communitypulse-hub / admin-reports.html
vanrowin's picture
complete all codes including user registration, manage finances, member management, generate reports and community settings
743a488 verified
Raw
History Blame Contribute Delete
10.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reports | CommunityPulse Hub</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></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 min-h-screen flex flex-col">
<custom-navbar></custom-navbar>
<main class="flex-grow container mx-auto px-4 py-8">
<div class="mb-8">
<h1 class="text-2xl font-bold text-gray-800">Financial Reports</h1>
<p class="text-gray-600">Generate and view financial reports for your community</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
<div class="lg:col-span-2 bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-center mb-6">
<h3 class="text-lg font-medium text-gray-900">Monthly Financial Overview</h3>
<select class="border border-gray-300 rounded-md px-3 py-1 text-sm">
<option>Last 6 Months</option>
<option>This Year</option>
<option>Last Year</option>
<option>Custom Range</option>
</select>
</div>
<canvas id="monthlyChart" height="300"></canvas>
</div>
<div class="bg-white rounded-lg shadow p-6">
<h3 class="text-lg font-medium text-gray-900 mb-6">Quick Reports</h3>
<div class="space-y-4">
<a href="#" class="block p-4 bg-gray-50 hover:bg-gray-100 rounded-lg transition duration-150 flex items-center gap-3">
<div class="p-3 rounded-full bg-primary-100 text-primary-500">
<i data-feather="file-text" class="w-5 h-5"></i>
</div>
<div>
<p class="font-medium">Monthly Dues Report</p>
<p class="text-sm text-gray-500">View all dues payments</p>
</div>
</a>
<a href="#" class="block p-4 bg-gray-50 hover:bg-gray-100 rounded-lg transition duration-150 flex items-center gap-3">
<div class="p-3 rounded-full bg-secondary-100 text-secondary-500">
<i data-feather="dollar-sign" class="w-5 h-5"></i>
</div>
<div>
<p class="font-medium">Expense Report</p>
<p class="text-sm text-gray-500">View all community expenses</p>
</div>
</a>
<a href="#" class="block p-4 bg-gray-50 hover:bg-gray-100 rounded-lg transition duration-150 flex items-center gap-3">
<div class="p-3 rounded-full bg-yellow-100 text-yellow-500">
<i data-feather="pie-chart" class="w-5 h-5"></i>
</div>
<div>
<p class="font-medium">Category Breakdown</p>
<p class="text-sm text-gray-500">View spending by category</p>
</div>
</a>
<a href="#" class="block p-4 bg-gray-50 hover:bg-gray-100 rounded-lg transition duration-150 flex items-center gap-3">
<div class="p-3 rounded-full bg-green-100 text-green-500">
<i data-feather="users" class="w-5 h-5"></i>
</div>
<div>
<p class="font-medium">Member Dues Status</p>
<p class="text-sm text-gray-500">View who has paid dues</p>
</div>
</a>
</div>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-center mb-6">
<h3 class="text-lg font-medium text-gray-900">Income vs Expenses</h3>
<select class="border border-gray-300 rounded-md px-3 py-1 text-sm">
<option>This Year</option>
<option>Last Year</option>
<option>Last 2 Years</option>
</select>
</div>
<canvas id="incomeExpenseChart" height="250"></canvas>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-center mb-6">
<h3 class="text-lg font-medium text-gray-900">Dues Collection Rate</h3>
<select class="border border-gray-300 rounded-md px-3 py-1 text-sm">
<option>This Month</option>
<option>Last Month</option>
<option>Quarterly</option>
</select>
</div>
<canvas id="duesChart" height="250"></canvas>
</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>
// Monthly Chart
const monthlyCtx = document.getElementById('monthlyChart').getContext('2d');
const monthlyChart = new Chart(monthlyCtx, {
type: 'bar',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [
{
label: 'Income',
data: [120000, 135000, 145000, 150000, 162250, 175000],
backgroundColor: '#4ade80',
borderRadius: 4
},
{
label: 'Expenses',
data: [85000, 90000, 95000, 92000, 94500, 97000],
backgroundColor: '#f87171',
borderRadius: 4
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
},
tooltip: {
callbacks: {
label: function(context) {
return context.dataset.label + ': ₱' + context.raw.toLocaleString();
}
}
}
},
scales: {
y: {
beginAtZero: true,
ticks: {
callback: function(value) {
return '₱' + value.toLocaleString();
}
}
}
}
}
});
// Income vs Expense Chart
const incomeExpenseCtx = document.getElementById('incomeExpenseChart').getContext('2d');
const incomeExpenseChart = new Chart(incomeExpenseCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
datasets: [
{
label: 'Income',
data: [120000, 135000, 145000, 150000, 162250, 175000],
borderColor: '#4ade80',
backgroundColor: 'rgba(74, 222, 128, 0.1)',
fill: true,
tension: 0.3
},
{
label: 'Expenses',
data: [85000, 90000, 95000, 92000, 94500, 97000],
borderColor: '#f87171',
backgroundColor: 'rgba(248, 113, 113, 0.1)',
fill: true,
tension: 0.3
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
},
tooltip: {
callbacks: {
label: function(context) {
return context.dataset.label + ': ₱' + context.raw.toLocaleString();
}
}
}
},
scales: {
y: {
beginAtZero: true,
ticks: {
callback: function(value) {
return '₱' + value.toLocaleString();
}
}
}
}
}
});
// Dues Chart
const duesCtx = document.getElementById('duesChart').getContext('2d');
const duesChart = new Chart(duesCtx, {
type: 'doughnut',
data: {
labels: ['Paid', 'Unpaid', 'Overdue'],
datasets: [{
data: [85, 10, 5],
backgroundColor: [
'#4ade80',
'#94a3b8',
'#f87171'
],
borderWidth: 0
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
},
tooltip: {
callbacks: {
label: function(context) {
return context.label + ': ' + context.raw + '%';
}
}
}
}
}
});
feather.replace();
</script>
</body>
</html>