diff --git a/src/app/admin/batteries/page.tsx b/src/app/admin/batteries/page.tsx index 2a9e0d0..adeb3d0 100644 --- a/src/app/admin/batteries/page.tsx +++ b/src/app/admin/batteries/page.tsx @@ -58,6 +58,8 @@ interface Battery { assignedBikerName?: string; currentStationId?: string; currentStationName?: string; + hubId?: string; + hubName?: string; lastMaintenance?: string; nextMaintenance?: string; bmsData?: BMSData; @@ -254,6 +256,13 @@ const mockStations: SwapStation[] = [ { id: 'SS-005', name: 'Mirpur Swap Station', location: 'Mirpur 1, Section 2' }, ]; +const hubs = [ + { id: 'HUB-001', name: 'JAIBEN Head Office' }, + { id: 'HUB-002', name: 'Banani Hub' }, + { id: 'HUB-003', name: 'Uttara Hub' }, + { id: 'HUB-004', name: 'Mirpur Hub' }, +]; + const statusColors: Record = { available: 'bg-green-100 text-green-700', 'in-use': 'bg-blue-100 text-blue-700', @@ -789,12 +798,17 @@ function BatteryForm({ battery, onSave, onCancel }: { battery: Battery | null; o voltage: 60, purchaseDate: new Date().toISOString().split('T')[0], purchasePrice: 0, + transactionMethod: 'cash', + autoJournal: true, + autoJournalSource: 'supplier', warrantyExpiry: '', status: 'available', currentSoc: 100, health: 100, cycleCount: 0, history: [], + hubId: '', + hubName: '', }); const handleChange = (field: keyof Battery, value: any) => { @@ -897,33 +911,23 @@ function BatteryForm({ battery, onSave, onCancel }: { battery: Battery | null; o -
- +
+ +
- {formData.autoJournal && ( -
- - -
- )}