@burdenoff/microfe-movethewheels 2026.703.1 → 2026.703.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/{AIAssistantPage-C3ovZ0Fh.js → AIAssistantPage-C3cPsWt-.js} +1 -1
- package/dist/{AnalyticsPage-O8SpY-V4.js → AnalyticsPage-Dz6g2MvK.js} +6 -6
- package/dist/{CreateOrderPage-CB1_-_mN.js → CreateOrderPage-C5iwnjp4.js} +29 -58
- package/dist/CustomerDetailsPage-B6nwFyLO.js +406 -0
- package/dist/{CustomersPage-DRaLuHMC.js → CustomersPage-BKxMS1AV.js} +5 -5
- package/dist/{DashboardPage-DPjhNfKB.js → DashboardPage-BVjQi0EB.js} +11 -11
- package/dist/DriverDetailsPage-CN3WQ0B9.js +507 -0
- package/dist/{DriversPage-C2Bk0w4Q.js → DriversPage-CH9rjQC-.js} +6 -6
- package/dist/{FinancePage-lmp0Sdsw.js → FinancePage-DEDykSOP.js} +5 -5
- package/dist/{FleetPage-DZn5pIqd.js → FleetPage-DqkFi3s3.js} +5 -5
- package/dist/FormError-BlOjnXOq.js +15 -0
- package/dist/{ImportExportPage-BIUJZc7O.js → ImportExportPage-DKJRCezl.js} +1 -1
- package/dist/{InventoryPage-Cxh1zYJd.js → InventoryPage-e0ze63iX.js} +6 -6
- package/dist/{LiveTrackingPage-BY1yAkIt.js → LiveTrackingPage-DCX-K-LR.js} +5 -5
- package/dist/{MarketplacePage-RMuL17EA.js → MarketplacePage-CIQ97_zp.js} +1 -1
- package/dist/{OrderDetailsPage-C2Mf4KSy.js → OrderDetailsPage-DYiZ-9UK.js} +5 -5
- package/dist/{OrdersListPage-BrPBtnhp.js → OrdersListPage-Cn90P1Xx.js} +4 -4
- package/dist/ProductDetailsPage-C9uOiYLp.js +350 -0
- package/dist/{ProductsPage-I5DilIoY.js → ProductsPage-QJfHHpqB.js} +4 -4
- package/dist/{ReportsPage-BDXNmUng.js → ReportsPage-Zp53q3_8.js} +2 -2
- package/dist/RouteDetailsPage-DUStXSf9.js +531 -0
- package/dist/{RoutesPage-lqX9ylHP.js → RoutesPage-DMfoicM1.js} +3 -3
- package/dist/{SettingsPage-CQVIOaNs.js → SettingsPage-Bn-v0mbQ.js} +1 -1
- package/dist/{TrackingPage-BXrjz7V8.js → TrackingPage-W-jtdM3Y.js} +4 -4
- package/dist/VehicleDetailsPage-Bceo5oz3.js +410 -0
- package/dist/{VehiclesPage-6W39XT5W.js → VehiclesPage-ApKThYeG.js} +5 -5
- package/dist/WarehouseDetailsPage-L_6sWigM.js +493 -0
- package/dist/{WarehousesPage-CHvBqNaQ.js → WarehousesPage-DCbXXXWE.js} +3 -3
- package/dist/index.js +154 -138
- package/dist/trash-2-BKhar6Hs.js +32 -0
- package/dist/{useFleet-DiAC-IiH.js → useFleet-DKqXZ16m.js} +77 -56
- package/dist/{useInventory-DKoks37x.js → useInventory-DkyiVY_A.js} +73 -53
- package/dist/{useTracking-GJify4HN.js → useTracking-B-va1kO3.js} +2 -2
- package/package.json +1 -1
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
- package/src/movethewheels/components/FormError.tsx +25 -0
- package/src/movethewheels/hooks/useFleet.ts +107 -0
- package/src/movethewheels/hooks/useInventory.ts +107 -0
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +153 -20
- package/src/movethewheels/pages/CustomersPage.tsx +1 -1
- package/src/movethewheels/pages/DriverDetailsPage.tsx +159 -2
- package/src/movethewheels/pages/DriversPage.tsx +6 -2
- package/src/movethewheels/pages/InventoryPage.tsx +1 -1
- package/src/movethewheels/pages/OrdersListPage.tsx +1 -1
- package/src/movethewheels/pages/ProductDetailsPage.tsx +146 -3
- package/src/movethewheels/pages/ProductsPage.tsx +6 -2
- package/src/movethewheels/pages/RouteDetailsPage.tsx +285 -25
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +158 -2
- package/src/movethewheels/pages/VehiclesPage.tsx +6 -2
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +224 -2
- package/src/movethewheels/pages/WarehousesPage.tsx +5 -1
- package/dist/CustomerDetailsPage-BaeKEI1D.js +0 -263
- package/dist/DriverDetailsPage-CSSQTOzn.js +0 -328
- package/dist/ProductDetailsPage-CezzzZcj.js +0 -193
- package/dist/RouteDetailsPage-BcomL20M.js +0 -263
- package/dist/VehicleDetailsPage-DZjLcJgr.js +0 -218
- package/dist/WarehouseDetailsPage-C10pgRGW.js +0 -236
- /package/dist/{MetricCard-7aYgzZHK.js → MetricCard-BY0QrMD4.js} +0 -0
- /package/dist/{StatusBadge-NpTeHVlw.js → StatusBadge-BZurYHMy.js} +0 -0
- /package/dist/{formatters-DhKZ-eA1.js → formatters-CF2S2l1m.js} +0 -0
- /package/dist/{trending-up-B7W-GL6P.js → trending-up-Dohgd4t_.js} +0 -0
- /package/dist/{triangle-alert-BonHFFNz.js → triangle-alert-i-XQL9Rd.js} +0 -0
- /package/dist/{truck-DrlfSpRC.js → truck-C0v_hbLR.js} +0 -0
- /package/dist/{useAnalytics-CgdzUfY_.js → useAnalytics-DS8n0xgg.js} +0 -0
- /package/dist/{useCustomers-QrlozybF.js → useCustomers-BmTNGxiI.js} +0 -0
- /package/dist/{useImportExport-BLMnAKCC.js → useImportExport-DHr-SWSw.js} +0 -0
- /package/dist/{useOrders-D3UZVy8Y.js → useOrders-Cfk1GLiq.js} +0 -0
- /package/dist/{useReports-Puq4DCH9.js → useReports-CTqZr-AB.js} +0 -0
- /package/dist/{useRoutes-Do57LvRb.js → useRoutes-BQWO607N.js} +0 -0
- /package/dist/{user-CjSoudeu.js → user-jyFU3lXk.js} +0 -0
- /package/dist/{users-BAM4gHTn.js → users-DZ-ilS6B.js} +0 -0
- /package/dist/{warehouse-C7MSr47B.js → warehouse-6m5kXMLu.js} +0 -0
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
import { A as e, F as t, I as n, L as r, M as i, P as a, R as o, ct as s, d as c, f as l, g as u, h as d, i as f, j as p, l as m, n as h, ot as g, r as _, u as v } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
import { t as y } from "./arrow-left-n48Y-Wis.js";
|
|
3
|
+
import { t as b } from "./box-D9Pal4HM.js";
|
|
4
|
+
import { t as x } from "./clock-DJZtdl8u.js";
|
|
5
|
+
import { t as S } from "./map-pin-BGiCvyCs.js";
|
|
6
|
+
import { t as C } from "./save-CojywNhG.js";
|
|
7
|
+
import { t as w } from "./square-pen-CopE9GmB.js";
|
|
8
|
+
import { t as T } from "./users-DZ-ilS6B.js";
|
|
9
|
+
import { t as E } from "./warehouse-6m5kXMLu.js";
|
|
10
|
+
import { a as D, t as O } from "./useInventory-DkyiVY_A.js";
|
|
11
|
+
import { t as k } from "./formatters-CF2S2l1m.js";
|
|
12
|
+
import { t as A } from "./FormError-BlOjnXOq.js";
|
|
13
|
+
import { useState as j } from "react";
|
|
14
|
+
import { useParams as M } from "react-router-dom";
|
|
15
|
+
import { jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
16
|
+
import { EmphasisPanel as F, NextSteps as I, PagePurpose as L } from "@burdenoff/fe-libs/ui";
|
|
17
|
+
//#region src/movethewheels/pages/WarehouseDetailsPage.tsx
|
|
18
|
+
var R = [
|
|
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 z() {
|
|
41
|
+
let { basePath: i, navigate: m } = g(), { createWarehouse: h } = O(), [_, b] = j({
|
|
42
|
+
code: "",
|
|
43
|
+
name: "",
|
|
44
|
+
type: "DISTRIBUTION",
|
|
45
|
+
street: "",
|
|
46
|
+
city: "",
|
|
47
|
+
state: "",
|
|
48
|
+
postalCode: "",
|
|
49
|
+
country: "USA",
|
|
50
|
+
totalCapacity: ""
|
|
51
|
+
}), [x, w] = j(!1), [T, D] = j(null), k = () => m?.(s(i, "inventory/warehouses")), M = (e, t) => b((n) => ({
|
|
52
|
+
...n,
|
|
53
|
+
[e]: t
|
|
54
|
+
})), I = async (e) => {
|
|
55
|
+
if (e.preventDefault(), !_.code.trim() || !_.name.trim()) {
|
|
56
|
+
D("Warehouse code and name are required.");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (!_.street.trim() || !_.city.trim()) {
|
|
60
|
+
D("A street and city are required for the warehouse address.");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
w(!0), D(null);
|
|
64
|
+
try {
|
|
65
|
+
let e = _.totalCapacity.trim() ? Number(_.totalCapacity) : void 0, t = await h({
|
|
66
|
+
code: _.code.trim(),
|
|
67
|
+
name: _.name.trim(),
|
|
68
|
+
type: _.type,
|
|
69
|
+
address: {
|
|
70
|
+
street: _.street.trim(),
|
|
71
|
+
city: _.city.trim(),
|
|
72
|
+
state: _.state.trim(),
|
|
73
|
+
postalCode: _.postalCode.trim(),
|
|
74
|
+
country: _.country.trim()
|
|
75
|
+
},
|
|
76
|
+
totalCapacity: e !== void 0 && !Number.isNaN(e) ? e : void 0
|
|
77
|
+
});
|
|
78
|
+
m?.(s(i, `inventory/warehouses/${t.id}`));
|
|
79
|
+
} catch (e) {
|
|
80
|
+
console.error("Failed to create warehouse:", e), D(e instanceof Error ? e.message : "Failed to create warehouse. Please try again."), w(!1);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return /* @__PURE__ */ P(f, {
|
|
84
|
+
title: "Add Warehouse",
|
|
85
|
+
subtitle: "Register a storage and fulfilment site",
|
|
86
|
+
icon: /* @__PURE__ */ N(E, { size: 24 }),
|
|
87
|
+
headerActions: /* @__PURE__ */ P("div", {
|
|
88
|
+
className: "flex gap-2",
|
|
89
|
+
children: [/* @__PURE__ */ P(v, {
|
|
90
|
+
variant: "outline",
|
|
91
|
+
onClick: k,
|
|
92
|
+
disabled: x,
|
|
93
|
+
children: [/* @__PURE__ */ N(y, { size: 16 }), " Cancel"]
|
|
94
|
+
}), /* @__PURE__ */ P(v, {
|
|
95
|
+
onClick: I,
|
|
96
|
+
disabled: x,
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ N(C, { size: 16 }),
|
|
99
|
+
" ",
|
|
100
|
+
x ? "Saving..." : "Add Warehouse"
|
|
101
|
+
]
|
|
102
|
+
})]
|
|
103
|
+
}),
|
|
104
|
+
children: [/* @__PURE__ */ N(L, {
|
|
105
|
+
icon: /* @__PURE__ */ N(E, { size: 18 }),
|
|
106
|
+
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."
|
|
107
|
+
}), /* @__PURE__ */ P("form", {
|
|
108
|
+
onSubmit: I,
|
|
109
|
+
className: "max-w-2xl space-y-6",
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ N(A, { message: T }),
|
|
112
|
+
/* @__PURE__ */ P(F, { children: [/* @__PURE__ */ N("h2", {
|
|
113
|
+
className: "text-base font-semibold text-text-primary mb-4",
|
|
114
|
+
children: "Warehouse Details"
|
|
115
|
+
}), /* @__PURE__ */ P("div", {
|
|
116
|
+
className: "space-y-4",
|
|
117
|
+
children: [/* @__PURE__ */ P("div", {
|
|
118
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ P("div", {
|
|
121
|
+
className: "space-y-2",
|
|
122
|
+
children: [/* @__PURE__ */ P(p, {
|
|
123
|
+
htmlFor: "code",
|
|
124
|
+
children: ["Code ", /* @__PURE__ */ N("span", {
|
|
125
|
+
className: "text-status-error-text",
|
|
126
|
+
children: "*"
|
|
127
|
+
})]
|
|
128
|
+
}), /* @__PURE__ */ N(e, {
|
|
129
|
+
id: "code",
|
|
130
|
+
value: _.code,
|
|
131
|
+
onChange: (e) => M("code", e.target.value),
|
|
132
|
+
placeholder: "WH-SF-01",
|
|
133
|
+
required: !0
|
|
134
|
+
})]
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ P("div", {
|
|
137
|
+
className: "space-y-2",
|
|
138
|
+
children: [/* @__PURE__ */ P(p, {
|
|
139
|
+
htmlFor: "name",
|
|
140
|
+
children: ["Name ", /* @__PURE__ */ N("span", {
|
|
141
|
+
className: "text-status-error-text",
|
|
142
|
+
children: "*"
|
|
143
|
+
})]
|
|
144
|
+
}), /* @__PURE__ */ N(e, {
|
|
145
|
+
id: "name",
|
|
146
|
+
value: _.name,
|
|
147
|
+
onChange: (e) => M("name", e.target.value),
|
|
148
|
+
placeholder: "San Francisco DC",
|
|
149
|
+
required: !0
|
|
150
|
+
})]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ P("div", {
|
|
153
|
+
className: "space-y-2",
|
|
154
|
+
children: [/* @__PURE__ */ P(p, {
|
|
155
|
+
htmlFor: "type",
|
|
156
|
+
children: ["Type ", /* @__PURE__ */ N("span", {
|
|
157
|
+
className: "text-status-error-text",
|
|
158
|
+
children: "*"
|
|
159
|
+
})]
|
|
160
|
+
}), /* @__PURE__ */ P(a, {
|
|
161
|
+
value: _.type,
|
|
162
|
+
onValueChange: (e) => M("type", e),
|
|
163
|
+
children: [/* @__PURE__ */ N(r, {
|
|
164
|
+
id: "type",
|
|
165
|
+
children: /* @__PURE__ */ N(o, {})
|
|
166
|
+
}), /* @__PURE__ */ N(t, { children: R.map((e) => /* @__PURE__ */ N(n, {
|
|
167
|
+
value: e.value,
|
|
168
|
+
children: e.label
|
|
169
|
+
}, e.value)) })]
|
|
170
|
+
})]
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
}), /* @__PURE__ */ P("div", {
|
|
174
|
+
className: "space-y-2",
|
|
175
|
+
children: [/* @__PURE__ */ N(p, {
|
|
176
|
+
htmlFor: "totalCapacity",
|
|
177
|
+
children: "Total Capacity (sq ft)"
|
|
178
|
+
}), /* @__PURE__ */ N(e, {
|
|
179
|
+
id: "totalCapacity",
|
|
180
|
+
type: "number",
|
|
181
|
+
min: "0",
|
|
182
|
+
value: _.totalCapacity,
|
|
183
|
+
onChange: (e) => M("totalCapacity", e.target.value),
|
|
184
|
+
placeholder: "50000"
|
|
185
|
+
})]
|
|
186
|
+
})]
|
|
187
|
+
})] }),
|
|
188
|
+
/* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
|
|
189
|
+
className: "flex items-center gap-2",
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ N(S, { size: 18 }),
|
|
192
|
+
" Address ",
|
|
193
|
+
/* @__PURE__ */ N("span", {
|
|
194
|
+
className: "text-status-error-text",
|
|
195
|
+
children: "*"
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
}) }), /* @__PURE__ */ P(l, {
|
|
199
|
+
className: "space-y-4",
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ P("div", {
|
|
202
|
+
className: "space-y-2",
|
|
203
|
+
children: [/* @__PURE__ */ N(p, {
|
|
204
|
+
htmlFor: "street",
|
|
205
|
+
children: "Street"
|
|
206
|
+
}), /* @__PURE__ */ N(e, {
|
|
207
|
+
id: "street",
|
|
208
|
+
value: _.street,
|
|
209
|
+
onChange: (e) => M("street", e.target.value),
|
|
210
|
+
placeholder: "500 Industrial Way"
|
|
211
|
+
})]
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ P("div", {
|
|
214
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
215
|
+
children: [/* @__PURE__ */ P("div", {
|
|
216
|
+
className: "space-y-2",
|
|
217
|
+
children: [/* @__PURE__ */ N(p, {
|
|
218
|
+
htmlFor: "city",
|
|
219
|
+
children: "City"
|
|
220
|
+
}), /* @__PURE__ */ N(e, {
|
|
221
|
+
id: "city",
|
|
222
|
+
value: _.city,
|
|
223
|
+
onChange: (e) => M("city", e.target.value),
|
|
224
|
+
placeholder: "San Francisco"
|
|
225
|
+
})]
|
|
226
|
+
}), /* @__PURE__ */ P("div", {
|
|
227
|
+
className: "space-y-2",
|
|
228
|
+
children: [/* @__PURE__ */ N(p, {
|
|
229
|
+
htmlFor: "state",
|
|
230
|
+
children: "State"
|
|
231
|
+
}), /* @__PURE__ */ N(e, {
|
|
232
|
+
id: "state",
|
|
233
|
+
value: _.state,
|
|
234
|
+
onChange: (e) => M("state", e.target.value),
|
|
235
|
+
placeholder: "CA"
|
|
236
|
+
})]
|
|
237
|
+
})]
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ P("div", {
|
|
240
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
241
|
+
children: [/* @__PURE__ */ P("div", {
|
|
242
|
+
className: "space-y-2",
|
|
243
|
+
children: [/* @__PURE__ */ N(p, {
|
|
244
|
+
htmlFor: "postalCode",
|
|
245
|
+
children: "ZIP / Postal Code"
|
|
246
|
+
}), /* @__PURE__ */ N(e, {
|
|
247
|
+
id: "postalCode",
|
|
248
|
+
value: _.postalCode,
|
|
249
|
+
onChange: (e) => M("postalCode", e.target.value),
|
|
250
|
+
placeholder: "94103"
|
|
251
|
+
})]
|
|
252
|
+
}), /* @__PURE__ */ P("div", {
|
|
253
|
+
className: "space-y-2",
|
|
254
|
+
children: [/* @__PURE__ */ N(p, {
|
|
255
|
+
htmlFor: "country",
|
|
256
|
+
children: "Country"
|
|
257
|
+
}), /* @__PURE__ */ N(e, {
|
|
258
|
+
id: "country",
|
|
259
|
+
value: _.country,
|
|
260
|
+
onChange: (e) => M("country", e.target.value),
|
|
261
|
+
placeholder: "USA"
|
|
262
|
+
})]
|
|
263
|
+
})]
|
|
264
|
+
})
|
|
265
|
+
]
|
|
266
|
+
})] })
|
|
267
|
+
]
|
|
268
|
+
})]
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
function B() {
|
|
272
|
+
let { warehouseId: e } = M(), { basePath: t, navigate: n } = g(), { warehouse: r, isLoading: a, error: o, refetch: p } = D(e), C = () => n?.(s(t, "inventory/warehouses")), O = (e) => n?.(s(t, e));
|
|
273
|
+
if (!e) return /* @__PURE__ */ N(z, {});
|
|
274
|
+
if (a) return /* @__PURE__ */ N(_, { message: "Loading warehouse details..." });
|
|
275
|
+
if (o || !r) return /* @__PURE__ */ N(h, {
|
|
276
|
+
title: "Warehouse not found",
|
|
277
|
+
onRetry: p
|
|
278
|
+
});
|
|
279
|
+
let A = r.capacity.usedSpace / r.capacity.totalSpace * 100;
|
|
280
|
+
return /* @__PURE__ */ P(f, {
|
|
281
|
+
title: r.name,
|
|
282
|
+
subtitle: `Code: ${r.code}`,
|
|
283
|
+
icon: /* @__PURE__ */ N(E, { size: 24 }),
|
|
284
|
+
headerActions: /* @__PURE__ */ P("div", {
|
|
285
|
+
className: "flex gap-2",
|
|
286
|
+
children: [/* @__PURE__ */ P(v, {
|
|
287
|
+
variant: "outline",
|
|
288
|
+
onClick: C,
|
|
289
|
+
children: [/* @__PURE__ */ N(y, { size: 16 }), " Back"]
|
|
290
|
+
}), /* @__PURE__ */ P(v, { children: [/* @__PURE__ */ N(w, { size: 16 }), " Edit"] })]
|
|
291
|
+
}),
|
|
292
|
+
headerContent: /* @__PURE__ */ P("div", {
|
|
293
|
+
className: "flex gap-2",
|
|
294
|
+
children: [/* @__PURE__ */ N(m, {
|
|
295
|
+
variant: r.isActive ? "default" : "secondary",
|
|
296
|
+
children: r.isActive ? "Active" : "Inactive"
|
|
297
|
+
}), /* @__PURE__ */ N(m, {
|
|
298
|
+
variant: "outline",
|
|
299
|
+
className: "capitalize",
|
|
300
|
+
children: r.type.replace("_", " ")
|
|
301
|
+
})]
|
|
302
|
+
}),
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ N(L, {
|
|
305
|
+
icon: /* @__PURE__ */ N(E, { size: 18 }),
|
|
306
|
+
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."
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ N(I, {
|
|
309
|
+
storageKey: "movethewheels-warehouse-details",
|
|
310
|
+
steps: [{
|
|
311
|
+
id: "inventory",
|
|
312
|
+
label: "Review stock here",
|
|
313
|
+
description: "See which products are stored at this site.",
|
|
314
|
+
icon: /* @__PURE__ */ N(b, { size: 16 }),
|
|
315
|
+
onClick: () => O("inventory/products")
|
|
316
|
+
}, {
|
|
317
|
+
id: "fulfil",
|
|
318
|
+
label: "Fulfil an order from this site",
|
|
319
|
+
description: "Pick a pending order to ship out of this warehouse.",
|
|
320
|
+
icon: /* @__PURE__ */ N(S, { size: 16 }),
|
|
321
|
+
onClick: () => O("orders")
|
|
322
|
+
}]
|
|
323
|
+
}),
|
|
324
|
+
/* @__PURE__ */ P("div", {
|
|
325
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
326
|
+
children: [/* @__PURE__ */ P("div", {
|
|
327
|
+
className: "lg:col-span-2 space-y-6",
|
|
328
|
+
children: [
|
|
329
|
+
/* @__PURE__ */ P(F, { children: [/* @__PURE__ */ P("h2", {
|
|
330
|
+
className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-4",
|
|
331
|
+
children: [/* @__PURE__ */ N(b, { size: 18 }), " Capacity"]
|
|
332
|
+
}), /* @__PURE__ */ P("div", {
|
|
333
|
+
className: "space-y-4",
|
|
334
|
+
children: [/* @__PURE__ */ P("div", { children: [
|
|
335
|
+
/* @__PURE__ */ P("div", {
|
|
336
|
+
className: "flex justify-between text-sm mb-2",
|
|
337
|
+
children: [/* @__PURE__ */ N("span", { children: "Space Utilization" }), /* @__PURE__ */ P("span", { children: [A.toFixed(0), "%"] })]
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ N(i, { value: A }),
|
|
340
|
+
/* @__PURE__ */ P("p", {
|
|
341
|
+
className: "text-sm text-text-secondary mt-1",
|
|
342
|
+
children: [
|
|
343
|
+
r.capacity.usedSpace.toLocaleString(),
|
|
344
|
+
" /",
|
|
345
|
+
" ",
|
|
346
|
+
r.capacity.totalSpace.toLocaleString(),
|
|
347
|
+
" sq ft"
|
|
348
|
+
]
|
|
349
|
+
})
|
|
350
|
+
] }), /* @__PURE__ */ N("div", {
|
|
351
|
+
className: "grid grid-cols-2 gap-4",
|
|
352
|
+
children: /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
353
|
+
className: "text-sm text-text-secondary",
|
|
354
|
+
children: "Pallets Used"
|
|
355
|
+
}), /* @__PURE__ */ P("p", {
|
|
356
|
+
className: "text-2xl font-bold",
|
|
357
|
+
children: [r.capacity.usedPallets, /* @__PURE__ */ P("span", {
|
|
358
|
+
className: "text-sm font-normal text-text-secondary",
|
|
359
|
+
children: [
|
|
360
|
+
" ",
|
|
361
|
+
"/ ",
|
|
362
|
+
r.capacity.totalPallets
|
|
363
|
+
]
|
|
364
|
+
})]
|
|
365
|
+
})] })
|
|
366
|
+
})]
|
|
367
|
+
})] }),
|
|
368
|
+
/* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, { children: [
|
|
369
|
+
"Zones (",
|
|
370
|
+
r.zones.length,
|
|
371
|
+
")"
|
|
372
|
+
] }) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("div", {
|
|
373
|
+
className: "space-y-3",
|
|
374
|
+
children: r.zones.map((e) => /* @__PURE__ */ P("div", {
|
|
375
|
+
className: "flex items-center justify-between p-3 border rounded-lg",
|
|
376
|
+
children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
377
|
+
className: "font-medium",
|
|
378
|
+
children: e.name
|
|
379
|
+
}), /* @__PURE__ */ P("p", {
|
|
380
|
+
className: "text-sm text-text-secondary capitalize",
|
|
381
|
+
children: [
|
|
382
|
+
e.type,
|
|
383
|
+
" - ",
|
|
384
|
+
e.location
|
|
385
|
+
]
|
|
386
|
+
})] }), /* @__PURE__ */ P("div", {
|
|
387
|
+
className: "text-right",
|
|
388
|
+
children: [/* @__PURE__ */ N(i, {
|
|
389
|
+
value: e.currentOccupancy / e.capacity * 100,
|
|
390
|
+
className: "w-24 h-2"
|
|
391
|
+
}), /* @__PURE__ */ P("p", {
|
|
392
|
+
className: "text-sm text-text-secondary",
|
|
393
|
+
children: [
|
|
394
|
+
e.currentOccupancy,
|
|
395
|
+
" / ",
|
|
396
|
+
e.capacity
|
|
397
|
+
]
|
|
398
|
+
})]
|
|
399
|
+
})]
|
|
400
|
+
}, e.id))
|
|
401
|
+
}) })] }),
|
|
402
|
+
/* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
|
|
403
|
+
className: "flex items-center gap-2",
|
|
404
|
+
children: [/* @__PURE__ */ N(x, { size: 18 }), " Operating Hours"]
|
|
405
|
+
}) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("div", {
|
|
406
|
+
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
407
|
+
children: Object.entries(r.operatingHours).map(([e, t]) => /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
408
|
+
className: "text-sm font-medium",
|
|
409
|
+
children: e
|
|
410
|
+
}), /* @__PURE__ */ N("p", {
|
|
411
|
+
className: "text-sm text-text-secondary",
|
|
412
|
+
children: t ? `${t.open} - ${t.close}` : "Closed"
|
|
413
|
+
})] }, e))
|
|
414
|
+
}) })] })
|
|
415
|
+
]
|
|
416
|
+
}), /* @__PURE__ */ P("div", {
|
|
417
|
+
className: "space-y-6",
|
|
418
|
+
children: [
|
|
419
|
+
/* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
|
|
420
|
+
className: "flex items-center gap-2",
|
|
421
|
+
children: [/* @__PURE__ */ N(S, { size: 18 }), " Location"]
|
|
422
|
+
}) }), /* @__PURE__ */ N(l, { children: /* @__PURE__ */ N("p", {
|
|
423
|
+
className: "text-sm",
|
|
424
|
+
children: k(r.address)
|
|
425
|
+
}) })] }),
|
|
426
|
+
/* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ N(u, { children: "Metrics" }) }), /* @__PURE__ */ P(l, {
|
|
427
|
+
className: "space-y-3",
|
|
428
|
+
children: [
|
|
429
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
430
|
+
className: "text-sm text-text-secondary",
|
|
431
|
+
children: "Throughput"
|
|
432
|
+
}), /* @__PURE__ */ P("p", {
|
|
433
|
+
className: "text-2xl font-bold",
|
|
434
|
+
children: [r.metrics.throughput, /* @__PURE__ */ N("span", {
|
|
435
|
+
className: "text-sm font-normal",
|
|
436
|
+
children: " orders/day"
|
|
437
|
+
})]
|
|
438
|
+
})] }),
|
|
439
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
440
|
+
className: "text-sm text-text-secondary",
|
|
441
|
+
children: "Accuracy"
|
|
442
|
+
}), /* @__PURE__ */ P("p", {
|
|
443
|
+
className: "text-2xl font-bold",
|
|
444
|
+
children: [r.metrics.accuracy, "%"]
|
|
445
|
+
})] }),
|
|
446
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
447
|
+
className: "text-sm text-text-secondary",
|
|
448
|
+
children: "Productivity"
|
|
449
|
+
}), /* @__PURE__ */ P("p", {
|
|
450
|
+
className: "text-2xl font-bold",
|
|
451
|
+
children: [r.metrics.productivity, "%"]
|
|
452
|
+
})] }),
|
|
453
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
454
|
+
className: "text-sm text-text-secondary",
|
|
455
|
+
children: "Orders Fulfilled"
|
|
456
|
+
}), /* @__PURE__ */ N("p", {
|
|
457
|
+
className: "text-2xl font-bold",
|
|
458
|
+
children: r.metrics.ordersFulfilled.toLocaleString()
|
|
459
|
+
})] })
|
|
460
|
+
]
|
|
461
|
+
})] }),
|
|
462
|
+
/* @__PURE__ */ P(c, { children: [/* @__PURE__ */ N(d, { children: /* @__PURE__ */ P(u, {
|
|
463
|
+
className: "flex items-center gap-2",
|
|
464
|
+
children: [
|
|
465
|
+
/* @__PURE__ */ N(T, { size: 18 }),
|
|
466
|
+
" Staff (",
|
|
467
|
+
r.staff.length,
|
|
468
|
+
")"
|
|
469
|
+
]
|
|
470
|
+
}) }), /* @__PURE__ */ N(l, { children: r.staff.length > 0 ? /* @__PURE__ */ N("div", {
|
|
471
|
+
className: "space-y-2",
|
|
472
|
+
children: r.staff.map((e, t) => /* @__PURE__ */ P("div", {
|
|
473
|
+
className: "flex items-center justify-between p-2 border rounded",
|
|
474
|
+
children: [/* @__PURE__ */ N("span", {
|
|
475
|
+
className: "text-sm capitalize",
|
|
476
|
+
children: e.role
|
|
477
|
+
}), /* @__PURE__ */ N(m, {
|
|
478
|
+
variant: "outline",
|
|
479
|
+
children: e.shift
|
|
480
|
+
})]
|
|
481
|
+
}, t))
|
|
482
|
+
}) : /* @__PURE__ */ N("p", {
|
|
483
|
+
className: "text-text-secondary",
|
|
484
|
+
children: "No staff assigned"
|
|
485
|
+
}) })] })
|
|
486
|
+
]
|
|
487
|
+
})]
|
|
488
|
+
})
|
|
489
|
+
]
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
//#endregion
|
|
493
|
+
export { B as default };
|
|
@@ -2,8 +2,8 @@ import { M as e, ct as t, i as n, l as r, ot as i } from "./PageLayout-D4LDHJJq.
|
|
|
2
2
|
import { t as a } from "./DataTable-DmciIKKM.js";
|
|
3
3
|
import { t as o } from "./plus-Z76q-FZm.js";
|
|
4
4
|
import { t as s } from "./refresh-cw-DKt6f5T6.js";
|
|
5
|
-
import { t as c } from "./warehouse-
|
|
6
|
-
import { o as l } from "./useInventory-
|
|
5
|
+
import { t as c } from "./warehouse-6m5kXMLu.js";
|
|
6
|
+
import { o as l } from "./useInventory-DkyiVY_A.js";
|
|
7
7
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
8
|
import { CTAOverflowMenu as f, EmphasisPanel as p, PagePurpose as m } from "@burdenoff/fe-libs/ui";
|
|
9
9
|
//#region src/movethewheels/pages/WarehousesPage.tsx
|
|
@@ -17,7 +17,7 @@ function h() {
|
|
|
17
17
|
primary: {
|
|
18
18
|
label: "Add Warehouse",
|
|
19
19
|
icon: /* @__PURE__ */ u(o, { size: 16 }),
|
|
20
|
-
onSelect: () =>
|
|
20
|
+
onSelect: () => x("inventory/warehouses/new")
|
|
21
21
|
},
|
|
22
22
|
actions: [{
|
|
23
23
|
label: "Refresh",
|