@burdenoff/microfe-movethewheels 2026.703.7 → 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/{AIAssistantPage-B7FGmmKT.js → AIAssistantPage-MWJLAMN_.js} +5 -5
- package/dist/{AnalyticsPage-DXduj5KB.js → AnalyticsPage-900jpV2T.js} +9 -9
- package/dist/{CreateOrderPage-DuJJQ16b.js → CreateOrderPage-CXbhJLLz.js} +164 -139
- package/dist/{CustomerDetailsPage-C98SKw7Z.js → CustomerDetailsPage-CHzg75Q5.js} +16 -16
- package/dist/{CustomersPage-s8hK55JL.js → CustomersPage-CwtVspuq.js} +11 -11
- package/dist/{DashboardPage-BsEgcKEN.js → DashboardPage-BoswH3ec.js} +17 -17
- package/dist/{DataTable-Da7yHjM1.js → DataTable-CmdZd6iV.js} +7 -7
- package/dist/{DocumentsCard-CziaTJhP.js → DocumentsCard-y2ybnAlu.js} +4 -4
- package/dist/DriverDetailsPage-CPO0G8Ki.js +518 -0
- package/dist/{DriversPage-Duy_ITG6.js → DriversPage-6Z61dpDI.js} +11 -11
- package/dist/{FinancePage-BZtPTpmT.js → FinancePage-DYadOUzC.js} +9 -9
- package/dist/{FleetPage-DJfzoHbs.js → FleetPage-qWRj7WFO.js} +10 -10
- package/dist/{FormError-CWjGwOW8.js → FormError-D4T5FWZA.js} +1 -1
- package/dist/{ImportExportPage-DJ77GK_7.js → ImportExportPage-BhWGfbH3.js} +6 -6
- package/dist/{InventoryPage-Dpnwk_N3.js → InventoryPage-DbR4Z--d.js} +10 -10
- package/dist/{LiveTrackingPage-CLlvsP1B.js → LiveTrackingPage-5U68u3oA.js} +10 -10
- package/dist/{MarketplacePage-d99r-v6p.js → MarketplacePage-DMH0HNDH.js} +9 -9
- package/dist/{MetricCard-DA5ZqAVl.js → MetricCard-CqU5WsyW.js} +2 -2
- package/dist/{Notice-kkjV2rLR.js → Notice-BrXJ85dA.js} +2 -2
- package/dist/{OrderDetailsPage-BePtkyN0.js → OrderDetailsPage-DRYifXm9.js} +28 -24
- package/dist/{OrdersListPage-Csy_KScx.js → OrdersListPage-DvICveRv.js} +14 -14
- package/dist/{PageLayout-h_q9l8af.js → PageLayout-j9Zw3wBN.js} +579 -561
- package/dist/ProductDetailsPage-CWgcRqGR.js +375 -0
- package/dist/{ProductsPage-B4jWJ5bv.js → ProductsPage-CokwDOR2.js} +9 -9
- package/dist/{ReportsPage-ALRYfXtz.js → ReportsPage-MU8F9DQC.js} +9 -9
- package/dist/RouteDetailsPage-BHQbFgI9.js +642 -0
- package/dist/{RoutesPage-CQHCDInT.js → RoutesPage-Dqd5Don6.js} +7 -7
- package/dist/{SettingsPage-BYBRrlGe.js → SettingsPage-_6SIlcBX.js} +4 -4
- package/dist/{Sparkline-Q-6bJ24J.js → Sparkline-DTGdlxUH.js} +1 -1
- package/dist/{StatusBadge-1W2p8fEi.js → StatusBadge-BfiF-nNI.js} +1 -1
- package/dist/{TrackingPage-CFndTIyk.js → TrackingPage-Cg0tYGJe.js} +11 -11
- package/dist/VehicleDetailsPage-BbZlCFPo.js +417 -0
- package/dist/{VehiclesPage-ClkfFZxL.js → VehiclesPage-BfBEyXGs.js} +12 -12
- package/dist/WarehouseDetailsPage-DxNhiaoI.js +515 -0
- package/dist/{WarehousesPage-kNba6cr3.js → WarehousesPage-M3NaBT0z.js} +8 -8
- package/dist/{arrow-left-XOzFvBFD.js → arrow-left-1dVWv2dg.js} +1 -1
- package/dist/{arrow-right-CRrwlvFe.js → arrow-right-PUCNATnk.js} +1 -1
- package/dist/{arrow-up-ClFaLPly.js → arrow-up-VQuGMABN.js} +1 -1
- package/dist/{box-BX4WyCLv.js → box-DW1KNP8j.js} +1 -1
- package/dist/{boxes-R3nq5f0_.js → boxes-D6I00XqA.js} +1 -1
- package/dist/{chart-column-BgF8J9bx.js → chart-column-BwQ5H9ol.js} +1 -1
- package/dist/{charts-BS_OnWc6.js → charts-Dv_zxP7L.js} +2 -2
- package/dist/{chevron-left-D3hcLQ1g.js → chevron-left-DzNxoaBG.js} +1 -1
- package/dist/{chevron-right-BpfSrzQF.js → chevron-right-CKm3ZC1T.js} +1 -1
- package/dist/{circle-alert-CLqT8iCQ.js → circle-alert-CtBm6oIb.js} +1 -1
- package/dist/{circle-check-CWLAr_8f.js → circle-check-B_Y7FDyR.js} +1 -1
- package/dist/{circle-check-big-Dsuz8dJ2.js → circle-check-big-H5pLiMBW.js} +1 -1
- package/dist/{clock-DrZOQD8h.js → clock-B4-qjGuB.js} +1 -1
- package/dist/{dollar-sign-CJfKfYul.js → dollar-sign-CYGHy2oS.js} +1 -1
- package/dist/{download-C-yNvUiL.js → download-BJonq2ty.js} +1 -1
- package/dist/{file-text-m2SyQgBo.js → file-text-C-cZx58r.js} +1 -1
- package/dist/{filter-uA6govE9.js → filter-B_S6WOqr.js} +1 -1
- package/dist/{fuel-BroSIBo1.js → fuel-Cjt6IxKr.js} +1 -1
- package/dist/index.js +53 -33
- package/dist/{map-BzwQ__kD.js → map-CO0aWUae.js} +1 -1
- package/dist/{map-pin-BGbmEGn3.js → map-pin-BISLzLwb.js} +1 -1
- package/dist/{maps-DpIuSSmg.js → maps-CtfuCAmh.js} +1 -1
- package/dist/{navigation-CjKGLL9T.js → navigation-BFki5UJz.js} +1 -1
- package/dist/{package-D36cKFvu.js → package-UyaWiALC.js} +1 -1
- package/dist/{phone-mMZFHd1Z.js → phone-Bav_V7rR.js} +1 -1
- package/dist/{plus-DY5R-c1j.js → plus-Bk_G-lFC.js} +1 -1
- package/dist/{refresh-cw-DyOLYuDU.js → refresh-cw-C4-jecjy.js} +1 -1
- package/dist/{route-CuaZ1wU3.js → route-WpCP6F1x.js} +1 -1
- package/dist/{save-h9dzHwJE.js → save-CcfoIn2J.js} +1 -1
- package/dist/{search-stTGSec-.js → search-C3YRxW9e.js} +1 -1
- package/dist/{square-pen-DT5srCPD.js → square-pen-Dr1X-P2s.js} +1 -1
- package/dist/{star-gp4yO3PF.js → star-1Ixfuzai.js} +1 -1
- package/dist/{store-DJZDAvCY.js → store-BwU935v5.js} +1 -1
- package/dist/{trash-2-DwcjTxYE.js → trash-2-CC4KugEJ.js} +1 -1
- package/dist/{trending-up-2q2sPVsb.js → trending-up-1brglj1E.js} +1 -1
- package/dist/{triangle-alert-CU60xaOi.js → triangle-alert-Dh56Yu3-.js} +1 -1
- package/dist/{truck-ByZxqZhI.js → truck-DxhtLfkG.js} +1 -1
- package/dist/{upload-CWor1uj3.js → upload-CLf0JLXW.js} +1 -1
- package/dist/{useAssistant-uoc8wjr0.js → useAssistant-B9qBtRKm.js} +1 -1
- package/dist/{useCustomers-BPPhQXSH.js → useCustomers-BQ4AIEAT.js} +1 -1
- package/dist/{useFleet-CT_iW2V9.js → useFleet-BfA_-VUW.js} +101 -72
- package/dist/{useImportExport-BG0Cg_D9.js → useImportExport-7-O8noRJ.js} +1 -1
- package/dist/{useInventory-BtBGnOC2.js → useInventory-BO7TSgq_.js} +99 -73
- package/dist/{useOrders-BC-1mCc0.js → useOrders-B5FV0kcz.js} +1 -1
- package/dist/{useReports-Cx8blThR.js → useReports-hUXb8ryJ.js} +1 -1
- package/dist/{useRoutes-8fw8oO6y.js → useRoutes-C_ZCYJ_h.js} +1 -1
- package/dist/{useSettings-Do5WSUaI.js → useSettings-BNNzQs_B.js} +2 -2
- package/dist/{useTracking-Dogilo5C.js → useTracking-7nd_XOSL.js} +3 -3
- package/dist/{user-Dr_JS2FF.js → user-B1IjWJtn.js} +1 -1
- package/dist/{user-check-CBSiMH6I.js → user-check-Cx6fHHll.js} +1 -1
- package/dist/{users-BRV9-2nV.js → users-BKmsb79k.js} +1 -1
- package/dist/{warehouse-CmIAl0_w.js → warehouse-DE1irFyJ.js} +1 -1
- package/dist/{wrench-6U-BTSbg.js → wrench-DTJGFs17.js} +1 -1
- package/dist/{x-DX8sZrkd.js → x-CvsUGJy1.js} +1 -1
- package/package.json +1 -1
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +5 -0
- package/src/movethewheels/components/GlassPanel.tsx +1 -3
- package/src/movethewheels/components/MetricCard.tsx +16 -3
- package/src/movethewheels/components/charts/StatusDonut.tsx +2 -6
- package/src/movethewheels/components/charts/TrendChart.tsx +2 -6
- package/src/movethewheels/components/maps/LogisticsMap.tsx +1 -4
- package/src/movethewheels/components/maps/RouteMap.tsx +3 -5
- package/src/movethewheels/components/maps/TrackingMap.tsx +11 -2
- 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/CustomerDetailsPage.tsx +3 -2
- package/src/movethewheels/pages/DriverDetailsPage.tsx +58 -20
- package/src/movethewheels/pages/OrderDetailsPage.tsx +2 -1
- package/src/movethewheels/pages/ProductDetailsPage.tsx +51 -15
- package/src/movethewheels/pages/RouteDetailsPage.tsx +51 -7
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +53 -17
- package/src/movethewheels/pages/VehiclesPage.tsx +9 -1
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +49 -11
- package/src/movethewheels/types/index.ts +3 -0
- package/src/movethewheels/utils/graphqlClient.ts +51 -1
- package/dist/DriverDetailsPage-CBzAmM6s.js +0 -490
- package/dist/ProductDetailsPage-BMlRoR9E.js +0 -350
- package/dist/RouteDetailsPage-Btb1MSIS.js +0 -610
- package/dist/VehicleDetailsPage-DNLrMljV.js +0 -393
- package/dist/WarehouseDetailsPage-CAQFz7l_.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 };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { M as e, i as t, l as n, lt as r, st as i, ut as a } from "./PageLayout-
|
|
2
|
-
import { t as o } from "./DataTable-
|
|
3
|
-
import { t as s } from "./circle-check-
|
|
4
|
-
import { t as c } from "./plus-
|
|
5
|
-
import { t as l } from "./refresh-cw-
|
|
6
|
-
import { t as u } from "./warehouse-
|
|
7
|
-
import { c as d, s as f } from "./useInventory-
|
|
8
|
-
import { r as p, t as m } from "./MetricCard-
|
|
1
|
+
import { M as e, i as t, l as n, lt as r, st as i, ut as a } from "./PageLayout-j9Zw3wBN.js";
|
|
2
|
+
import { t as o } from "./DataTable-CmdZd6iV.js";
|
|
3
|
+
import { t as s } from "./circle-check-B_Y7FDyR.js";
|
|
4
|
+
import { t as c } from "./plus-Bk_G-lFC.js";
|
|
5
|
+
import { t as l } from "./refresh-cw-C4-jecjy.js";
|
|
6
|
+
import { t as u } from "./warehouse-DE1irFyJ.js";
|
|
7
|
+
import { c as d, s as f } from "./useInventory-BO7TSgq_.js";
|
|
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";
|
|
11
11
|
import { CTAOverflowMenu as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as e, t } from "./chunk-BdsCSvBP.js";
|
|
2
|
-
import { at as n, it as r, rt as i, st as a } from "./PageLayout-
|
|
3
|
-
import { $ as o, A as s, B as c, C as l, D as u, E as d, F as f, G as p, H as m, I as h, J as g, K as _, L as v, M as y, N as ee, O as b, P as te, Q as ne, R as x, S as re, T as ie, U as ae, V as oe, W as se, X as ce, Y as le, Z as S, _ as ue, a as de, b as fe, c as pe, d as me, et as he, f as ge, g as _e, h as ve, i as ye, j as be, k as C, l as xe, m as Se, n as w, nt as Ce, o as we, p as Te, q as Ee, r as De, s as T, tt as Oe, u as ke, v as Ae, w as je, x as Me, y as Ne, z as Pe } from "./Sparkline-
|
|
2
|
+
import { at as n, it as r, rt as i, st as a } from "./PageLayout-j9Zw3wBN.js";
|
|
3
|
+
import { $ as o, A as s, B as c, C as l, D as u, E as d, F as f, G as p, H as m, I as h, J as g, K as _, L as v, M as y, N as ee, O as b, P as te, Q as ne, R as x, S as re, T as ie, U as ae, V as oe, W as se, X as ce, Y as le, Z as S, _ as ue, a as de, b as fe, c as pe, d as me, et as he, f as ge, g as _e, h as ve, i as ye, j as be, k as C, l as xe, m as Se, n as w, nt as Ce, o as we, p as Te, q as Ee, r as De, s as T, tt as Oe, u as ke, v as Ae, w as je, x as Me, y as Ne, z as Pe } from "./Sparkline-DTGdlxUH.js";
|
|
4
4
|
import E, { PureComponent as Fe, useCallback as D, useEffect as O, useId as Ie, useMemo as k, useState as A } from "react";
|
|
5
5
|
import { jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
6
6
|
//#region src/movethewheels/hooks/useAnalytics.ts
|