@burdenoff/microfe-movethewheels 2026.925.3 → 2026.929.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/StatusBadge.js +4 -1
- package/dist/hooks/useFleet.js +4 -4
- package/dist/hooks/useInventory.js +2 -1
- package/dist/movethewheels/components/StatusBadge.d.ts +3 -1
- package/dist/movethewheels/hooks/useFleet.d.ts +4 -3
- package/dist/movethewheels/hooks/useInventory.d.ts +1 -0
- package/dist/movethewheels/types/index.d.ts +6 -5
- package/dist/pages/DriverDetailsPage.js +2 -2
- package/dist/pages/DriversPage.js +2 -2
- package/dist/pages/InventoryPage.js +1 -1
- package/dist/pages/RouteDetailsPage.js +353 -373
- package/dist/pages/VehicleDetailsPage.js +49 -26
- package/dist/pages/VehiclesPage.js +2 -2
- package/dist/pages/WarehouseDetailsPage.js +73 -70
- package/dist/pages/WarehousesPage.js +1 -1
- package/package.json +1 -1
- package/src/movethewheels/components/StatusBadge.tsx +7 -4
- package/src/movethewheels/hooks/useFleet.ts +16 -7
- package/src/movethewheels/hooks/useInventory.ts +1 -1
- package/src/movethewheels/pages/DriverDetailsPage.tsx +3 -1
- package/src/movethewheels/pages/DriversPage.tsx +5 -1
- package/src/movethewheels/pages/InventoryPage.tsx +4 -1
- package/src/movethewheels/pages/RouteDetailsPage.tsx +24 -25
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +35 -13
- package/src/movethewheels/pages/VehiclesPage.tsx +4 -2
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +4 -3
- package/src/movethewheels/pages/WarehousesPage.tsx +4 -1
- package/src/movethewheels/types/index.ts +14 -5
package/dist/hooks/useFleet.js
CHANGED
|
@@ -63,9 +63,9 @@ function T(e) {
|
|
|
63
63
|
ownershipType: e.ownershipType ?? void 0,
|
|
64
64
|
year: e.year ?? void 0,
|
|
65
65
|
capacity: {
|
|
66
|
-
weight: 0,
|
|
67
|
-
volume: 0,
|
|
68
|
-
|
|
66
|
+
weight: typeof e.capacity?.weight == "number" ? e.capacity.weight : void 0,
|
|
67
|
+
volume: typeof e.capacity?.volume == "number" ? e.capacity.volume : void 0,
|
|
68
|
+
pallets: typeof e.capacity?.pallets == "number" ? e.capacity.pallets : void 0
|
|
69
69
|
},
|
|
70
70
|
status: b(e.status),
|
|
71
71
|
driverId: void 0,
|
|
@@ -91,7 +91,7 @@ function E(e) {
|
|
|
91
91
|
employeeId: e.employeeId,
|
|
92
92
|
licenseNumber: e.licenseNumber ?? "",
|
|
93
93
|
licenseType: e.licenseClass ?? "standard",
|
|
94
|
-
licenseExpiry: e.licenseExpiry ? new Date(e.licenseExpiry) :
|
|
94
|
+
licenseExpiry: e.licenseExpiry ? new Date(e.licenseExpiry) : void 0,
|
|
95
95
|
vehicleIds: e.vehicleId ? [e.vehicleId] : [],
|
|
96
96
|
assignedVehicle: e.vehicleId ?? void 0,
|
|
97
97
|
status: S(e.status),
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { VehicleType } from '../types';
|
|
2
|
+
|
|
1
3
|
type StatusType = 'order' | 'vehicle' | 'driver' | 'custom';
|
|
2
4
|
interface StatusBadgeProps {
|
|
3
5
|
status: string;
|
|
@@ -44,7 +46,7 @@ export declare function PaymentStatusBadge({ status, size, className, }: {
|
|
|
44
46
|
* VehicleTypeBadge - Displays vehicle type
|
|
45
47
|
*/
|
|
46
48
|
export declare function VehicleTypeBadge({ type, size, className, }: {
|
|
47
|
-
type:
|
|
49
|
+
type: VehicleType;
|
|
48
50
|
size?: 'sm' | 'md' | 'lg';
|
|
49
51
|
className?: string;
|
|
50
52
|
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Driver, DriverStatus, FleetFilter, Vehicle, VehicleStatus } from '../types';
|
|
1
|
+
import { Driver, DriverStatus, FleetFilter, Vehicle, VehicleFuelType, VehicleStatus } from '../types';
|
|
2
2
|
|
|
3
3
|
interface UseFleetOptions {
|
|
4
4
|
filters?: FleetFilter;
|
|
@@ -16,7 +16,8 @@ export interface CreateVehicleInput {
|
|
|
16
16
|
year?: number;
|
|
17
17
|
/** VehicleStatus enum value, e.g. `ACTIVE`, `MAINTENANCE`. */
|
|
18
18
|
status?: string;
|
|
19
|
-
|
|
19
|
+
/** FuelType enum value, e.g. `DIESEL`, `ELECTRIC`. */
|
|
20
|
+
fuelType?: VehicleFuelType;
|
|
20
21
|
fuelEfficiencyLPer100Km?: number;
|
|
21
22
|
capacity?: {
|
|
22
23
|
weight?: number;
|
|
@@ -75,7 +76,7 @@ export interface ApiVehicle {
|
|
|
75
76
|
capacity?: Record<string, unknown> | null;
|
|
76
77
|
status: string;
|
|
77
78
|
currentLocation?: Record<string, unknown> | null;
|
|
78
|
-
fuelType?:
|
|
79
|
+
fuelType?: VehicleFuelType | null;
|
|
79
80
|
fuelEfficiencyLPer100Km?: number | null;
|
|
80
81
|
fuelLevel?: number | null;
|
|
81
82
|
mileage?: number | null;
|
|
@@ -111,6 +111,7 @@ export declare function useWarehouse(warehouseId: string | undefined): {
|
|
|
111
111
|
isLoading: boolean;
|
|
112
112
|
error: Error | null;
|
|
113
113
|
refetch: () => undefined;
|
|
114
|
+
reload: () => Promise<void>;
|
|
114
115
|
};
|
|
115
116
|
export interface InventoryStats {
|
|
116
117
|
/** Units physically in the warehouses. */
|
|
@@ -245,7 +245,8 @@ export interface ProofOfDelivery {
|
|
|
245
245
|
capturedByDriverId: string;
|
|
246
246
|
notes?: string;
|
|
247
247
|
}
|
|
248
|
-
export type VehicleType = 'van' | 'truck' | 'motorcycle' | 'bicycle' | '
|
|
248
|
+
export type VehicleType = 'van' | 'truck' | 'motorcycle' | 'bicycle' | 'flatbed' | 'refrigerated' | 'semi_trailer' | 'drone';
|
|
249
|
+
export type VehicleFuelType = 'DIESEL' | 'PETROL' | 'CNG' | 'ELECTRIC' | 'HYBRID';
|
|
249
250
|
export type VehicleStatus = 'available' | 'assigned' | 'maintenance' | 'out_of_service' | 'decommissioned';
|
|
250
251
|
export interface VehicleDocument {
|
|
251
252
|
id: string;
|
|
@@ -265,8 +266,8 @@ export interface Vehicle {
|
|
|
265
266
|
ownershipType?: string;
|
|
266
267
|
year?: number;
|
|
267
268
|
capacity: {
|
|
268
|
-
weight
|
|
269
|
-
volume
|
|
269
|
+
weight?: number;
|
|
270
|
+
volume?: number;
|
|
270
271
|
pallets?: number;
|
|
271
272
|
};
|
|
272
273
|
status: VehicleStatus;
|
|
@@ -276,7 +277,7 @@ export interface Vehicle {
|
|
|
276
277
|
nextMaintenance?: Date;
|
|
277
278
|
/** Odometer reading (km) at which the next service is due. */
|
|
278
279
|
nextMaintenanceMileage?: number;
|
|
279
|
-
fuelType?:
|
|
280
|
+
fuelType?: VehicleFuelType;
|
|
280
281
|
/** Fuel consumption, litres per 100km. */
|
|
281
282
|
fuelEfficiencyLPer100Km?: number;
|
|
282
283
|
fuelLevel?: number;
|
|
@@ -301,7 +302,7 @@ export interface Driver {
|
|
|
301
302
|
employeeId: string;
|
|
302
303
|
licenseNumber: string;
|
|
303
304
|
licenseType: string;
|
|
304
|
-
licenseExpiry
|
|
305
|
+
licenseExpiry?: Date;
|
|
305
306
|
vehicleIds: string[];
|
|
306
307
|
assignedVehicle?: string;
|
|
307
308
|
status: DriverStatus;
|
|
@@ -709,9 +709,9 @@ function Y() {
|
|
|
709
709
|
className: "text-sm text-text-secondary",
|
|
710
710
|
children: [_.licenseNumber || "—", _.licenseType ? ` - ${_.licenseType}` : ""]
|
|
711
711
|
}),
|
|
712
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ U("p", {
|
|
713
713
|
className: "text-sm text-text-secondary",
|
|
714
|
-
children:
|
|
714
|
+
children: _.licenseExpiry ? `Expires: ${L(_.licenseExpiry)}` : "Expiry not recorded"
|
|
715
715
|
})
|
|
716
716
|
] })
|
|
717
717
|
}) })] }),
|
|
@@ -183,9 +183,9 @@ function P() {
|
|
|
183
183
|
header: "License",
|
|
184
184
|
cell: (e) => /* @__PURE__ */ A("div", {
|
|
185
185
|
className: "text-sm",
|
|
186
|
-
children: [/* @__PURE__ */ k("p", { children: e.licenseType }), /* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ k("p", { children: e.licenseType }), /* @__PURE__ */ k("p", {
|
|
187
187
|
className: "text-text-secondary",
|
|
188
|
-
children:
|
|
188
|
+
children: e.licenseExpiry ? `Exp: ${E(e.licenseExpiry, "short")}` : "Expiry not recorded"
|
|
189
189
|
})]
|
|
190
190
|
})
|
|
191
191
|
},
|
|
@@ -427,7 +427,7 @@ function M() {
|
|
|
427
427
|
className: "text-xs text-text-secondary",
|
|
428
428
|
children: N("movethewheels.inventory.warehouses.utilization", "Utilization")
|
|
429
429
|
}), /* @__PURE__ */ C(g, {
|
|
430
|
-
value: e.capacity.usedSpace / e.capacity.totalSpace * 100,
|
|
430
|
+
value: e.capacity.totalSpace > 0 ? e.capacity.usedSpace / e.capacity.totalSpace * 100 : 0,
|
|
431
431
|
className: "w-24 h-2"
|
|
432
432
|
})]
|
|
433
433
|
})]
|