diff --git a/asignados.html b/asignados.html index 62ef761..4638a1d 100644 --- a/asignados.html +++ b/asignados.html @@ -346,25 +346,48 @@ const raw = req.raw_data || {}; const name = raw["Nombre Cliente"] || raw["CLIENTE"] || "Cliente"; const rDate = formatDate(raw.requested_date); - const rTime = addOneHour(raw.requested_time); // Calculamos el tramo para mostrarlo + const rTime = addOneHour(raw.requested_time); + + // Extraer descripción limpia y teléfono + const desc = raw["Descripción"] || raw["DESCRIPCION"] || "Sin notas de avería."; + const rawPhone = raw["Teléfono"] || raw["TELEFONOS"] || raw["TELEFONO"] || ""; + const matchPhone = rawPhone.toString().match(/[6789]\d{8}/); + const safePhone = matchPhone ? matchPhone[0] : ""; reqList.innerHTML += ` -
-
-
+
+
+ +

Cita Solicitada

-

${name}

-

${rDate} | ${raw.requested_time} - ${rTime}

+

${name}

+

${rDate} | ${raw.requested_time} - ${rTime}

+
+ +
+

${desc}

+
+ +
+ +
-
`; }); lucide.createIcons(); } + // Helper rápido para el botón de llamada + function quickCallInline(phone) { + if (phone) window.location.href = `tel:+34${phone}`; + else alert("No hay un teléfono válido guardado para este cliente."); + } + function openApproveModal(id) { const req = pendingRequests.find(r => r.id === id); if(!req) return;