diff --git a/src/app/admin/batteries/[id]/page.tsx b/src/app/admin/batteries/[id]/page.tsx index 0ce336d..84cbe75 100644 --- a/src/app/admin/batteries/[id]/page.tsx +++ b/src/app/admin/batteries/[id]/page.tsx @@ -994,6 +994,47 @@ export default function BatteryDetailPage({ params }: { params: Promise<{ id: st )} + {battery.investorId && ( +
+
+
+
+ +
+
+

Investor Co-Ownership Details

+ Active Investment +
+
+
+ +
+
+

Investor Name

+ + {battery.investorName} + +

ID: {battery.investorId}

+
+
+

Ownership Share (%)

+

{battery.investorSharePercentage}%

+

Share of Daily Rent Revenue

+
+
+

Invested Amount

+

৳{(battery.investedAmount || 0).toLocaleString()}

+

Total Capital Contributed

+
+
+

Investor Daily Payout

+

৳{(((battery.rentPrice || 150) * (battery.investorSharePercentage || 0)) / 100).toLocaleString()}/day

+

Calculated from Daily Rent

+
+
+
+ )} + {showEditModal && ( + +
+

Investor Assignment (Co-Ownership)

+
+
+ + handleChange('investorId', e.target.value)} + placeholder="INV-001" + className="w-full px-3 py-2 border border-slate-200 rounded-lg text-sm" + /> +
+
+ + handleChange('investorName', e.target.value)} + placeholder="Tahmid Rahman" + className="w-full px-3 py-2 border border-slate-200 rounded-lg text-sm" + /> +
+
+ + handleChange('investorSharePercentage', parseInt(e.target.value))} + placeholder="60" + className="w-full px-3 py-2 border border-slate-200 rounded-lg text-sm" + /> +
+
+ + handleChange('investedAmount', parseInt(e.target.value))} + placeholder="45000" + className="w-full px-3 py-2 border border-slate-200 rounded-lg text-sm" + /> +
+
+
)} - {/* Details Modal */} - {showDetailsModal && selectedBattery && ( -
-
-
-

Battery Details

- -
- setShowDetailsModal(false)} - /> -
-
- )} + {/* History Modal */} {showHistoryModal && selectedBattery && (