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

@@ -8,6 +8,8 @@ import { Progress } from '@/components/ui/progress';
import { Clock, Plus } from 'lucide-react';
import { motion } from 'framer-motion';
import { toast } from 'sonner';
const SavingsGoalsGrid: React.FC = () => {
const goals = [
@@ -18,6 +20,14 @@ const SavingsGoalsGrid: React.FC = () => {
{ name: 'Home Downpayment', saved: 125000, target: 200000, daysLeft: 730, color: 'bg-indigo-500' },
];
const handleAddSavings = (amount: number | 'custom', goalName: string) => {
if (amount === 'custom') {
toast.info("Custom amount feature pending: Enter amount manually soon.");
} else {
toast.success(`Ajded AED ${amount} to ${goalName}`);
}
};
return (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{goals.map((goal, index) => {
@@ -49,13 +59,27 @@ const SavingsGoalsGrid: React.FC = () => {
</div>
<div className="grid grid-cols-3 gap-2">
<Button variant="outline" size="sm" className="h-8 text-xs border-slate-200 hover:bg-slate-50 hover:text-slate-900">
<Button
variant="outline"
size="sm"
className="h-8 text-xs border-slate-200 hover:bg-slate-50 hover:text-slate-900"
onClick={() => handleAddSavings(1000, goal.name)}
>
+1K
</Button>
<Button variant="outline" size="sm" className="h-8 text-xs border-slate-200 hover:bg-slate-50 hover:text-slate-900">
<Button
variant="outline"
size="sm"
className="h-8 text-xs border-slate-200 hover:bg-slate-50 hover:text-slate-900"
onClick={() => handleAddSavings(5000, goal.name)}
>
+5K
</Button>
<Button size="sm" className="h-8 text-xs bg-black text-white hover:bg-slate-800">
<Button
size="sm"
className="h-8 text-xs bg-black text-white hover:bg-slate-800"
onClick={() => handleAddSavings('custom', goal.name)}
>
Custom
</Button>
</div>