Autosave: 20260430-180545
This commit is contained in:
parent
b7f5f0e7d2
commit
62877072fb
BIN
assets/pasted-20260430-180021-d1e90ce2.png
Normal file
BIN
assets/pasted-20260430-180021-d1e90ce2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
BIN
assets/uploads/vouchers/69f387360514b-741.png
Normal file
BIN
assets/uploads/vouchers/69f387360514b-741.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 394 KiB |
BIN
assets/uploads/vouchers/69f38a73c80c9-Screenshot_276.png
Normal file
BIN
assets/uploads/vouchers/69f38a73c80c9-Screenshot_276.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 478 KiB |
@ -264,6 +264,7 @@ include 'layout_header.php';
|
||||
?>
|
||||
<div class="mt-1">
|
||||
<button type="button" class="btn btn-sm btn-info" title="Consultar Estado" data-bs-toggle="modal" data-bs-target="#trackingModal" data-order-number="<?php echo htmlspecialchars($pedido['codigo_rastreo'] ?? 'N/A'); ?>" data-order-code="<?php echo htmlspecialchars($pedido['codigo_tracking'] ?? 'N/A'); ?>">🔍</button>
|
||||
<a href="https://rastrea.shalom.pe/rastrea" target="_blank" class="btn btn-sm btn-primary" title="Rastreo Shalom">🚚</a>
|
||||
<a href="<?php echo $whatsappUrl; ?>" target="_blank" class="btn btn-sm btn-secondary whatsapp-icon" id="whatsapp-icon-<?php echo $pedido['id']; ?>" title="Enviar WhatsApp">💬</a>
|
||||
</div>
|
||||
</td>
|
||||
@ -375,7 +376,131 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
const statusData = data.statuses.data;
|
||||
const statusMessage = data.statuses.message || 'No disponible';
|
||||
|
||||
let html = `<div class="alert alert-info text-center"><h5 class="alert-heading mb-0">Estado: ${statusMessage}</h5></div>`;
|
||||
let statusIcon = '';
|
||||
let statusColor = '#003399';
|
||||
let statusBg = '#fff9e6'; // Light yellow background
|
||||
|
||||
const upperStatus = statusMessage.toUpperCase();
|
||||
if (upperStatus.includes('ENTREGADO')) {
|
||||
statusColor = '#198754';
|
||||
statusBg = '#e9f7ef';
|
||||
statusIcon = `
|
||||
<svg width="140" height="140" viewBox="0 0 140 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="70" cy="70" r="65" fill="#198754" fill-opacity="0.1" stroke="#198754" stroke-width="2"/>
|
||||
<!-- Box -->
|
||||
<g transform="translate(40, 60)">
|
||||
<path d="M0 10L30 20V50L0 40V10Z" fill="#e30613"/>
|
||||
<path d="M30 20L60 10V40L30 50V20Z" fill="#b90510"/>
|
||||
<path d="M0 10L30 0L60 10L30 20L0 10Z" fill="#f14b55"/>
|
||||
<text x="5" y="35" fill="white" font-family="Arial Black, sans-serif" font-weight="900" font-style="italic" font-size="7" transform="skewY(15)">SHALOM</text>
|
||||
</g>
|
||||
<!-- Checkmark -->
|
||||
<circle cx="100" cy="40" r="25" fill="#198754"/>
|
||||
<path d="M88 40L96 48L112 32" stroke="white" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>`;
|
||||
} else if (upperStatus.includes('DESTINO')) {
|
||||
statusColor = '#003399';
|
||||
statusBg = '#eef2ff';
|
||||
statusIcon = `
|
||||
<svg width="140" height="140" viewBox="0 0 140 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<!-- Dashed Path -->
|
||||
<path d="M30 60C40 60 45 90 65 90C85 90 90 60 100 60" stroke="#cbd5e1" stroke-width="3" stroke-dasharray="6 6" />
|
||||
|
||||
<!-- Small Pin -->
|
||||
<g transform="translate(22, 45) scale(0.6)">
|
||||
<path d="M12 0C5.37 0 0 5.37 0 12C0 21 12 34 12 34C12 34 24 21 24 12C24 5.37 18.63 0 12 0Z" fill="#1e293b"/>
|
||||
<circle cx="12" cy="12" r="4" fill="white"/>
|
||||
</g>
|
||||
|
||||
<!-- Box -->
|
||||
<g transform="translate(45, 75)">
|
||||
<!-- Front Face -->
|
||||
<path d="M0 15L35 25V55L0 45V15Z" fill="#e30613"/>
|
||||
<!-- Right Face -->
|
||||
<path d="M35 25L60 15V45L35 55V25Z" fill="#b90510"/>
|
||||
<!-- Top Face -->
|
||||
<path d="M0 15L25 5L60 15L35 25L0 15Z" fill="#f14b55"/>
|
||||
<!-- White Stripe -->
|
||||
<path d="M12 10L30 16L50 10L32 4L12 10Z" fill="white"/>
|
||||
<!-- Shalom Text -->
|
||||
<text x="4" y="40" fill="white" font-family="Arial Black, sans-serif" font-weight="900" font-style="italic" font-size="7" transform="skewY(15)">SHALOM</text>
|
||||
</g>
|
||||
|
||||
<!-- Large Pin -->
|
||||
<g transform="translate(70, 30)">
|
||||
<path d="M20 0C8.95 0 0 8.95 0 20C0 35 20 55 20 55C20 55 40 35 40 20C40 8.95 31.05 0 20 0Z" fill="#003399"/>
|
||||
<circle cx="20" cy="20" r="8" fill="white"/>
|
||||
</g>
|
||||
</svg>`;
|
||||
} else if (upperStatus.includes('TRANSITO') || upperStatus.includes('TRÁNSITO')) {
|
||||
statusColor = '#ffc107';
|
||||
statusBg = '#fff9e6';
|
||||
statusIcon = `
|
||||
<svg width="140" height="140" viewBox="0 0 140 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="70" cy="70" r="65" fill="#ffc107" fill-opacity="0.1" stroke="#ffc107" stroke-width="2"/>
|
||||
<!-- Road -->
|
||||
<path d="M20 105H120" stroke="#6c757d" stroke-width="4" stroke-linecap="round" stroke-dasharray="8 8"/>
|
||||
<!-- Truck Body -->
|
||||
<rect x="30" y="55" width="60" height="40" rx="2" fill="#003399"/>
|
||||
<!-- Truck Cabin -->
|
||||
<path d="M90 65H105L115 80V95H90V65Z" fill="#003399"/>
|
||||
<!-- Window -->
|
||||
<path d="M95 70H103L108 80H95V70Z" fill="#eef2ff"/>
|
||||
<!-- Wheels -->
|
||||
<circle cx="45" cy="100" r="8" fill="#1e293b"/>
|
||||
<circle cx="45" cy="100" r="4" fill="#94a3b8"/>
|
||||
<circle cx="75" cy="100" r="8" fill="#1e293b"/>
|
||||
<circle cx="75" cy="100" r="4" fill="#94a3b8"/>
|
||||
<circle cx="105" cy="100" r="8" fill="#1e293b"/>
|
||||
<circle cx="105" cy="100" r="4" fill="#94a3b8"/>
|
||||
<!-- Shalom Text on Truck -->
|
||||
<text x="35" y="80" fill="white" font-family="Arial Black, sans-serif" font-weight="900" font-style="italic" font-size="8">SHALOM</text>
|
||||
<!-- Speed lines -->
|
||||
<path d="M10 65H25M5 75H20M10 85H25" stroke="#ffc107" stroke-width="3" stroke-linecap="round"/>
|
||||
</svg>`;
|
||||
} else if (upperStatus.includes('ORIGEN')) {
|
||||
statusColor = '#6c757d';
|
||||
statusBg = '#f8f9fa';
|
||||
statusIcon = `
|
||||
<svg width="140" height="140" viewBox="0 0 140 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="70" cy="70" r="65" fill="#6c757d" fill-opacity="0.1" stroke="#6c757d" stroke-width="2"/>
|
||||
<!-- Warehouse -->
|
||||
<path d="M30 100V50L70 30L110 50V100H30Z" fill="#6c757d"/>
|
||||
<path d="M40 100V60H60V100H40Z" fill="white"/>
|
||||
<path d="M80 100V60H100V100H80Z" fill="white"/>
|
||||
<path d="M70 30L110 50L120 45L70 20L20 45L30 50L70 30Z" fill="#495057"/>
|
||||
<!-- Shalom Text -->
|
||||
<text x="45" y="90" fill="white" font-family="Arial Black, sans-serif" font-weight="900" font-style="italic" font-size="8">SHALOM</text>
|
||||
</svg>`;
|
||||
} else {
|
||||
statusIcon = `
|
||||
<svg width="140" height="140" viewBox="0 0 140 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="70" cy="70" r="65" fill="#0dcaf0" fill-opacity="0.1" stroke="#0dcaf0" stroke-width="2"/>
|
||||
<!-- Box -->
|
||||
<g transform="translate(40, 60)">
|
||||
<path d="M0 10L30 20V50L0 40V10Z" fill="#e30613"/>
|
||||
<path d="M30 20L60 10V40L30 50V20Z" fill="#b90510"/>
|
||||
<path d="M0 10L30 0L60 10L30 20L0 10Z" fill="#f14b55"/>
|
||||
<text x="5" y="35" fill="white" font-family="Arial Black, sans-serif" font-weight="900" font-style="italic" font-size="7" transform="skewY(15)">SHALOM</text>
|
||||
</g>
|
||||
</svg>`;
|
||||
}
|
||||
|
||||
let html = `
|
||||
<div id="status-capture-area" class="text-center mb-4 p-4" style="background: ${statusBg}; border-radius: 20px; border: 3px solid ${statusColor}; box-shadow: 0 10px 20px rgba(0,0,0,0.1);">
|
||||
<div class="mb-3">${statusIcon}</div>
|
||||
<h1 class="mt-2" style="color: ${statusColor}; font-weight: 900; text-transform: uppercase; letter-spacing: 1px;">${statusMessage}</h1>
|
||||
<div class="badge bg-dark px-3 py-2 mt-2" style="font-size: 1rem;">Guía: ${orderNumber}</div>
|
||||
<hr style="border-top: 2px dashed ${statusColor}; opacity: 0.3;">
|
||||
<p class="mb-0" style="font-weight: bold; color: #555;">Destino: ${searchData.destino.nombre}</p>
|
||||
<p class="text-muted small">Consulta realizada: ${new Date().toLocaleString('es-PE')}</p>
|
||||
</div>
|
||||
<div class="d-grid gap-2 mb-3">
|
||||
<button class="btn btn-success" onclick="copyStatusToClipboard('${statusMessage}', '${orderNumber}', '${searchData.destino.nombre}')">
|
||||
<i class="fab fa-whatsapp"></i> Copiar Resumen para Cliente
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
|
||||
const timeline = [
|
||||
{ name: 'Registrado', data: statusData.registrado },
|
||||
@ -493,4 +618,18 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
verifyButton.addEventListener('click', verificarEstados);
|
||||
}
|
||||
});
|
||||
|
||||
function copyStatusToClipboard(status, order, destination) {
|
||||
const text = `📦 *Estado de tu pedido Shalom*\n\n` +
|
||||
`🔖 *Nro de Orden:* ${order}\n` +
|
||||
`📍 *Destino:* ${destination}\n` +
|
||||
`🚚 *Estado:* ${status}\n\n` +
|
||||
`¡Tu pedido está en camino! Gracias por tu confianza. ✨`;
|
||||
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
alert('Resumen copiado al portapapeles. Ya puedes pegarlo en WhatsApp.');
|
||||
}).catch(err => {
|
||||
console.error('Error al copiar:', err);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
53
shalom_temp.html
Normal file
53
shalom_temp.html
Normal file
@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html translate="no" lang="es">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Shalom Envíos a todo el Perú</title>
|
||||
<meta name="description" content="Realizamos envíos de sobres, encomiendas, paquetería y carga a más de 250 destinos en todo el Perú y a más de 14 destinos aéreos ✈️ en agencias seleccionadas. Contamos con el servicio de última milla para estar más cerca de ti 🚚📦">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<script type="module" crossorigin src="/assets/index-7084d73f.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/index-7084d73f.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/vue-vendor-f32f8572.js">
|
||||
<link rel="stylesheet" href="/assets/index-21e5dea2.css">
|
||||
<link rel="stylesheet" href="/assets/vue-vendor-4d8e306f.css">
|
||||
<link rel="manifest" href="/manifest.webmanifest"></head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
function loadScript(a){
|
||||
var b=document.getElementsByTagName("head")[0],
|
||||
c=document.createElement("script");
|
||||
c.type="text/javascript";
|
||||
c.src="https://tracker.metricool.com/resources/be.js";
|
||||
c.onreadystatechange=a;
|
||||
c.onload=a;
|
||||
b.appendChild(c);
|
||||
}
|
||||
loadScript(function(){
|
||||
beTracker.t({hash:"c59f4ee07ee9bc00105b6104389a5c70"});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- Talkdesk Chat -->
|
||||
<script>
|
||||
(function () {
|
||||
let js = document.createElement('script');
|
||||
js.type = 'text/javascript';
|
||||
js.async = 1;
|
||||
js.src = 'https://go.botmaker.com/rest/webchat/p/1IFWAU5FRR/init.js';
|
||||
document.body.appendChild(js);
|
||||
})()
|
||||
</script>
|
||||
|
||||
<!-- Openpay / Izipay / Socket.io -->
|
||||
<script src="https://js.openpay.pe/openpay.v1.min.js"></script>
|
||||
<script src="https://js.openpay.pe/openpay-data.v1.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script>
|
||||
<script src="https://checkout.izipay.pe/payments/v1/js/index.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user