feat: integrate ai jars into budget, rename tabs, and fix dashboard navigation

This commit is contained in:
CycroftX
2026-02-16 12:45:06 +05:30
parent 3d95b99502
commit 9dbfb70dc2
21 changed files with 643 additions and 68 deletions

View File

@@ -7,7 +7,26 @@ import { Label } from '@/components/ui/label';
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
import { DirhamIcon } from '@/components/ui/custom-icons';
import { toast } from 'sonner';
const AddExpenseForm: React.FC = () => {
const handleAddExpense = () => {
const amount = (document.getElementById('amount') as HTMLInputElement).value;
const desc = (document.getElementById('desc') as HTMLInputElement).value;
const category = (document.getElementById('category') as HTMLButtonElement | null)?.innerText || "Category";
if (!amount || !desc) {
toast.error("Please fill in amount and description");
return;
}
toast.success(`Expense Added: AED ${amount} to ${category}`);
// Clear
(document.getElementById('amount') as HTMLInputElement).value = '';
(document.getElementById('desc') as HTMLInputElement).value = '';
};
return (
<div className="flex justify-center items-center h-[400px]">
<GlassCard className="p-8 w-full max-w-md">
@@ -45,7 +64,10 @@ const AddExpenseForm: React.FC = () => {
<Input id="desc" placeholder="e.g. Grocery shopping" className="bg-white/50 border-slate-200" />
</div>
<Button className="w-full mt-4 bg-slate-900 text-white hover:bg-slate-800 shadow-md">
<Button
className="w-full mt-4 bg-slate-900 text-white hover:bg-slate-800 shadow-md"
onClick={handleAddExpense}
>
Add Expense
</Button>
</div>