@burdenoff/microfe-movethewheels 2026.925.2 → 2026.925.3
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 +30 -30
- package/dist/constants/index.js +12 -5
- package/dist/hooks/useCustomers.js +0 -3
- package/dist/hooks/useFleet.js +144 -131
- package/dist/hooks/useInventory.js +144 -145
- package/dist/hooks/useRoutes.js +5 -14
- package/dist/movethewheels/constants/index.d.ts +1 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +13 -1
- package/dist/movethewheels/hooks/useInventory.d.ts +10 -0
- package/dist/movethewheels/types/index.d.ts +13 -70
- package/dist/pages/CustomerDetailsPage.js +666 -344
- package/dist/pages/CustomersPage.js +71 -80
- package/dist/pages/FleetPage.js +1 -3
- package/dist/pages/InventoryPage.js +4 -4
- package/dist/pages/RouteDetailsPage.js +273 -248
- package/dist/pages/RoutesPage.js +130 -67
- package/dist/pages/VehicleDetailsPage.js +506 -391
- package/dist/pages/VehiclesPage.js +119 -70
- package/dist/pages/WarehouseDetailsPage.js +410 -370
- package/dist/pages/WarehousesPage.js +131 -82
- package/package.json +1 -1
- package/src/movethewheels/components/StatusBadge.tsx +8 -3
- package/src/movethewheels/constants/index.ts +9 -0
- package/src/movethewheels/hooks/useCustomers.ts +0 -3
- package/src/movethewheels/hooks/useFleet.ts +74 -19
- package/src/movethewheels/hooks/useInventory.ts +76 -32
- package/src/movethewheels/hooks/useRoutes.ts +17 -12
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +376 -109
- package/src/movethewheels/pages/CustomersPage.tsx +6 -15
- package/src/movethewheels/pages/FleetPage.tsx +2 -1
- package/src/movethewheels/pages/InventoryPage.tsx +14 -5
- package/src/movethewheels/pages/RouteDetailsPage.tsx +74 -34
- package/src/movethewheels/pages/RoutesPage.tsx +66 -2
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +151 -11
- package/src/movethewheels/pages/VehiclesPage.tsx +68 -3
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +213 -135
- package/src/movethewheels/pages/WarehousesPage.tsx +77 -16
- package/src/movethewheels/types/index.ts +14 -70
|
@@ -25,7 +25,14 @@ export interface CreateWarehouseInput {
|
|
|
25
25
|
postalCode: string;
|
|
26
26
|
country: string;
|
|
27
27
|
};
|
|
28
|
+
/** Free-text on the backend, e.g. "ACTIVE", "INACTIVE". Defaults to ACTIVE. */
|
|
29
|
+
status?: string;
|
|
30
|
+
contactInfo?: {
|
|
31
|
+
email?: string;
|
|
32
|
+
phone?: string;
|
|
33
|
+
};
|
|
28
34
|
totalCapacity?: number;
|
|
35
|
+
usedCapacity?: number;
|
|
29
36
|
}
|
|
30
37
|
interface UseInventoryResult {
|
|
31
38
|
inventory: Inventory[];
|
|
@@ -43,6 +50,7 @@ interface UseInventoryResult {
|
|
|
43
50
|
createWarehouse: (input: CreateWarehouseInput) => Promise<Warehouse>;
|
|
44
51
|
updateProduct: (id: string, input: CreateProductInput) => Promise<Product>;
|
|
45
52
|
updateWarehouse: (id: string, input: CreateWarehouseInput) => Promise<Warehouse>;
|
|
53
|
+
deleteWarehouse: (id: string) => Promise<void>;
|
|
46
54
|
}
|
|
47
55
|
export declare function useInventory(options?: UseInventoryOptions): UseInventoryResult;
|
|
48
56
|
interface UseListOptions {
|
|
@@ -55,6 +63,8 @@ interface UseProductsOptions extends UseListOptions {
|
|
|
55
63
|
}
|
|
56
64
|
interface UseWarehousesOptions extends UseListOptions {
|
|
57
65
|
search?: string;
|
|
66
|
+
/** Raw backend value, e.g. "ACTIVE"/"INACTIVE". */
|
|
67
|
+
status?: string;
|
|
58
68
|
}
|
|
59
69
|
export declare function useProducts(options?: UseProductsOptions): {
|
|
60
70
|
products: Product[];
|
|
@@ -135,11 +135,6 @@ export interface Customer {
|
|
|
135
135
|
address: Address;
|
|
136
136
|
businessLicense?: string;
|
|
137
137
|
taxId?: string;
|
|
138
|
-
website?: string;
|
|
139
|
-
preferredContactMethod: 'email' | 'phone' | 'both';
|
|
140
|
-
marketingOptIn: boolean;
|
|
141
|
-
notes?: string;
|
|
142
|
-
isActive: boolean;
|
|
143
138
|
rating: number;
|
|
144
139
|
createdAt: Date;
|
|
145
140
|
updatedAt: Date;
|
|
@@ -251,7 +246,7 @@ export interface ProofOfDelivery {
|
|
|
251
246
|
notes?: string;
|
|
252
247
|
}
|
|
253
248
|
export type VehicleType = 'van' | 'truck' | 'motorcycle' | 'bicycle' | 'car';
|
|
254
|
-
export type VehicleStatus = 'available' | 'assigned' | 'maintenance' | 'out_of_service';
|
|
249
|
+
export type VehicleStatus = 'available' | 'assigned' | 'maintenance' | 'out_of_service' | 'decommissioned';
|
|
255
250
|
export interface VehicleDocument {
|
|
256
251
|
id: string;
|
|
257
252
|
type: 'registration' | 'insurance' | 'inspection' | 'permit';
|
|
@@ -268,7 +263,7 @@ export interface Vehicle {
|
|
|
268
263
|
licensePlate: string;
|
|
269
264
|
/** MtwVehicle.ownershipType — free-text, e.g. "owned", "leased". */
|
|
270
265
|
ownershipType?: string;
|
|
271
|
-
year
|
|
266
|
+
year?: number;
|
|
272
267
|
capacity: {
|
|
273
268
|
weight: number;
|
|
274
269
|
volume: number;
|
|
@@ -326,70 +321,28 @@ export interface Driver {
|
|
|
326
321
|
documents: DriverDocument[];
|
|
327
322
|
createdAt: Date;
|
|
328
323
|
}
|
|
329
|
-
export interface WarehouseZone {
|
|
330
|
-
id: string;
|
|
331
|
-
name: string;
|
|
332
|
-
type: 'receiving' | 'storage' | 'picking' | 'packing' | 'shipping';
|
|
333
|
-
location: string;
|
|
334
|
-
capacity: number;
|
|
335
|
-
currentOccupancy: number;
|
|
336
|
-
}
|
|
337
|
-
export interface WarehouseEquipment {
|
|
338
|
-
id: string;
|
|
339
|
-
type: string;
|
|
340
|
-
model: string;
|
|
341
|
-
status: 'operational' | 'maintenance' | 'out_of_service';
|
|
342
|
-
lastMaintenance: Date;
|
|
343
|
-
nextMaintenance: Date;
|
|
344
|
-
}
|
|
345
324
|
export interface Warehouse {
|
|
346
325
|
id: string;
|
|
347
326
|
name: string;
|
|
348
327
|
code: string;
|
|
349
328
|
address: Address;
|
|
350
|
-
type: 'distribution' | 'fulfillment' | 'cold_storage' | 'cross_dock';
|
|
329
|
+
type: 'distribution' | 'fulfillment' | 'cold_storage' | 'cross_dock' | 'retail';
|
|
330
|
+
/** Raw backend value (free-text, e.g. "ACTIVE"/"INACTIVE" — defaults to ACTIVE). */
|
|
331
|
+
status: string;
|
|
351
332
|
capacity: {
|
|
352
333
|
totalSpace: number;
|
|
353
334
|
usedSpace: number;
|
|
354
|
-
totalPallets: number;
|
|
355
|
-
usedPallets: number;
|
|
356
|
-
specialAreas: Array<{
|
|
357
|
-
type: string;
|
|
358
|
-
capacity: number;
|
|
359
|
-
currentUsage: number;
|
|
360
|
-
temperature?: {
|
|
361
|
-
min: number;
|
|
362
|
-
max: number;
|
|
363
|
-
unit: string;
|
|
364
|
-
};
|
|
365
|
-
}>;
|
|
366
335
|
};
|
|
367
336
|
operatingHours: Record<string, {
|
|
368
337
|
open: string;
|
|
369
338
|
close: string;
|
|
370
339
|
} | null>;
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}>;
|
|
375
|
-
zones: WarehouseZone[];
|
|
376
|
-
equipment: WarehouseEquipment[];
|
|
377
|
-
staff: Array<{
|
|
378
|
-
userId: string;
|
|
379
|
-
role: string;
|
|
380
|
-
shift: string;
|
|
381
|
-
permissions: string[];
|
|
382
|
-
}>;
|
|
383
|
-
metrics: {
|
|
384
|
-
throughput: number;
|
|
385
|
-
accuracy: number;
|
|
386
|
-
productivity: number;
|
|
387
|
-
utilization: number;
|
|
388
|
-
ordersFulfilled: number;
|
|
389
|
-
averageProcessingTime: number;
|
|
390
|
-
lastUpdated: Date;
|
|
340
|
+
contactInfo?: {
|
|
341
|
+
email?: string;
|
|
342
|
+
phone?: string;
|
|
391
343
|
};
|
|
392
|
-
|
|
344
|
+
/** Real computed value: usedSpace / totalSpace. No other backend metrics exist for a warehouse. */
|
|
345
|
+
utilization: number;
|
|
393
346
|
createdAt: Date;
|
|
394
347
|
}
|
|
395
348
|
export interface InventoryMovement {
|
|
@@ -409,20 +362,13 @@ export interface Inventory {
|
|
|
409
362
|
productSku?: string;
|
|
410
363
|
warehouseId: string;
|
|
411
364
|
warehouseName?: string;
|
|
412
|
-
zoneId: string;
|
|
413
365
|
quantity: number;
|
|
414
366
|
reservedQuantity: number;
|
|
415
367
|
availableQuantity: number;
|
|
416
|
-
|
|
417
|
-
|
|
368
|
+
damagedQuantity: number;
|
|
369
|
+
/** Undefined means no reorder point is configured — never treat as 0 (matches the backend's low-stock rule, which requires one to be set). */
|
|
370
|
+
reorderLevel?: number;
|
|
418
371
|
lastRestocked: Date;
|
|
419
|
-
location: {
|
|
420
|
-
aisle: string;
|
|
421
|
-
shelf: string;
|
|
422
|
-
position: string;
|
|
423
|
-
level: number;
|
|
424
|
-
};
|
|
425
|
-
movements: InventoryMovement[];
|
|
426
372
|
createdAt: Date;
|
|
427
373
|
updatedAt: Date;
|
|
428
374
|
}
|
|
@@ -456,10 +402,7 @@ export interface Route {
|
|
|
456
402
|
/** Estimated fuel cost for the route (svc MtwRoute.fuelCost). */
|
|
457
403
|
fuelCost?: number;
|
|
458
404
|
actualDuration?: number;
|
|
459
|
-
startTime?: Date;
|
|
460
|
-
endTime?: Date;
|
|
461
405
|
optimized: boolean;
|
|
462
|
-
trafficConditions: TrafficCondition[];
|
|
463
406
|
createdAt: Date;
|
|
464
407
|
}
|
|
465
408
|
export interface TrackingAlert {
|