refactor: remove register bike and battery assignment buttons from investor detail page

This commit is contained in:
sazzadulalambd
2026-05-19 19:02:15 +06:00
parent 646068dbe3
commit 7ced7f8ed4

View File

@@ -1526,25 +1526,6 @@ export default function InvestorDetailPage() {
>
<Plus className="w-4 h-4" /> Assign Existing
</button>
<button
onClick={() => {
const evInv = investor.investments?.find((inv: any) => inv.assetType === 'bike' || inv.planName.toLowerCase().includes('ev') || inv.planName.toLowerCase().includes('bike')) || investor.investments?.[0];
setRegisterBikeForm({
plateNumber: `DHAKA-METRO-HA-${Math.floor(1000 + Math.random() * 9000)}`,
brand: 'Etron',
model: 'ET50',
currentRent: 150,
location: 'Banani',
purchasePrice: 200000,
rentalType: 'single_rent',
investmentId: evInv?.id || ''
});
setShowRegisterBikeModal(true);
}}
className="px-4 py-2 bg-investor text-white rounded-lg text-sm font-semibold hover:bg-investor-dark flex items-center gap-2 shadow-sm transition-colors"
>
<Plus className="w-4 h-4" /> Register & Assign New
</button>
</div>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
@@ -1699,29 +1680,6 @@ export default function InvestorDetailPage() {
>
<Plus className="w-4 h-4" /> Assign Existing
</button>
<button
onClick={() => {
const batInv = investor.investments?.find((inv: any) => inv.assetType === 'battery' || inv.planName.toLowerCase().includes('battery')) || investor.investments?.[0];
setRegisterForm({
serialNumber: `SN-2026-${Math.floor(10000 + Math.random() * 90000)}`,
brand: 'BYD',
model: 'Li-Ion 60V50Ah',
type: 'lithium-ion',
capacity: 50,
voltage: 60,
purchasePrice: 45000,
deposit: 5000,
rentPrice: 150,
investorShare: 100,
investedAmount: 45000,
investmentId: batInv?.id || ''
});
setShowRegisterBatteryModal(true);
}}
className="px-4 py-2 bg-emerald-600 text-white rounded-lg text-sm font-semibold hover:bg-emerald-700 flex items-center gap-2 shadow-sm transition-colors"
>
<Plus className="w-4 h-4" /> Register & Assign New
</button>
</div>
</div>