Files
TenerifeProp/public/admin/leads.html
TenerifeProp Dev 9cffbb3bf3 refactor: split admin.html into modular section files with dynamic loading
- Extracted 10 sections from admin.html (3315 lines) into separate files:
  - dashboard.html (298 lines)
  - properties.html (242 lines)
  - leads.html (280 lines)
  - testimonials.html (78 lines)
  - faq.html (91 lines)
  - services.html (61 lines)
  - settings.html (93 lines)
  - users.html (73 lines)
  - analytics.html (64 lines)
  - traffic.html (69 lines)
- admin.html reduced from 3315 to 1582 lines
- Added dynamic section loader via fetch()
- Sections load on-demand when clicking sidebar links
- Previously loaded sections cached in memory
- Updated server routes to serve all section files
- DataTables initialized per-section on load
2026-04-07 00:25:36 +01:00

281 lines
12 KiB
HTML

<!-- ============ LEADS SECTION ============ -->
<section class="page-section" id="section-leads">
<div class="page-header">
<div>
<h1 class="page-title" data-i18n="leads.title">Leads</h1>
<p class="page-subtitle" data-i18n="leads.subtitle">Gestiona las solicitudes de tus clientes</p>
</div>
<div class="d-flex gap-3">
<button class="btn btn-outline-primary">
<i class="bi bi-download me-2"></i>Exportar
</button>
<button class="btn btn-primary">
<i class="bi bi-plus-lg me-2"></i>Añadir lead manualmente
</button>
</div>
</div>
<!-- Filters -->
<div class="card mb-4">
<div class="card-body">
<div class="row g-3">
<div class="col-md-2">
<select class="form-select" id="leadStatus">
<option value="">Todos los estados</option>
<option value="new">Nuevo</option>
<option value="pending">Pendiente</option>
<option value="contacted">Contactado</option>
<option value="qualified">Cualificado</option>
<option value="converted">Convertido</option>
<option value="lost">Perdido</option>
</select>
</div>
<div class="col-md-2">
<select class="form-select" id="leadSource">
<option value="">Todas las fuentes</option>
<option value="whatsapp">WhatsApp</option>
<option value="form">Formulario web</option>
<option value="phone">Llamada</option>
<option value="direct">Tráfico directo</option>
<option value="referral">Referido</option>
</select>
</div>
<div class="col-md-2">
<select class="form-select" id="leadProperty">
<option value="">Todas las propiedades</option>
<option>Terreno Urbano Adeje</option>
<option>Terreno Agrícola Güímar</option>
<option>Villa Los Cristianos</option>
</select>
</div>
<div class="col-md-3">
<div class="input-group">
<span class="input-group-text"><i class="bi bi-search"></i></span>
<input type="text" class="form-control" id="searchLead" placeholder="Buscar lead...">
</div>
</div>
<div class="col-md-3">
<input type="text" id="leadDateRange" class="form-control" placeholder="Rango de fechas">
</div>
</div>
</div>
</div>
<!-- Leads Table -->
<div class="table-card">
<div class="table-card-header">
<h4 class="table-card-title">Lista de leads</h4>
<div class="d-flex gap-2">
<span class="badge bg-success">12 Nuevos</span>
<span class="badge bg-warning">8 Pendientes</span>
<span class="badge bg-info">5 En proceso</span>
</div>
</div>
<div class="table-wrapper">
<table class="table table-hover mb-0" id="fullLeadsTable">
<thead>
<tr>
<th><input type="checkbox" class="form-check-input"></th>
<th data-i18n="table.client">Cliente</th>
<th data-i18n="table.contact">Contacto</th>
<th data-i18n="table.property">Propiedad</th>
<th data-i18n="table.budget">Presupuesto</th>
<th data-i18n="table.source">Fuente</th>
<th data-i18n="table.date">Fecha</th>
<th data-i18n="table.status">Estado</th>
<th data-i18n="table.actions">Acciones</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" class="form-check-input"></td>
<td>
<div class="table-user">
<img src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100&h=100&fit=crop" class="table-user-avatar">
<div class="table-user-info">
Michael Schmidt
<small>🇩🇪 Alemania</small>
</div>
</div>
</td>
<td>
<div>+34 600 123 456<br>
<small class="text-muted">michael@mail.de</small></div>
</td>
<td>
<div class="table-property">
<img src="https://images.unsplash.com/photo-1564013799919-ab600027ffc6?w=100&q=80" class="table-property-img">
<div class="table-property-info">
<h6>Terreno Urbano Adeje</h6>
<span>385.000 €</span>
</div>
</div>
</td>
<td>400.000 €</td>
<td><span class="badge bg-success">WhatsApp</span></td>
<td>15/01/2024 14:32</td>
<td><span class="table-badge pending">Pendiente</span></td>
<td>
<div class="table-actions">
<button class="table-action-btn view" title="Ver"><i class="bi bi-eye"></i></button>
<button class="table-action-btn" title="WhatsApp" style="background: #25D366; color: white;"><i class="bi bi-whatsapp"></i></button>
<button class="table-action-btn edit" title="Editar"><i class="bi bi-pencil"></i></button>
<button class="table-action-btn delete" title="Eliminar"><i class="bi bi-trash"></i></button>
</div>
</td>
</tr>
<tr>
<td><input type="checkbox" class="form-check-input"></td>
<td>
<div class="table-user">
<img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=100&h=100&fit=crop" class="table-user-avatar">
<div class="table-user-info">
Anna Petrova
<small>🇷🇺 Rusia</small>
</div>
</div>
</td>
<td>
<div>anna@mail.com<br>
<small class="text-muted">Sin teléfono</small></div>
</td>
<td>
<div class="table-property">
<img src="https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=100&q=80" class="table-property-img">
<div class="table-property-info">
<h6>Terreno Agrícola Güímar</h6>
<span>125.000 €</span>
</div>
</div>
</td>
<td>150.000 €</td>
<td><span class="badge bg-secondary">Formulario</span></td>
<td>15/01/2024 12:18</td>
<td><span class="table-badge new">Nuevo</span></td>
<td>
<div class="table-actions">
<button class="table-action-btn view" title="Ver"><i class="bi bi-eye"></i></button>
<button class="table-action-btn" title="Enviar email"><i class="bi bi-envelope"></i></button>
<button class="table-action-btn edit" title="Editar"><i class="bi bi-pencil"></i></button>
<button class="table-action-btn delete" title="Eliminar"><i class="bi bi-trash"></i></button>
</div>
</td>
</tr>
<tr>
<td><input type="checkbox" class="form-check-input"></td>
<td>
<div class="table-user">
<img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100&h=100&fit=crop" class="table-user-avatar">
<div class="table-user-info">
Pierre Dubois
<small>🇫🇷 Francia</small>
</div>
</div>
</td>
<td>
<div>+33 600 789 012<br>
<small class="text-muted">pierre.d@mail.fr</small></div>
</td>
<td>
<div class="table-property">
<img src="https://images.unsplash.com/photo-1613490493576-7fde63acd811?w=100&q=80" class="table-property-img">
<div class="table-property-info">
<h6>Villa Los Cristianos</h6>
<span>595.000 €</span>
</div>
</div>
</td>
<td>650.000 €</td>
<td><span class="badge bg-primary">Directo</span></td>
<td>14/01/2024 18:45</td>
<td><span class="table-badge completed">Contactado</span></td>
<td>
<div class="table-actions">
<button class="table-action-btn view" title="Ver"><i class="bi bi-eye"></i></button>
<button class="table-action-btn" title="WhatsApp" style="background: #25D366; color: white;"><i class="bi bi-whatsapp"></i></button>
<button class="table-action-btn edit" title="Editar"><i class="bi bi-pencil"></i></button>
<button class="table-action-btn delete" title="Eliminar"><i class="bi bi-trash"></i></button>
</div>
</td>
</tr>
<tr>
<td><input type="checkbox" class="form-check-input"></td>
<td>
<div class="table-user">
<img src="https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=100&h=100&fit=crop" class="table-user-avatar">
<div class="table-user-info">
Carlos García
<small>🇪🇸 España</small>
</div>
</div>
</td>
<td>
<div>+34 600 456 789<br>
<small class="text-muted">carlos.g@mail.com</small></div>
</td>
<td>
<div class="table-property">
<img src="https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?w=100&q=80" class="table-property-img">
<div class="table-property-info">
<h6>Apartamento Puerto Cruz</h6>
<span>245.000 €</span>
</div>
</div>
</td>
<td>280.000 €</td>
<td><span class="badge bg-info">Referido</span></td>
<td>14/01/2024 10:22</td>
<td><span class="table-badge" style="background: rgba(59,130,246,0.1); color: var(--info);">En proceso</span></td>
<td>
<div class="table-actions">
<button class="table-action-btn view" title="Ver"><i class="bi bi-eye"></i></button>
<button class="table-action-btn" title="WhatsApp" style="background: #25D366; color: white;"><i class="bi bi-whatsapp"></i></button>
<button class="table-action-btn edit" title="Editar"><i class="bi bi-pencil"></i></button>
<button class="table-action-btn delete" title="Eliminar"><i class="bi bi-trash"></i></button>
</div>
</td>
</tr>
<tr>
<td><input type="checkbox" class="form-check-input"></td>
<td>
<div class="table-user">
<img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100&h=100&fit=crop" class="table-user-avatar">
<div class="table-user-info">
Emma Johnson
<small>🇬🇧 Reino Unido</small>
</div>
</div>
</td>
<td>
<div>+44 7700 123 456<br>
<small class="text-muted">emma.j@mail.co.uk</small></div>
</td>
<td>
<div class="table-property">
<img src="https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=100&q=80" class="table-property-img">
<div class="table-property-info">
<h6>Chalet La Caleta</h6>
<span>750.000 €</span>
</div>
</div>
</td>
<td>800.000 €</td>
<td><span class="badge bg-warning">Instagram</span></td>
<td>13/01/2024 16:30</td>
<td><span class="table-badge completed">Cualificado</span></td>
<td>
<div class="table-actions">
<button class="table-action-btn view" title="Ver"><i class="bi bi-eye"></i></button>
<button class="table-action-btn" title="WhatsApp" style="background: #25D366; color: white;"><i class="bi bi-whatsapp"></i></button>
<button class="table-action-btn edit" title="Editar"><i class="bi bi-pencil"></i></button>
<button class="table-action-btn delete" title="Eliminar"><i class="bi bi-trash"></i></button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>