Actualizar index.html
This commit is contained in:
131
index.html
131
index.html
@@ -9,7 +9,6 @@
|
|||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background-color: #f4f7f9;
|
background-color: #f4f7f9;
|
||||||
/* Patrón de fondo muy sutil */
|
|
||||||
background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
|
background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
|
||||||
background-size: 24px 24px;
|
background-size: 24px 24px;
|
||||||
}
|
}
|
||||||
@@ -65,30 +64,55 @@
|
|||||||
|
|
||||||
<div class="px-5 flex-1 flex flex-col gap-6 fade-in" style="animation-delay: 0.2s;">
|
<div class="px-5 flex-1 flex flex-col gap-6 fade-in" style="animation-delay: 0.2s;">
|
||||||
|
|
||||||
<div class="bg-white/80 backdrop-blur-xl p-7 rounded-[2.5rem] shadow-xl shadow-slate-200/40 border border-white">
|
<h2 class="text-3xl font-black text-slate-800 tracking-tight">Hola, <span id="clientName" class="text-blue-600">Cliente</span></h2>
|
||||||
<h2 class="text-3xl font-black text-slate-800 mb-1 tracking-tight">Hola, <span id="clientName" class="text-blue-600">Cliente</span></h2>
|
|
||||||
|
|
||||||
<div id="activeServicesContainer" class="mt-6 space-y-6">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="noActiveServices" class="hidden text-center mt-6 pt-6 border-t border-slate-100">
|
<div id="mainServiceHeader" class="bg-white/80 backdrop-blur-xl p-6 rounded-[2rem] shadow-xl shadow-slate-200/40 border border-white space-y-5 hidden">
|
||||||
<div class="w-16 h-16 bg-slate-100 text-slate-400 rounded-full flex items-center justify-center mx-auto mb-4">
|
<div>
|
||||||
<i data-lucide="check-circle" class="w-8 h-8"></i>
|
<p class="text-[10px] font-black text-slate-400 uppercase tracking-widest mb-1">Motivo de la Visita</p>
|
||||||
|
<h3 id="mainServiceDesc" class="font-black text-slate-800 text-sm leading-snug"></h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-col gap-3 pt-4 border-t border-slate-100">
|
||||||
|
<div class="flex items-center gap-3">
|
||||||
|
<div class="w-8 h-8 bg-slate-50 rounded-full flex items-center justify-center text-slate-400 shrink-0 shadow-sm border border-slate-100"><i data-lucide="map-pin" class="w-4 h-4"></i></div>
|
||||||
|
<p id="mainServiceAddress" class="text-xs font-bold text-slate-600 leading-tight uppercase"></p>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="text-lg font-black text-slate-800 tracking-tight">Todo al día</h3>
|
<div class="flex items-center gap-3">
|
||||||
<p class="text-xs text-slate-500 font-medium mt-2 mb-6">No tienes averías ni servicios activos en este momento con nosotros.</p>
|
<div class="w-8 h-8 bg-slate-50 rounded-full flex items-center justify-center text-slate-400 shrink-0 shadow-sm border border-slate-100"><i data-lucide="phone" class="w-4 h-4"></i></div>
|
||||||
|
<p id="mainServicePhone" class="text-xs font-bold text-slate-600"></p>
|
||||||
<div class="bg-blue-50 border border-blue-100 p-5 rounded-2xl text-left">
|
|
||||||
<h4 class="text-xs font-black text-blue-800 uppercase tracking-widest mb-1">¿Nueva Avería?</h4>
|
|
||||||
<p class="text-[10px] text-blue-600 font-bold mb-4">Si necesitas un nuevo servicio de forma particular (fuera de seguro), puedes solicitarlo aquí. <br><br>⚠️ <i>Si es un siniestro del seguro, debes llamarles a ellos primero.</i></p>
|
|
||||||
<button onclick="requestNewService()" class="w-full bg-blue-600 text-white font-black py-3 rounded-xl shadow-lg hover:bg-blue-700 transition-colors uppercase tracking-widest text-[10px]">
|
|
||||||
Solicitar Servicio Particular
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="contactButtons" class="grid grid-cols-2 gap-3 pt-4 border-t border-slate-100 hidden">
|
||||||
|
<button onclick="alert('Llamando al técnico (Próximamente conectaremos su número)')" class="bg-blue-50 border border-blue-100 text-blue-600 font-black py-3 rounded-xl hover:bg-blue-100 flex items-center justify-center gap-2 transition-all active:scale-95 shadow-sm">
|
||||||
|
<i data-lucide="phone" class="w-4 h-4"></i> <span class="text-[10px] uppercase tracking-widest">Llamar</span>
|
||||||
|
</button>
|
||||||
|
<button onclick="alert('Abriendo WhatsApp del técnico (Próximamente conectaremos su número)')" class="bg-emerald-50 border border-emerald-100 text-emerald-600 font-black py-3 rounded-xl hover:bg-emerald-100 flex items-center justify-center gap-2 transition-all active:scale-95 shadow-sm">
|
||||||
|
<i data-lucide="message-circle" class="w-4 h-4"></i> <span class="text-[10px] uppercase tracking-widest">WhatsApp</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="activeServicesContainer" class="space-y-6">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="noActiveServices" class="hidden text-center mt-2 p-6 bg-white/80 backdrop-blur-xl rounded-[2.5rem] shadow-xl shadow-slate-200/40 border border-white">
|
||||||
|
<div class="w-16 h-16 bg-slate-100 text-slate-400 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||||
|
<i data-lucide="check-circle" class="w-8 h-8"></i>
|
||||||
|
</div>
|
||||||
|
<h3 class="text-lg font-black text-slate-800 tracking-tight">Todo al día</h3>
|
||||||
|
<p class="text-xs text-slate-500 font-medium mt-2 mb-6">No tienes averías ni servicios activos en este momento con nosotros.</p>
|
||||||
|
|
||||||
|
<div class="bg-blue-50 border border-blue-100 p-5 rounded-2xl text-left">
|
||||||
|
<h4 class="text-xs font-black text-blue-800 uppercase tracking-widest mb-1">¿Nueva Avería?</h4>
|
||||||
|
<p class="text-[10px] text-blue-600 font-bold mb-4">Si necesitas un nuevo servicio de forma particular (fuera de seguro), puedes solicitarlo aquí. <br><br>⚠️ <i>Si es un siniestro del seguro, debes llamarles a ellos primero.</i></p>
|
||||||
|
<button onclick="requestNewService()" class="w-full bg-blue-600 text-white font-black py-3 rounded-xl shadow-lg hover:bg-blue-700 transition-colors uppercase tracking-widest text-[10px]">
|
||||||
|
Solicitar Servicio Particular
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="historyContainerWrapper" class="hidden">
|
<div id="historyContainerWrapper" class="hidden mt-4">
|
||||||
<h3 class="text-xs font-black text-slate-400 uppercase tracking-widest mb-3 ml-2">Historial de Expedientes</h3>
|
<h3 class="text-xs font-black text-slate-400 uppercase tracking-widest mb-3 ml-2">Historial de Expedientes</h3>
|
||||||
<div id="historyServicesContainer" class="space-y-4">
|
<div id="historyServicesContainer" class="space-y-4">
|
||||||
</div>
|
</div>
|
||||||
@@ -142,10 +166,7 @@
|
|||||||
function summarizeDescription(rawText) {
|
function summarizeDescription(rawText) {
|
||||||
if (!rawText) return "Avería reportada.";
|
if (!rawText) return "Avería reportada.";
|
||||||
|
|
||||||
// 1. Quitamos los saltos de línea
|
|
||||||
let text = rawText.replace(/\n/g, ' ');
|
let text = rawText.replace(/\n/g, ' ');
|
||||||
|
|
||||||
// 2. Cortamos el texto justo antes de donde empieza la basura habitual de los seguros
|
|
||||||
const regexCorte = /(\(|\bM\.O\b|\bMATERIAL\b|\bASEGURADO\b|\bTELEFONO\b|\bURGENTE\b)/i;
|
const regexCorte = /(\(|\bM\.O\b|\bMATERIAL\b|\bASEGURADO\b|\bTELEFONO\b|\bURGENTE\b)/i;
|
||||||
let cutPos = text.search(regexCorte);
|
let cutPos = text.search(regexCorte);
|
||||||
|
|
||||||
@@ -153,13 +174,9 @@
|
|||||||
text = text.substring(0, cutPos);
|
text = text.substring(0, cutPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Limpiamos espacios extra
|
|
||||||
text = text.trim();
|
text = text.trim();
|
||||||
|
|
||||||
// 4. Lo pasamos a formato "Capitalizado"
|
|
||||||
text = text.charAt(0).toUpperCase() + text.slice(1).toLowerCase();
|
text = text.charAt(0).toUpperCase() + text.slice(1).toLowerCase();
|
||||||
|
|
||||||
// 5. Cogemos solo las primeras 8-10 palabras para que quede bonito
|
|
||||||
let words = text.split(/\s+/);
|
let words = text.split(/\s+/);
|
||||||
if (words.length > 10) {
|
if (words.length > 10) {
|
||||||
return words.slice(0, 10).join(" ") + "...";
|
return words.slice(0, 10).join(" ") + "...";
|
||||||
@@ -203,22 +220,36 @@
|
|||||||
const historyContainer = document.getElementById('historyServicesContainer');
|
const historyContainer = document.getElementById('historyServicesContainer');
|
||||||
const historyWrapper = document.getElementById('historyContainerWrapper');
|
const historyWrapper = document.getElementById('historyContainerWrapper');
|
||||||
const noActiveDiv = document.getElementById('noActiveServices');
|
const noActiveDiv = document.getElementById('noActiveServices');
|
||||||
|
const headerCard = document.getElementById('mainServiceHeader');
|
||||||
|
|
||||||
activeContainer.innerHTML = '';
|
activeContainer.innerHTML = '';
|
||||||
historyContainer.innerHTML = '';
|
historyContainer.innerHTML = '';
|
||||||
|
|
||||||
let hasActive = false;
|
let hasActive = false;
|
||||||
let hasHistory = false;
|
let hasHistory = false;
|
||||||
|
let firstActiveRendered = false;
|
||||||
|
|
||||||
allServices.forEach(srv => {
|
allServices.forEach(srv => {
|
||||||
const isFinalized = srv.status_name === 'Terminado';
|
const isFinalized = srv.status_name === 'Terminado';
|
||||||
const isPendingWorker = (!srv.assigned_worker || srv.assigned_worker === 'Pendiente');
|
const isPendingWorker = (!srv.assigned_worker || srv.assigned_worker === 'Pendiente');
|
||||||
|
|
||||||
// Procesamos la descripción con la "mini-IA"
|
|
||||||
const descLimpia = summarizeDescription(srv.description);
|
const descLimpia = summarizeDescription(srv.description);
|
||||||
|
|
||||||
let statusHtml = '';
|
let statusHtml = '';
|
||||||
|
|
||||||
|
// SI ES EL PRIMER SERVICIO ACTIVO, RELLENAMOS LA FICHA SUPERIOR
|
||||||
|
if (!isFinalized && !firstActiveRendered) {
|
||||||
|
headerCard.classList.remove('hidden');
|
||||||
|
document.getElementById('mainServiceDesc').innerText = descLimpia;
|
||||||
|
document.getElementById('mainServiceAddress').innerText = client.addresses[0] || "Dirección no especificada";
|
||||||
|
document.getElementById('mainServicePhone').innerText = client.phone;
|
||||||
|
|
||||||
|
if (!isPendingWorker) {
|
||||||
|
document.getElementById('contactButtons').classList.remove('hidden');
|
||||||
|
} else {
|
||||||
|
document.getElementById('contactButtons').classList.add('hidden');
|
||||||
|
}
|
||||||
|
firstActiveRendered = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (isFinalized) {
|
if (isFinalized) {
|
||||||
// MODO HISTORIAL (Gris y apagado)
|
// MODO HISTORIAL (Gris y apagado)
|
||||||
statusHtml = `
|
statusHtml = `
|
||||||
@@ -228,9 +259,9 @@
|
|||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
} else if (isPendingWorker) {
|
} else if (isPendingWorker) {
|
||||||
// MODO 1: AÚN NO HAY TÉCNICO - AHORA CON DISEÑO AZUL Y BONITO
|
// MODO 1: AÚN NO HAY TÉCNICO (Botón de agendar bloqueado)
|
||||||
statusHtml = `
|
statusHtml = `
|
||||||
<div class="bg-blue-50/50 border border-blue-100 p-6 rounded-2xl text-center">
|
<div class="bg-blue-50/50 border border-blue-100 p-6 rounded-3xl text-center">
|
||||||
<div class="w-12 h-12 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center mx-auto mb-3 relative">
|
<div class="w-12 h-12 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center mx-auto mb-3 relative">
|
||||||
<span class="absolute inset-0 bg-blue-200 rounded-full animate-ping opacity-50"></span>
|
<span class="absolute inset-0 bg-blue-200 rounded-full animate-ping opacity-50"></span>
|
||||||
<i data-lucide="search" class="w-6 h-6 relative z-10"></i>
|
<i data-lucide="search" class="w-6 h-6 relative z-10"></i>
|
||||||
@@ -243,7 +274,7 @@
|
|||||||
} else if (srv.appointment_status === 'pending') {
|
} else if (srv.appointment_status === 'pending') {
|
||||||
// MODO 2: PENDIENTE DE ACEPTACIÓN POR LA OFICINA
|
// MODO 2: PENDIENTE DE ACEPTACIÓN POR LA OFICINA
|
||||||
statusHtml = `
|
statusHtml = `
|
||||||
<div class="bg-amber-50 border border-amber-200 p-5 rounded-2xl text-center shadow-inner">
|
<div class="bg-amber-50 border border-amber-200 p-5 rounded-3xl text-center shadow-inner">
|
||||||
<div class="w-10 h-10 bg-amber-100 text-amber-600 rounded-full flex items-center justify-center mx-auto mb-3 relative">
|
<div class="w-10 h-10 bg-amber-100 text-amber-600 rounded-full flex items-center justify-center mx-auto mb-3 relative">
|
||||||
<span class="absolute inset-0 bg-amber-200 rounded-full animate-ping opacity-50"></span>
|
<span class="absolute inset-0 bg-amber-200 rounded-full animate-ping opacity-50"></span>
|
||||||
<i data-lucide="clock" class="w-5 h-5 relative z-10"></i>
|
<i data-lucide="clock" class="w-5 h-5 relative z-10"></i>
|
||||||
@@ -253,11 +284,11 @@
|
|||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
} else if (srv.status_name === 'Visita Agendada' || (srv.scheduled_date && srv.scheduled_time)) {
|
} else if (srv.status_name === 'Visita Agendada' || (srv.scheduled_date && srv.scheduled_time)) {
|
||||||
// MODO 3: CITA CONFIRMADA (FRANJA DE 1 HORA)
|
// MODO 3: CITA CONFIRMADA
|
||||||
const endT = addOneHour(srv.scheduled_time);
|
const endT = addOneHour(srv.scheduled_time);
|
||||||
statusHtml = `
|
statusHtml = `
|
||||||
<div class="bg-gradient-to-br from-emerald-400 to-emerald-600 p-5 rounded-2xl flex items-center gap-4 text-white shadow-lg shadow-emerald-500/30 relative overflow-hidden">
|
<div class="bg-gradient-to-br from-emerald-400 to-emerald-600 p-5 rounded-3xl flex items-center gap-4 text-white shadow-lg shadow-emerald-500/30 relative overflow-hidden">
|
||||||
<div class="w-12 h-12 bg-white/20 rounded-xl flex items-center justify-center backdrop-blur-md border border-white/30 shrink-0 relative z-10">
|
<div class="w-12 h-12 bg-white/20 rounded-2xl flex items-center justify-center backdrop-blur-md border border-white/30 shrink-0 relative z-10">
|
||||||
<i data-lucide="calendar-check" class="w-6 h-6 text-white"></i>
|
<i data-lucide="calendar-check" class="w-6 h-6 text-white"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="relative z-10">
|
<div class="relative z-10">
|
||||||
@@ -268,9 +299,9 @@
|
|||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
} else if (srv.status_name === 'Técnico de Camino') {
|
} else if (srv.status_name === 'Técnico de Camino') {
|
||||||
// MODO 5: DE CAMINO (MAPA PLACEHOLDER)
|
// MODO 5: DE CAMINO
|
||||||
statusHtml = `
|
statusHtml = `
|
||||||
<div class="bg-indigo-50 border border-indigo-200 p-5 rounded-2xl relative overflow-hidden shadow-inner">
|
<div class="bg-indigo-50 border border-indigo-200 p-5 rounded-3xl relative overflow-hidden shadow-inner">
|
||||||
<div class="flex items-center gap-3 mb-4 relative z-10">
|
<div class="flex items-center gap-3 mb-4 relative z-10">
|
||||||
<div class="w-10 h-10 bg-indigo-500 text-white rounded-full flex items-center justify-center shadow-md animate-bounce">
|
<div class="w-10 h-10 bg-indigo-500 text-white rounded-full flex items-center justify-center shadow-md animate-bounce">
|
||||||
<i data-lucide="truck" class="w-5 h-5"></i>
|
<i data-lucide="truck" class="w-5 h-5"></i>
|
||||||
@@ -280,7 +311,7 @@
|
|||||||
<p class="text-[10px] text-indigo-600 font-bold mt-1">Llegando en breves momentos a tu domicilio.</p>
|
<p class="text-[10px] text-indigo-600 font-bold mt-1">Llegando en breves momentos a tu domicilio.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full h-24 bg-indigo-100 rounded-xl border border-indigo-200 border-dashed flex items-center justify-center text-indigo-300 relative z-10">
|
<div class="w-full h-24 bg-indigo-100 rounded-2xl border border-indigo-200 border-dashed flex items-center justify-center text-indigo-300 relative z-10">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<i data-lucide="map" class="w-6 h-6 mx-auto mb-1 opacity-50"></i>
|
<i data-lucide="map" class="w-6 h-6 mx-auto mb-1 opacity-50"></i>
|
||||||
<p class="text-[8px] font-black uppercase tracking-widest mt-1">Señal GPS Próximamente</p>
|
<p class="text-[8px] font-black uppercase tracking-widest mt-1">Señal GPS Próximamente</p>
|
||||||
@@ -291,8 +322,8 @@
|
|||||||
} else if (srv.status_name === 'En Reparación') {
|
} else if (srv.status_name === 'En Reparación') {
|
||||||
// MODO 8: TRABAJANDO
|
// MODO 8: TRABAJANDO
|
||||||
statusHtml = `
|
statusHtml = `
|
||||||
<div class="bg-orange-50 border border-orange-200 p-5 rounded-2xl flex items-center gap-4 shadow-inner">
|
<div class="bg-orange-50 border border-orange-200 p-5 rounded-3xl flex items-center gap-4 shadow-inner">
|
||||||
<div class="w-12 h-12 bg-orange-500 text-white rounded-xl flex items-center justify-center shadow-md shrink-0">
|
<div class="w-12 h-12 bg-orange-500 text-white rounded-2xl flex items-center justify-center shadow-md shrink-0">
|
||||||
<i data-lucide="hammer" class="w-6 h-6"></i>
|
<i data-lucide="hammer" class="w-6 h-6"></i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -304,8 +335,8 @@
|
|||||||
} else if (srv.status_name === 'Pausado / Incidencia') {
|
} else if (srv.status_name === 'Pausado / Incidencia') {
|
||||||
// MODO 6: INCIDENCIA
|
// MODO 6: INCIDENCIA
|
||||||
statusHtml = `
|
statusHtml = `
|
||||||
<div class="bg-red-50 border border-red-200 p-5 rounded-2xl flex items-center gap-4 shadow-inner">
|
<div class="bg-red-50 border border-red-200 p-5 rounded-3xl flex items-center gap-4 shadow-inner">
|
||||||
<div class="w-12 h-12 bg-red-500 text-white rounded-xl flex items-center justify-center shadow-md shrink-0">
|
<div class="w-12 h-12 bg-red-500 text-white rounded-2xl flex items-center justify-center shadow-md shrink-0">
|
||||||
<i data-lucide="alert-triangle" class="w-6 h-6"></i>
|
<i data-lucide="alert-triangle" class="w-6 h-6"></i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -317,7 +348,7 @@
|
|||||||
} else {
|
} else {
|
||||||
// MODO 4: PENDIENTE DE CITA NORMAL (Tiene técnico, no tiene cita)
|
// MODO 4: PENDIENTE DE CITA NORMAL (Tiene técnico, no tiene cita)
|
||||||
statusHtml = `
|
statusHtml = `
|
||||||
<div class="bg-blue-50/50 border border-blue-100 p-6 rounded-2xl text-center">
|
<div class="bg-blue-50/50 border border-blue-100 p-6 rounded-3xl text-center">
|
||||||
<div class="w-12 h-12 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center mx-auto mb-3 relative">
|
<div class="w-12 h-12 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center mx-auto mb-3 relative">
|
||||||
<span class="absolute inset-0 bg-blue-200 rounded-full animate-ping opacity-50"></span>
|
<span class="absolute inset-0 bg-blue-200 rounded-full animate-ping opacity-50"></span>
|
||||||
<i data-lucide="calendar-clock" class="w-6 h-6 relative z-10"></i>
|
<i data-lucide="calendar-clock" class="w-6 h-6 relative z-10"></i>
|
||||||
@@ -325,21 +356,19 @@
|
|||||||
<h4 class="font-black text-slate-800 uppercase text-base leading-tight tracking-tight">Pendiente de Cita</h4>
|
<h4 class="font-black text-slate-800 uppercase text-base leading-tight tracking-tight">Pendiente de Cita</h4>
|
||||||
<p class="text-[10px] text-slate-500 font-medium mt-1 mb-4">El técnico necesita saber cuándo puede pasar por tu domicilio para la reparación.</p>
|
<p class="text-[10px] text-slate-500 font-medium mt-1 mb-4">El técnico necesita saber cuándo puede pasar por tu domicilio para la reparación.</p>
|
||||||
|
|
||||||
<button onclick="startBooking('${srv.id}')" class="w-full bg-blue-600 text-white font-black py-3.5 rounded-xl shadow-lg shadow-blue-600/30 hover:bg-blue-700 transition-all active:scale-95 flex justify-center items-center gap-2 uppercase tracking-widest text-[10px]">
|
<button onclick="startBooking('${srv.id}')" class="w-full bg-blue-600 text-white font-black py-3.5 rounded-2xl shadow-lg shadow-blue-600/30 hover:bg-blue-700 transition-all active:scale-95 flex justify-center items-center gap-2 uppercase tracking-widest text-[10px]">
|
||||||
Agendar Visita Ahora <i data-lucide="arrow-right" class="w-3.5 h-3.5"></i>
|
Agendar Visita Ahora <i data-lucide="arrow-right" class="w-3.5 h-3.5"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ESTRUCTURA DE LA TARJETA DEL EXPEDIENTE
|
// ESTRUCTURA DE LA TARJETA DEL EXPEDIENTE (SOLO MUESTRA INFO DE GESTIÓN Y ESTADO)
|
||||||
const cardHtml = `
|
const cardHtml = `
|
||||||
<div class="bg-white border ${isFinalized ? 'border-slate-100' : 'border-slate-200 shadow-md'} rounded-3xl p-5 mb-4 relative overflow-hidden">
|
<div class="bg-white/80 backdrop-blur-xl border ${isFinalized ? 'border-slate-100' : 'border-white shadow-xl shadow-slate-200/40'} rounded-[2.5rem] p-5 mb-4 relative overflow-hidden">
|
||||||
|
<div class="flex justify-between items-start mb-4">
|
||||||
<div class="flex justify-between items-start mb-3">
|
|
||||||
<div class="pr-2">
|
<div class="pr-2">
|
||||||
<span class="text-[9px] font-black text-slate-400 uppercase tracking-widest">${srv.title}</span>
|
<span class="text-[9px] font-black text-slate-400 uppercase tracking-widest">Exp. #${srv.title.replace('Expediente #', '').replace('🚨 URGENTE: ', '')}</span>
|
||||||
<h3 class="font-black text-slate-800 text-sm mt-0.5 leading-tight">${descLimpia}</h3>
|
|
||||||
</div>
|
</div>
|
||||||
${srv.assigned_worker && srv.assigned_worker !== 'Pendiente' ?
|
${srv.assigned_worker && srv.assigned_worker !== 'Pendiente' ?
|
||||||
`<div class="bg-slate-50 border border-slate-100 px-2 py-1 rounded-md text-center shrink-0">
|
`<div class="bg-slate-50 border border-slate-100 px-2 py-1 rounded-md text-center shrink-0">
|
||||||
@@ -348,7 +377,6 @@
|
|||||||
</div>` : ''
|
</div>` : ''
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
${statusHtml}
|
${statusHtml}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
@@ -365,6 +393,7 @@
|
|||||||
// GESTIÓN DE VISIBILIDAD DE CONTENEDORES
|
// GESTIÓN DE VISIBILIDAD DE CONTENEDORES
|
||||||
if (!hasActive) {
|
if (!hasActive) {
|
||||||
activeContainer.classList.add('hidden');
|
activeContainer.classList.add('hidden');
|
||||||
|
headerCard.classList.add('hidden');
|
||||||
noActiveDiv.classList.remove('hidden');
|
noActiveDiv.classList.remove('hidden');
|
||||||
} else {
|
} else {
|
||||||
activeContainer.classList.remove('hidden');
|
activeContainer.classList.remove('hidden');
|
||||||
|
|||||||
Reference in New Issue
Block a user