diff --git a/src/components/Dashboard.tsx b/src/components/Dashboard.tsx index 09d77bb..93d9873 100644 --- a/src/components/Dashboard.tsx +++ b/src/components/Dashboard.tsx @@ -6,6 +6,7 @@ import { Progress } from '@/components/ui/progress'; import { Input } from '@/components/ui/input'; import { GlassCard } from '@/components/ui/GlassCard'; import { BudgetRing } from '@/components/BudgetRing'; +import { formatCurrency } from '@/lib/utils'; import { TrendingUp, TrendingDown, @@ -25,26 +26,26 @@ import { const Dashboard: React.FC = () => { const portfolioData = { - totalValue: 9850000, // ₹98.5 lakhs + totalValue: 350000, change: 3.2, isPositive: true }; const budgetData = { - spent: 45000, - budget: 65000, + spent: 4500, + budget: 6500, categories: [ - { name: 'Food', spent: 12500, budget: 18000, color: 'text-orange-500' }, - { name: 'Transport', spent: 8500, budget: 12000, color: 'text-blue-500' }, - { name: 'Entertainment', spent: 6000, budget: 8000, color: 'text-purple-500' }, - { name: 'Shopping', spent: 18000, budget: 27000, color: 'text-pink-500' } + { name: 'Food', spent: 1250, budget: 1800, color: 'text-orange-500' }, + { name: 'Transport', spent: 850, budget: 1200, color: 'text-blue-500' }, + { name: 'Entertainment', spent: 600, budget: 800, color: 'text-purple-500' }, + { name: 'Shopping', spent: 1800, budget: 2700, color: 'text-pink-500' } ] }; const savingsGoals = [ - { name: 'Emergency Fund', current: 450000, target: 800000, color: 'from-green-400 to-green-600' }, - { name: 'Goa Trip', current: 85000, target: 150000, color: 'from-blue-400 to-blue-600' }, - { name: 'New Car', current: 620000, target: 1200000, color: 'from-purple-400 to-purple-600' } + { name: 'Emergency Fund', current: 45000, target: 80000, color: 'from-green-400 to-green-600' }, + { name: 'Dubai Trip', current: 8500, target: 15000, color: 'from-blue-400 to-blue-600' }, + { name: 'New Car', current: 62000, target: 120000, color: 'from-purple-400 to-purple-600' } ]; const creditScore = 768; @@ -115,7 +116,7 @@ const Dashboard: React.FC = () => {
Total Net Worth
-Total Savings
-Cancel unused Hotstar subscription to save ₹1,499/year. You haven't used it in 3 months.
+Cancel unused streaming subscription to save {formatCurrency(150)}/year. You haven't used it in 3 months.
Pay down ₹12k on HDFC card to keep utilization under 30%.
+Pay down {formatCurrency(1200)} on ADCB card to keep utilization under 30%.
Target Amount
-₹{(progressInsights.totalTargetAmount / 100000).toFixed(1)}L
+{formatCurrency(progressInsights.totalTargetAmount)}
Total across goals
Monthly SIP
-₹{(progressInsights.monthlyCommitment / 1000).toFixed(0)}K
+{formatCurrency(progressInsights.monthlyCommitment)}
Total commitment
{Math.round((goal.currentAmount / goal.targetAmount) * 100)}% completed
Monthly SIP
-₹{(goal.monthlyContribution / 1000).toFixed(0)}K
+{formatCurrency(goal.monthlyContribution)}
Time Remaining
@@ -399,22 +399,22 @@ const GoalPlanning: React.FC = () => {Current
-₹{(goal.currentAmount / 100000).toFixed(1)}L
+{formatCurrency(goal.currentAmount)}
Monthly SIP
-₹{(goal.monthlyContribution / 1000).toFixed(0)}K
+{formatCurrency(goal.monthlyContribution)}
Remaining
-₹{((goal.targetAmount - goal.currentAmount) / 100000).toFixed(1)}L
+{formatCurrency(goal.targetAmount - goal.currentAmount)}
AI-optimized strategy
₹{(milestone.amount / 100000).toFixed(1)}L
+{formatCurrency(milestone.amount)}
Target: {new Date(milestone.date).toLocaleDateString()}
diff --git a/src/components/features/PortfolioManager.tsx b/src/components/features/PortfolioManager.tsx index 76056ec..bde6322 100644 --- a/src/components/features/PortfolioManager.tsx +++ b/src/components/features/PortfolioManager.tsx @@ -4,6 +4,7 @@ import { GlassCard } from '@/components/ui/GlassCard'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; +import { formatCurrency } from '@/lib/utils'; import { TrendingUp, TrendingDown, @@ -11,99 +12,99 @@ import { Target, ArrowUpRight, ArrowDownRight, - IndianRupee, PieChart, - Wallet + Wallet, + Coins // Replaced IndianRupee with Coins as a generic financial icon or could use a custom Dirham icon } from 'lucide-react'; const PortfolioManager: React.FC = () => { const [selectedPeriod, setSelectedPeriod] = useState('1M'); const portfolioOverview = { - totalValue: 9850000, // ₹98.5L - totalInvested: 8200000, // ₹82L - totalGains: 1650000, // ₹16.5L - gainPercentage: 20.12, - dayChange: 45000, // ₹45K + totalValue: 350000, + totalInvested: 290000, + totalGains: 60000, + gainPercentage: 20.69, + dayChange: 1500, dayChangePercent: 0.46 }; const holdings = [ { - name: 'HDFC Bank', - symbol: 'HDFCBANK', - shares: 150, - currentPrice: 1680, - invested: 225000, - currentValue: 252000, - gain: 27000, + name: 'Emirates NBD', + symbol: 'ENBD', + shares: 1500, + currentPrice: 16.80, + invested: 22500, + currentValue: 25200, + gain: 2700, gainPercent: 12.0, sector: 'Banking' }, { - name: 'Infosys', - symbol: 'INFY', - shares: 200, - currentPrice: 1420, - invested: 260000, - currentValue: 284000, - gain: 24000, - gainPercent: 9.23, - sector: 'IT' + name: 'Emaar Properties', + symbol: 'EMAAR', + shares: 3000, + currentPrice: 8.20, + invested: 22000, + currentValue: 24600, + gain: 2600, + gainPercent: 11.8, + sector: 'Real Estate' }, { - name: 'Reliance Industries', - symbol: 'RELIANCE', - shares: 80, - currentPrice: 2850, - invested: 216000, - currentValue: 228000, - gain: 12000, - gainPercent: 5.56, - sector: 'Oil & Gas' + name: 'DEWA', + symbol: 'DEWA', + shares: 5000, + currentPrice: 2.50, + invested: 12000, + currentValue: 12500, + gain: 500, + gainPercent: 4.17, + sector: 'Utilities' }, { - name: 'SBI Bluechip Fund', - symbol: 'SBI-BC', - units: 5000, - currentPrice: 85.50, - invested: 400000, - currentValue: 427500, - gain: 27500, - gainPercent: 6.88, - sector: 'Mutual Fund' + name: 'US Tech ETF', + symbol: 'QQQ', + units: 50, + currentPrice: 450.50, + invested: 20000, + currentValue: 22525, + gain: 2525, + gainPercent: 12.6, + sector: 'ETF' } ]; const sectorAllocation = [ - { sector: 'Banking', percentage: 35, value: 3447500, color: 'from-blue-400 to-blue-600' }, - { sector: 'IT', percentage: 25, value: 2462500, color: 'from-green-400 to-green-600' }, - { sector: 'Mutual Funds', percentage: 20, value: 1970000, color: 'from-purple-400 to-purple-600' }, - { sector: 'Oil & Gas', percentage: 15, value: 1477500, color: 'from-red-400 to-red-600' }, - { sector: 'Others', percentage: 5, value: 492500, color: 'from-yellow-400 to-yellow-600' } + { sector: 'Banking', percentage: 35, value: 122500, color: 'from-blue-400 to-blue-600' }, + { sector: 'Real Estate', percentage: 25, value: 87500, color: 'from-green-400 to-green-600' }, + { sector: 'Utilities', percentage: 20, value: 70000, color: 'from-purple-400 to-purple-600' }, + { sector: 'Telecom', percentage: 15, value: 52500, color: 'from-red-400 to-red-600' }, + { sector: 'Others', percentage: 5, value: 17500, color: 'from-yellow-400 to-yellow-600' } ]; const recommendations = [ { type: 'rebalance', title: 'Rebalance Portfolio', - description: 'Your banking allocation is 5% above target. Consider reducing exposure.', + description: 'Your real estate allocation is 5% above target. Consider reducing exposure.', priority: 'medium', - action: 'Sell ₹1.5L worth of banking stocks' + action: `Sell ${formatCurrency(5000)} worth of real estate stocks` }, { type: 'opportunity', title: 'Investment Opportunity', - description: 'HDFC Pharma Fund showing strong momentum with low correlation to your existing holdings.', + description: 'Renewable energy ETF showing strong momentum with low correlation to your existing holdings.', priority: 'high', - action: 'Consider investing ₹2L' + action: `Consider investing ${formatCurrency(10000)}` }, { type: 'risk', title: 'Risk Alert', - description: 'High concentration in financial sector. Diversify across sectors.', + description: 'High concentration in local equity. Diversify globally.', priority: 'high', - action: 'Add technology and healthcare exposure' + action: 'Add US or Global ETFs' } ]; @@ -136,7 +137,7 @@ const PortfolioManager: React.FC = () => {₹{(portfolioOverview.totalValue / 100000).toFixed(1)}L
+{formatCurrency(portfolioOverview.totalValue)}
₹{(portfolioOverview.totalGains / 100000).toFixed(1)}L
-vs ₹{(portfolioOverview.totalInvested / 100000).toFixed(1)}L invested
+{formatCurrency(portfolioOverview.totalGains)}
+vs {formatCurrency(portfolioOverview.totalInvested)} invested
Day Change
₹{(portfolioOverview.dayChange / 1000).toFixed(0)}K
+{formatCurrency(portfolioOverview.dayChange)}
{holding.shares} shares @ ₹{holding.currentPrice}
+{holding.shares} shares @ {formatCurrency(holding.currentPrice)}
Current Value
-₹{(holding.currentValue / 1000).toFixed(1)}k
+{formatCurrency(holding.currentValue)}
@@ -214,7 +215,7 @@ const PortfolioManager: React.FC = () => { {holding.gainPercent}%
- {holding.gain > 0 ? '+' : ''}₹{(holding.gain / 1000).toFixed(1)}k + {holding.gain > 0 ? '+' : ''}{formatCurrency(holding.gain)}
₹{(sector.value / 100000).toFixed(1)}L
+{formatCurrency(sector.value)}
Interactive AI Financial Overview
+Portfolio
++24.5%
+Protection
+Assets Secured
++ WealthWise combines advanced AI with intuitive design to give you complete control over your financial life. +
++ {feature.desc} +
++ Join thousands of users who are already building a better financial future with WealthWise. +
+- Transform your financial future with intelligent insights, automated savings, - and personalized investment strategies designed for Indian investors. -
- -- Discover how AI can revolutionize your relationship with money -
- - {/* Available Features Highlight */} -- Portfolio Manager, Budget Tracker & Savings Booster are live and ready to transform your finances! -
-- Get instant access to Portfolio Management, Budget Tracking, and Savings Optimization -
- - {/* Feature Pills */} -- No credit card required • Full access to available features • More coming soon -
-