rentalai-optimizer-pro / analytics.html
Matteofaedda's picture
togli la parte di login
6fde72d verified
Raw History Blame Contribute Delete
8.85 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Performance Analytics | RentalAI Optimizer Pro</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body class="bg-gray-50">
<custom-navbar></custom-navbar>
<main class="container mx-auto px-4 py-8">
<div class="mb-8">
<h1 class="text-3xl font-bold text-gray-800">Performance Analytics</h1>
<p class="text-gray-600">Monitor your property performance across key metrics</p>
</div>
<!-- Date Range Selector -->
<div class="bg-white rounded-xl shadow p-6 mb-8">
<div class="flex flex-col md:flex-row md:items-center md:justify-between">
<div>
<h3 class="text-lg font-semibold text-gray-800">Date Range</h3>
<p class="text-sm text-gray-500">Select period to analyze</p>
</div>
<div class="mt-4 md:mt-0 flex space-x-2">
<button class="px-4 py-2 bg-indigo-600 text-white rounded-lg">Last 30 Days</button>
<button class="px-4 py-2 bg-gray-200 text-gray-800 rounded-lg">Last Quarter</button>
<button class="px-4 py-2 bg-gray-200 text-gray-800 rounded-lg">Custom Range</button>
</div>
</div>
</div>
<!-- KPI Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white rounded-xl shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">Occupancy Rate</p>
<h3 class="text-2xl font-bold text-gray-800">78%</h3>
</div>
<div class="bg-green-100 p-3 rounded-lg">
<i data-feather="calendar" class="text-green-600"></i>
</div>
</div>
<p class="text-sm text-green-600 mt-2">
<i data-feather="trending-up" class="inline"></i> 5% from last period
</p>
</div>
<div class="bg-white rounded-xl shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">Average Daily Rate</p>
<h3 class="text-2xl font-bold text-gray-800">€125</h3>
</div>
<div class="bg-blue-100 p-3 rounded-lg">
<i data-feather="dollar-sign" class="text-blue-600"></i>
</div>
</div>
<p class="text-sm text-green-600 mt-2">
<i data-feather="trending-up" class="inline"></i> 8% from last period
</p>
</div>
<div class="bg-white rounded-xl shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">Revenue</p>
<h3 class="text-2xl font-bold text-gray-800">€12,450</h3>
</div>
<div class="bg-purple-100 p-3 rounded-lg">
<i data-feather="credit-card" class="text-purple-600"></i>
</div>
</div>
<p class="text-sm text-green-600 mt-2">
<i data-feather="trending-up" class="inline"></i> 12% from last period
</p>
</div>
</div>
<!-- Charts -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
<div class="bg-white rounded-xl shadow p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-800">Occupancy Trends</h3>
</div>
<div class="h-64">
<canvas id="occupancyChart"></canvas>
</div>
</div>
<div class="bg-white rounded-xl shadow p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-semibold text-gray-800">Revenue Trends</h3>
</div>
<div class="h-64">
<canvas id="revenueChart"></canvas>
</div>
</div>
</div>
<!-- Performance Comparison -->
<div class="bg-white rounded-xl shadow overflow-hidden mb-8">
<div class="p-6 border-b border-gray-200">
<h3 class="text-lg font-semibold text-gray-800">Performance vs Market</h3>
</div>
<div class="p-6">
<div class="h-64">
<canvas id="comparisonChart"></canvas>
</div>
</div>
</div>
</main>
<custom-footer></custom-footer>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
// Initialize charts
document.addEventListener('DOMContentLoaded', function() {
// Occupancy Chart
const occupancyCtx = document.getElementById('occupancyChart').getContext('2d');
const occupancyChart = new Chart(occupancyCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [{
label: 'Occupancy Rate',
data: [75, 78, 82, 80, 85, 88],
borderColor: '#4f46e5',
backgroundColor: 'rgba(79, 70, 229, 0.1)',
borderWidth: 2,
tension: 0.3,
fill: true
}]
},
options: {
responsive: true,
plugins: {
legend: {
display: false
}
},
scales: {
y: {
beginAtZero: true,
max: 100
}
}
}
});
// Revenue Chart
const revenueCtx = document.getElementById('revenueChart').getContext('2d');
const revenueChart = new Chart(revenueCtx, {
type: 'bar',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [{
label: 'Revenue (€)',
data: [8500, 9200, 10500, 11000, 12450, 13200],
backgroundColor: 'rgba(79, 70, 229, 0.7)',
borderColor: 'rgba(79, 70, 229, 1)',
borderWidth: 1
}]
},
options: {
responsive: true,
plugins: {
legend: {
display: false
}
}
}
});
// Comparison Chart
const comparisonCtx = document.getElementById('comparisonChart').getContext('2d');
const comparisonChart = new Chart(comparisonCtx, {
type: 'bar',
data: {
labels: ['Your Property', 'Market Average', 'Top 10%'],
datasets: [{
label: 'Occupancy Rate',
data: [88, 75, 92],
backgroundColor: '#4f46e5'
}, {
label: 'Daily Rate',
data: [125, 95, 140],
backgroundColor: '#8b5cf6'
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'bottom'
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
});
</script>
</body>
</html>