From c1ab1eb0a3f69b36daae720121e61530b020c72d Mon Sep 17 00:00:00 2001 From: sazzadulalambd Date: Fri, 15 May 2026 01:31:21 +0600 Subject: [PATCH] feat: implement investor withdrawal workflow and add new navigation routes for investments, plans, and withdrawals --- src/app/admin/investors/[id]/page.tsx | 28 +- src/app/investor/investments/[id]/page.tsx | 346 ++++++++++++++++++ src/app/investor/page.tsx | 226 +++++++++--- src/app/investor/plans/new/page.tsx | 394 +++++++++++++++++++++ src/app/investor/plans/page.tsx | 139 ++++++++ src/app/investor/withdraw/page.tsx | 224 ++++++++++++ src/components/Sidebar.tsx | 12 +- 7 files changed, 1288 insertions(+), 81 deletions(-) create mode 100644 src/app/investor/investments/[id]/page.tsx create mode 100644 src/app/investor/plans/new/page.tsx create mode 100644 src/app/investor/plans/page.tsx create mode 100644 src/app/investor/withdraw/page.tsx diff --git a/src/app/admin/investors/[id]/page.tsx b/src/app/admin/investors/[id]/page.tsx index e49bac3..273aa97 100644 --- a/src/app/admin/investors/[id]/page.tsx +++ b/src/app/admin/investors/[id]/page.tsx @@ -1165,25 +1165,20 @@ export default function InvestorDetailPage() {
-
- +
+

{account.bankName}

{account.branch}

-
- {account.isPrimary && ( - Primary - )} - -
+
@@ -1234,8 +1229,7 @@ export default function InvestorDetailPage() {
-

Primary

-

{investor.mobileBanking}

+

{investor.mobileBanking}

{investor.mobileBankingNumber}

-
- setEditingMobileBanking({ ...editingMobileBanking, isPrimary: e.target.checked })} className="rounded text-investor" /> - Set as primary account -
diff --git a/src/app/investor/investments/[id]/page.tsx b/src/app/investor/investments/[id]/page.tsx new file mode 100644 index 0000000..a6a49bc --- /dev/null +++ b/src/app/investor/investments/[id]/page.tsx @@ -0,0 +1,346 @@ +'use client'; + +import { useState, use } from 'react'; +import Link from 'next/link'; +import { useRouter } from 'next/navigation'; +import { + ArrowLeft, TrendingUp, Bike, DollarSign, Calendar, + CreditCard, FileText, Download, Check, + Printer, BarChart3, Wallet, Clock, Shield, Percent, Activity, AlertTriangle, + Receipt, CreditCardIcon, Zap, Smartphone, ChevronRight +} from 'lucide-react'; +import { investors, bikes, transactions } from '@/data/mockData'; +import toast from 'react-hot-toast'; + +export default function InvestorInvestmentDetailPage({ params }: { params: Promise<{ id: string }> }) { + const resolvedParams = use(params); + const { id: investmentId } = resolvedParams; + const router = useRouter(); + + const investor = investors[0]; // mock logged-in investor + const investment = investor.investments?.find((inv: any) => inv.id === investmentId); + + const [activeTab, setActiveTab] = useState('overview'); + + if (!investment) { + return ( +
+
+

Investment Not Found

+

The investment you're looking for doesn't exist.

+ + Back to Portfolio + +
+
+ ); + } + + const planConfig: Record = { + silver: { bg: 'bg-slate-50', border: 'border-slate-200', text: 'text-slate-700', badge: 'bg-slate-200 text-slate-700', icon: Zap }, + gold: { bg: 'bg-amber-50', border: 'border-amber-200', text: 'text-amber-700', badge: 'bg-amber-100 text-amber-700', icon: Shield }, + platinum: { bg: 'bg-purple-50', border: 'border-purple-200', text: 'text-purple-700', badge: 'bg-purple-100 text-purple-700', icon: TrendingUp }, + diamond: { bg: 'bg-blue-50', border: 'border-blue-200', text: 'text-blue-700', badge: 'bg-blue-100 text-blue-700', icon: Zap }, + }; + const style = planConfig[investment.planType] || planConfig.gold; + + const assignedBikes = bikes.filter((b: any) => b.investorId === investor.id && b.id === 'b1'); // mock filtering for this investment + + const investmentTransactions = transactions.filter((t: any) => t.investorId === investor.id && t.type === 'investment_return'); + + return ( +
+
+
+ +
+
+

{investment.planName}

+ + {investment.planType} Plan + + + {investment.status} + +
+

+ ID: #{investment.id?.toUpperCase()} + Started: {investment.startDate} +

+
+
+
+ +
+
+ +
+
+
+
+ +
+

Invested

+
+

৳{investment.totalInvestment.toLocaleString()}

+
+
+
+
+ +
+

Total Return

+
+

৳{investment.actualEarnings.toLocaleString()}

+
+
+
+
+ +
+

Pending

+
+

৳{(investment.totalInvestment * 0.24 - investment.actualEarnings).toLocaleString()}

+
+
+
+
+ +
+

ROI

+
+

{investment.expectedRoi}%

+
+
+ +
+
+
+
+ {['overview', 'bikes', 'pnl', 'transactions'].map((tab) => ( + + ))} +
+ +
+ {activeTab === 'overview' && ( +
+
+
+

+ Investment Details +

+
+
+ Plan Name + {investment.planName} +
+
+ Plan Type + {investment.planType} +
+
+ Period + {investment.startDate} - {investment.endDate || 'Ongoing'} +
+
+ Payment Method + {investment.paymentMethod} +
+
+
+ +
+

+ Plan Policy +

+
+
+ Min Duration + 12 Months +
+
+ Lock-in Period + 3 Months +
+
+ Exit Penalty + 10% +
+
+ Maintenance + Included +
+
+
+
+ +
+

+ Profit Sharing Configuration +

+

Your share based on rental model

+
+
+

Single Rent

+

55%

+
+
+

Rent to Own

+

45%

+
+
+

Share EV

+

40%

+
+
+
+
+ )} + + {activeTab === 'bikes' && ( +
+ {assignedBikes.length > 0 ? assignedBikes.map(bike => ( +
+
+ {bike.model} +
+
+
{bike.model}
+

{bike.plateNumber} • {bike.brand}

+
+ + {bike.status} + + + Daily: ৳{bike.currentRent} + +
+
+
+

Total Earnings

+

৳{bike.totalEarnings?.toLocaleString()}

+ + Live Track + +
+
+ )) : ( +
+ +

No bikes assigned yet.

+

Admin will assign bikes to this investment shortly.

+
+ )} +
+ )} + + {activeTab === 'pnl' && ( +
+
+

Detailed P&L Statement

+
+
+ Gross Rental Revenue + ৳{(investment.actualEarnings / 0.55).toFixed(0)} +
+
+
+ Platform Management Fee (45%) + -৳{((investment.actualEarnings / 0.55) * 0.45).toFixed(0)} +
+
+ Fleet Insurance & Maintenance + Included in Platform Fee +
+
+
+ Net Return to Investor + ৳{investment.actualEarnings.toLocaleString()} +
+
+
+
+ )} + + {activeTab === 'transactions' && ( +
+ + + + + + + + + + + {investmentTransactions.map(t => ( + + + + + + + ))} + +
DateDescriptionAmountStatus
{t.createdAt} +

{t.description}

+

Ref: {t.id}

+
+ +৳{t.amount.toLocaleString()} + + + Completed + +
+
+ )} +
+
+
+ +
+
+

+ Quick Actions +

+
+ + + +
+
+ +
+

+ Support Desk +

+

+ Need help with this investment or bike assignment? Our team is available 24/7. +

+ +
+
+
+
+ ); +} diff --git a/src/app/investor/page.tsx b/src/app/investor/page.tsx index 6b18cdf..bcae764 100644 --- a/src/app/investor/page.tsx +++ b/src/app/investor/page.tsx @@ -1,75 +1,185 @@ -import StatCard from '@/components/StatCard'; -import TransactionList from '@/components/TransactionList'; import { investors, bikes, transactions } from '@/data/mockData'; -import { Wallet, TrendingUp, Bike, Target, DollarSign, FileText, Phone, BarChart3, Send, ArrowDownToLine } from 'lucide-react'; +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'; -export default function InvestorPage() { - const investor = investors[0]; - const investorBikes = bikes.filter(b => b.investorId === investor?.id || b.status === 'rented'); +export default function InvestorDashboardPage() { + const investor = investors[0]; // mock logged-in investor + 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 ( -
-
-

Investor Dashboard

-

Track your investments and earnings

-
- -
- - - - -
- -
-
-
-

My Portfolio

- - {investorBikes.length} bikes +
+
+
+

Welcome back, {investor.name.split(' ')[0]} 👋

+

Here's what's happening with your investments today.

+
+
+ {investor.kycStatus === 'verified' ? ( + + KYC Verified + ) : ( + + Complete KYC + + )} + + New Investment + +
+
+ +
+
+
+
+
+ +
+

Total Invested

-
- {investorBikes.map(bike => ( -
-
-

{bike.model}

-

{bike.plateNumber}

-
- - {bike.status} - +

৳{(investor.totalInvested / 1000).toFixed(0)}k

+
+ +
+
+
+
+ +
+

Total Earnings

+
+

৳{(investor.totalEarnings / 1000).toFixed(1)}k

+
+ +
+
+
+
+ +
+

Active Bikes

+
+

{investor.activeBikes}

+
+ +
+
+
+
+ +
+

Avg. ROI

+
+

{investor.roi}%

+
+
+ +
+
+
+

+ My Portfolio Overview +

+ + View All + +
+
+ {investorBikes.length > 0 ? ( +
+ {investorBikes.slice(0, 3).map(bike => ( + +
+ {bike.model} +
+
+

{bike.model}

+

{bike.plateNumber}

+
+
+

৳{bike.currentRent || 0}

+

Daily Rent

+
+
+ + {bike.status} + +
+ + ))}
- ))} + ) : ( +
+
+ +
+

No bikes assigned yet

+

Once you make an investment, assigned bikes will appear here.

+
+ )}
-
-

Quick Actions

-
- - - - +
+
+

Quick Actions

+
+
+
+

Available to Withdraw

+

৳{availableBalance.toLocaleString()}

+ + Withdraw Funds + +
+ + +
+ +
+
+

Update KYC

+

Manage documents

+
+ + + +
+ +
+
+

Earnings & P&L

+

View detailed reports

+
+
-
-

Transaction History

- t.userId === 'u7')} /> +
+
+

+ Recent Transactions +

+ +
+
+ +
); diff --git a/src/app/investor/plans/new/page.tsx b/src/app/investor/plans/new/page.tsx new file mode 100644 index 0000000..8b5c264 --- /dev/null +++ b/src/app/investor/plans/new/page.tsx @@ -0,0 +1,394 @@ +'use client'; + +import { useState } from 'react'; +import Link from 'next/link'; +import { useRouter } from 'next/navigation'; +import { + ArrowLeft, Zap, Shield, TrendingUp, Check, Info, + Calendar, DollarSign, CreditCard, FileText, ChevronRight, + AlertCircle, ArrowDown, Wallet, Clock, Activity +} from 'lucide-react'; +import toast from 'react-hot-toast'; + +const PLAN_TEMPLATES = [ + { + id: '1bike', + name: '1 Bike Plan', + description: 'Investment plan for 1 bike - perfect for small investors', + evBasePrice: 200000, + minQty: 1, + minInvestment: 200000, + maxInvestment: 1000000, + duration: 12, + lockIn: 3, + exitPenalty: 10, + ficoShare: { single: 45, own: 55, ev: 60 }, + icon: Zap, + color: 'bg-blue-600', + lightColor: 'bg-blue-50 text-blue-700' + }, + { + id: '5bike', + name: '5 Bike Plan', + description: 'Perfect for established investors looking for better returns', + evBasePrice: 180000, + minQty: 5, + minInvestment: 900000, + maxInvestment: 5000000, + duration: 24, + lockIn: 6, + exitPenalty: 15, + ficoShare: { single: 40, own: 50, ev: 55 }, + icon: TrendingUp, + color: 'bg-purple-600', + lightColor: 'bg-purple-50 text-purple-700' + } +]; + +export default function NewInvestmentPage() { + const router = useRouter(); + const [step, setStep] = useState<'select' | 'form'>('select'); + const [selectedTemplate, setSelectedTemplate] = useState(null); + + const [formData, setFormData] = useState({ + planName: '', + planType: 'Gold', + investmentAmount: 0, + initialPayment: 0, + startDate: new Date().toISOString().split('T')[0], + endDate: '', + paymentMethod: 'Bank Transfer', + transactionRef: '', + description: '' + }); + + const handleSelectTemplate = (template: typeof PLAN_TEMPLATES[0]) => { + setSelectedTemplate(template); + setFormData({ + ...formData, + planName: template.name, + investmentAmount: template.minInvestment, + initialPayment: Math.floor(template.minInvestment * 0.5) // Default 50% initial + }); + setStep('form'); + }; + + const handleCreateInvestment = (e: React.FormEvent) => { + e.preventDefault(); + if (formData.investmentAmount < (selectedTemplate?.minInvestment || 0)) { + toast.error(`Minimum investment for this plan is ৳${selectedTemplate?.minInvestment.toLocaleString()}`); + return; + } + toast.success('Investment request created successfully! Admin will review and assign bikes.'); + router.push('/investor/plans'); + }; + + return ( +
+
+ +
+

+ {step === 'select' ? 'Select Investment Plan' : 'Configure New Investment'} +

+

+ {step === 'select' ? 'Choose a template to start' : `Set up investment under ${selectedTemplate?.name}`} +

+
+
+ + {step === 'select' && ( +
+ {PLAN_TEMPLATES.map((plan) => { + const Icon = plan.icon; + return ( +
handleSelectTemplate(plan)} + > +
+ +
+

{plan.name}

+

{plan.description}

+ +
+
+ Min Investment + ৳{plan.minInvestment.toLocaleString()} +
+
+ EV Base Price + ৳{plan.evBasePrice.toLocaleString()} +
+
+ Duration + {plan.duration} Months +
+
+ + +
+ ); + })} +
+ )} + + {step === 'form' && selectedTemplate && ( +
+
+
+ {/* Core Configuration */} +
+

+ Plan Configuration +

+ +
+
+ + setFormData({...formData, planName: e.target.value})} + className="w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl text-sm focus:ring-2 focus:ring-investor/20 focus:border-investor outline-none transition-all font-medium" + placeholder="e.g. My First Bike" + required + /> +
+
+ + +
+
+ +
+
+

EV Base Price

+

৳{selectedTemplate.evBasePrice.toLocaleString()}

+
+
+

Min Qty

+

{selectedTemplate.minQty} Bike(s)

+
+
+

Min Invest

+

৳{selectedTemplate.minInvestment.toLocaleString()}

+
+
+

Max Invest

+

৳{selectedTemplate.maxInvestment.toLocaleString()}

+
+
+ +
+
+ + setFormData({...formData, investmentAmount: Number(e.target.value)})} + className="w-full px-4 py-3 border border-slate-200 rounded-xl text-sm focus:ring-2 focus:ring-investor/20 focus:border-investor outline-none transition-all font-extrabold" + required + /> +
+
+ + setFormData({...formData, initialPayment: Number(e.target.value)})} + className="w-full px-4 py-3 border border-investor rounded-xl text-sm focus:ring-2 focus:ring-investor/20 outline-none transition-all font-extrabold text-investor" + placeholder="Amount to pay now" + required + /> +

Pay part of your investment now to confirm

+
+
+
+ + {/* Profit Sharing Policy */} +
+

+ FICO Share - Jaiben's Profit per Ride +

+

Profit sharing when bikes are rented to end customers

+ +
+
+

Single Rent

+

{selectedTemplate.ficoShare.single}%

+
+
+

Rent to Own

+

{selectedTemplate.ficoShare.own}%

+
+
+

Share an EV

+

{selectedTemplate.ficoShare.ev}%

+
+
+
+ + {/* Auto-Journal Entry Visualization */} +
+
+

+ Auto-Journal Entry (Draft) +

+ +
+
+ Account Details + Amount (৳) +
+ +
+
+

Debit (Dr)

+

Bank - City Bank

+

CODE: 1200

+
+

৳{formData.investmentAmount.toLocaleString()}

+
+ +
+
+ +
+
+ +
+
+

Credit (Cr)

+

Investor Liabilities

+

CODE: 2200

+
+

৳{formData.investmentAmount.toLocaleString()}

+
+ +
+

Reference: INV/{new Date().getFullYear()}/AUTO-{Math.random().toString(36).substring(7).toUpperCase()}

+

Status: Draft - On Creation

+
+
+
+
+ +
+ {/* Time & Period */} +
+

+ Schedule +

+
+
+ + setFormData({...formData, startDate: e.target.value})} + className="w-full px-4 py-2.5 bg-slate-50 border border-slate-200 rounded-xl text-sm focus:ring-2 focus:ring-investor/20 outline-none font-bold" + required + /> +
+
+ + setFormData({...formData, endDate: e.target.value})} + className="w-full px-4 py-2.5 bg-slate-50 border border-slate-200 rounded-xl text-sm focus:ring-2 focus:ring-investor/20 outline-none font-bold" + /> +
+
+ +

+ Duration is fixed at {selectedTemplate.duration} months with a {selectedTemplate.lockIn} month lock-in period as per template. +

+
+
+
+ + {/* Payment Details */} +
+

+ Payment +

+
+
+ + +
+
+ + setFormData({...formData, transactionRef: e.target.value})} + className="w-full px-4 py-2.5 bg-slate-50 border border-slate-200 rounded-xl text-sm focus:ring-2 focus:ring-investor/20 outline-none font-bold" + placeholder="Auto-generated if empty" + /> +
+
+
+ Pay Now + ৳{formData.initialPayment.toLocaleString()} +
+
+ Balance Due + ৳{(formData.investmentAmount - formData.initialPayment).toLocaleString()} +
+
+
+
+ + {/* Actions */} +
+ + +
+
+
+ + )} +
+ ); +} diff --git a/src/app/investor/plans/page.tsx b/src/app/investor/plans/page.tsx new file mode 100644 index 0000000..e25329b --- /dev/null +++ b/src/app/investor/plans/page.tsx @@ -0,0 +1,139 @@ +'use client'; + +import { useState } from 'react'; +import Link from 'next/link'; +import { Target, ArrowRight, Zap, TrendingUp, CreditCard, Plus, FileText, ChevronRight, Wallet, Clock, Percent } from 'lucide-react'; +import { investors } from '@/data/mockData'; +import toast from 'react-hot-toast'; + +export default function MyInvestmentsPage() { + const investor = investors[0]; // mock logged-in investor + + return ( +
+
+
+

My Investments

+

Manage your active portfolios and track your earnings.

+
+ + New Investment + +
+ + {/* Portfolio Summary */} +
+
+

+ Portfolio Overview +

+
+
+
+
+
+ +
+

Total Invested

+
+

৳{investor.totalInvested.toLocaleString()}

+
+
+
+
+ +
+

Total Returns

+
+

৳{investor.totalEarnings.toLocaleString()}

+
+
+
+
+ +
+

Active Bikes

+
+

{investor.activeBikes} Units

+
+
+
+ + {/* My Active Investments List */} +
+
+

+ Active Investment Plans +

+ + {investor.investments?.length || 0} Total + +
+
+ + + + + + + + + + + + {investor.investments && investor.investments.length > 0 ? investor.investments.map((inv) => ( + + + + + + + + )) : ( + + + + )} + +
Investment PlanCapital InvestedActual ReturnsStatusAction
+

{inv.planName}

+
+ {inv.planType} + Started: {inv.startDate} +
+
+

৳{inv.totalInvestment.toLocaleString()}

+
+

৳{inv.actualEarnings.toLocaleString()}

+

+{inv.expectedRoi}% ROI

+
+ +
+ {inv.status} + +
+ + View Details + +
+
+ +

No active investments found.

+ + Start your first investment + +
+
+
+
+
+ ); +} diff --git a/src/app/investor/withdraw/page.tsx b/src/app/investor/withdraw/page.tsx new file mode 100644 index 0000000..ebd6ee3 --- /dev/null +++ b/src/app/investor/withdraw/page.tsx @@ -0,0 +1,224 @@ +'use client'; + +import { useState } from 'react'; +import { CreditCard, Wallet, ArrowUpRight, History, CheckCircle, Clock, Building2, Smartphone, AlertCircle, ChevronDown } from 'lucide-react'; +import { investors, transactions } from '@/data/mockData'; +import toast from 'react-hot-toast'; + +export default function InvestorWithdrawPage() { + const investor = investors[0]; // mock logged-in investor + const availableBalance = investor.totalEarnings - investor.totalWithdrawn - investor.withdrawalPending; + + const withdrawHistory = transactions.filter(t => t.investorId === investor.id && t.type === 'withdrawal').sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()); + + const [amount, setAmount] = useState(''); + const [method, setMethod] = useState<'bank' | 'mobile'>('bank'); + const [selectedAccount, setSelectedAccount] = useState(''); + + const handleWithdraw = (e: React.FormEvent) => { + e.preventDefault(); + const withdrawAmount = Number(amount); + if (!withdrawAmount || withdrawAmount <= 0) { + toast.error('Please enter a valid amount'); + return; + } + if (withdrawAmount > availableBalance) { + toast.error('Insufficient available balance'); + return; + } + if (!selectedAccount) { + toast.error('Please select an account to receive funds'); + return; + } + + toast.success(`Withdrawal request for ৳${withdrawAmount.toLocaleString()} submitted successfully.`); + setAmount(''); + }; + + return ( +
+
+

Withdraw Funds

+

Request withdrawals to your bank or mobile banking accounts

+
+ +
+ {/* Balance Overview */} +
+
+
+
+
+ + Available Balance +
+

+ ৳{availableBalance.toLocaleString()} +

+

Ready to withdraw

+
+ +
+
+

Total Earnings

+

৳{investor.totalEarnings.toLocaleString()}

+
+
+

Total Withdrawn

+

৳{investor.totalWithdrawn.toLocaleString()}

+
+
+
+ +
+ +
+

Pending Requests

+

You currently have ৳{investor.withdrawalPending.toLocaleString()} in pending withdrawals. Processing takes 1-3 business days.

+
+
+
+ + {/* Withdrawal Form */} +
+
+

+ Create Withdrawal Request +

+ +
+
+ +
+ + setAmount(e.target.value)} + placeholder="0.00" + className="w-full pl-8 pr-4 py-3 border border-slate-200 rounded-xl text-lg font-semibold focus:outline-none focus:border-investor focus:ring-1 focus:ring-investor transition-all" + /> + +
+
+ +
+ +
+
setMethod('bank')} + className={`p-4 rounded-xl border-2 cursor-pointer transition-all ${method === 'bank' ? 'border-investor bg-investor/5' : 'border-slate-100 bg-white hover:border-slate-200'}`} + > + +

Bank Transfer

+

1-3 business days

+
+
setMethod('mobile')} + className={`p-4 rounded-xl border-2 cursor-pointer transition-all ${method === 'mobile' ? 'border-investor bg-investor/5' : 'border-slate-100 bg-white hover:border-slate-200'}`} + > + +

Mobile Banking

+

Instant transfer

+
+
+
+ +
+ +
+ + +
+
+ +
+ +
+
+
+
+
+ + {/* Withdrawal History */} +
+

+ Recent Withdrawals +

+
+
+ + + + + + + + + + + + {withdrawHistory.length > 0 ? withdrawHistory.map((t) => ( + + + + + + + + )) : ( + + + + )} + +
DateRef / DescMethodAmountStatus
{t.createdAt} +

{t.referenceNumber || 'Withdrawal'}

+

{t.description}

+
{t.paymentMethod}৳{t.amount.toLocaleString()} + + {t.status === 'completed' && } + {t.status === 'pending' && } + {t.status} + +
+ No withdrawal history found. +
+
+
+
+
+ ); +} \ No newline at end of file diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index ffd97df..76db878 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -22,7 +22,8 @@ import { ChevronDown, LogOut, Calculator, - Wrench + Wrench, + Target, User } from 'lucide-react'; import { getUserName, getUserRole, logout } from '@/lib/auth'; @@ -64,7 +65,10 @@ const bikerNavItems = [ ]; const investorNavItems = [ - { label: 'Dashboard', href: '/investor', icon: Wallet }, + { label: 'Dashboard', href: '/investor', icon: BarChart3 }, + { label: 'My Investments', href: '/investor/plans', icon: Target }, + { label: 'Withdraw', href: '/investor/withdraw', icon: CreditCard }, + { label: 'My Profile', href: '/investor/profile', icon: User }, ]; const shopNavItems = [ @@ -100,8 +104,8 @@ export default function Sidebar() { { label: 'Fleet', href: '/admin/fleet', icon: Bike }, { label: 'Users', href: '/admin/users', icon: Users }, ] : isInvestor ? [ - { label: 'Home', href: '/investor', icon: Wallet }, - { label: 'Portfolio', href: '/investor/portfolio', icon: BarChart3 }, + { label: 'Home', href: '/investor', icon: BarChart3 }, + { label: 'Investments', href: '/investor/plans', icon: Target }, { label: 'Withdraw', href: '/investor/withdraw', icon: CreditCard }, ] : isShop ? [ { label: 'Home', href: '/shop', icon: Store },