diff --git a/src/app/investor/dashboard/page.tsx b/src/app/investor/dashboard/page.tsx index d6ca11d..8dfe28a 100644 --- a/src/app/investor/dashboard/page.tsx +++ b/src/app/investor/dashboard/page.tsx @@ -2,182 +2,186 @@ import { investors, bikes, transactions } from '@/data/mockData'; import { Wallet, TrendingUp, Bike, Target, DollarSign, FileText, Phone, BarChart3, Clock, ArrowRight, ShieldCheck, Zap, AlertCircle } from 'lucide-react'; import Link from 'next/link'; import TransactionList from '@/components/TransactionList'; +import InvestorNotification from '@/components/InvestorNotification'; export default function InvestorDashboardPage() { - const investor = investors[0]; // mock logged-in investor + const investor = investors[0]; const investorBikes = bikes.filter(b => b.investorId === investor?.id); const recentTransactions = transactions.filter(t => t.investorId === investor.id).slice(0, 5); const availableBalance = investor.totalEarnings - investor.totalWithdrawn - investor.withdrawalPending; return ( -
Here's what's happening with your investments today.
-Total Invested
+Here's what's happening with your investments today.
৳{(investor.totalInvested / 1000).toFixed(0)}k
-Total Earnings
-৳{(investor.totalEarnings / 1000).toFixed(1)}k
-Active Bikes
-{investor.activeBikes}
-Avg. ROI
-{investor.roi}%
-{bike.plateNumber}
-৳{bike.currentRent || 0}
-Daily Rent
-No bikes assigned yet
-Once you make an investment, assigned bikes will appear here.
-Total Invested
+৳{(investor.totalInvested / 1000).toFixed(0)}k
Available to Withdraw
-৳{availableBalance.toLocaleString()}
- -Total Earnings
+৳{(investor.totalEarnings / 1000).toFixed(1)}k
+Active Bikes
+{investor.activeBikes}
+Avg. ROI
+{investor.roi}%
+{bike.plateNumber}
+৳{bike.currentRent || 0}
+Daily Rent
+No bikes assigned yet
+Once you make an investment, assigned bikes will appear here.
+Available to Withdraw
+৳{availableBalance.toLocaleString()}
+ +Update KYC
-Manage documents
-Earnings & P&L
-View detailed reports
-Update KYC
+Manage documents
+Earnings & P&L
+View detailed reports
++ ID: #{investment.id?.toUpperCase()} + • Started: {investment.startDate} +
- ID: #{investment.id?.toUpperCase()} - • Started: {investment.startDate} -
+Invested
Invested
+৳{investment.totalInvestment.toLocaleString()}
৳{investment.totalInvestment.toLocaleString()}
-Total Return
Total Return
+৳{investment.actualEarnings.toLocaleString()}
৳{investment.actualEarnings.toLocaleString()}
-Pending
Pending
+৳{(investment.totalInvestment * 0.24 - investment.actualEarnings).toLocaleString()}
৳{(investment.totalInvestment * 0.24 - investment.actualEarnings).toLocaleString()}
-ROI
ROI
+{investment.expectedRoi}%
{investment.expectedRoi}%
Your share based on rental model
+Single Rent
+55%
Rent to Own
+45%
Share EV
+40%
Your share based on rental model
-Single Rent
-55%
+ {activeTab === 'bikes' && ( +{bike.plateNumber} • {bike.brand}
+Total Earnings
+৳{bike.totalEarnings?.toLocaleString()}
+ + Live TrackRent to Own
-45%
+ )) : ( +No bikes assigned yet.
+Admin will assign bikes to this investment shortly.
Share EV
-40%
+ )} +{bike.plateNumber} • {bike.brand}
-Total Earnings
-৳{bike.totalEarnings?.toLocaleString()}
- - Live TrackNo bikes assigned yet.
-Admin will assign bikes to this investment shortly.
-| Date | -Description | -Amount | -Status | -||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| {t.createdAt} | -
- {t.description} -Ref: {t.id} - |
- - +৳{t.amount.toLocaleString()} - | -- - Completed - - | + {activeTab === 'transactions' && ( +
| Date | +Description | +Amount | +Status |
|---|
{t.description}
+Ref: {t.id}
+- Need help with this investment or bike assignment? Our team is available 24/7. -
- ++ Need help with this investment or bike assignment? Our team is available 24/7. +
+ +Manage your active portfolios and track your earnings.
-Manage investment portfolios for this investor
-{inv.planType} Plan
-Investment
-৳{inv.totalInvestment.toLocaleString()}
-Total Return
-৳{inv.actualEarnings.toLocaleString()}
-ID: #{inv.id?.slice(-6) || 'N/A'}
-Create your first investment plan
-