const App = () => {
React.useEffect(() => {
feather.replace();
// Mock Chart for Income vs Expenses
const incomeExpenseCtx = document.getElementById('incomeExpenseChart');
if (incomeExpenseCtx) {
new Chart(incomeExpenseCtx, {
type: 'line',
data: {
labels: ['Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb'],
datasets: [{
label: 'Income',
data: [120000, 130000, 140000, 135000, 150000, 160000],
borderColor: '#10B981',
backgroundColor: 'rgba(16, 185, 129, 0.1)',
fill: true,
tension: 0.4
}, {
label: 'Expenses',
data: [90000, 95000, 105000, 100000, 110000, 115000],
borderColor: '#EF4444',
backgroundColor: 'rgba(239, 68, 68, 0.1)',
fill: true,
tension: 0.4
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
ticks: {
callback: function(value) {
return '$' + value / 1000 + 'k';
}
}
}
}
}
});
}
// Mock Chart for Fee Collection
const feeCollectionCtx = document.getElementById('feeCollectionChart');
if (feeCollectionCtx) {
new Chart(feeCollectionCtx, {
type: 'doughnut',
data: {
labels: ['Collected', 'Pending', 'Overdue'],
datasets: [{
data: [85, 10, 5],
backgroundColor: ['#10B981', '#F59E0B', '#EF4444'],
borderWidth: 0
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
cutout: '70%',
plugins: {
legend: {
display: false
}
}
}
});
}
}, []);
const navItems = {
Overview: [
{ name: 'Dashboard', icon: 'grid', active: true },
],
Academic: [
{ name: 'Students', icon: 'users' },
{ name: 'Teachers', icon: 'users' },
{ name: 'Classes', icon: 'book' },
{ name: 'Timetable', icon: 'calendar' },
{ name: 'Attendance', icon: 'check-square' },
{ name: 'Examinations', icon: 'file-text' },
],
Finance: [
{ name: 'Chart of Accounts', icon: 'file' },
{ name: 'Journal Entries', icon: 'book-open' },
{ name: 'Invoices (AR)', icon: 'dollar-sign' },
{ name: 'Payments', icon: 'trending-up' },
{ name: 'Bills (AP)', icon: 'file-minus' },
{ name: 'Vendors', icon: 'briefcase' },
{ name: 'Inventory', icon: 'archive' },
]
};
const stats = [
{ title: 'Total Students', value: '487', change: '+12 this month', changeType: 'increase', icon: 'users', iconBg: 'blue' },
{ title: 'Total Teachers', value: '32', change: '2 on leave', icon: 'users', iconBg: 'blue' },
{ title: 'Total Revenue', value: 'GH₵1,085,500.00', change: '+8.2% from last year', changeType: 'increase', icon: 'dollar-sign', iconBg: 'green' },
{ title: 'Pending Fees', value: 'GH₵85,000.00', change: '12 invoices overdue', changeType: 'decrease', icon: 'alert-triangle', iconBg: 'red' },
];
const Sidebar = () => (
Mother Providencia
International School
);
const Header = () => (
Switch Role
JA
John Administrator
Admin
);
const StatCard = ({ stat }) => (
{stat.value}
{stat.change}
);
return (
Welcome back, John!
Here's your administrative overview of the school.
{stats.map(stat => )}
Cash Position
Current balances
Bank Account
GH₵650,000.00
Operating + Savings
Petty Cash
GH₵2,500.00
On hand
Upcoming payables GH₵31,000.00
Fee Collection
Current academic year
Collected
Pending
Overdue
Income vs Expenses
Last 6 months trend
Recent Invoices
| Student | Amount | Status |
| Kwabena Adu | GH₵1,200.00 | Paid |
| Afiya Owusu | GH₵1,200.00 | Pending |
Recent Payments
| Student | Amount | Date |
| Kwabena Adu | GH₵1,200.00 | 2024-02-15 |
| Esi Mensah | GH₵1,000.00 | 2024-02-14 |
);
};