- Replace all /login.html redirects with /login in admin.html - Remove /login.html route from server - Update dashboard charts to load real data from API - Add initCharts() and loadDashboardData() functions - Remove static chart data and use dynamic API data - Update stats counters to animate with real values
3252 lines
119 KiB
HTML
3252 lines
119 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="es">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="robots" content="noindex, nofollow">
|
||
|
||
<title>Panel de Administración | TenerifeProp</title>
|
||
|
||
<!-- Bootstrap 5 CSS -->
|
||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||
<!-- Bootstrap Icons -->
|
||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css" rel="stylesheet">
|
||
<!-- Google Fonts -->
|
||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
|
||
<!-- Chart.js -->
|
||
<link href="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.min.css" rel="stylesheet">
|
||
<!-- DataTables -->
|
||
<link href="https://cdn.jsdelivr.net/npm/datatables.net-bs5@1.13.8/css/dataTables.bootstrap5.min.css" rel="stylesheet">
|
||
<!-- Lightpick -->
|
||
<link href="https://cdn.jsdelivr.net/npm/lightpick@1.6.2/css/lightpick.min.css" rel="stylesheet">
|
||
|
||
<style>
|
||
:root {
|
||
--primary: #1a5f4a;
|
||
--primary-light: #2d8f6f;
|
||
--primary-dark: #0d4535;
|
||
--secondary: #d4a853;
|
||
--accent: #e85d04;
|
||
--success: #10b981;
|
||
--warning: #f59e0b;
|
||
--danger: #ef4444;
|
||
--info: #3b82f6;
|
||
|
||
/* Dark Theme */
|
||
--sidebar-bg: #0f172a;
|
||
--sidebar-hover: #1e293b;
|
||
--sidebar-active: #1a5f4a;
|
||
--sidebar-text: #94a3b8;
|
||
--sidebar-text-active: #ffffff;
|
||
|
||
--body-bg: #f1f5f9;
|
||
--card-bg: #ffffff;
|
||
--card-border: #e2e8f0;
|
||
--text-primary: #1e293b;
|
||
--text-secondary: #64748b;
|
||
--text-muted: #94a3b8;
|
||
|
||
--sidebar-width: 280px;
|
||
--topbar-height: 70px;
|
||
|
||
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
||
--shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
|
||
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
|
||
--shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
||
}
|
||
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
html, body {
|
||
height: 100%;
|
||
}
|
||
|
||
body {
|
||
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
||
background: var(--body-bg);
|
||
color: var(--text-primary);
|
||
overflow-x: hidden;
|
||
}
|
||
|
||
/* ============ SIDEBAR ============ */
|
||
.sidebar {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: var(--sidebar-width);
|
||
height: 100vh;
|
||
background: var(--sidebar-bg);
|
||
z-index: 1000;
|
||
transition: all 0.3s ease;
|
||
display: flex;
|
||
flex-direction: column;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.sidebar-header {
|
||
padding: 24px 24px 20px;
|
||
border-bottom: 1px solid rgba(255,255,255,0.1);
|
||
}
|
||
|
||
.sidebar-logo {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.sidebar-logo-icon {
|
||
width: 40px;
|
||
height: 40px;
|
||
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
|
||
border-radius: 10px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: white;
|
||
font-weight: 800;
|
||
font-size: 1.2rem;
|
||
}
|
||
|
||
.sidebar-logo-text {
|
||
font-weight: 700;
|
||
font-size: 1.25rem;
|
||
color: white;
|
||
}
|
||
|
||
.sidebar-logo-text span {
|
||
color: var(--secondary);
|
||
}
|
||
|
||
.sidebar-nav {
|
||
flex: 1;
|
||
padding: 20px 12px;
|
||
}
|
||
|
||
.sidebar-section {
|
||
margin-bottom: 24px;
|
||
}
|
||
|
||
.sidebar-section-title {
|
||
font-size: 0.7rem;
|
||
font-weight: 600;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.5px;
|
||
color: var(--text-muted);
|
||
padding: 0 12px;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.sidebar-link {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 14px;
|
||
padding: 12px 16px;
|
||
border-radius: 10px;
|
||
color: var(--sidebar-text);
|
||
text-decoration: none;
|
||
font-weight: 500;
|
||
font-size: 0.95rem;
|
||
transition: all 0.2s ease;
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.sidebar-link:hover {
|
||
background: var(--sidebar-hover);
|
||
color: white;
|
||
}
|
||
|
||
.sidebar-link.active {
|
||
background: var(--sidebar-active);
|
||
color: white;
|
||
}
|
||
|
||
.sidebar-link i {
|
||
font-size: 1.2rem;
|
||
width: 24px;
|
||
text-align: center;
|
||
}
|
||
|
||
.sidebar-link .badge {
|
||
margin-left: auto;
|
||
padding: 4px 10px;
|
||
font-size: 0.75rem;
|
||
font-weight: 600;
|
||
border-radius: 20px;
|
||
}
|
||
|
||
.sidebar-link .badge.bg-danger { background: var(--danger) !important; }
|
||
.sidebar-link .badge.bg-success { background: var(--success) !important; }
|
||
|
||
.sidebar-footer {
|
||
padding: 20px 24px;
|
||
border-top: 1px solid rgba(255,255,255,0.1);
|
||
}
|
||
|
||
.sidebar-user {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
|
||
.sidebar-user-avatar {
|
||
width: 42px;
|
||
height: 42px;
|
||
border-radius: 10px;
|
||
object-fit: cover;
|
||
border: 2px solid var(--primary);
|
||
}
|
||
|
||
.sidebar-user-info {
|
||
flex: 1;
|
||
}
|
||
|
||
.sidebar-user-name {
|
||
color: white;
|
||
font-weight: 600;
|
||
font-size: 0.9rem;
|
||
}
|
||
|
||
.sidebar-user-role {
|
||
color: var(--text-muted);
|
||
font-size: 0.8rem;
|
||
}
|
||
|
||
.sidebar-user-action {
|
||
color: var(--text-muted);
|
||
font-size: 1.1rem;
|
||
cursor: pointer;
|
||
transition: color 0.2s;
|
||
}
|
||
|
||
.sidebar-user-action:hover {
|
||
color: white;
|
||
}
|
||
|
||
/* ============ MAIN CONTENT ============ */
|
||
.main-wrapper {
|
||
margin-left: var(--sidebar-width);
|
||
min-height: 100vh;
|
||
transition: margin-left 0.3s ease;
|
||
}
|
||
|
||
/* ============ TOPBAR ============ */
|
||
.topbar {
|
||
position: sticky;
|
||
top: 0;
|
||
height: var(--topbar-height);
|
||
background: var(--card-bg);
|
||
border-bottom: 1px solid var(--card-border);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding: 0 32px;
|
||
z-index: 100;
|
||
}
|
||
|
||
.topbar-left {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 20px;
|
||
}
|
||
|
||
.topbar-toggle {
|
||
width: 40px;
|
||
height: 40px;
|
||
border: none;
|
||
background: var(--body-bg);
|
||
border-radius: 10px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
}
|
||
|
||
.topbar-toggle:hover {
|
||
background: var(--card-border);
|
||
}
|
||
|
||
.topbar-toggle i {
|
||
font-size: 1.2rem;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
.topbar-search {
|
||
position: relative;
|
||
width: 350px;
|
||
}
|
||
|
||
.topbar-search input {
|
||
width: 100%;
|
||
height: 42px;
|
||
padding: 10px 16px 10px 44px;
|
||
border: 1px solid var(--card-border);
|
||
border-radius: 10px;
|
||
font-size: 0.9rem;
|
||
background: var(--body-bg);
|
||
transition: all 0.2s;
|
||
}
|
||
|
||
.topbar-search input:focus {
|
||
outline: none;
|
||
border-color: var(--primary);
|
||
background: white;
|
||
box-shadow: 0 0 0 3px rgba(26,95,74,0.1);
|
||
}
|
||
|
||
.topbar-search i {
|
||
position: absolute;
|
||
left: 16px;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.topbar-right {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 16px;
|
||
}
|
||
|
||
.topbar-btn {
|
||
width: 42px;
|
||
height: 42px;
|
||
border: none;
|
||
background: var(--body-bg);
|
||
border-radius: 10px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
position: relative;
|
||
}
|
||
|
||
.topbar-btn:hover {
|
||
background: var(--card-border);
|
||
}
|
||
|
||
.topbar-btn i {
|
||
font-size: 1.2rem;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
.topbar-btn .badge {
|
||
position: absolute;
|
||
top: 6px;
|
||
right: 6px;
|
||
width: 18px;
|
||
height: 18px;
|
||
padding: 0;
|
||
font-size: 0.7rem;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.topbar-lang {
|
||
display: flex;
|
||
gap: 4px;
|
||
background: var(--body-bg);
|
||
border-radius: 10px;
|
||
padding: 4px;
|
||
}
|
||
|
||
.topbar-lang button {
|
||
padding: 8px 14px;
|
||
border: none;
|
||
background: transparent;
|
||
border-radius: 8px;
|
||
font-size: 0.85rem;
|
||
font-weight: 500;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
.topbar-lang button.active {
|
||
background: white;
|
||
color: var(--primary);
|
||
box-shadow: var(--shadow-sm);
|
||
}
|
||
|
||
.topbar-profile {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
padding: 6px 12px 6px 6px;
|
||
background: var(--body-bg);
|
||
border-radius: 12px;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
}
|
||
|
||
.topbar-profile:hover {
|
||
background: var(--card-border);
|
||
}
|
||
|
||
.topbar-profile img {
|
||
width: 36px;
|
||
height: 36px;
|
||
border-radius: 8px;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.topbar-profile-info {
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.topbar-profile-name {
|
||
font-weight: 600;
|
||
font-size: 0.85rem;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.topbar-profile-role {
|
||
font-size: 0.75rem;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
/* ============ PAGE CONTENT ============ */
|
||
.page-content {
|
||
padding: 32px;
|
||
}
|
||
|
||
.page-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
margin-bottom: 32px;
|
||
}
|
||
|
||
.page-title {
|
||
font-size: 1.75rem;
|
||
font-weight: 700;
|
||
color: var(--text-primary);
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.page-subtitle {
|
||
font-size: 0.9rem;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
/* ============ STATS CARDS ============ */
|
||
.stats-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 1fr);
|
||
gap: 24px;
|
||
margin-bottom: 32px;
|
||
}
|
||
|
||
.stat-card {
|
||
background: var(--card-bg);
|
||
border-radius: 16px;
|
||
padding: 24px;
|
||
border: 1px solid var(--card-border);
|
||
transition: all 0.3s ease;
|
||
}
|
||
|
||
.stat-card:hover {
|
||
transform: translateY(-4px);
|
||
box-shadow: var(--shadow-lg);
|
||
}
|
||
|
||
.stat-card-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: flex-start;
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.stat-card-icon {
|
||
width: 48px;
|
||
height: 48px;
|
||
border-radius: 12px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 1.4rem;
|
||
}
|
||
|
||
.stat-card-icon.green { background: rgba(16,185,129,0.1); color: var(--success); }
|
||
.stat-card-icon.blue { background: rgba(59,130,246,0.1); color: var(--info); }
|
||
.stat-card-icon.orange { background: rgba(245,158,11,0.1); color: var(--warning); }
|
||
.stat-card-icon.red { background: rgba(239,68,68,0.1); color: var(--danger); }
|
||
|
||
.stat-card-trend {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
font-size: 0.85rem;
|
||
font-weight: 600;
|
||
padding: 4px 10px;
|
||
border-radius: 20px;
|
||
}
|
||
|
||
.stat-card-trend.up {
|
||
background: rgba(16,185,129,0.1);
|
||
color: var(--success);
|
||
}
|
||
|
||
.stat-card-trend.down {
|
||
background: rgba(239,68,68,0.1);
|
||
color: var(--danger);
|
||
}
|
||
|
||
.stat-card-value {
|
||
font-size: 2rem;
|
||
font-weight: 800;
|
||
color: var(--text-primary);
|
||
margin-bottom: 4px;
|
||
line-height: 1;
|
||
}
|
||
|
||
.stat-card-label {
|
||
font-size: 0.9rem;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
/* ============ CHARTS ============ */
|
||
.charts-grid {
|
||
display: grid;
|
||
grid-template-columns: 2fr 1fr;
|
||
gap: 24px;
|
||
margin-bottom: 32px;
|
||
}
|
||
|
||
.chart-card {
|
||
background: var(--card-bg);
|
||
border-radius: 16px;
|
||
padding: 24px;
|
||
border: 1px solid var(--card-border);
|
||
}
|
||
|
||
.chart-card-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
margin-bottom: 24px;
|
||
}
|
||
|
||
.chart-card-title {
|
||
font-size: 1.1rem;
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.chart-card-actions {
|
||
display: flex;
|
||
gap: 8px;
|
||
}
|
||
|
||
.chart-period-btn {
|
||
padding: 8px 16px;
|
||
border: 1px solid var(--card-border);
|
||
background: transparent;
|
||
border-radius: 8px;
|
||
font-size: 0.85rem;
|
||
font-weight: 500;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
.chart-period-btn.active, .chart-period-btn:hover {
|
||
background: var(--primary);
|
||
border-color: var(--primary);
|
||
color: white;
|
||
}
|
||
|
||
.chart-container {
|
||
position: relative;
|
||
height: 300px;
|
||
}
|
||
|
||
/* ============ TABLES ============ */
|
||
.table-card {
|
||
background: var(--card-bg);
|
||
border-radius: 16px;
|
||
border: 1px solid var(--card-border);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.table-card-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
padding: 20px 24px;
|
||
border-bottom: 1px solid var(--card-border);
|
||
}
|
||
|
||
.table-card-title {
|
||
font-size: 1.1rem;
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.table-card-action {
|
||
padding: 8px 16px;
|
||
background: var(--primary);
|
||
color: white;
|
||
border: none;
|
||
border-radius: 8px;
|
||
font-size: 0.85rem;
|
||
font-weight: 500;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
text-decoration: none;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.table-card-action:hover {
|
||
background: var(--primary-dark);
|
||
color: white;
|
||
}
|
||
|
||
.table-wrapper {
|
||
padding: 0;
|
||
}
|
||
|
||
table.dataTable {
|
||
border-collapse: collapse !important;
|
||
}
|
||
|
||
table.dataTable thead th {
|
||
background: var(--body-bg);
|
||
color: var(--text-secondary);
|
||
font-weight: 600;
|
||
font-size: 0.8rem;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.5px;
|
||
padding: 14px 16px;
|
||
border-bottom: 1px solid var(--card-border);
|
||
}
|
||
|
||
table.dataTable tbody td {
|
||
padding: 16px;
|
||
vertical-align: middle;
|
||
font-size: 0.9rem;
|
||
}
|
||
|
||
table.dataTable tbody tr:hover {
|
||
background: var(--body-bg);
|
||
}
|
||
|
||
.table-property {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
|
||
.table-property-img {
|
||
width: 50px;
|
||
height: 50px;
|
||
border-radius: 8px;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.table-property-info h6 {
|
||
font-weight: 600;
|
||
font-size: 0.9rem;
|
||
margin-bottom: 2px;
|
||
}
|
||
|
||
.table-property-info span {
|
||
font-size: 0.8rem;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.table-badge {
|
||
display: inline-flex;
|
||
padding: 5px 12px;
|
||
border-radius: 20px;
|
||
font-size: 0.75rem;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.table-badge.new { background: rgba(59,130,246,0.1); color: var(--info); }
|
||
.table-badge.pending { background: rgba(245,158,11,0.1); color: var(--warning); }
|
||
.table-badge.completed { background: rgba(16,185,129,0.1); color: var(--success); }
|
||
.table-badge.cancelled { background: rgba(239,68,68,0.1); color: var(--danger); }
|
||
|
||
.table-user {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
}
|
||
|
||
.table-user-avatar {
|
||
width: 36px;
|
||
height: 36px;
|
||
border-radius: 50%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.table-user-info {
|
||
font-weight: 500;
|
||
}
|
||
|
||
.table-user-info small {
|
||
display: block;
|
||
color: var(--text-muted);
|
||
font-weight: 400;
|
||
}
|
||
|
||
.table-actions {
|
||
display: flex;
|
||
gap: 8px;
|
||
}
|
||
|
||
.table-action-btn {
|
||
width: 32px;
|
||
height: 32px;
|
||
border: none;
|
||
background: var(--body-bg);
|
||
border-radius: 6px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
.table-action-btn:hover {
|
||
background: var(--primary);
|
||
color: white;
|
||
}
|
||
|
||
.table-action-btn.danger:hover {
|
||
background: var(--danger);
|
||
}
|
||
|
||
.table-action-btn.view { color: var(--info); }
|
||
.table-action-btn.edit { color: var(--warning); }
|
||
.table-action-btn.delete { color: var(--danger); }
|
||
|
||
/* ============ ROWS GRID ============ */
|
||
.rows-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, 1fr);
|
||
gap: 24px;
|
||
}
|
||
|
||
.row-card {
|
||
background: var(--card-bg);
|
||
border-radius: 16px;
|
||
padding: 24px;
|
||
border: 1px solid var(--card-border);
|
||
}
|
||
|
||
.row-card-header {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
.row-card-title {
|
||
font-size: 1rem;
|
||
font-weight: 600;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
/* ============ QUICK ACTIONS ============ */
|
||
.quick-actions {
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 1fr);
|
||
gap: 16px;
|
||
margin-top: 24px;
|
||
}
|
||
|
||
.quick-action {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 20px;
|
||
background: var(--body-bg);
|
||
border-radius: 12px;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
text-decoration: none;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.quick-action:hover {
|
||
background: var(--primary);
|
||
color: white;
|
||
transform: translateY(-2px);
|
||
}
|
||
|
||
.quick-action-icon {
|
||
width: 48px;
|
||
height: 48px;
|
||
background: white;
|
||
border-radius: 12px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 1.4rem;
|
||
color: var(--primary);
|
||
transition: all 0.2s;
|
||
}
|
||
|
||
.quick-action:hover .quick-action-icon {
|
||
background: rgba(255,255,255,0.2);
|
||
color: white;
|
||
}
|
||
|
||
.quick-action span {
|
||
font-size: 0.85rem;
|
||
font-weight: 500;
|
||
}
|
||
|
||
/* ============ PAGE SECTIONS ============ */
|
||
.page-section {
|
||
display: none;
|
||
}
|
||
|
||
.page-section.active {
|
||
display: block;
|
||
}
|
||
|
||
/* ============ PROPERTY CARDS GRID ============ */
|
||
.properties-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, 1fr);
|
||
gap: 24px;
|
||
}
|
||
|
||
.property-admin-card {
|
||
background: var(--card-bg);
|
||
border-radius: 16px;
|
||
overflow: hidden;
|
||
border: 1px solid var(--card-border);
|
||
transition: all 0.3s;
|
||
}
|
||
|
||
.property-admin-card:hover {
|
||
transform: translateY(-4px);
|
||
box-shadow: var(--shadow-lg);
|
||
}
|
||
|
||
.property-admin-card-image {
|
||
position: relative;
|
||
height: 180px;
|
||
}
|
||
|
||
.property-admin-card-image img {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.property-admin-card-badges {
|
||
position: absolute;
|
||
top: 12px;
|
||
left: 12px;
|
||
display: flex;
|
||
gap: 6px;
|
||
}
|
||
|
||
.property-admin-card-badge {
|
||
padding: 4px 10px;
|
||
border-radius: 6px;
|
||
font-size: 0.7rem;
|
||
font-weight: 600;
|
||
text-transform: uppercase;
|
||
}
|
||
|
||
.property-admin-card-badge.active {
|
||
background: var(--success);
|
||
color: white;
|
||
}
|
||
|
||
.property-admin-card-badge.inactive {
|
||
background: var(--text-muted);
|
||
color: white;
|
||
}
|
||
|
||
.property-admin-card-badge.urban { background: #4a90d9; color: white; }
|
||
.property-admin-card-badge.agricultural { background: var(--primary); color: white; }
|
||
.property-admin-card-badge.house { background: #9b59b6; color: white; }
|
||
.property-admin-card-badge.apartment { background: var(--secondary); color: var(--dark); }
|
||
.property-admin-card-badge.ruins { background: var(--danger); color: white; }
|
||
|
||
.property-admin-card-actions {
|
||
position: absolute;
|
||
top: 12px;
|
||
right: 12px;
|
||
display: flex;
|
||
gap: 6px;
|
||
}
|
||
|
||
.property-admin-card-action {
|
||
width: 32px;
|
||
height: 32px;
|
||
background: white;
|
||
border: none;
|
||
border-radius: 6px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
color: var(--text-secondary);
|
||
text-decoration: none;
|
||
}
|
||
|
||
.property-admin-card-action:hover {
|
||
background: var(--primary);
|
||
color: white;
|
||
}
|
||
|
||
.property-admin-card-action.delete:hover {
|
||
background: var(--danger);
|
||
}
|
||
|
||
.property-admin-card-content {
|
||
padding: 20px;
|
||
}
|
||
|
||
.property-admin-card-title {
|
||
font-size: 1rem;
|
||
font-weight: 600;
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
.property-admin-card-location {
|
||
font-size: 0.85rem;
|
||
color: var(--text-muted);
|
||
margin-bottom: 12px;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
}
|
||
|
||
.property-admin-card-stats {
|
||
display: flex;
|
||
gap: 16px;
|
||
padding-top: 12px;
|
||
border-top: 1px solid var(--card-border);
|
||
}
|
||
|
||
.property-admin-card-stat {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-size: 0.85rem;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
.property-admin-card-stat i {
|
||
color: var(--primary);
|
||
}
|
||
|
||
.property-admin-card-price {
|
||
font-size: 1.25rem;
|
||
font-weight: 700;
|
||
color: var(--primary);
|
||
}
|
||
|
||
/* ============ MODAL ============ */
|
||
.modal-content {
|
||
border: none;
|
||
border-radius: 16px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.modal-header {
|
||
padding: 20px 24px;
|
||
border-bottom: 1px solid var(--card-border);
|
||
}
|
||
|
||
.modal-title {
|
||
font-weight: 700;
|
||
}
|
||
|
||
.modal-body {
|
||
padding: 24px;
|
||
}
|
||
|
||
.modal-footer {
|
||
padding: 16px 24px;
|
||
border-top: 1px solid var(--card-border);
|
||
}
|
||
|
||
/* ============ FORM STYLES ============ */
|
||
.form-label {
|
||
font-weight: 500;
|
||
font-size: 0.9rem;
|
||
color: var(--text-primary);
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.form-control, .form-select {
|
||
padding: 12px 16px;
|
||
border-radius: 10px;
|
||
border: 1px solid var(--card-border);
|
||
font-size: 0.9rem;
|
||
transition: all 0.2s;
|
||
}
|
||
|
||
.form-control:focus, .form-select:focus {
|
||
border-color: var(--primary);
|
||
box-shadow: 0 0 0 3px rgba(26,95,74,0.1);
|
||
}
|
||
|
||
.form-check-input:checked {
|
||
background-color: var(--primary);
|
||
border-color: var(--primary);
|
||
}
|
||
|
||
.btn-primary {
|
||
background: var(--primary);
|
||
border-color: var(--primary);
|
||
padding: 12px 24px;
|
||
border-radius: 10px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.btn-primary:hover {
|
||
background: var(--primary-dark);
|
||
border-color: var(--primary-dark);
|
||
}
|
||
|
||
.btn-outline-primary {
|
||
border-color: var(--primary);
|
||
color: var(--primary);
|
||
padding: 12px 24px;
|
||
border-radius: 10px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.btn-outline-primary:hover {
|
||
background: var(--primary);
|
||
border-color: var(--primary);
|
||
}
|
||
|
||
/* ============ FILE UPLOAD ============ */
|
||
.file-upload {
|
||
border: 2px dashed var(--card-border);
|
||
border-radius: 12px;
|
||
padding: 40px;
|
||
text-align: center;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
background: var(--body-bg);
|
||
}
|
||
|
||
.file-upload:hover {
|
||
border-color: var(--primary);
|
||
background: rgba(26,95,74,0.05);
|
||
}
|
||
|
||
.file-upload i {
|
||
font-size: 3rem;
|
||
color: var(--text-muted);
|
||
margin-bottom: 16px;
|
||
}
|
||
|
||
.file-upload h6 {
|
||
font-weight: 600;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.file-upload p {
|
||
font-size: 0.85rem;
|
||
color: var(--text-muted);
|
||
margin: 0;
|
||
}
|
||
|
||
/* ============ PAGINATION ============ */
|
||
.dataTables_wrapper .pagination {
|
||
justify-content: center;
|
||
margin-top: 20px;
|
||
}
|
||
|
||
.dataTables_wrapper .page-item.active .page-link {
|
||
background: var(--primary);
|
||
border-color: var(--primary);
|
||
}
|
||
|
||
.dataTables_wrapper .page-link {
|
||
color: var(--text-secondary);
|
||
padding: 10px 16px;
|
||
}
|
||
|
||
.dataTables_wrapper .page-link:hover {
|
||
color: var(--primary);
|
||
}
|
||
|
||
/* ============ RESPONSIVE ============ */
|
||
@media (max-width: 1400px) {
|
||
.stats-grid { grid-template-columns: repeat(2, 1fr); }
|
||
.charts-grid { grid-template-columns: 1fr; }
|
||
.rows-grid { grid-template-columns: repeat(2, 1fr); }
|
||
.properties-grid { grid-template-columns: repeat(2, 1fr); }
|
||
}
|
||
|
||
@media (max-width: 1200px) {
|
||
:root { --sidebar-width: 80px; }
|
||
|
||
.sidebar-logo-text,
|
||
.sidebar-section-title,
|
||
.sidebar-link span,
|
||
.sidebar-link .badge,
|
||
.sidebar-user-info,
|
||
.sidebar-footer { display: none; }
|
||
|
||
.sidebar-link {
|
||
justify-content: center;
|
||
padding: 14px;
|
||
}
|
||
|
||
.sidebar-link i { margin: 0; }
|
||
|
||
.sidebar-logo { justify-content: center; }
|
||
|
||
.sidebar-user { justify-content: center; }
|
||
|
||
.main-wrapper { margin-left: var(--sidebar-width); }
|
||
}
|
||
|
||
@media (max-width: 992px) {
|
||
.topbar-search { display: none; }
|
||
.topbar-lang { display: none; }
|
||
.stats-grid { grid-template-columns: 1fr; }
|
||
.properties-grid { grid-template-columns: 1fr; }
|
||
.rows-grid { grid-template-columns: 1fr; }
|
||
}
|
||
|
||
@media (max-width: 768px) {
|
||
.page-content { padding: 20px; }
|
||
.page-header { flex-direction: column; align-items: flex-start; gap: 16px; }
|
||
.quick-actions { grid-template-columns: repeat(2, 1fr); }
|
||
}
|
||
|
||
/* ============ ANIMATIONS ============ */
|
||
@keyframes fadeIn {
|
||
from { opacity: 0; transform: translateY(10px); }
|
||
to { opacity: 1; transform: translateY(0); }
|
||
}
|
||
|
||
.animate-fade-in {
|
||
animation: fadeIn 0.3s ease;
|
||
}
|
||
|
||
/* Loading Skeleton */
|
||
.skeleton {
|
||
background: linear-gradient(90deg, var(--body-bg) 25%, #e2e8f0 50%, var(--body-bg) 75%);
|
||
background-size: 200% 100%;
|
||
animation: shimmer 1.5s infinite;
|
||
}
|
||
|
||
@keyframes shimmer {
|
||
0% { background-position: -200% 0; }
|
||
100% { background-position: 200% 0; }
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<!-- ============ SIDEBAR ============ -->
|
||
<aside class="sidebar" id="sidebar">
|
||
<div class="sidebar-header">
|
||
<a href="#" class="sidebar-logo">
|
||
<div class="sidebar-logo-icon">TP</div>
|
||
<span class="sidebar-logo-text">Tenerife<span>Prop</span></span>
|
||
</a>
|
||
</div>
|
||
|
||
<nav class="sidebar-nav">
|
||
<div class="sidebar-section">
|
||
<div class="sidebar-section-title" data-i18n="sidebar.main">Principal</div>
|
||
<a href="#" class="sidebar-link active" data-section="dashboard">
|
||
<i class="bi bi-grid-1x2"></i>
|
||
<span data-i18n="sidebar.dashboard">Dashboard</span>
|
||
</a>
|
||
<a href="#" class="sidebar-link" data-section="properties">
|
||
<i class="bi bi-building"></i>
|
||
<span data-i18n="sidebar.properties">Propiedades</span>
|
||
<span class="badge bg-success">9</span>
|
||
</a>
|
||
<a href="#" class="sidebar-link" data-section="leads">
|
||
<i class="bi bi-people"></i>
|
||
<span data-i18n="sidebar.leads">Leads</span>
|
||
<span class="badge bg-danger" id="leadsCount">12</span>
|
||
</a>
|
||
</div>
|
||
|
||
<div class="sidebar-section">
|
||
<div class="sidebar-section-title" data-i18n="sidebar.content">Contenido</div>
|
||
<a href="#" class="sidebar-link" data-section="testimonials">
|
||
<i class="bi bi-chat-quote"></i>
|
||
<span data-i18n="sidebar.testimonials">Testimonios</span>
|
||
</a>
|
||
<a href="#" class="sidebar-link" data-section="faq">
|
||
<i class="bi bi-question-circle"></i>
|
||
<span data-i18n="sidebar.faq">FAQ</span>
|
||
</a>
|
||
<a href="#" class="sidebar-link" data-section="services">
|
||
<i class="bi bi-briefcase"></i>
|
||
<span data-i18n="sidebar.services">Servicios</span>
|
||
</a>
|
||
<a href="#" class="sidebar-link" data-section="pages">
|
||
<i class="bi bi-file-earmark-text"></i>
|
||
<span data-i18n="sidebar.pages">Páginas</span>
|
||
</a>
|
||
</div>
|
||
|
||
<div class="sidebar-section">
|
||
<div class="sidebar-section-title" data-i18n="sidebar.analytics">Analítica</div>
|
||
<a href="#" class="sidebar-link" data-section="analytics">
|
||
<i class="bi bi-graph-up"></i>
|
||
<span data-i18n="sidebar.analytics">Estadísticas</span>
|
||
</a>
|
||
<a href="#" class="sidebar-link" data-section="traffic">
|
||
<i class="bi bi-globe"></i>
|
||
<span data-i18n="sidebar.traffic">Tráfico</span>
|
||
</a>
|
||
</div>
|
||
|
||
<div class="sidebar-section">
|
||
<div class="sidebar-section-title" data-i18n="sidebar.settings">Sistema</div>
|
||
<a href="#" class="sidebar-link" data-section="settings">
|
||
<i class="bi bi-gear"></i>
|
||
<span data-i18n="sidebar.settings">Configuración</span>
|
||
</a>
|
||
<a href="#" class="sidebar-link" data-section="users">
|
||
<i class="bi bi-person-badge"></i>
|
||
<span data-i18n="sidebar.users">Usuarios</span>
|
||
</a>
|
||
</div>
|
||
</nav>
|
||
|
||
<div class="sidebar-footer">
|
||
<div class="sidebar-user">
|
||
<img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100&h=100&fit=crop" alt="Admin" class="sidebar-user-avatar">
|
||
<div class="sidebar-user-info">
|
||
<div class="sidebar-user-name">Carlos Martínez</div>
|
||
<div class="sidebar-user-role">Administrador</div>
|
||
</div>
|
||
<i class="bi bi-box-arrow-right sidebar-user-action" title="Cerrar sesión"></i>
|
||
</div>
|
||
</div>
|
||
</aside>
|
||
|
||
<!-- ============ MAIN CONTENT ============ -->
|
||
<div class="main-wrapper">
|
||
<!-- Topbar -->
|
||
<header class="topbar">
|
||
<div class="topbar-left">
|
||
<button class="topbar-toggle" id="sidebarToggle">
|
||
<i class="bi bi-list"></i>
|
||
</button>
|
||
<div class="topbar-search">
|
||
<i class="bi bi-search"></i>
|
||
<input type="text" placeholder="Buscar propiedades, leads, contenido..." id="globalSearch">
|
||
</div>
|
||
</div>
|
||
<div class="topbar-right">
|
||
<div class="topbar-lang">
|
||
<button class="active" data-lang="es">ES</button>
|
||
<button data-lang="ru">RU</button>
|
||
</div>
|
||
<button class="topbar-btn" title="Notificaciones">
|
||
<i class="bi bi-bell"></i>
|
||
<span class="badge bg-danger rounded-circle">3</span>
|
||
</button>
|
||
<button class="topbar-btn" title="Mensajes">
|
||
<i class="bi bi-chat-dots"></i>
|
||
<span class="badge bg-primary rounded-circle">5</span>
|
||
</button>
|
||
<div class="topbar-profile" id="profileDropdown">
|
||
<img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=100&h=100&fit=crop" alt="Admin">
|
||
<div class="topbar-profile-info">
|
||
<span class="topbar-profile-name">Carlos Martínez</span>
|
||
<span class="topbar-profile-role">Administrador</span>
|
||
</div>
|
||
<i class="bi bi-chevron-down"></i>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
|
||
<!-- Page Content -->
|
||
<main class="page-content">
|
||
<!-- ============ DASHBOARD SECTION ============ -->
|
||
<section class="page-section active" id="section-dashboard">
|
||
<div class="page-header">
|
||
<div>
|
||
<h1 class="page-title" data-i18n="dashboard.title">Dashboard</h1>
|
||
<p class="page-subtitle" data-i18n="dashboard.subtitle">Resumen del rendimiento de tu negocio</p>
|
||
</div>
|
||
<div class="d-flex gap-3">
|
||
<input type="text" id="dateRange" class="form-control" style="width: 250px;" placeholder="Seleccionar rango de fechas">
|
||
<button class="btn btn-primary">
|
||
<i class="bi bi-download me-2"></i>Exportar
|
||
</button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Stats Grid -->
|
||
<div class="stats-grid">
|
||
<div class="stat-card animate-fade-in">
|
||
<div class="stat-card-header">
|
||
<div class="stat-card-icon green">
|
||
<i class="bi bi-eye"></i>
|
||
</div>
|
||
<div class="stat-card-trend up">
|
||
<i class="bi bi-arrow-up"></i>
|
||
12.5%
|
||
</div>
|
||
</div>
|
||
<div class="stat-card-value" id="statViews">24,892</div>
|
||
<div class="stat-card-label" data-i18n="dashboard.views">Vistas de propiedades</div>
|
||
</div>
|
||
|
||
<div class="stat-card animate-fade-in">
|
||
<div class="stat-card-header">
|
||
<div class="stat-card-icon blue">
|
||
<i class="bi bi-cursor-click"></i>
|
||
</div>
|
||
<div class="stat-card-trend up">
|
||
<i class="bi bi-arrow-up"></i>
|
||
8.3%
|
||
</div>
|
||
</div>
|
||
<div class="stat-card-value" id="statClicks">3,421</div>
|
||
<div class="stat-card-label" data-i18n="dashboard.clicks">Clics en WhatsApp</div>
|
||
</div>
|
||
|
||
<div class="stat-card animate-fade-in">
|
||
<div class="stat-card-header">
|
||
<div class="stat-card-icon orange">
|
||
<i class="bi bi-envelope"></i>
|
||
</div>
|
||
<div class="stat-card-trend up">
|
||
<i class="bi bi-arrow-up"></i>
|
||
15.7%
|
||
</div>
|
||
</div>
|
||
<div class="stat-card-value" id="statLeads">156</div>
|
||
<div class="stat-card-label" data-i18n="dashboard.leads">Nuevos leads</div>
|
||
</div>
|
||
|
||
<div class="stat-card animate-fade-in">
|
||
<div class="stat-card-header">
|
||
<div class="stat-card-icon red">
|
||
<i class="bi bi-percent"></i>
|
||
</div>
|
||
<div class="stat-card-trend up">
|
||
<i class="bi bi-arrow-up"></i>
|
||
2.1%
|
||
</div>
|
||
</div>
|
||
<div class="stat-card-value" id="statConversion">13.7%</div>
|
||
<div class="stat-card-label" data-i18n="dashboard.conversion">Tasa de conversión</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Charts -->
|
||
<div class="charts-grid">
|
||
<div class="chart-card">
|
||
<div class="chart-card-header">
|
||
<h4 class="chart-card-title" data-i18n="dashboard.analytics">Rendimiento mensual</h4>
|
||
<div class="chart-card-actions">
|
||
<button class="chart-period-btn" data-period="week">Semana</button>
|
||
<button class="chart-period-btn active" data-period="month">Mes</button>
|
||
<button class="chart-period-btn" data-period="year">Año</button>
|
||
</div>
|
||
</div>
|
||
<div class="chart-container">
|
||
<canvas id="performanceChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="chart-card">
|
||
<div class="chart-card-header">
|
||
<h4 class="chart-card-title" data-i18n="dashboard.sources">Fuentes de tráfico</h4>
|
||
</div>
|
||
<div class="chart-container">
|
||
<canvas id="trafficChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Additional Charts Row -->
|
||
<div class="rows-grid">
|
||
<div class="chart-card">
|
||
<div class="chart-card-header">
|
||
<h4 class="chart-card-title" data-i18n="dashboard.propertyTypes">Propiedades por tipo</h4>
|
||
</div>
|
||
<div class="chart-container" style="height: 220px;">
|
||
<canvas id="typesChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="chart-card">
|
||
<div class="chart-card-header">
|
||
<h4 class="chart-card-title" data-i18n="dashboard.leadsStatus">Estado de leads</h4>
|
||
</div>
|
||
<div class="chart-container" style="height: 220px;">
|
||
<canvas id="leadsChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="chart-card">
|
||
<div class="chart-card-header">
|
||
<h4 class="chart-card-title" data-i18n="dashboard.topProperties">Top 5 propiedades</h4>
|
||
</div>
|
||
<div class="chart-container" style="height: 220px;">
|
||
<canvas id="topPropertiesChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Recent Leads Table -->
|
||
<div class="table-card mt-4">
|
||
<div class="table-card-header">
|
||
<h4 class="table-card-title" data-i18n="dashboard.recentLeads">Leads recientes</h4>
|
||
<a href="#" class="table-card-action" data-section="leads">
|
||
<i class="bi bi-eye"></i>
|
||
Ver todos
|
||
</a>
|
||
</div>
|
||
<div class="table-wrapper">
|
||
<table class="table table-hover mb-0" id="leadsTable">
|
||
<thead>
|
||
<tr>
|
||
<th data-i18n="table.client">Cliente</th>
|
||
<th data-i18n="table.property">Propiedad</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>
|
||
<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>+34 600 123 456</small>
|
||
</div>
|
||
</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><span class="badge bg-info">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 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>
|
||
<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>anna@mail.com</small>
|
||
</div>
|
||
</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><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 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>
|
||
<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>+33 600 789 012</small>
|
||
</div>
|
||
</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><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 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>
|
||
<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>carlos.g@mail.com</small>
|
||
</div>
|
||
</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><span class="badge bg-success">Referido</span></td>
|
||
<td>14/01/2024 10:22</td>
|
||
<td><span class="table-badge completed">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 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>
|
||
|
||
<!-- Quick Actions -->
|
||
<div class="quick-actions">
|
||
<a href="#" class="quick-action" data-section="properties">
|
||
<div class="quick-action-icon"><i class="bi bi-plus-lg"></i></div>
|
||
<span data-i18n="dashboard.addProperty">Añadir propiedad</span>
|
||
</a>
|
||
<a href="#" class="quick-action" data-section="leads">
|
||
<div class="quick-action-icon"><i class="bi bi-envelope-plus"></i></div>
|
||
<span data-i18n="dashboard.viewLeads">Ver leads</span>
|
||
</a>
|
||
<a href="#" class="quick-action" data-section="analytics">
|
||
<div class="quick-action-icon"><i class="bi bi-bar-chart"></i></div>
|
||
<span data-i18n="dashboard.fullReport">Informe completo</span>
|
||
</a>
|
||
<a href="#" class="quick-action" data-section="settings">
|
||
<div class="quick-action-icon"><i class="bi bi-gear"></i></div>
|
||
<span data-i18n="dashboard.settings">Configuración</span>
|
||
</a>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ PROPERTIES SECTION ============ -->
|
||
<section class="page-section" id="section-properties">
|
||
<div class="page-header">
|
||
<div>
|
||
<h1 class="page-title" data-i18n="properties.title">Propiedades</h1>
|
||
<p class="page-subtitle" data-i18n="properties.subtitle">Gestiona tu catálogo de propiedades</p>
|
||
</div>
|
||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#propertyModal">
|
||
<i class="bi bi-plus-lg me-2"></i>Añadir propiedad
|
||
</button>
|
||
</div>
|
||
|
||
<!-- Filters -->
|
||
<div class="card mb-4">
|
||
<div class="card-body">
|
||
<div class="row g-3">
|
||
<div class="col-md-3">
|
||
<select class="form-select" id="filterType">
|
||
<option value="">Todos los tipos</option>
|
||
<option value="agricultural">Terrenos agrícolas</option>
|
||
<option value="urban">Terrenos urbanos</option>
|
||
<option value="house">Casas</option>
|
||
<option value="apartment">Apartamentos</option>
|
||
<option value="ruins">Ruinas</option>
|
||
</select>
|
||
</div>
|
||
<div class="col-md-3">
|
||
<select class="form-select" id="filterStatus">
|
||
<option value="">Todos los estados</option>
|
||
<option value="active">Activo</option>
|
||
<option value="inactive">Inactivo</option>
|
||
<option value="sold">Vendido</option>
|
||
</select>
|
||
</div>
|
||
<div class="col-md-4">
|
||
<div class="input-group">
|
||
<span class="input-group-text"><i class="bi bi-search"></i></span>
|
||
<input type="text" class="form-control" id="searchProperty" placeholder="Buscar propiedad...">
|
||
</div>
|
||
</div>
|
||
<div class="col-md-2">
|
||
<button class="btn btn-outline-primary w-100">
|
||
<i class="bi bi-funnel me-2"></i>Filtrar
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Properties Grid -->
|
||
<div class="properties-grid" id="propertiesGrid">
|
||
<!-- Property Card 1 -->
|
||
<div class="property-admin-card">
|
||
<div class="property-admin-card-image">
|
||
<img src="https://images.unsplash.com/photo-1564013799919-ab600027ffc6?w=800&q=80" alt="Terreno urbano">
|
||
<div class="property-admin-card-badges">
|
||
<span class="property-admin-card-badge active">Activo</span>
|
||
<span class="property-admin-card-badge urban">Urbano</span>
|
||
</div>
|
||
<div class="property-admin-card-actions">
|
||
<a href="#" class="property-admin-card-action" title="Ver"><i class="bi bi-eye"></i></a>
|
||
<a href="#" class="property-admin-card-action" title="Editar"><i class="bi bi-pencil"></i></a>
|
||
<a href="#" class="property-admin-card-action delete" title="Eliminar"><i class="bi bi-trash"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="property-admin-card-content">
|
||
<h5 class="property-admin-card-title">Terreno Urbano en Adeje</h5>
|
||
<p class="property-admin-card-location"><i class="bi bi-geo-alt"></i>Adeje, Tenerife Sur</p>
|
||
<div class="property-admin-card-stats">
|
||
<span class="property-admin-card-stat"><i class="bi bi-eye"></i>1,245</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-cursor-click"></i>89</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-envelope"></i>12</span>
|
||
</div>
|
||
<div class="d-flex justify-content-between align-items-center mt-3">
|
||
<span class="property-admin-card-price">385.000 €</span>
|
||
<small class="text-muted">2.500 m²</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Property Card 2 -->
|
||
<div class="property-admin-card">
|
||
<div class="property-admin-card-image">
|
||
<img src="https://images.unsplash.com/photo-1500382017468-9049fed747ef?w=800&q=80" alt="Terreno agrícola">
|
||
<div class="property-admin-card-badges">
|
||
<span class="property-admin-card-badge active">Activo</span>
|
||
<span class="property-admin-card-badge agricultural">Agrícola</span>
|
||
</div>
|
||
<div class="property-admin-card-actions">
|
||
<a href="#" class="property-admin-card-action" title="Ver"><i class="bi bi-eye"></i></a>
|
||
<a href="#" class="property-admin-card-action" title="Editar"><i class="bi bi-pencil"></i></a>
|
||
<a href="#" class="property-admin-card-action delete" title="Eliminar"><i class="bi bi-trash"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="property-admin-card-content">
|
||
<h5 class="property-admin-card-title">Terreno Agrícola en Güímar</h5>
|
||
<p class="property-admin-card-location"><i class="bi bi-geo-alt"></i>Güímar, Tenerife Sur</p>
|
||
<div class="property-admin-card-stats">
|
||
<span class="property-admin-card-stat"><i class="bi bi-eye"></i>892</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-cursor-click"></i>56</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-envelope"></i>8</span>
|
||
</div>
|
||
<div class="d-flex justify-content-between align-items-center mt-3">
|
||
<span class="property-admin-card-price">125.000 €</span>
|
||
<small class="text-muted">8.500 m²</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Property Card 3 -->
|
||
<div class="property-admin-card">
|
||
<div class="property-admin-card-image">
|
||
<img src="https://images.unsplash.com/photo-1613490493576-7fde63acd811?w=800&q=80" alt="Villa">
|
||
<div class="property-admin-card-badges">
|
||
<span class="property-admin-card-badge active">Activo</span>
|
||
<span class="property-admin-card-badge house">Casa</span>
|
||
</div>
|
||
<div class="property-admin-card-actions">
|
||
<a href="#" class="property-admin-card-action" title="Ver"><i class="bi bi-eye"></i></a>
|
||
<a href="#" class="property-admin-card-action" title="Editar"><i class="bi bi-pencil"></i></a>
|
||
<a href="#" class="property-admin-card-action delete" title="Eliminar"><i class="bi bi-trash"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="property-admin-card-content">
|
||
<h5 class="property-admin-card-title">Villa con Vistas al Mar</h5>
|
||
<p class="property-admin-card-location"><i class="bi bi-geo-alt"></i>Los Cristianos, Arona</p>
|
||
<div class="property-admin-card-stats">
|
||
<span class="property-admin-card-stat"><i class="bi bi-eye"></i>2,156</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-cursor-click"></i>167</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-envelope"></i>24</span>
|
||
</div>
|
||
<div class="d-flex justify-content-between align-items-center mt-3">
|
||
<span class="property-admin-card-price">595.000 €</span>
|
||
<small class="text-muted">350 m²</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Property Card 4 -->
|
||
<div class="property-admin-card">
|
||
<div class="property-admin-card-image">
|
||
<img src="https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?w=800&q=80" alt="Apartamento">
|
||
<div class="property-admin-card-badges">
|
||
<span class="property-admin-card-badge active">Activo</span>
|
||
<span class="property-admin-card-badge apartment">Apartamento</span>
|
||
</div>
|
||
<div class="property-admin-card-actions">
|
||
<a href="#" class="property-admin-card-action" title="Ver"><i class="bi bi-eye"></i></a>
|
||
<a href="#" class="property-admin-card-action" title="Editar"><i class="bi bi-pencil"></i></a>
|
||
<a href="#" class="property-admin-card-action delete" title="Eliminar"><i class="bi bi-trash"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="property-admin-card-content">
|
||
<h5 class="property-admin-card-title">Apartamento Puerto de la Cruz</h5>
|
||
<p class="property-admin-card-location"><i class="bi bi-geo-alt"></i>Puerto de la Cruz</p>
|
||
<div class="property-admin-card-stats">
|
||
<span class="property-admin-card-stat"><i class="bi bi-eye"></i>1,089</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-cursor-click"></i>78</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-envelope"></i>15</span>
|
||
</div>
|
||
<div class="d-flex justify-content-between align-items-center mt-3">
|
||
<span class="property-admin-card-price">245.000 €</span>
|
||
<small class="text-muted">85 m²</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Property Card 5 -->
|
||
<div class="property-admin-card">
|
||
<div class="property-admin-card-image">
|
||
<img src="https://images.unsplash.com/photo-1518780664697-55e3ad937233?w=800&q=80" alt="Ruinas">
|
||
<div class="property-admin-card-badges">
|
||
<span class="property-admin-card-badge active">Activo</span>
|
||
<span class="property-admin-card-badge ruins">Ruinas</span>
|
||
</div>
|
||
<div class="property-admin-card-actions">
|
||
<a href="#" class="property-admin-card-action" title="Ver"><i class="bi bi-eye"></i></a>
|
||
<a href="#" class="property-admin-card-action" title="Editar"><i class="bi bi-pencil"></i></a>
|
||
<a href="#" class="property-admin-card-action delete" title="Eliminar"><i class="bi bi-trash"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="property-admin-card-content">
|
||
<h5 class="property-admin-card-title">Casa Ruina San Miguel</h5>
|
||
<p class="property-admin-card-location"><i class="bi bi-geo-alt"></i>San Miguel de Abona</p>
|
||
<div class="property-admin-card-stats">
|
||
<span class="property-admin-card-stat"><i class="bi bi-eye"></i>567</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-cursor-click"></i>34</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-envelope"></i>6</span>
|
||
</div>
|
||
<div class="d-flex justify-content-between align-items-center mt-3">
|
||
<span class="property-admin-card-price">175.000 €</span>
|
||
<small class="text-muted">4.200 m²</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Property Card 6 -->
|
||
<div class="property-admin-card">
|
||
<div class="property-admin-card-image">
|
||
<img src="https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=800&q=80" alt="Parcela">
|
||
<div class="property-admin-card-badges">
|
||
<span class="property-admin-card-badge active">Activo</span>
|
||
<span class="property-admin-card-badge urban">Urbano</span>
|
||
</div>
|
||
<div class="property-admin-card-actions">
|
||
<a href="#" class="property-admin-card-action" title="Ver"><i class="bi bi-eye"></i></a>
|
||
<a href="#" class="property-admin-card-action" title="Editar"><i class="bi bi-pencil"></i></a>
|
||
<a href="#" class="property-admin-card-action delete" title="Eliminar"><i class="bi bi-trash"></i></a>
|
||
</div>
|
||
</div>
|
||
<div class="property-admin-card-content">
|
||
<h5 class="property-admin-card-title">Parcela Urbana Granadilla</h5>
|
||
<p class="property-admin-card-location"><i class="bi bi-geo-alt"></i>Granadilla de Abona</p>
|
||
<div class="property-admin-card-stats">
|
||
<span class="property-admin-card-stat"><i class="bi bi-eye"></i>734</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-cursor-click"></i>45</span>
|
||
<span class="property-admin-card-stat"><i class="bi bi-envelope"></i>9</span>
|
||
</div>
|
||
<div class="d-flex justify-content-between align-items-center mt-3">
|
||
<span class="property-admin-card-price">210.000 €</span>
|
||
<small class="text-muted">1.800 m²</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Pagination -->
|
||
<nav class="mt-4">
|
||
<ul class="pagination justify-content-center">
|
||
<li class="page-item disabled">
|
||
<a class="page-link" href="#"><i class="bi bi-chevron-left"></i></a>
|
||
</li>
|
||
<li class="page-item active"><a class="page-link" href="#">1</a></li>
|
||
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||
<li class="page-item">
|
||
<a class="page-link" href="#"><i class="bi bi-chevron-right"></i></a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
</section>
|
||
|
||
<!-- ============ 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>
|
||
|
||
<!-- ============ TESTIMONIALS SECTION ============ -->
|
||
<section class="page-section" id="section-testimonials">
|
||
<div class="page-header">
|
||
<div>
|
||
<h1 class="page-title">Testimonios</h1>
|
||
<p class="page-subtitle">Gestiona los testimonios de clientes</p>
|
||
</div>
|
||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#testimonialModal">
|
||
<i class="bi bi-plus-lg me-2"></i>Añadir testimonio
|
||
</button>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
<div class="card mb-4">
|
||
<div class="card-body">
|
||
<div class="d-flex gap-3">
|
||
<img src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100&h=100&fit=crop" class="rounded-circle" style="width: 60px; height: 60px; object-fit: cover;">
|
||
<div class="flex-grow-1">
|
||
<div class="d-flex justify-content-between align-items-start">
|
||
<div>
|
||
<h5 class="mb-1">Michael Schmidt</h5>
|
||
<p class="text-muted mb-2">🇩🇪 Alemania</p>
|
||
</div>
|
||
<div class="text-warning">
|
||
<i class="bi bi-star-fill"></i>
|
||
<i class="bi bi-star-fill"></i>
|
||
<i class="bi bi-star-fill"></i>
|
||
<i class="bi bi-star-fill"></i>
|
||
<i class="bi bi-star-fill"></i>
|
||
</div>
|
||
</div>
|
||
<p class="mb-2">"Encuentré mi terreno perfecto en solo 3 semanas. El equipo de TenerifeProp me ayudó con todo, desde la documentación hasta la conexión de servicios."</p>
|
||
<small class="text-muted">Hace 2 semanas</small>
|
||
</div>
|
||
</div>
|
||
<div class="mt-3 pt-3 border-top d-flex gap-2">
|
||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil me-1"></i>Editar</button>
|
||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash me-1"></i>Eliminar</button>
|
||
<span class="badge bg-success ms-auto">Activo</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="card mb-4">
|
||
<div class="card-body">
|
||
<div class="d-flex gap-3">
|
||
<img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=100&h=100&fit=crop" class="rounded-circle" style="width: 60px; height: 60px; object-fit: cover;">
|
||
<div class="flex-grow-1">
|
||
<div class="d-flex justify-content-between align-items-start">
|
||
<div>
|
||
<h5 class="mb-1">Anna Petrova</h5>
|
||
<p class="text-muted mb-2">🇷🇺 Rusia</p>
|
||
</div>
|
||
<div class="text-warning">
|
||
<i class="bi bi-star-fill"></i>
|
||
<i class="bi bi-star-fill"></i>
|
||
<i class="bi bi-star-fill"></i>
|
||
<i class="bi bi-star-fill"></i>
|
||
<i class="bi bi-star-fill"></i>
|
||
</div>
|
||
</div>
|
||
<p class="mb-2">"Las ruinas que compramos fueron restauradas y ahora tenemos la casa de nuestros sueños. El equipo,懂 todo el proceso legal."</p>
|
||
<small class="text-muted">Hace 1 mes</small>
|
||
</div>
|
||
</div>
|
||
<div class="mt-3 pt-3 border-top d-flex gap-2">
|
||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil me-1"></i>Editar</button>
|
||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash me-1"></i>Eliminar</button>
|
||
<span class="badge bg-success ms-auto">Activo</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ FAQ SECTION ============ -->
|
||
<section class="page-section" id="section-faq">
|
||
<div class="page-header">
|
||
<div>
|
||
<h1 class="page-title">FAQ</h1>
|
||
<p class="page-subtitle">Gestiona las preguntas frecuentes</p>
|
||
</div>
|
||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#faqModal">
|
||
<i class="bi bi-plus-lg me-2"></i>Añadir pregunta
|
||
</button>
|
||
</div>
|
||
|
||
<div class="accordion" id="faqAccordionAdmin">
|
||
<div class="accordion-item">
|
||
<h2 class="accordion-header">
|
||
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#faq1-admin">
|
||
<div class="d-flex justify-content-between align-items-center w-100 me-3">
|
||
<span>¿Puedo comprar terreno siendo extranjero en España?</span>
|
||
<div class="d-flex gap-2">
|
||
<span class="badge bg-success">Activo</span>
|
||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></button>
|
||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button>
|
||
</div>
|
||
</div>
|
||
</button>
|
||
</h2>
|
||
<div id="faq1-admin" class="accordion-collapse collapse show" data-bs-parent="#faqAccordionAdmin">
|
||
<div class="accordion-body">
|
||
Sí, absolutamente. España permite la compra de propiedades a ciudadanos extranjeros sin restricciones. Necesitará obtener un NIE (Número de Identificación de Extranjero) para completar la transacción.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="accordion-item">
|
||
<h2 class="accordion-header">
|
||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#faq2-admin">
|
||
<div class="d-flex justify-content-between align-items-center w-100 me-3">
|
||
<span>¿Qué costes adicionales hay que tener en cuenta al comprar?</span>
|
||
<div class="d-flex gap-2">
|
||
<span class="badge bg-success">Activo</span>
|
||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></button>
|
||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button>
|
||
</div>
|
||
</div>
|
||
</button>
|
||
</h2>
|
||
<div id="faq2-admin" class="accordion-collapse collapse" data-bs-parent="#faqAccordionAdmin">
|
||
<div class="accordion-body">
|
||
Además del precio de compra, debe presupuestar: Impuesto de Transmisiones Patrimoniales (ITP) 6.5-8%, gastos de notaría (aprox. 1%), registro de propiedad (0.5-1%), gestoría (0.5-1%) y honorarios de la agencia.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ SERVICES SECTION ============ -->
|
||
<section class="page-section" id="section-services">
|
||
<div class="page-header">
|
||
<div>
|
||
<h1 class="page-title">Servicios</h1>
|
||
<p class="page-subtitle">Gestiona los servicios que ofreces</p>
|
||
</div>
|
||
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#serviceModal">
|
||
<i class="bi bi-plus-lg me-2"></i>Añadir servicio
|
||
</button>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-md-4">
|
||
<div class="card text-center">
|
||
<div class="card-body">
|
||
<div class="service-icon mx-auto mb-3" style="width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); border-radius: 20px; display: flex; align-items: center; justify-content: center;">
|
||
<i class="bi bi-file-text text-white" style="font-size: 2rem;"></i>
|
||
</div>
|
||
<h5>Asesoría Legal</h5>
|
||
<p class="text-muted small">Verificación completa de la documentación</p>
|
||
<div class="d-flex justify-content-center gap-2 mt-3">
|
||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></button>
|
||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-4">
|
||
<div class="card text-center">
|
||
<div class="card-body">
|
||
<div class="service-icon mx-auto mb-3" style="width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); border-radius: 20px; display: flex; align-items: center; justify-content: center;">
|
||
<i class="bi bi-key text-white" style="font-size: 2rem;"></i>
|
||
</div>
|
||
<h5>Financiación Hipotecaria</h5>
|
||
<p class="text-muted small">Apoyo en obtención de préstamos hipotecarios</p>
|
||
<div class="d-flex justify-content-center gap-2 mt-3">
|
||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></button>
|
||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-4">
|
||
<div class="card text-center">
|
||
<div class="card-body">
|
||
<div class="service-icon mx-auto mb-3" style="width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); border-radius: 20px; display: flex; align-items: center; justify-content: center;">
|
||
<i class="bi bi-tools text-white" style="font-size: 2rem;"></i>
|
||
</div>
|
||
<h5>Reformas y Construcción</h5>
|
||
<p class="text-muted small">Red de arquitectos y constructores locales</p>
|
||
<div class="d-flex justify-content-center gap-2 mt-3">
|
||
<button class="btn btn-sm btn-outline-primary"><i class="bi bi-pencil"></i></button>
|
||
<button class="btn btn-sm btn-outline-danger"><i class="bi bi-trash"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ SETTINGS SECTION ============ -->
|
||
<section class="page-section" id="section-settings">
|
||
<div class="page-header">
|
||
<div>
|
||
<h1 class="page-title">Configuración</h1>
|
||
<p class="page-subtitle">Ajustes generales del sistema</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-md-3">
|
||
<div class="list-group">
|
||
<a href="#settings-general" class="list-group-item list-group-item-action active" data-bs-toggle="list">
|
||
<i class="bi bi-gear me-2"></i>General
|
||
</a>
|
||
<a href="#settings-contact" class="list-group-item list-group-item-action" data-bs-toggle="list">
|
||
<i class="bi bi-telephone me-2"></i>Contacto
|
||
</a>
|
||
<a href="#settings-notifications" class="list-group-item list-group-item-action" data-bs-toggle="list">
|
||
<i class="bi bi-bell me-2"></i>Notificaciones
|
||
</a>
|
||
<a href="#settings-integrations" class="list-group-item list-group-item-action" data-bs-toggle="list">
|
||
<i class="bi bi-plug me-2"></i>Integraciones
|
||
</a>
|
||
<a href="#settings-seo" class="list-group-item list-group-item-action" data-bs-toggle="list">
|
||
<i class="bi bi-search me-2"></i>SEO
|
||
</a>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-9">
|
||
<div class="tab-content">
|
||
<div class="tab-pane fade show active" id="settings-general">
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<h5 class="mb-0">Configuración General</h5>
|
||
</div>
|
||
<div class="card-body">
|
||
<div class="row mb-3">
|
||
<div class="col-md-6">
|
||
<label class="form-label">Nombre de la empresa</label>
|
||
<input type="text" class="form-control" value="TenerifeProp">
|
||
</div>
|
||
<div class="col-md-6">
|
||
<label class="form-label">Idioma principal</label>
|
||
<select class="form-select">
|
||
<option value="es" selected>Español</option>
|
||
<option value="ru">Русский</option>
|
||
<option value="en">English</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Descripción</label>
|
||
<textarea class="form-control" rows="3">Agencia inmobiliaria especializada en la venta de terrenos y propiedades en Tenerife.</textarea>
|
||
</div>
|
||
<button class="btn btn-primary">Guardar cambios</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane fade" id="settings-contact">
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<h5 class="mb-0">Información de Contacto</h5>
|
||
</div>
|
||
<div class="card-body">
|
||
<div class="row mb-3">
|
||
<div class="col-md-6">
|
||
<label class="form-label">Teléfono</label>
|
||
<input type="text" class="form-control" value="+34 922 123 456">
|
||
</div>
|
||
<div class="col-md-6">
|
||
<label class="form-label">WhatsApp</label>
|
||
<input type="text" class="form-control" value="+34 600 123 456">
|
||
</div>
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Email</label>
|
||
<input type="email" class="form-control" value="info@tenerifeprop.com">
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Dirección</label>
|
||
<textarea class="form-control" rows="2">Avda. de la Constitución, 25
|
||
38640 Adeje, Tenerife, España</textarea>
|
||
</div>
|
||
<button class="btn btn-primary">Guardar cambios</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ USERS SECTION ============ -->
|
||
<section class="page-section" id="section-users">
|
||
<div class="page-header">
|
||
<div>
|
||
<h1 class="page-title">Usuarios</h1>
|
||
<p class="page-subtitle">Gestiona los usuarios del sistema</p>
|
||
</div>
|
||
<button class="btn btn-primary">
|
||
<i class="bi bi-plus-lg me-2"></i>Añadir usuario
|
||
</button>
|
||
</div>
|
||
|
||
<div class="table-card">
|
||
<div class="table-wrapper">
|
||
<table class="table table-hover mb-0">
|
||
<thead>
|
||
<tr>
|
||
<th>Usuario</th>
|
||
<th>Email</th>
|
||
<th>Rol</th>
|
||
<th>Último acceso</th>
|
||
<th>Estado</th>
|
||
<th>Acciones</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<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">
|
||
Carlos Martínez
|
||
<small>Admin principal</small>
|
||
</div>
|
||
</div>
|
||
</td>
|
||
<td>carlos@tenerifeprop.com</td>
|
||
<td><span class="badge bg-danger">Administrador</span></td>
|
||
<td>Hace 5 minutos</td>
|
||
<td><span class="table-badge completed">Activo</span></td>
|
||
<td>
|
||
<div class="table-actions">
|
||
<button class="table-action-btn edit" title="Editar"><i class="bi bi-pencil"></i></button>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<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">
|
||
María García
|
||
<small>Agente inmobiliario</small>
|
||
</div>
|
||
</div>
|
||
</td>
|
||
<td>maria@tenerifeprop.com</td>
|
||
<td><span class="badge bg-primary">Agente</span></td>
|
||
<td>Hace 1 hora</td>
|
||
<td><span class="table-badge completed">Activo</span></td>
|
||
<td>
|
||
<div class="table-actions">
|
||
<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>
|
||
|
||
<!-- ============ ANALYTICS SECTION ============ -->
|
||
<section class="page-section" id="section-analytics">
|
||
<div class="page-header">
|
||
<div>
|
||
<h1 class="page-title">Estadísticas detalladas</h1>
|
||
<p class="page-subtitle">Análisis profundo del rendimiento</p>
|
||
</div>
|
||
<div class="d-flex gap-3">
|
||
<select class="form-select" style="width: 200px;">
|
||
<option>Últimos 30 días</option>
|
||
<option>Últimos 90 días</option>
|
||
<option>Este año</option>
|
||
</select>
|
||
<button class="btn btn-primary">
|
||
<i class="bi bi-download me-2"></i>Exportar informe
|
||
</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="stats-grid">
|
||
<div class="stat-card">
|
||
<div class="stat-card-header">
|
||
<div class="stat-card-icon green"><i class="bi bi-people"></i></div>
|
||
<div class="stat-card-trend up"><i class="bi bi-arrow-up"></i>18%</div>
|
||
</div>
|
||
<div class="stat-card-value">8,452</div>
|
||
<div class="stat-card-label">Visitantes únicos</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<div class="stat-card-header">
|
||
<div class="stat-card-icon blue"><i class="bi bi-clock-history"></i></div>
|
||
<div class="stat-card-trend up"><i class="bi bi-arrow-up"></i>12%</div>
|
||
</div>
|
||
<div class="stat-card-value">3:24</div>
|
||
<div class="stat-card-label">Tiempo en sitio (min)</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<div class="stat-card-header">
|
||
<div class="stat-card-icon orange"><i class="bi bi-bounce"></i></div>
|
||
<div class="stat-card-trend down"><i class="bi bi-arrow-down"></i>3%</div>
|
||
</div>
|
||
<div class="stat-card-value">42%</div>
|
||
<div class="stat-card-label">Rebote</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<div class="stat-card-header">
|
||
<div class="stat-card-icon red"><i class="bi bi-calendar-check"></i></div>
|
||
<div class="stat-card-trend up"><i class="bi bi-arrow-up"></i>25%</div>
|
||
</div>
|
||
<div class="stat-card-value">156</div>
|
||
<div class="stat-card-label">Conversiones</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="chart-card mt-4">
|
||
<div class="chart-card-header">
|
||
<h4 class="chart-card-title">Rendimiento por día</h4>
|
||
</div>
|
||
<div class="chart-container" style="height: 350px;">
|
||
<canvas id="dailyPerformanceChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ============ TRAFFIC SECTION ============ -->
|
||
<section class="page-section" id="section-traffic">
|
||
<div class="page-header">
|
||
<div>
|
||
<h1 class="page-title">Tráfico</h1>
|
||
<p class="page-subtitle">Fuentes de tráfico y comportamiento</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row">
|
||
<div class="col-md-6">
|
||
<div class="chart-card">
|
||
<div class="chart-card-header">
|
||
<h4 class="chart-card-title">Dispositivos</h4>
|
||
</div>
|
||
<div class="chart-container" style="height: 250px;">
|
||
<canvas id="devicesChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<div class="chart-card">
|
||
<div class="chart-card-header">
|
||
<h4 class="chart-card-title">Geolocalización (Top 5 países)</h4>
|
||
</div>
|
||
<div class="chart-container" style="height: 250px;">
|
||
<canvas id="geoChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="table-card mt-4">
|
||
<div class="table-card-header">
|
||
<h4 class="table-card-title">Páginas más visitadas</h4>
|
||
</div>
|
||
<div class="table-wrapper">
|
||
<table class="table table-hover mb-0">
|
||
<thead>
|
||
<tr>
|
||
<th>Página</th>
|
||
<th>Vistas</th>
|
||
<th>Únicos</th>
|
||
<th>Tiempo avg</th>
|
||
<th>Tasa de rebote</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>/terreno-urbano-adeje</td>
|
||
<td>2,345</td>
|
||
<td>1,890</td>
|
||
<td>4:32</td>
|
||
<td>28%</td>
|
||
</tr>
|
||
<tr>
|
||
<td>/catalogo</td>
|
||
<td>1,892</td>
|
||
<td>1,456</td>
|
||
<td>3:45</td>
|
||
<td>35%</td>
|
||
</tr>
|
||
<tr>
|
||
<td>/villa-los-cristianos</td>
|
||
<td>1,567</td>
|
||
<td>1,234</td>
|
||
<td>5:12</td>
|
||
<td>22%</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</main>
|
||
</div>
|
||
|
||
<!-- ============ PROPERTY MODAL ============ -->
|
||
<div class="modal fade" id="propertyModal" tabindex="-1">
|
||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<h5 class="modal-title"><i class="bi bi-building me-2"></i>Añadir nueva propiedad</h5>
|
||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="row">
|
||
<div class="col-md-8">
|
||
<div class="mb-3">
|
||
<label class="form-label">Título (ES)</label>
|
||
<input type="text" class="form-control" placeholder="Terreno Urbano en Adeje">
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Título (RU)</label>
|
||
<input type="text" class="form-control" placeholder="Городской участок в Адехе">
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-md-6 mb-3">
|
||
<label class="form-label">Tipo de propiedad</label>
|
||
<select class="form-select">
|
||
<option value="">Seleccionar tipo</option>
|
||
<option value="agricultural">Terreno agrícola</option>
|
||
<option value="urban">Terreno urbano</option>
|
||
<option value="house">Casa</option>
|
||
<option value="apartment">Apartamento</option>
|
||
<option value="ruins">Ruinas</option>
|
||
</select>
|
||
</div>
|
||
<div class="col-md-6 mb-3">
|
||
<label class="form-label">Estado</label>
|
||
<select class="form-select">
|
||
<option value="active">Activo</option>
|
||
<option value="inactive">Inactivo</option>
|
||
<option value="sold">Vendido</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-md-6 mb-3">
|
||
<label class="form-label">Precio (€)</label>
|
||
<input type="number" class="form-control" placeholder="385000">
|
||
</div>
|
||
<div class="col-md-6 mb-3">
|
||
<label class="form-label">Área (m²)</label>
|
||
<input type="number" class="form-control" placeholder="2500">
|
||
</div>
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Ubicación</label>
|
||
<input type="text" class="form-control" placeholder="Adeje, Tenerife Sur">
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Descripción (ES)</label>
|
||
<textarea class="form-control" rows="4" placeholder="Descripción detallada de la propiedad..."></textarea>
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Descripción (RU)</label>
|
||
<textarea class="form-control" rows="4" placeholder="Подробное описание объекта..."></textarea>
|
||
</div>
|
||
</div>
|
||
<div class="col-md-4">
|
||
<div class="mb-3">
|
||
<label class="form-label">Coordenadas</label>
|
||
<div class="row g-2">
|
||
<div class="col-6">
|
||
<input type="text" class="form-control" placeholder="Lat">
|
||
</div>
|
||
<div class="col-6">
|
||
<input type="text" class="form-control" placeholder="Lng">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Comunicaciones</label>
|
||
<div class="form-check mb-2">
|
||
<input class="form-check-input" type="checkbox" id="modalWater" checked>
|
||
<label class="form-check-label" for="modalWater">Agua</label>
|
||
</div>
|
||
<div class="form-check mb-2">
|
||
<input class="form-check-input" type="checkbox" id="modalElectricity" checked>
|
||
<label class="form-check-label" for="modalElectricity">Electricidad</label>
|
||
</div>
|
||
<div class="form-check mb-2">
|
||
<input class="form-check-input" type="checkbox" id="modalRoad" checked>
|
||
<label class="form-check-label" for="modalRoad">Acceso rodado</label>
|
||
</div>
|
||
<div class="form-check mb-2">
|
||
<input class="form-check-input" type="checkbox" id="modalLicense">
|
||
<label class="form-check-label" for="modalLicense">Licencia de obras</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<input class="form-check-input" type="checkbox" id="modalSeaView">
|
||
<label class="form-check-label" for="modalSeaView">Vista al mar</label>
|
||
</div>
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Badges</label>
|
||
<div class="form-check">
|
||
<input class="form-check-input" type="checkbox" id="modalNew">
|
||
<label class="form-check-label" for="modalNew">Nuevo</label>
|
||
</div>
|
||
<div class="form-check">
|
||
<input class="form-check-input" type="checkbox" id="modalExclusive">
|
||
<label class="form-check-label" for="modalExclusive">Exclusivo</label>
|
||
</div>
|
||
</div>
|
||
<div class="mb-3">
|
||
<label class="form-label">Imágenes</label>
|
||
<div class="file-upload" onclick="document.getElementById('imageUpload').click()">
|
||
<i class="bi bi-cloud-arrow-up"></i>
|
||
<h6>Arrastra imágenes aquí</h6>
|
||
<p>o haz clic para seleccionar</p>
|
||
</div>
|
||
<input type="file" id="imageUpload" multiple accept="image/*" style="display: none;">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancelar</button>
|
||
<button type="button" class="btn btn-primary">
|
||
<i class="bi bi-check-lg me-2"></i>Guardar propiedad
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Scripts -->
|
||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/datatables.net@1.13.8/js/jquery.dataTables.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/datatables.net-bs5@1.13.8/js/dataTables.bootstrap5.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/moment@2.30.1/moment.min.js"></script>
|
||
<script src="https://cdn.jsdelivr.net/npm/lightpick@1.6.2/lightpick.min.js"></script>
|
||
|
||
<script>
|
||
// ============ SIDEBAR NAVIGATION ============
|
||
$(document).ready(function() {
|
||
// Navigation
|
||
$('.sidebar-link, .quick-action').on('click', function(e) {
|
||
e.preventDefault();
|
||
const section = $(this).data('section');
|
||
|
||
// Update sidebar active
|
||
$('.sidebar-link').removeClass('active');
|
||
$(`.sidebar-link[data-section="${section}"]`).addClass('active');
|
||
|
||
// Show section
|
||
$('.page-section').removeClass('active');
|
||
$(`#section-${section}`).addClass('active');
|
||
|
||
// Scroll to top
|
||
window.scrollTo(0, 0);
|
||
});
|
||
|
||
// Sidebar toggle
|
||
$('#sidebarToggle').on('click', function() {
|
||
const sidebarWidth = $('#sidebar').css('width');
|
||
if (sidebarWidth === '280px') {
|
||
$('#sidebar').css('width', '80px');
|
||
$('.sidebar-logo-text, .sidebar-section-title, .sidebar-link span, .sidebar-link .badge, .sidebar-user-info, .sidebar-footer').hide();
|
||
$('.sidebar-link').css('justify-content', 'center');
|
||
$('.sidebar-link i').css('margin', '0');
|
||
$('.sidebar-logo').css('justify-content', 'center');
|
||
$('.sidebar-user').css('justify-content', 'center');
|
||
$('.main-wrapper').css('margin-left', '80px');
|
||
} else {
|
||
$('#sidebar').css('width', '280px');
|
||
$('.sidebar-logo-text, .sidebar-section-title, .sidebar-link span, .sidebar-link .badge, .sidebar-user-info, .sidebar-footer').show();
|
||
$('.sidebar-link').css('justify-content', 'flex-start');
|
||
$('.sidebar-link i').css('margin-right', '14px');
|
||
$('.sidebar-logo').css('justify-content', 'flex-start');
|
||
$('.sidebar-user').css('justify-content', 'flex-start');
|
||
$('.main-wrapper').css('margin-left', '280px');
|
||
}
|
||
});
|
||
|
||
// Initialize DataTables
|
||
$('#leadsTable, #fullLeadsTable').DataTable({
|
||
language: {
|
||
url: 'https://cdn.datatables.net/plug-ins/1.13.8/i18n/es-ES.json'
|
||
},
|
||
pageLength: 10,
|
||
ordering: true,
|
||
order: [[6, 'desc']]
|
||
});
|
||
|
||
// ============ CHARTS ============
|
||
const chartColors = {
|
||
primary: '#1a5f4a',
|
||
primaryLight: '#2d8f6f',
|
||
secondary: '#d4a853',
|
||
success: '#10b981',
|
||
warning: '#f59e0b',
|
||
danger: '#ef4444',
|
||
info: '#3b82f6',
|
||
gray: '#94a3b8'
|
||
};
|
||
|
||
// Performance Chart
|
||
const performanceCtx = document.getElementById('performanceChart').getContext('2d');
|
||
new Chart(performanceCtx, {
|
||
type: 'line',
|
||
data: {
|
||
labels: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
|
||
datasets: [{
|
||
label: 'Vistas',
|
||
data: [1200, 1900, 2400, 2100, 2800, 3200, 2900, 3500, 3100, 3800, 3400, 4200],
|
||
borderColor: chartColors.primary,
|
||
backgroundColor: 'rgba(26, 95, 74, 0.1)',
|
||
fill: true,
|
||
tension: 0.4,
|
||
pointRadius: 4,
|
||
pointHoverRadius: 6
|
||
}, {
|
||
label: 'Leads',
|
||
data: [80, 120, 150, 130, 180, 210, 190, 230, 200, 260, 240, 280],
|
||
borderColor: chartColors.secondary,
|
||
backgroundColor: 'rgba(212, 168, 83, 0.1)',
|
||
fill: true,
|
||
tension: 0.4,
|
||
pointRadius: 4,
|
||
pointHoverRadius: 6
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: {
|
||
position: 'top',
|
||
labels: {
|
||
usePointStyle: true,
|
||
padding: 20
|
||
}
|
||
}
|
||
},
|
||
scales: {
|
||
y: {
|
||
beginAtZero: true,
|
||
grid: {
|
||
color: 'rgba(0,0,0,0.05)'
|
||
}
|
||
},
|
||
x: {
|
||
grid: {
|
||
display: false
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
// Traffic Sources Chart
|
||
const trafficCtx = document.getElementById('trafficChart').getContext('2d');
|
||
new Chart(trafficCtx, {
|
||
type: 'doughnut',
|
||
data: {
|
||
labels: ['Google', 'Directo', 'Instagram', 'Referidos', 'Facebook'],
|
||
datasets: [{
|
||
data: [35, 25, 18, 12, 10],
|
||
backgroundColor: [
|
||
chartColors.primary,
|
||
chartColors.secondary,
|
||
chartColors.info,
|
||
chartColors.success,
|
||
chartColors.warning
|
||
],
|
||
borderWidth: 0
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: {
|
||
position: 'bottom',
|
||
labels: {
|
||
usePointStyle: true,
|
||
padding: 15
|
||
}
|
||
}
|
||
},
|
||
cutout: '70%'
|
||
}
|
||
});
|
||
|
||
// Property Types Chart
|
||
const typesCtx = document.getElementById('typesChart').getContext('2d');
|
||
new Chart(typesCtx, {
|
||
type: 'bar',
|
||
data: {
|
||
labels: ['Agrícola', 'Urbano', 'Casas', 'Apartamentos', 'Ruinas'],
|
||
datasets: [{
|
||
label: 'Propiedades',
|
||
data: [25, 30, 20, 15, 10],
|
||
backgroundColor: [
|
||
chartColors.primary,
|
||
'#4a90d9',
|
||
'#9b59b6',
|
||
chartColors.secondary,
|
||
chartColors.danger
|
||
],
|
||
borderRadius: 8
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: { display: false }
|
||
},
|
||
scales: {
|
||
y: {
|
||
beginAtZero: true,
|
||
grid: { color: 'rgba(0,0,0,0.05)' }
|
||
},
|
||
x: {
|
||
grid: { display: false }
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
// Leads Status Chart
|
||
const leadsCtx = document.getElementById('leadsChart').getContext('2d');
|
||
new Chart(leadsCtx, {
|
||
type: 'polarArea',
|
||
data: {
|
||
labels: ['Nuevos', 'Pendientes', 'Contactados', 'Cualificados', 'Convertidos'],
|
||
datasets: [{
|
||
data: [12, 8, 15, 6, 4],
|
||
backgroundColor: [
|
||
'rgba(59, 130, 246, 0.8)',
|
||
'rgba(245, 158, 11, 0.8)',
|
||
'rgba(16, 185, 129, 0.8)',
|
||
'rgba(139, 92, 246, 0.8)',
|
||
'rgba(34, 197, 94, 0.8)'
|
||
],
|
||
borderWidth: 0
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: {
|
||
position: 'bottom',
|
||
labels: { usePointStyle: true, padding: 10, font: { size: 10 } }
|
||
}
|
||
},
|
||
scales: {
|
||
r: {
|
||
grid: { display: false }
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
// Top Properties Chart
|
||
const topPropsCtx = document.getElementById('topPropertiesChart').getContext('2d');
|
||
new Chart(topPropsCtx, {
|
||
type: 'bar',
|
||
data: {
|
||
labels: ['Terreno Adeje', 'Villa Marina', 'Ático Luz', 'Casa Palmera', 'Solar Norte'],
|
||
datasets: [{
|
||
label: 'Vistas',
|
||
data: [1245, 986, 876, 754, 623],
|
||
backgroundColor: chartColors.primary,
|
||
borderRadius: 6
|
||
}]
|
||
},
|
||
options: {
|
||
indexAxis: 'y',
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: { legend: { display: false } },
|
||
scales: {
|
||
x: { grid: { color: 'rgba(0,0,0,0.05)' } },
|
||
y: { grid: { display: false } }
|
||
}
|
||
}
|
||
});
|
||
|
||
// Daily Performance Chart (Analytics)
|
||
const dailyCtx = document.getElementById('dailyPerformanceChart').getContext('2d');
|
||
new Chart(dailyCtx, {
|
||
type: 'bar',
|
||
data: {
|
||
labels: Array.from({length: 30}, (_, i) => `Día ${i + 1}`),
|
||
datasets: [{
|
||
label: 'Visitantes',
|
||
data: Array.from({length: 30}, () => Math.floor(Math.random() * 400) + 100),
|
||
backgroundColor: 'rgba(26, 95, 74, 0.7)',
|
||
borderRadius: 4
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: { legend: { display: false } },
|
||
scales: {
|
||
y: { beginAtZero: true, grid: { color: 'rgba(0,0,0,0.05)' } },
|
||
x: { grid: { display: false } }
|
||
}
|
||
}
|
||
});
|
||
|
||
// Devices Chart
|
||
const devicesCtx = document.getElementById('devicesChart').getContext('2d');
|
||
new Chart(devicesCtx, {
|
||
type: 'pie',
|
||
data: {
|
||
labels: ['Móvil', 'Desktop', 'Tablet'],
|
||
datasets: [{
|
||
data: [58, 35, 7],
|
||
backgroundColor: [chartColors.primary, chartColors.secondary, chartColors.info],
|
||
borderWidth: 0
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: { position: 'bottom', labels: { usePointStyle: true, padding: 15 } }
|
||
}
|
||
}
|
||
});
|
||
|
||
// Geo Chart
|
||
const geoCtx = document.getElementById('geoChart').getContext('2d');
|
||
new Chart(geoCtx, {
|
||
type: 'bar',
|
||
data: {
|
||
labels: ['España', 'Rusia', 'Alemania', 'Reino Unido', 'Francia'],
|
||
datasets: [{
|
||
label: 'Visitantes',
|
||
data: [2456, 1234, 987, 876, 654],
|
||
backgroundColor: [
|
||
'#e74c3c',
|
||
'#3498db',
|
||
'#f1c40f',
|
||
'#9b59b6',
|
||
'#1abc9c'
|
||
],
|
||
borderRadius: 8
|
||
}]
|
||
},
|
||
options: {
|
||
indexAxis: 'y',
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: { legend: { display: false } },
|
||
scales: {
|
||
x: { grid: { color: 'rgba(0,0,0,0.05)' } },
|
||
y: { grid: { display: false } }
|
||
}
|
||
}
|
||
});
|
||
|
||
// Period buttons
|
||
$('.chart-period-btn').on('click', function() {
|
||
$('.chart-period-btn').removeClass('active');
|
||
$(this).addClass('active');
|
||
// Here you would update the chart data based on the selected period
|
||
});
|
||
|
||
// Date range picker
|
||
new Lightpick({
|
||
field: document.getElementById('dateRange'),
|
||
singleMode: false,
|
||
numberOfMonths: 2,
|
||
locale: {
|
||
buttons: {
|
||
prev: '←',
|
||
next: '→',
|
||
close: '×'
|
||
}
|
||
}
|
||
});
|
||
|
||
new Lightpick({
|
||
field: document.getElementById('leadDateRange'),
|
||
singleMode: false,
|
||
numberOfMonths: 2,
|
||
locale: {
|
||
buttons: {
|
||
prev: '←',
|
||
next: '→',
|
||
close: '×'
|
||
}
|
||
}
|
||
});
|
||
|
||
// Language switcher
|
||
$('.topbar-lang button, .lang-btn').on('click', function() {
|
||
const lang = $(this).data('lang');
|
||
$('.topbar-lang button, .lang-btn').removeClass('active');
|
||
$(this).addClass('active');
|
||
$('html').attr('lang', lang);
|
||
// Here you would switch all translations
|
||
});
|
||
|
||
// Search functionality
|
||
$('#globalSearch, #searchProperty, #searchLead').on('keyup', function() {
|
||
const searchText = $(this).val().toLowerCase();
|
||
// Filter functionality would go here
|
||
});
|
||
|
||
// Filter change handlers
|
||
$('#filterType, #filterStatus, #leadStatus, #leadSource, #leadProperty').on('change', function() {
|
||
// Filter logic would go here
|
||
console.log('Filter changed:', $(this).attr('id'), $(this).val());
|
||
});
|
||
|
||
// Table row actions
|
||
$('.table-action-btn').on('click', function() {
|
||
const action = $(this).attr('title');
|
||
const row = $(this).closest('tr');
|
||
// Handle action
|
||
console.log('Action:', action, 'Row:', row.find('.table-user-info h6, .table-property-info h6').text());
|
||
});
|
||
|
||
// Property card actions
|
||
$('.property-admin-card-action').on('click', function(e) {
|
||
e.preventDefault();
|
||
const action = $(this).attr('title');
|
||
const card = $(this).closest('.property-admin-card');
|
||
const title = card.find('.property-admin-card-title').text();
|
||
console.log('Action:', action, 'Property:', title);
|
||
});
|
||
|
||
// File upload preview
|
||
$('#imageUpload').on('change', function() {
|
||
const files = this.files;
|
||
if (files.length > 0) {
|
||
console.log('Selected files:', files.length);
|
||
// Preview functionality would go here
|
||
}
|
||
});
|
||
|
||
// Counter animation
|
||
function animateCounter(element, target, duration) {
|
||
let start = 0;
|
||
const increment = target / (duration / 16);
|
||
const timer = setInterval(() => {
|
||
start += increment;
|
||
if (start >= target) {
|
||
element.text(target.toLocaleString());
|
||
clearInterval(timer);
|
||
} else {
|
||
element.text(Math.floor(start).toLocaleString());
|
||
}
|
||
}, 16);
|
||
}
|
||
|
||
// Animate stats on load
|
||
setTimeout(() => {
|
||
animateCounter($('#statViews'), 24892, 1500);
|
||
animateCounter($('#statClicks'), 3421, 1500);
|
||
animateCounter($('#statLeads'), 156, 1500);
|
||
}, 500);
|
||
|
||
// Notifications dropdown
|
||
$('.topbar-btn').first().on('click', function() {
|
||
// Show notifications
|
||
console.log('Show notifications');
|
||
});
|
||
|
||
// Profile dropdown
|
||
$('#profileDropdown').on('click', function() {
|
||
// Show profile menu
|
||
console.log('Show profile menu');
|
||
});
|
||
|
||
// Responsive sidebar
|
||
if ($(window).width() < 1200) {
|
||
$('#sidebar').css('width', '80px');
|
||
$('.sidebar-logo-text, .sidebar-section-title, .sidebar-link span, .sidebar-link .badge, .sidebar-user-info, .sidebar-footer').hide();
|
||
$('.sidebar-link').css('justify-content', 'center');
|
||
$('.main-wrapper').css('margin-left', '80px');
|
||
}
|
||
});
|
||
|
||
// Authentication check
|
||
(async function checkAuth() {
|
||
try {
|
||
const res = await fetch('/api/auth/me');
|
||
const data = await res.json();
|
||
|
||
if (!data.success || !data.data) {
|
||
// Not authenticated, redirect to login
|
||
window.location.href = '/login';
|
||
return;
|
||
}
|
||
|
||
// Store user info
|
||
const user = data.data;
|
||
window.currentUser = user;
|
||
localStorage.setItem('user', JSON.stringify(user));
|
||
|
||
// Update UI with user info
|
||
const userNameEl = document.querySelector('.sidebar-user-info h6, .sidebar-user-name');
|
||
const userRoleEl = document.querySelector('.sidebar-user-info small, .sidebar-user-role');
|
||
|
||
if (userNameEl) {
|
||
userNameEl.textContent = user.name || 'Admin';
|
||
}
|
||
if (userRoleEl) {
|
||
const roleNames = {
|
||
admin: 'Administrador',
|
||
agent: 'Agente',
|
||
editor: 'Editor'
|
||
};
|
||
userRoleEl.textContent = roleNames[user.role] || user.role;
|
||
}
|
||
|
||
// Initialize admin panel
|
||
if (window.admin) {
|
||
window.admin.init();
|
||
}
|
||
} catch (error) {
|
||
console.error('Auth check failed:', error);
|
||
window.location.href = '/login';
|
||
}
|
||
})();
|
||
|
||
// Logout function
|
||
async function logout() {
|
||
try {
|
||
await fetch('/api/auth/logout', { method: 'POST' });
|
||
localStorage.removeItem('user');
|
||
window.location.href = '/login';
|
||
} catch (error) {
|
||
console.error('Logout failed:', error);
|
||
window.location.href = '/login';
|
||
}
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|