diff --git a/src/app/investor/profile/page.tsx b/src/app/investor/profile/page.tsx index 7a7082d..5583703 100644 --- a/src/app/investor/profile/page.tsx +++ b/src/app/investor/profile/page.tsx @@ -50,6 +50,8 @@ export default function InvestorProfilePage() { const [showPassword, setShowPassword] = useState({ current: false, new: false, confirm: false }); const [passwordForm, setPasswordForm] = useState({ current: '', new: '', confirm: '' }); const [twoFactorEnabled, setTwoFactorEnabled] = useState(false); + const [showUploadDocModal, setShowUploadDocModal] = useState(false); + const [uploadDocForm, setUploadDocForm] = useState({ docType: '', docNumber: '', docFile: null as File | null }); const [showAddBankModal, setShowAddBankModal] = useState(false); const [showEditBankModal, setShowEditBankModal] = useState(false); @@ -122,36 +124,36 @@ export default function InvestorProfilePage() { ]; return ( -
+
{/* Profile Header */} -
-
-
-
- {investor.name.charAt(0)} +
+
+
+
+ {investor.name.charAt(0)}
-
-
+
-

{investor.name}

- +

{investor.name}

+ KYC {investor.kycStatus} - + {investor.status} - + Risk: {investor.riskLevel}
-

{investor.id} • {investor.email}

-
+

{investor.id} • {investor.email}

+
Ref: {investor.referralCode} {investor.totalReferrals} Referrals • {investor.investments?.length || 0} Investments @@ -160,55 +162,56 @@ export default function InvestorProfilePage() {
-
-
+
+

Invested

-

৳{investor.totalInvested.toLocaleString()}

+

৳{investor.totalInvested.toLocaleString()}

-
+

Earnings

-

৳{investor.totalEarnings.toLocaleString()}

+

৳{investor.totalEarnings.toLocaleString()}

-
+

Withdrawn

-

৳{investor.totalWithdrawn.toLocaleString()}

+

৳{investor.totalWithdrawn.toLocaleString()}

-
+

Balance

-

৳{currentBalance.toLocaleString()}

+

৳{currentBalance.toLocaleString()}

-
+

Bikes

-

{investor.activeBikes}

+

{investor.activeBikes}

-
+

Pending

-

৳{investor.pendingEarnings.toLocaleString()}

+

৳{investor.pendingEarnings.toLocaleString()}

{/* Tabs */} -
-
+
+
{tabs.map(tab => { const Icon = tab.icon; return ( ); })}
-
+
{/* Personal Info Tab */} {activeTab === 'personal' && ( -
+
{editingSection === 'personal' ? ( -
+
setEditForm({ ...editForm, fullName: e.target.value })} className="w-full px-3 py-2 border border-slate-200 rounded-lg text-sm" /> @@ -546,7 +549,7 @@ export default function InvestorProfilePage() { {/* Nominee Tab */} {activeTab === 'nominee' && ( -
+
-
@@ -854,7 +857,7 @@ export default function InvestorProfilePage() { {/* Security Tab */} {activeTab === 'security' && ( -
+
@@ -1101,6 +1104,92 @@ export default function InvestorProfilePage() {
)} + + {showUploadDocModal && ( +
+
+
+

Upload Document

+ +
+
+
+ + +
+
+ + setUploadDocForm({ ...uploadDocForm, docNumber: e.target.value })} + className="w-full px-3 py-2 border border-slate-200 rounded-lg text-sm" + placeholder="Enter document number" + /> +
+
+ +
document.getElementById('docFileInput')?.click()} + > + {uploadDocForm.docFile ? ( +
+ + {uploadDocForm.docFile.name} +
+ ) : ( + <> + +

Click to upload or drag and drop

+

PDF, JPG, PNG (max 5MB)

+ + )} + { + const file = e.target.files?.[0]; + if (file) setUploadDocForm({ ...uploadDocForm, docFile: file }); + }} + /> +
+
+
+
+ + +
+
+
+ )}
); } \ No newline at end of file