chanix21's picture
Create a responsive web-based Archiving Document Tracking System for one ICT Office.
25ce612 verified
Raw History Blame Contribute Delete
6.97 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard - DocTrack 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://unpkg.com/feather-icons"></script>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="components/stats-card.js"></script>
<script src="components/recent-activity.js"></script>
</head>
<body class="bg-gray-50 min-h-screen flex flex-col">
<custom-navbar></custom-navbar>
<main class="flex-grow p-4 md:p-6">
<div class="max-w-7xl mx-auto">
<div class="mb-8">
<h1 class="text-2xl font-bold text-gray-800">Dashboard</h1>
<p class="text-gray-600">Welcome back! Here's what's happening with your documents.</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<stats-card
icon="file-text"
title="Total Documents"
value="142"
trend="up"
change="12% from last month"
color="blue"
></stats-card>
<stats-card
icon="clock"
title="Pending Review"
value="23"
trend="up"
change="5 new today"
color="yellow"
></stats-card>
<stats-card
icon="check-circle"
title="Approved"
value="87"
trend="steady"
change="Same as last week"
color="green"
></stats-card>
<stats-card
icon="archive"
title="Archived"
value="32"
trend="up"
change="8% from last month"
color="indigo"
></stats-card>
</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">
<h2 class="text-lg font-semibold text-gray-800">Document Status Overview</h2>
<select class="border border-gray-300 rounded-md px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">
<option>Last 7 days</option>
<option>Last 30 days</option>
<option>Last quarter</option>
</select>
</div>
<div class="h-64">
<canvas id="statusChart"></canvas>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-6">Quick Actions</h2>
<div class="space-y-4">
<a href="add-document.html" class="flex items-center p-3 bg-blue-50 rounded-lg hover:bg-blue-100 transition-colors">
<i data-feather="plus" class="w-5 h-5 text-blue-600 mr-3"></i>
<span class="font-medium">Add New Document</span>
</a>
<a href="review.html" class="flex items-center p-3 bg-yellow-50 rounded-lg hover:bg-yellow-100 transition-colors">
<i data-feather="edit" class="w-5 h-5 text-yellow-600 mr-3"></i>
<span class="font-medium">Review Documents</span>
</a>
<a href="archive.html" class="flex items-center p-3 bg-indigo-50 rounded-lg hover:bg-indigo-100 transition-colors">
<i data-feather="archive" class="w-5 h-5 text-indigo-600 mr-3"></i>
<span class="font-medium">Archive Approved</span>
</a>
<a href="reports.html" class="flex items-center p-3 bg-green-50 rounded-lg hover:bg-green-100 transition-colors">
<i data-feather="bar-chart-2" class="w-5 h-5 text-green-600 mr-3"></i>
<span class="font-medium">Generate Reports</span>
</a>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-6">Recent Activities</h2>
<recent-activity></recent-activity>
</div>
</div>
</main>
<custom-footer></custom-footer>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
feather.replace();
// Initialize chart
document.addEventListener('DOMContentLoaded', function() {
const ctx = document.getElementById('statusChart').getContext('2d');
const chart = new Chart(ctx, {
type: 'bar',
data: {
labels: ['Pending', 'Ongoing', 'For Review', 'Approved', 'Archived'],
datasets: [{
label: 'Documents',
data: [23, 45, 18, 87, 32],
backgroundColor: [
'rgba(251, 191, 36, 0.7)',
'rgba(59, 130, 246, 0.7)',
'rgba(249, 115, 22, 0.7)',
'rgba(16, 185, 129, 0.7)',
'rgba(99, 102, 241, 0.7)'
],
borderColor: [
'rgba(251, 191, 36, 1)',
'rgba(59, 130, 246, 1)',
'rgba(249, 115, 22, 1)',
'rgba(16, 185, 129, 1)',
'rgba(99, 102, 241, 1)'
],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true
}
}
}
});
});
</script>
</body>
</html>