veggie-ledger-tracker / reports.html
UltraFastBrother's picture
I'm like dont get salary, I do work like bringing vegetables, grocery and other for home asked either by Mother, Father, Brother and they gave certain money and I returen certain, I want this type and want like time, date, expense occured, tracking, reports, and change also, and maintain balance and all
1503282 verified
Raw History Blame Contribute Delete
7.06 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Veggie Ledger | Reports</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>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#4CAF50',
secondary: '#8BC34A',
}
}
}
}
</script>
</head>
<body class="bg-gray-50">
<custom-navbar></custom-navbar>
<main class="container mx-auto px-4 py-8">
<h1 class="text-2xl font-bold text-gray-800 mb-6">Reports & Analytics</h1>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
<div class="bg-white rounded-lg shadow-md p-6">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Monthly Summary</h2>
<div class="h-64">
<canvas id="monthlyChart"></canvas>
</div>
</div>
<div class="bg-white rounded-lg shadow-md p-6">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Expense Categories</h2>
<div class="h-64">
<canvas id="categoryChart"></canvas>
</div>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="bg-white rounded-lg shadow-md p-6">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Family Balances</h2>
<div class="space-y-4">
<div class="flex justify-between items-center">
<span>Mother</span>
<span class="text-primary">₹350.00</span>
</div>
<div class="flex justify-between items-center">
<span>Father</span>
<span class="text-primary">₹1,200.00</span>
</div>
<div class="flex justify-between items-center">
<span>Brother</span>
<span class="text-red-500">-₹2,000.00</span>
</div>
<div class="flex justify-between items-center">
<span>Sister</span>
<span class="text-gray-500">₹0.00</span>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow-md p-6 md:col-span-2">
<h2 class="text-xl font-semibold text-gray-800 mb-4">Recent Activity</h2>
<div class="space-y-4">
<div class="flex justify-between items-center border-b pb-2">
<div>
<p class="font-medium">Vegetables</p>
<p class="text-sm text-gray-500">Mother • 15 Nov 2023</p>
</div>
<p class="text-red-500 font-medium">-₹350.00</p>
</div>
<div class="flex justify-between items-center border-b pb-2">
<div>
<p class="font-medium">Grocery</p>
<p class="text-sm text-gray-500">Father • 14 Nov 2023</p>
</div>
<p class="text-red-500 font-medium">-₹1,200.00</p>
</div>
<div class="flex justify-between items-center">
<div>
<p class="font-medium">Received Money</p>
<p class="text-sm text-gray-500">Brother • 12 Nov 2023</p>
</div>
<p class="text-primary font-medium">+₹2,000.00</p>
</div>
</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();
document.addEventListener('DOMContentLoaded', function() {
// Monthly Chart
const monthlyCtx = document.getElementById('monthlyChart').getContext('2d');
new Chart(monthlyCtx, {
type: 'bar',
data: {
labels: ['Sep', 'Oct', 'Nov'],
datasets: [
{
label: 'Income',
data: [2500, 3000, 2000],
backgroundColor: '#8BC34A',
borderRadius: 4
},
{
label: 'Expenses',
data: [1800, 2200, 1550],
backgroundColor: '#F44336',
borderRadius: 4
}
]
},
options: {
responsive: true,
scales: {
x: {
stacked: false,
grid: {
display: false
}
},
y: {
beginAtZero: true,
grid: {
drawBorder: false
}
}
},
plugins: {
legend: {
position: 'top',
}
}
}
});
// Category Chart
const categoryCtx = document.getElementById('categoryChart').getContext('2d');
new Chart(categoryCtx, {
type: 'doughnut',
data: {
labels: ['Vegetables', 'Grocery', 'Transport', 'Other'],
datasets: [{
data: [35, 40, 15, 10],
backgroundColor: [
'#4CAF50',
'#8BC34A',
'#CDDC39',
'#FFC107'
],
borderWidth: 0
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
}
}
}
});
});
</script>
</body>
</html>