@burdenoff/microfe-movethewheels 2026.703.8 → 2026.704.1
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/{CreateOrderPage-V8aXfcpN.js → CreateOrderPage-CXbhJLLz.js} +163 -138
- package/dist/{DashboardPage-DiD-cWwD.js → DashboardPage-BoswH3ec.js} +2 -2
- package/dist/DriverDetailsPage-CPO0G8Ki.js +518 -0
- package/dist/{DriversPage-DW-FGPFW.js → DriversPage-6Z61dpDI.js} +1 -1
- package/dist/{FleetPage-P9k4zZqP.js → FleetPage-qWRj7WFO.js} +1 -1
- package/dist/{InventoryPage-BWikjZMW.js → InventoryPage-DbR4Z--d.js} +1 -1
- package/dist/{LiveTrackingPage-UQBWlthJ.js → LiveTrackingPage-5U68u3oA.js} +1 -1
- package/dist/{OrderDetailsPage-2J4ua0wd.js → OrderDetailsPage-DRYifXm9.js} +1 -1
- package/dist/ProductDetailsPage-CWgcRqGR.js +375 -0
- package/dist/{ProductsPage-Bn1U2jTj.js → ProductsPage-CokwDOR2.js} +1 -1
- package/dist/{RouteDetailsPage-CgSY1CTd.js → RouteDetailsPage-BHQbFgI9.js} +242 -210
- package/dist/{SettingsPage-2a05Sq2k.js → SettingsPage-_6SIlcBX.js} +1 -1
- package/dist/{TrackingPage-SnjW6qeD.js → TrackingPage-Cg0tYGJe.js} +1 -1
- package/dist/{VehicleDetailsPage-CvRMJ2zC.js → VehicleDetailsPage-BbZlCFPo.js} +159 -135
- package/dist/{VehiclesPage-qxf-1C1B.js → VehiclesPage-BfBEyXGs.js} +1 -1
- package/dist/WarehouseDetailsPage-DxNhiaoI.js +515 -0
- package/dist/{WarehousesPage-44Wj7AGT.js → WarehousesPage-M3NaBT0z.js} +1 -1
- package/dist/index.js +25 -5
- package/dist/{useFleet-BXSocBD_.js → useFleet-BfA_-VUW.js} +100 -71
- package/dist/{useInventory-DmZficcp.js → useInventory-BO7TSgq_.js} +98 -72
- package/dist/{useSettings-CteNasBE.js → useSettings-BNNzQs_B.js} +1 -1
- package/dist/{useTracking-B7ttexRe.js → useTracking-7nd_XOSL.js} +1 -1
- package/package.json +1 -1
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +5 -0
- package/src/movethewheels/hooks/useFleet.ts +113 -0
- package/src/movethewheels/hooks/useInventory.ts +86 -0
- package/src/movethewheels/hooks/useSettings.ts +8 -1
- package/src/movethewheels/pages/CreateOrderPage.tsx +48 -6
- package/src/movethewheels/pages/DriverDetailsPage.tsx +56 -18
- package/src/movethewheels/pages/ProductDetailsPage.tsx +51 -15
- package/src/movethewheels/pages/RouteDetailsPage.tsx +51 -7
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +51 -15
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +46 -10
- package/src/movethewheels/types/index.ts +3 -0
- package/dist/DriverDetailsPage-DjaXaATQ.js +0 -490
- package/dist/ProductDetailsPage-BSjWLrty.js +0 -350
- package/dist/WarehouseDetailsPage-D0Wyyj1Y.js +0 -493
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import { A as e, F as t, I as n, L as r, M as i, P as a, R as o, d as s, f as c, g as l, h as u, i as d, j as f, l as p, lt as m, n as h, r as g, st as _, u as v } from "./PageLayout-j9Zw3wBN.js";
|
|
2
|
+
import { t as y } from "./arrow-left-1dVWv2dg.js";
|
|
3
|
+
import { t as b } from "./box-DW1KNP8j.js";
|
|
4
|
+
import { t as x } from "./clock-B4-qjGuB.js";
|
|
5
|
+
import { t as S } from "./map-pin-BISLzLwb.js";
|
|
6
|
+
import { t as C } from "./save-CcfoIn2J.js";
|
|
7
|
+
import { t as w } from "./square-pen-Dr1X-P2s.js";
|
|
8
|
+
import { t as T } from "./users-BKmsb79k.js";
|
|
9
|
+
import { t as E } from "./warehouse-DE1irFyJ.js";
|
|
10
|
+
import { o as D, t as O } from "./useInventory-BO7TSgq_.js";
|
|
11
|
+
import { t as k } from "./FormError-D4T5FWZA.js";
|
|
12
|
+
import { t as A } from "./formatters-FWJDwTFv.js";
|
|
13
|
+
import { useEffect as j, useState as M } from "react";
|
|
14
|
+
import { useLocation as N, useParams as P } from "react-router-dom";
|
|
15
|
+
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
16
|
+
import { EmphasisPanel as L, NextSteps as R, PagePurpose as z } from "@burdenoff/fe-libs/ui";
|
|
17
|
+
//#region src/movethewheels/pages/WarehouseDetailsPage.tsx
|
|
18
|
+
var B = [
|
|
19
|
+
{
|
|
20
|
+
value: "DISTRIBUTION",
|
|
21
|
+
label: "Distribution"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
value: "FULFILLMENT",
|
|
25
|
+
label: "Fulfillment"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
value: "COLD_STORAGE",
|
|
29
|
+
label: "Cold Storage"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
value: "CROSS_DOCK",
|
|
33
|
+
label: "Cross-Dock"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
value: "RETAIL",
|
|
37
|
+
label: "Retail"
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
function V({ editId: i }) {
|
|
41
|
+
let { basePath: p, navigate: h } = _(), { createWarehouse: g, updateWarehouse: b } = O(), { warehouse: x } = D(i), w = !!i, [T, A] = M({
|
|
42
|
+
code: "",
|
|
43
|
+
name: "",
|
|
44
|
+
type: "DISTRIBUTION",
|
|
45
|
+
street: "",
|
|
46
|
+
city: "",
|
|
47
|
+
state: "",
|
|
48
|
+
postalCode: "",
|
|
49
|
+
country: "USA",
|
|
50
|
+
totalCapacity: ""
|
|
51
|
+
}), [N, P] = M(!1), [R, V] = M(null);
|
|
52
|
+
j(() => {
|
|
53
|
+
!i || !x || A({
|
|
54
|
+
code: x.code || "",
|
|
55
|
+
name: x.name || "",
|
|
56
|
+
type: x.type ? x.type.toUpperCase() : "DISTRIBUTION",
|
|
57
|
+
street: x.address.street || "",
|
|
58
|
+
city: x.address.city || "",
|
|
59
|
+
state: x.address.state || "",
|
|
60
|
+
postalCode: x.address.postalCode || "",
|
|
61
|
+
country: x.address.country || "USA",
|
|
62
|
+
totalCapacity: x.capacity.totalSpace ? String(x.capacity.totalSpace) : ""
|
|
63
|
+
});
|
|
64
|
+
}, [i, x]);
|
|
65
|
+
let H = () => h?.(m(p, "inventory/warehouses")), U = (e, t) => A((n) => ({
|
|
66
|
+
...n,
|
|
67
|
+
[e]: t
|
|
68
|
+
})), W = async (e) => {
|
|
69
|
+
if (e.preventDefault(), !T.code.trim() || !T.name.trim()) {
|
|
70
|
+
V("Warehouse code and name are required.");
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (!T.street.trim() || !T.city.trim()) {
|
|
74
|
+
V("A street and city are required for the warehouse address.");
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
P(!0), V(null);
|
|
78
|
+
try {
|
|
79
|
+
let e = T.totalCapacity.trim() ? Number(T.totalCapacity) : void 0, t = {
|
|
80
|
+
code: T.code.trim(),
|
|
81
|
+
name: T.name.trim(),
|
|
82
|
+
type: T.type,
|
|
83
|
+
address: {
|
|
84
|
+
street: T.street.trim(),
|
|
85
|
+
city: T.city.trim(),
|
|
86
|
+
state: T.state.trim(),
|
|
87
|
+
postalCode: T.postalCode.trim(),
|
|
88
|
+
country: T.country.trim()
|
|
89
|
+
},
|
|
90
|
+
totalCapacity: e !== void 0 && !Number.isNaN(e) ? e : void 0
|
|
91
|
+
};
|
|
92
|
+
if (i) await b(i, t), h?.(m(p, `inventory/warehouses/${i}`));
|
|
93
|
+
else {
|
|
94
|
+
let e = await g(t);
|
|
95
|
+
h?.(m(p, `inventory/warehouses/${e.id}`));
|
|
96
|
+
}
|
|
97
|
+
} catch (e) {
|
|
98
|
+
console.error("Failed to create warehouse:", e), V(e instanceof Error ? e.message : "Failed to create warehouse. Please try again."), P(!1);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
return /* @__PURE__ */ I(d, {
|
|
102
|
+
title: w ? "Edit Warehouse" : "Add Warehouse",
|
|
103
|
+
subtitle: "Register a storage and fulfilment site",
|
|
104
|
+
icon: /* @__PURE__ */ F(E, { size: 24 }),
|
|
105
|
+
headerActions: /* @__PURE__ */ I("div", {
|
|
106
|
+
className: "flex gap-2",
|
|
107
|
+
children: [/* @__PURE__ */ I(v, {
|
|
108
|
+
variant: "outline",
|
|
109
|
+
onClick: H,
|
|
110
|
+
disabled: N,
|
|
111
|
+
children: [/* @__PURE__ */ F(y, { size: 16 }), " Cancel"]
|
|
112
|
+
}), /* @__PURE__ */ I(v, {
|
|
113
|
+
onClick: W,
|
|
114
|
+
disabled: N,
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ F(C, { size: 16 }),
|
|
117
|
+
" ",
|
|
118
|
+
w ? N ? "Saving..." : "Save Changes" : N ? "Saving..." : "Add Warehouse"
|
|
119
|
+
]
|
|
120
|
+
})]
|
|
121
|
+
}),
|
|
122
|
+
children: [/* @__PURE__ */ F(z, {
|
|
123
|
+
icon: /* @__PURE__ */ F(E, { size: 18 }),
|
|
124
|
+
children: "Add a warehouse so you can store inventory and fulfil orders from it. A code, name, type and location get it on the network — set a total capacity to track utilization."
|
|
125
|
+
}), /* @__PURE__ */ I("form", {
|
|
126
|
+
onSubmit: W,
|
|
127
|
+
className: "max-w-2xl space-y-6",
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ F(k, { message: R }),
|
|
130
|
+
/* @__PURE__ */ I(L, { children: [/* @__PURE__ */ F("h2", {
|
|
131
|
+
className: "text-base font-semibold text-text-primary mb-4",
|
|
132
|
+
children: "Warehouse Details"
|
|
133
|
+
}), /* @__PURE__ */ I("div", {
|
|
134
|
+
className: "space-y-4",
|
|
135
|
+
children: [/* @__PURE__ */ I("div", {
|
|
136
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ I("div", {
|
|
139
|
+
className: "space-y-2",
|
|
140
|
+
children: [/* @__PURE__ */ I(f, {
|
|
141
|
+
htmlFor: "code",
|
|
142
|
+
children: ["Code ", /* @__PURE__ */ F("span", {
|
|
143
|
+
className: "text-status-error-text",
|
|
144
|
+
children: "*"
|
|
145
|
+
})]
|
|
146
|
+
}), /* @__PURE__ */ F(e, {
|
|
147
|
+
id: "code",
|
|
148
|
+
value: T.code,
|
|
149
|
+
onChange: (e) => U("code", e.target.value),
|
|
150
|
+
placeholder: "WH-SF-01",
|
|
151
|
+
required: !0
|
|
152
|
+
})]
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ I("div", {
|
|
155
|
+
className: "space-y-2",
|
|
156
|
+
children: [/* @__PURE__ */ I(f, {
|
|
157
|
+
htmlFor: "name",
|
|
158
|
+
children: ["Name ", /* @__PURE__ */ F("span", {
|
|
159
|
+
className: "text-status-error-text",
|
|
160
|
+
children: "*"
|
|
161
|
+
})]
|
|
162
|
+
}), /* @__PURE__ */ F(e, {
|
|
163
|
+
id: "name",
|
|
164
|
+
value: T.name,
|
|
165
|
+
onChange: (e) => U("name", e.target.value),
|
|
166
|
+
placeholder: "San Francisco DC",
|
|
167
|
+
required: !0
|
|
168
|
+
})]
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ I("div", {
|
|
171
|
+
className: "space-y-2",
|
|
172
|
+
children: [/* @__PURE__ */ I(f, {
|
|
173
|
+
htmlFor: "type",
|
|
174
|
+
children: ["Type ", /* @__PURE__ */ F("span", {
|
|
175
|
+
className: "text-status-error-text",
|
|
176
|
+
children: "*"
|
|
177
|
+
})]
|
|
178
|
+
}), /* @__PURE__ */ I(a, {
|
|
179
|
+
value: T.type,
|
|
180
|
+
onValueChange: (e) => U("type", e),
|
|
181
|
+
children: [/* @__PURE__ */ F(r, {
|
|
182
|
+
id: "type",
|
|
183
|
+
children: /* @__PURE__ */ F(o, {})
|
|
184
|
+
}), /* @__PURE__ */ F(t, { children: B.map((e) => /* @__PURE__ */ F(n, {
|
|
185
|
+
value: e.value,
|
|
186
|
+
children: e.label
|
|
187
|
+
}, e.value)) })]
|
|
188
|
+
})]
|
|
189
|
+
})
|
|
190
|
+
]
|
|
191
|
+
}), /* @__PURE__ */ I("div", {
|
|
192
|
+
className: "space-y-2",
|
|
193
|
+
children: [/* @__PURE__ */ F(f, {
|
|
194
|
+
htmlFor: "totalCapacity",
|
|
195
|
+
children: "Total Capacity (sq ft)"
|
|
196
|
+
}), /* @__PURE__ */ F(e, {
|
|
197
|
+
id: "totalCapacity",
|
|
198
|
+
type: "number",
|
|
199
|
+
min: "0",
|
|
200
|
+
value: T.totalCapacity,
|
|
201
|
+
onChange: (e) => U("totalCapacity", e.target.value),
|
|
202
|
+
placeholder: "50000"
|
|
203
|
+
})]
|
|
204
|
+
})]
|
|
205
|
+
})] }),
|
|
206
|
+
/* @__PURE__ */ I(s, { children: [/* @__PURE__ */ F(u, { children: /* @__PURE__ */ I(l, {
|
|
207
|
+
className: "flex items-center gap-2",
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ F(S, { size: 18 }),
|
|
210
|
+
" Address ",
|
|
211
|
+
/* @__PURE__ */ F("span", {
|
|
212
|
+
className: "text-status-error-text",
|
|
213
|
+
children: "*"
|
|
214
|
+
})
|
|
215
|
+
]
|
|
216
|
+
}) }), /* @__PURE__ */ I(c, {
|
|
217
|
+
className: "space-y-4",
|
|
218
|
+
children: [
|
|
219
|
+
/* @__PURE__ */ I("div", {
|
|
220
|
+
className: "space-y-2",
|
|
221
|
+
children: [/* @__PURE__ */ F(f, {
|
|
222
|
+
htmlFor: "street",
|
|
223
|
+
children: "Street"
|
|
224
|
+
}), /* @__PURE__ */ F(e, {
|
|
225
|
+
id: "street",
|
|
226
|
+
value: T.street,
|
|
227
|
+
onChange: (e) => U("street", e.target.value),
|
|
228
|
+
placeholder: "500 Industrial Way"
|
|
229
|
+
})]
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ I("div", {
|
|
232
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
233
|
+
children: [/* @__PURE__ */ I("div", {
|
|
234
|
+
className: "space-y-2",
|
|
235
|
+
children: [/* @__PURE__ */ F(f, {
|
|
236
|
+
htmlFor: "city",
|
|
237
|
+
children: "City"
|
|
238
|
+
}), /* @__PURE__ */ F(e, {
|
|
239
|
+
id: "city",
|
|
240
|
+
value: T.city,
|
|
241
|
+
onChange: (e) => U("city", e.target.value),
|
|
242
|
+
placeholder: "San Francisco"
|
|
243
|
+
})]
|
|
244
|
+
}), /* @__PURE__ */ I("div", {
|
|
245
|
+
className: "space-y-2",
|
|
246
|
+
children: [/* @__PURE__ */ F(f, {
|
|
247
|
+
htmlFor: "state",
|
|
248
|
+
children: "State"
|
|
249
|
+
}), /* @__PURE__ */ F(e, {
|
|
250
|
+
id: "state",
|
|
251
|
+
value: T.state,
|
|
252
|
+
onChange: (e) => U("state", e.target.value),
|
|
253
|
+
placeholder: "CA"
|
|
254
|
+
})]
|
|
255
|
+
})]
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ I("div", {
|
|
258
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
259
|
+
children: [/* @__PURE__ */ I("div", {
|
|
260
|
+
className: "space-y-2",
|
|
261
|
+
children: [/* @__PURE__ */ F(f, {
|
|
262
|
+
htmlFor: "postalCode",
|
|
263
|
+
children: "ZIP / Postal Code"
|
|
264
|
+
}), /* @__PURE__ */ F(e, {
|
|
265
|
+
id: "postalCode",
|
|
266
|
+
value: T.postalCode,
|
|
267
|
+
onChange: (e) => U("postalCode", e.target.value),
|
|
268
|
+
placeholder: "94103"
|
|
269
|
+
})]
|
|
270
|
+
}), /* @__PURE__ */ I("div", {
|
|
271
|
+
className: "space-y-2",
|
|
272
|
+
children: [/* @__PURE__ */ F(f, {
|
|
273
|
+
htmlFor: "country",
|
|
274
|
+
children: "Country"
|
|
275
|
+
}), /* @__PURE__ */ F(e, {
|
|
276
|
+
id: "country",
|
|
277
|
+
value: T.country,
|
|
278
|
+
onChange: (e) => U("country", e.target.value),
|
|
279
|
+
placeholder: "USA"
|
|
280
|
+
})]
|
|
281
|
+
})]
|
|
282
|
+
})
|
|
283
|
+
]
|
|
284
|
+
})] })
|
|
285
|
+
]
|
|
286
|
+
})]
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
function H() {
|
|
290
|
+
let { warehouseId: e } = P(), { basePath: t, navigate: n } = _(), r = N().pathname.endsWith("/edit"), { warehouse: a, isLoading: o, error: f, refetch: C } = D(e), O = () => n?.(m(t, "inventory/warehouses")), k = (e) => n?.(m(t, e));
|
|
291
|
+
if (!e) return /* @__PURE__ */ F(V, {});
|
|
292
|
+
if (r) return /* @__PURE__ */ F(V, { editId: e });
|
|
293
|
+
if (o) return /* @__PURE__ */ F(g, { message: "Loading warehouse details..." });
|
|
294
|
+
if (f || !a) return /* @__PURE__ */ F(h, {
|
|
295
|
+
title: "Warehouse not found",
|
|
296
|
+
onRetry: C
|
|
297
|
+
});
|
|
298
|
+
let j = a.capacity.usedSpace / a.capacity.totalSpace * 100;
|
|
299
|
+
return /* @__PURE__ */ I(d, {
|
|
300
|
+
title: a.name,
|
|
301
|
+
subtitle: `Code: ${a.code}`,
|
|
302
|
+
icon: /* @__PURE__ */ F(E, { size: 24 }),
|
|
303
|
+
headerActions: /* @__PURE__ */ I("div", {
|
|
304
|
+
className: "flex gap-2",
|
|
305
|
+
children: [/* @__PURE__ */ I(v, {
|
|
306
|
+
variant: "outline",
|
|
307
|
+
onClick: O,
|
|
308
|
+
children: [/* @__PURE__ */ F(y, { size: 16 }), " Back"]
|
|
309
|
+
}), /* @__PURE__ */ I(v, {
|
|
310
|
+
onClick: () => n?.(m(t, `inventory/warehouses/${e}/edit`)),
|
|
311
|
+
children: [/* @__PURE__ */ F(w, { size: 16 }), " Edit"]
|
|
312
|
+
})]
|
|
313
|
+
}),
|
|
314
|
+
headerContent: /* @__PURE__ */ I("div", {
|
|
315
|
+
className: "flex gap-2",
|
|
316
|
+
children: [/* @__PURE__ */ F(p, {
|
|
317
|
+
variant: a.isActive ? "default" : "secondary",
|
|
318
|
+
children: a.isActive ? "Active" : "Inactive"
|
|
319
|
+
}), /* @__PURE__ */ F(p, {
|
|
320
|
+
variant: "outline",
|
|
321
|
+
className: "capitalize",
|
|
322
|
+
children: a.type.replace("_", " ")
|
|
323
|
+
})]
|
|
324
|
+
}),
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ F(z, {
|
|
327
|
+
icon: /* @__PURE__ */ F(E, { size: 18 }),
|
|
328
|
+
children: "A storage and fulfilment site at a glance — how full it is, its zones, operating hours, throughput and staff. Use it to decide whether this warehouse has the space and hours to fulfil an order, and where stock is running tight."
|
|
329
|
+
}),
|
|
330
|
+
/* @__PURE__ */ F(R, {
|
|
331
|
+
storageKey: "movethewheels-warehouse-details",
|
|
332
|
+
steps: [{
|
|
333
|
+
id: "inventory",
|
|
334
|
+
label: "Review stock here",
|
|
335
|
+
description: "See which products are stored at this site.",
|
|
336
|
+
icon: /* @__PURE__ */ F(b, { size: 16 }),
|
|
337
|
+
onClick: () => k("inventory/products")
|
|
338
|
+
}, {
|
|
339
|
+
id: "fulfil",
|
|
340
|
+
label: "Fulfil an order from this site",
|
|
341
|
+
description: "Pick a pending order to ship out of this warehouse.",
|
|
342
|
+
icon: /* @__PURE__ */ F(S, { size: 16 }),
|
|
343
|
+
onClick: () => k("orders")
|
|
344
|
+
}]
|
|
345
|
+
}),
|
|
346
|
+
/* @__PURE__ */ I("div", {
|
|
347
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
348
|
+
children: [/* @__PURE__ */ I("div", {
|
|
349
|
+
className: "lg:col-span-2 space-y-6",
|
|
350
|
+
children: [
|
|
351
|
+
/* @__PURE__ */ I(L, { children: [/* @__PURE__ */ I("h2", {
|
|
352
|
+
className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
|
|
353
|
+
children: [/* @__PURE__ */ F(b, { size: 18 }), " Capacity"]
|
|
354
|
+
}), /* @__PURE__ */ I("div", {
|
|
355
|
+
className: "space-y-4",
|
|
356
|
+
children: [/* @__PURE__ */ I("div", { children: [
|
|
357
|
+
/* @__PURE__ */ I("div", {
|
|
358
|
+
className: "flex justify-between text-sm mb-2",
|
|
359
|
+
children: [/* @__PURE__ */ F("span", { children: "Space Utilization" }), /* @__PURE__ */ I("span", { children: [j.toFixed(0), "%"] })]
|
|
360
|
+
}),
|
|
361
|
+
/* @__PURE__ */ F(i, { value: j }),
|
|
362
|
+
/* @__PURE__ */ I("p", {
|
|
363
|
+
className: "text-sm text-text-secondary mt-1",
|
|
364
|
+
children: [
|
|
365
|
+
a.capacity.usedSpace.toLocaleString(),
|
|
366
|
+
" /",
|
|
367
|
+
" ",
|
|
368
|
+
a.capacity.totalSpace.toLocaleString(),
|
|
369
|
+
" sq ft"
|
|
370
|
+
]
|
|
371
|
+
})
|
|
372
|
+
] }), /* @__PURE__ */ F("div", {
|
|
373
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
374
|
+
children: /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
375
|
+
className: "text-sm text-text-secondary",
|
|
376
|
+
children: "Pallets Used"
|
|
377
|
+
}), /* @__PURE__ */ I("p", {
|
|
378
|
+
className: "text-2xl font-bold",
|
|
379
|
+
children: [a.capacity.usedPallets, /* @__PURE__ */ I("span", {
|
|
380
|
+
className: "text-sm font-normal text-text-secondary",
|
|
381
|
+
children: [
|
|
382
|
+
" ",
|
|
383
|
+
"/ ",
|
|
384
|
+
a.capacity.totalPallets
|
|
385
|
+
]
|
|
386
|
+
})]
|
|
387
|
+
})] })
|
|
388
|
+
})]
|
|
389
|
+
})] }),
|
|
390
|
+
/* @__PURE__ */ I(s, { children: [/* @__PURE__ */ F(u, { children: /* @__PURE__ */ I(l, { children: [
|
|
391
|
+
"Zones (",
|
|
392
|
+
a.zones.length,
|
|
393
|
+
")"
|
|
394
|
+
] }) }), /* @__PURE__ */ F(c, { children: /* @__PURE__ */ F("div", {
|
|
395
|
+
className: "space-y-3",
|
|
396
|
+
children: a.zones.map((e) => /* @__PURE__ */ I("div", {
|
|
397
|
+
className: "flex items-center justify-between p-3 border rounded-lg",
|
|
398
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
399
|
+
className: "font-medium",
|
|
400
|
+
children: e.name
|
|
401
|
+
}), /* @__PURE__ */ I("p", {
|
|
402
|
+
className: "text-sm text-text-secondary capitalize",
|
|
403
|
+
children: [
|
|
404
|
+
e.type,
|
|
405
|
+
" - ",
|
|
406
|
+
e.location
|
|
407
|
+
]
|
|
408
|
+
})] }), /* @__PURE__ */ I("div", {
|
|
409
|
+
className: "text-right",
|
|
410
|
+
children: [/* @__PURE__ */ F(i, {
|
|
411
|
+
value: e.currentOccupancy / e.capacity * 100,
|
|
412
|
+
className: "w-24 h-2"
|
|
413
|
+
}), /* @__PURE__ */ I("p", {
|
|
414
|
+
className: "text-sm text-text-secondary",
|
|
415
|
+
children: [
|
|
416
|
+
e.currentOccupancy,
|
|
417
|
+
" / ",
|
|
418
|
+
e.capacity
|
|
419
|
+
]
|
|
420
|
+
})]
|
|
421
|
+
})]
|
|
422
|
+
}, e.id))
|
|
423
|
+
}) })] }),
|
|
424
|
+
/* @__PURE__ */ I(s, { children: [/* @__PURE__ */ F(u, { children: /* @__PURE__ */ I(l, {
|
|
425
|
+
className: "flex items-center gap-2",
|
|
426
|
+
children: [/* @__PURE__ */ F(x, { size: 18 }), " Operating Hours"]
|
|
427
|
+
}) }), /* @__PURE__ */ F(c, { children: /* @__PURE__ */ F("div", {
|
|
428
|
+
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
429
|
+
children: Object.entries(a.operatingHours).map(([e, t]) => /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
430
|
+
className: "text-sm font-medium",
|
|
431
|
+
children: e
|
|
432
|
+
}), /* @__PURE__ */ F("p", {
|
|
433
|
+
className: "text-sm text-text-secondary",
|
|
434
|
+
children: t ? `${t.open} - ${t.close}` : "Closed"
|
|
435
|
+
})] }, e))
|
|
436
|
+
}) })] })
|
|
437
|
+
]
|
|
438
|
+
}), /* @__PURE__ */ I("div", {
|
|
439
|
+
className: "space-y-6",
|
|
440
|
+
children: [
|
|
441
|
+
/* @__PURE__ */ I(s, { children: [/* @__PURE__ */ F(u, { children: /* @__PURE__ */ I(l, {
|
|
442
|
+
className: "flex items-center gap-2",
|
|
443
|
+
children: [/* @__PURE__ */ F(S, { size: 18 }), " Location"]
|
|
444
|
+
}) }), /* @__PURE__ */ F(c, { children: /* @__PURE__ */ F("p", {
|
|
445
|
+
className: "text-sm",
|
|
446
|
+
children: A(a.address)
|
|
447
|
+
}) })] }),
|
|
448
|
+
/* @__PURE__ */ I(s, { children: [/* @__PURE__ */ F(u, { children: /* @__PURE__ */ F(l, { children: "Metrics" }) }), /* @__PURE__ */ I(c, {
|
|
449
|
+
className: "space-y-3",
|
|
450
|
+
children: [
|
|
451
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
452
|
+
className: "text-sm text-text-secondary",
|
|
453
|
+
children: "Throughput"
|
|
454
|
+
}), /* @__PURE__ */ I("p", {
|
|
455
|
+
className: "text-2xl font-bold",
|
|
456
|
+
children: [a.metrics.throughput, /* @__PURE__ */ F("span", {
|
|
457
|
+
className: "text-sm font-normal",
|
|
458
|
+
children: " orders/day"
|
|
459
|
+
})]
|
|
460
|
+
})] }),
|
|
461
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
462
|
+
className: "text-sm text-text-secondary",
|
|
463
|
+
children: "Accuracy"
|
|
464
|
+
}), /* @__PURE__ */ I("p", {
|
|
465
|
+
className: "text-2xl font-bold",
|
|
466
|
+
children: [a.metrics.accuracy, "%"]
|
|
467
|
+
})] }),
|
|
468
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
469
|
+
className: "text-sm text-text-secondary",
|
|
470
|
+
children: "Productivity"
|
|
471
|
+
}), /* @__PURE__ */ I("p", {
|
|
472
|
+
className: "text-2xl font-bold",
|
|
473
|
+
children: [a.metrics.productivity, "%"]
|
|
474
|
+
})] }),
|
|
475
|
+
/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
476
|
+
className: "text-sm text-text-secondary",
|
|
477
|
+
children: "Orders Fulfilled"
|
|
478
|
+
}), /* @__PURE__ */ F("p", {
|
|
479
|
+
className: "text-2xl font-bold",
|
|
480
|
+
children: a.metrics.ordersFulfilled.toLocaleString()
|
|
481
|
+
})] })
|
|
482
|
+
]
|
|
483
|
+
})] }),
|
|
484
|
+
/* @__PURE__ */ I(s, { children: [/* @__PURE__ */ F(u, { children: /* @__PURE__ */ I(l, {
|
|
485
|
+
className: "flex items-center gap-2",
|
|
486
|
+
children: [
|
|
487
|
+
/* @__PURE__ */ F(T, { size: 18 }),
|
|
488
|
+
" Staff (",
|
|
489
|
+
a.staff.length,
|
|
490
|
+
")"
|
|
491
|
+
]
|
|
492
|
+
}) }), /* @__PURE__ */ F(c, { children: a.staff.length > 0 ? /* @__PURE__ */ F("div", {
|
|
493
|
+
className: "space-y-2",
|
|
494
|
+
children: a.staff.map((e, t) => /* @__PURE__ */ I("div", {
|
|
495
|
+
className: "flex items-center justify-between p-2 border rounded",
|
|
496
|
+
children: [/* @__PURE__ */ F("span", {
|
|
497
|
+
className: "text-sm capitalize",
|
|
498
|
+
children: e.role
|
|
499
|
+
}), /* @__PURE__ */ F(p, {
|
|
500
|
+
variant: "outline",
|
|
501
|
+
children: e.shift
|
|
502
|
+
})]
|
|
503
|
+
}, t))
|
|
504
|
+
}) : /* @__PURE__ */ F("p", {
|
|
505
|
+
className: "text-text-secondary",
|
|
506
|
+
children: "No staff assigned"
|
|
507
|
+
}) })] })
|
|
508
|
+
]
|
|
509
|
+
})]
|
|
510
|
+
})
|
|
511
|
+
]
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
//#endregion
|
|
515
|
+
export { H as default };
|
|
@@ -4,7 +4,7 @@ import { t as s } from "./circle-check-B_Y7FDyR.js";
|
|
|
4
4
|
import { t as c } from "./plus-Bk_G-lFC.js";
|
|
5
5
|
import { t as l } from "./refresh-cw-C4-jecjy.js";
|
|
6
6
|
import { t as u } from "./warehouse-DE1irFyJ.js";
|
|
7
|
-
import { c as d, s as f } from "./useInventory-
|
|
7
|
+
import { c as d, s as f } from "./useInventory-BO7TSgq_.js";
|
|
8
8
|
import { r as p, t as m } from "./MetricCard-CqU5WsyW.js";
|
|
9
9
|
import { useState as h } from "react";
|
|
10
10
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { t as Ne } from "./chart-column-BwQ5H9ol.js";
|
|
|
6
6
|
import { t as Pe } from "./dollar-sign-CYGHy2oS.js";
|
|
7
7
|
import { n as Fe, t as Ie } from "./DocumentsCard-y2ybnAlu.js";
|
|
8
8
|
import { t as Le } from "./file-text-C-cZx58r.js";
|
|
9
|
-
import { n as Re, r as ze, t as Be } from "./useSettings-
|
|
9
|
+
import { n as Re, r as ze, t as Be } from "./useSettings-BNNzQs_B.js";
|
|
10
10
|
import { n as Ve, t as He } from "./Notice-BrXJ85dA.js";
|
|
11
11
|
import { t as Ue } from "./map-CO0aWUae.js";
|
|
12
12
|
import { t as We } from "./package-UyaWiALC.js";
|
|
@@ -17,12 +17,12 @@ import { t as qe } from "./user-check-Cx6fHHll.js";
|
|
|
17
17
|
import { t as Je } from "./users-BKmsb79k.js";
|
|
18
18
|
import { t as N } from "./warehouse-DE1irFyJ.js";
|
|
19
19
|
import { n as Ye, r as Xe, t as Ze } from "./useOrders-B5FV0kcz.js";
|
|
20
|
-
import { a as Qe, i as $e, n as et, o as tt, r as nt, t as rt } from "./useFleet-
|
|
21
|
-
import { a as it, c as at, n as ot, o as st, r as ct, t as lt } from "./useInventory-
|
|
20
|
+
import { a as Qe, i as $e, n as et, o as tt, r as nt, t as rt } from "./useFleet-BfA_-VUW.js";
|
|
21
|
+
import { a as it, c as at, n as ot, o as st, r as ct, t as lt } from "./useInventory-BO7TSgq_.js";
|
|
22
22
|
import { n as ut, r as dt, t as ft } from "./useCustomers-BQ4AIEAT.js";
|
|
23
23
|
import { n as pt, r as mt, t as ht } from "./useRoutes-C_ZCYJ_h.js";
|
|
24
24
|
import { a as gt, c as _t, d as vt, f as yt, i as bt, l as xt, n as St, o as Ct, r as wt, s as Tt, t as Et, u as Dt } from "./charts-Dv_zxP7L.js";
|
|
25
|
-
import { a as Ot, i as kt, n as At, o as jt, r as Mt, s as Nt, t as Pt } from "./useTracking-
|
|
25
|
+
import { a as Ot, i as kt, n as At, o as jt, r as Mt, s as Nt, t as Pt } from "./useTracking-7nd_XOSL.js";
|
|
26
26
|
import { t as Ft } from "./useReports-hUXb8ryJ.js";
|
|
27
27
|
import { t as It } from "./useImportExport-7-O8noRJ.js";
|
|
28
28
|
import { n as Lt, r as Rt, t as zt } from "./Sparkline-DTGdlxUH.js";
|
|
@@ -117,7 +117,7 @@ function mn() {
|
|
|
117
117
|
})
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
var hn = P(() => import("./DashboardPage-
|
|
120
|
+
var hn = P(() => import("./DashboardPage-BoswH3ec.js")), gn = P(() => import("./OrdersListPage-DvICveRv.js")), _n = P(() => import("./OrderDetailsPage-DRYifXm9.js")), B = P(() => import("./CreateOrderPage-CXbhJLLz.js")), vn = P(() => import("./TrackingPage-Cg0tYGJe.js")), yn = P(() => import("./LiveTrackingPage-5U68u3oA.js")), bn = P(() => import("./FleetPage-qWRj7WFO.js")), xn = P(() => import("./VehiclesPage-BfBEyXGs.js")), V = P(() => import("./VehicleDetailsPage-BbZlCFPo.js")), Sn = P(() => import("./DriversPage-6Z61dpDI.js")), H = P(() => import("./DriverDetailsPage-CPO0G8Ki.js")), Cn = P(() => import("./InventoryPage-DbR4Z--d.js")), wn = P(() => import("./ProductsPage-CokwDOR2.js")), U = P(() => import("./ProductDetailsPage-CWgcRqGR.js")), Tn = P(() => import("./WarehousesPage-M3NaBT0z.js")), W = P(() => import("./WarehouseDetailsPage-DxNhiaoI.js")), En = P(() => import("./CustomersPage-CwtVspuq.js")), G = P(() => import("./CustomerDetailsPage-CHzg75Q5.js")), Dn = P(() => import("./RoutesPage-Dqd5Don6.js")), K = P(() => import("./RouteDetailsPage-BHQbFgI9.js")), On = P(() => import("./AnalyticsPage-900jpV2T.js")), kn = P(() => import("./FinancePage-DYadOUzC.js")), An = P(() => import("./MarketplacePage-DMH0HNDH.js")), jn = P(() => import("./ImportExportPage-BhWGfbH3.js")), Mn = P(() => import("./ReportsPage-MU8F9DQC.js")), Nn = P(() => import("./SettingsPage-_6SIlcBX.js")), Pn = P(() => import("./AIAssistantPage-MWJLAMN_.js"));
|
|
121
121
|
function Fn() {
|
|
122
122
|
return /* @__PURE__ */ L(rn, {
|
|
123
123
|
fallback: /* @__PURE__ */ L(mn, {}),
|
|
@@ -166,6 +166,10 @@ function Fn() {
|
|
|
166
166
|
path: "fleet/vehicles/:vehicleId",
|
|
167
167
|
element: /* @__PURE__ */ L(V, {})
|
|
168
168
|
}),
|
|
169
|
+
/* @__PURE__ */ L(I, {
|
|
170
|
+
path: "fleet/vehicles/:vehicleId/edit",
|
|
171
|
+
element: /* @__PURE__ */ L(V, {})
|
|
172
|
+
}),
|
|
169
173
|
/* @__PURE__ */ L(I, {
|
|
170
174
|
path: "fleet/drivers",
|
|
171
175
|
element: /* @__PURE__ */ L(Sn, {})
|
|
@@ -178,6 +182,10 @@ function Fn() {
|
|
|
178
182
|
path: "fleet/drivers/:driverId",
|
|
179
183
|
element: /* @__PURE__ */ L(H, {})
|
|
180
184
|
}),
|
|
185
|
+
/* @__PURE__ */ L(I, {
|
|
186
|
+
path: "fleet/drivers/:driverId/edit",
|
|
187
|
+
element: /* @__PURE__ */ L(H, {})
|
|
188
|
+
}),
|
|
181
189
|
/* @__PURE__ */ L(I, {
|
|
182
190
|
path: "inventory",
|
|
183
191
|
element: /* @__PURE__ */ L(Cn, {})
|
|
@@ -194,6 +202,10 @@ function Fn() {
|
|
|
194
202
|
path: "inventory/products/:productId",
|
|
195
203
|
element: /* @__PURE__ */ L(U, {})
|
|
196
204
|
}),
|
|
205
|
+
/* @__PURE__ */ L(I, {
|
|
206
|
+
path: "inventory/products/:productId/edit",
|
|
207
|
+
element: /* @__PURE__ */ L(U, {})
|
|
208
|
+
}),
|
|
197
209
|
/* @__PURE__ */ L(I, {
|
|
198
210
|
path: "inventory/warehouses",
|
|
199
211
|
element: /* @__PURE__ */ L(Tn, {})
|
|
@@ -206,6 +218,10 @@ function Fn() {
|
|
|
206
218
|
path: "inventory/warehouses/:warehouseId",
|
|
207
219
|
element: /* @__PURE__ */ L(W, {})
|
|
208
220
|
}),
|
|
221
|
+
/* @__PURE__ */ L(I, {
|
|
222
|
+
path: "inventory/warehouses/:warehouseId/edit",
|
|
223
|
+
element: /* @__PURE__ */ L(W, {})
|
|
224
|
+
}),
|
|
209
225
|
/* @__PURE__ */ L(I, {
|
|
210
226
|
path: "customers",
|
|
211
227
|
element: /* @__PURE__ */ L(En, {})
|
|
@@ -230,6 +246,10 @@ function Fn() {
|
|
|
230
246
|
path: "routes/:routeId",
|
|
231
247
|
element: /* @__PURE__ */ L(K, {})
|
|
232
248
|
}),
|
|
249
|
+
/* @__PURE__ */ L(I, {
|
|
250
|
+
path: "routes/:routeId/edit",
|
|
251
|
+
element: /* @__PURE__ */ L(K, {})
|
|
252
|
+
}),
|
|
233
253
|
/* @__PURE__ */ L(I, {
|
|
234
254
|
path: "analytics",
|
|
235
255
|
element: /* @__PURE__ */ L(On, {})
|