Actualizar proteccion.html

This commit is contained in:
2026-03-30 07:43:38 +00:00
parent d33ca33767
commit 58b3b749db

View File

@@ -3,13 +3,14 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Planes de Protección - Admin IntegraRepara</title>
<title>Planes de Protección - IntegraRepara</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap');
body { font-family: 'Inter', sans-serif; background-color: #f8fafc; }
body { font-family: 'Inter', sans-serif; }
.no-scrollbar::-webkit-scrollbar { display: none; }
/* Estilos para las pestañas */
.tab-btn.active {
background-color: white;
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
@@ -18,7 +19,7 @@
.tab-btn:not(.active) { color: #64748b; }
</style>
</head>
<body class="flex h-screen overflow-hidden">
<body class="bg-slate-50 flex h-screen overflow-hidden">
<div id="sidebar-container" class="h-full shrink-0"></div>
@@ -51,63 +52,33 @@
<div class="lg:col-span-1 space-y-6">
<div class="bg-white p-6 rounded-[2rem] shadow-sm border border-slate-100">
<h3 class="text-sm font-black text-slate-800 uppercase tracking-tight mb-4 flex items-center gap-2">
<i data-lucide="banknote" class="w-4 h-4 text-blue-600"></i> Precios y Tarifas
<i data-lucide="banknote" class="w-4 h-4 text-blue-600"></i> Tarifas
</h3>
<div class="space-y-4">
<div>
<label class="text-[10px] font-black text-slate-400 uppercase ml-1">Cuota Mensual (€)</label>
<input type="number" id="cfg-price-month" value="6.90" class="w-full px-4 py-3 bg-slate-50 border border-slate-100 rounded-xl font-bold text-slate-700 focus:ring-2 focus:ring-blue-500 outline-none">
<label class="text-[10px] font-black text-slate-400 uppercase ml-1">Mensual (€)</label>
<input type="number" id="cfg-price-month" value="6.90" class="w-full px-4 py-3 bg-slate-50 border border-slate-100 rounded-xl font-bold">
</div>
<div>
<label class="text-[10px] font-black text-slate-400 uppercase ml-1">Cuota Anual (€)</label>
<input type="number" id="cfg-price-year" value="59.95" class="w-full px-4 py-3 bg-slate-50 border border-slate-100 rounded-xl font-bold text-slate-700 focus:ring-2 focus:ring-blue-500 outline-none">
</div>
<div class="pt-2">
<label class="flex items-center gap-2 cursor-pointer">
<input type="checkbox" checked class="w-5 h-5 rounded border-slate-300 text-blue-600">
<span class="text-xs font-bold text-slate-600">IVA Incluido en el precio</span>
</label>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-[2rem] shadow-sm border border-slate-100">
<h3 class="text-sm font-black text-slate-800 uppercase tracking-tight mb-4 flex items-center gap-2">
<i data-lucide="settings-2" class="w-4 h-4 text-blue-600"></i> Parámetros del Plan
</h3>
<div class="space-y-4">
<div>
<label class="text-[10px] font-black text-slate-400 uppercase ml-1">Días de Carencia</label>
<input type="number" value="15" class="w-full px-4 py-3 bg-slate-50 border border-slate-100 rounded-xl font-bold text-slate-700">
</div>
<div>
<label class="text-[10px] font-black text-slate-400 uppercase ml-1">Urgencias/Año Incluidas</label>
<input type="number" value="2" class="w-full px-4 py-3 bg-slate-50 border border-slate-100 rounded-xl font-bold text-slate-700">
</div>
<div>
<label class="text-[10px] font-black text-slate-400 uppercase ml-1">Horas Manitas/Año</label>
<input type="number" value="2" class="w-full px-4 py-3 bg-slate-50 border border-slate-100 rounded-xl font-bold text-slate-700">
<label class="text-[10px] font-black text-slate-400 uppercase ml-1">Anual (€)</label>
<input type="number" id="cfg-price-year" value="59.95" class="w-full px-4 py-3 bg-slate-50 border border-slate-100 rounded-xl font-bold">
</div>
</div>
</div>
</div>
<div class="lg:col-span-2">
<div class="bg-white p-6 rounded-[2rem] shadow-sm border border-slate-100 h-full flex flex-col">
<h3 class="text-sm font-black text-slate-800 uppercase tracking-tight mb-4 flex items-center justify-between">
<span class="flex items-center gap-2"><i data-lucide="file-text" class="w-4 h-4 text-blue-600"></i> Texto Legal del Contrato</span>
<span class="text-[10px] text-slate-400 font-medium">Se inyectará en el PDF al firmar</span>
<h3 class="text-sm font-black text-slate-800 uppercase tracking-tight mb-4 flex items-center gap-2">
<i data-lucide="file-text" class="w-4 h-4 text-blue-600"></i> Texto del Contrato
</h3>
<textarea id="cfg-contract-text" class="flex-1 w-full p-6 bg-slate-50 border border-slate-100 rounded-[1.5rem] text-sm text-slate-600 leading-relaxed focus:ring-2 focus:ring-blue-500 outline-none min-h-[450px]">
1. OBJETO DEL CONTRATO: IntegraRepara prestará servicios de asistencia técnica...
2. COBERTURA DE URGENCIAS: 2 intervenciones al año, 3h de mano de obra...
3. BRICOLAJE ELÉCTRICO: 1 servicio de 2h anual...
4. MATERIALES: Por cuenta del cliente...
... (puedes editar el contrato completo aquí)
<textarea id="cfg-contract-text" class="flex-1 w-full p-6 bg-slate-50 border border-slate-100 rounded-[1.5rem] text-sm text-slate-600 min-h-[400px]">
1. OBJETO DEL CONTRATO...
2. COBERTURA DE URGENCIAS...
3. BRICOLAJE ELÉCTRICO...
</textarea>
<div class="mt-6 flex justify-end">
<button onclick="saveConfig()" class="bg-blue-600 text-white px-8 py-4 rounded-2xl font-black uppercase tracking-widest text-xs shadow-lg hover:opacity-90 active:scale-95 transition-all flex items-center gap-2">
<i data-lucide="save" class="w-4 h-4"></i> Guardar Configuración
<div class="mt-4 flex justify-end">
<button onclick="saveConfig()" class="bg-blue-600 text-white px-6 py-3 rounded-xl font-black uppercase tracking-widest text-[10px] flex items-center gap-2">
<i data-lucide="save" class="w-4 h-4"></i> Guardar Cambios
</button>
</div>
</div>
@@ -116,91 +87,52 @@
</div>
<div id="tab-clients" class="tab-content hidden space-y-6">
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="bg-white p-6 rounded-3xl border border-slate-100 shadow-sm flex items-center gap-4">
<div class="w-12 h-12 bg-blue-50 text-blue-600 rounded-2xl flex items-center justify-center shadow-sm"><i data-lucide="users" class="w-6 h-6"></i></div>
<div><p class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Total Socios</p><p class="text-xl font-black text-slate-800">124</p></div>
</div>
<div class="bg-white p-6 rounded-3xl border border-slate-100 shadow-sm flex items-center gap-4">
<div class="w-12 h-12 bg-emerald-50 text-emerald-600 rounded-2xl flex items-center justify-center shadow-sm"><i data-lucide="trending-up" class="w-6 h-6"></i></div>
<div><p class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Ingreso Mensual (MRR)</p><p class="text-xl font-black text-slate-800">855,60€</p></div>
</div>
<div class="bg-white p-6 rounded-3xl border border-slate-100 shadow-sm flex items-center gap-4">
<div class="w-12 h-12 bg-rose-50 text-rose-600 rounded-2xl flex items-center justify-center shadow-sm"><i data-lucide="alert-circle" class="w-6 h-6"></i></div>
<div><p class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Impagos / Fallidos</p><p class="text-xl font-black text-slate-800">3</p></div>
</div>
</div>
<div class="bg-white rounded-[2.5rem] shadow-sm border border-slate-100 overflow-hidden">
<div class="p-6 border-b border-slate-50 flex flex-col md:flex-row justify-between gap-4">
<div class="relative flex-1 max-w-md">
<i data-lucide="search" class="w-4 h-4 absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"></i>
<input type="text" placeholder="Buscar por nombre o teléfono..." class="w-full pl-11 pr-4 py-3 bg-slate-50 rounded-xl text-sm font-medium outline-none focus:ring-2 focus:ring-blue-500 border-none">
</div>
</div>
<div class="overflow-x-auto">
<table class="w-full text-left border-collapse">
<thead>
<tr class="bg-slate-50 text-[10px] font-black text-slate-400 uppercase tracking-widest">
<th class="px-6 py-4">Socio</th>
<th class="px-6 py-4 text-center">Plan</th>
<th class="px-6 py-4">Estado Pago</th>
<th class="px-6 py-4">Última Visita</th>
<div class="bg-white rounded-[2rem] shadow-sm border border-slate-100 overflow-hidden">
<table class="w-full text-left">
<thead class="bg-slate-50 text-[10px] font-black text-slate-400 uppercase tracking-widest">
<tr>
<th class="px-6 py-4">Cliente</th>
<th class="px-6 py-4">Plan</th>
<th class="px-6 py-4">Estado</th>
<th class="px-6 py-4 text-right">Acciones</th>
</tr>
</thead>
<tbody class="text-sm font-bold text-slate-600 divide-y divide-slate-50">
<tr>
<td class="px-6 py-4">
<div class="flex flex-col">
<span>Juan Pérez García</span>
<span class="text-[10px] font-medium text-slate-400">600 112 233</span>
</div>
</td>
<td class="px-6 py-4 text-center">
<span class="bg-blue-50 text-blue-700 px-2 py-1 rounded text-[10px]">ANUAL</span>
</td>
<td class="px-6 py-4">
<span class="text-emerald-500 flex items-center gap-1.5"><div class="w-2 h-2 rounded-full bg-emerald-500 animate-pulse"></div> Activo</span>
</td>
<td class="px-6 py-4 text-slate-400 font-medium">Pendiente revisión</td>
<td class="px-6 py-4">Juan Pérez <br><span class="text-[10px] text-slate-400">600123456</span></td>
<td class="px-6 py-4"><span class="bg-blue-50 text-blue-600 px-2 py-0.5 rounded text-[10px]">ANUAL</span></td>
<td class="px-6 py-4 text-emerald-500">Activo</td>
<td class="px-6 py-4 text-right">
<button class="w-8 h-8 bg-slate-50 text-slate-400 rounded-lg hover:text-blue-600 transition-colors"><i data-lucide="file-text" class="w-4 h-4 mx-auto"></i></button>
<button class="p-2 bg-slate-100 rounded-lg"><i data-lucide="file-text" class="w-4 h-4"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</main>
</div>
<script src="js/main.js"></script>
<script>
// Inicializar Iconos de Lucide al cargar
lucide.createIcons();
// Lógica de pestañas
function switchTab(tab) {
// Ocultar todos los contenidos
document.querySelectorAll('.tab-content').forEach(el => el.classList.add('hidden'));
document.querySelectorAll('.tab-btn').forEach(el => el.classList.remove('active'));
// Mostrar el seleccionado
document.getElementById('tab-' + tab).classList.remove('hidden');
document.getElementById('btn-tab-' + tab).classList.add('active');
// Re-renderizar iconos por si hay nuevos en la pestaña
lucide.createIcons();
}
async function saveConfig() {
const text = document.getElementById('cfg-contract-text').value;
const pMonth = document.getElementById('cfg-price-month').value;
const pYear = document.getElementById('cfg-price-year').value;
alert("✅ Configuración guardada correctamente en el sistema.");
alert("✅ Configuración guardada localmente");
}
// Inicializar iconos al cargar
document.addEventListener('DOMContentLoaded', () => {
if(window.lucide) lucide.createIcons();
});
</script>
</body>
</html>