@burdenoff/microfe-movethewheels 2026.1017.11 → 2026.1017.13
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/MoveTheWheelsRoot.js +7 -0
- package/dist/MoveTheWheelsRoutes.js +39 -35
- package/dist/components/pallet-preview/PalletPreviewResults.js +189 -0
- package/dist/generated/pallet-preview-operations.d.ts +273 -0
- package/dist/hooks/usePalletPreview.js +86 -0
- package/dist/movethewheels/components/pallet-preview/PalletPreviewResults.d.ts +6 -0
- package/dist/movethewheels/hooks/usePalletPreview.d.ts +98 -0
- package/dist/movethewheels/pages/PalletPreviewPage.d.ts +1 -0
- package/dist/movethewheels/utils/graphqlClient.d.ts +4 -0
- package/dist/movethewheels/utils/palletPreviewInput.d.ts +54 -0
- package/dist/movethewheels/utils/palletPreviewResponse.d.ts +7 -0
- package/dist/pages/PalletPreviewPage.js +501 -0
- package/dist/pages/WarehousesPage.js +83 -78
- package/dist/src/generated/pallet-preview-operations.js +594 -0
- package/dist/utils/graphqlClient.js +27 -19
- package/dist/utils/palletPreviewInput.js +138 -0
- package/dist/utils/palletPreviewResponse.js +191 -0
- package/package.json +5 -4
- package/src/generated/pallet-preview-operations.ts +204 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +7 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +2 -0
- package/src/movethewheels/components/pallet-preview/PalletPreviewResults.tsx +220 -0
- package/src/movethewheels/hooks/usePalletPreview.ts +114 -0
- package/src/movethewheels/pages/PalletPreviewPage.tsx +588 -0
- package/src/movethewheels/pages/WarehousesPage.tsx +9 -1
- package/src/movethewheels/utils/graphqlClient.ts +19 -2
- package/src/movethewheels/utils/palletPreviewInput.ts +199 -0
- package/src/movethewheels/utils/palletPreviewResponse.ts +256 -0
- package/src/operations/pallet-preview/preview.graphql +26 -0
|
@@ -6,17 +6,19 @@ import { RefreshCw as i } from "../node_modules/lucide-react/dist/esm/icons/refr
|
|
|
6
6
|
import { Warehouse as a } from "../node_modules/lucide-react/dist/esm/icons/warehouse.js";
|
|
7
7
|
import { joinPath as o } from "../utils/navigation.js";
|
|
8
8
|
import { useMoveTheWheels as s } from "../providers/MoveTheWheelsProvider.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
9
|
+
import { useTr as c } from "../shared/hooks/useTr.js";
|
|
10
|
+
import { useWarehouseStats as l, useWarehouses as u } from "../hooks/useInventory.js";
|
|
11
|
+
import "../hooks/index.js";
|
|
12
|
+
import { Badge as d, Button as f, Card as p, CardContent as m, Progress as h, Select as g, SelectContent as _, SelectItem as v, SelectTrigger as y, SelectValue as b } from "../components/ui.js";
|
|
13
|
+
import { PageLayout as x } from "../components/PageLayout.js";
|
|
14
|
+
import { MetricCard as S, MetricGrid as C } from "../components/MetricCard.js";
|
|
15
|
+
import { DataTable as w } from "../components/DataTable.js";
|
|
16
|
+
import { useDebouncedValue as T } from "../hooks/useDebouncedValue.js";
|
|
17
|
+
import { useState as E } from "react";
|
|
18
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
19
|
+
import { CTAOverflowMenu as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
|
|
18
20
|
//#region src/movethewheels/pages/WarehousesPage.tsx
|
|
19
|
-
var
|
|
21
|
+
var j = [
|
|
20
22
|
{
|
|
21
23
|
value: "all",
|
|
22
24
|
label: "All statuses"
|
|
@@ -30,111 +32,114 @@ var A = [
|
|
|
30
32
|
label: "Inactive"
|
|
31
33
|
}
|
|
32
34
|
];
|
|
33
|
-
function
|
|
34
|
-
let { basePath:
|
|
35
|
-
limit:
|
|
36
|
-
offset:
|
|
37
|
-
search:
|
|
38
|
-
status:
|
|
39
|
-
}),
|
|
40
|
-
return /* @__PURE__ */
|
|
35
|
+
function M() {
|
|
36
|
+
let M = c(), { basePath: N, navigate: P } = s(), [F, I] = E(0), [L, R] = E(25), [z, B] = E(""), [V, H] = E("all"), U = T(z), { warehouses: W, totalWarehouses: G, hasMore: K, isLoading: q, error: J, refetch: Y } = u({
|
|
37
|
+
limit: L,
|
|
38
|
+
offset: F * L,
|
|
39
|
+
search: U,
|
|
40
|
+
status: V === "all" ? void 0 : V
|
|
41
|
+
}), X = V !== "all" || z.length > 0, { stats: Z } = l(), Q = (e) => P?.(o(N, e));
|
|
42
|
+
return /* @__PURE__ */ O(x, {
|
|
41
43
|
title: "Warehouses",
|
|
42
|
-
subtitle: `${
|
|
43
|
-
icon: /* @__PURE__ */
|
|
44
|
-
headerActions: /* @__PURE__ */
|
|
44
|
+
subtitle: `${Z.total} warehouses`,
|
|
45
|
+
icon: /* @__PURE__ */ D(a, { size: 24 }),
|
|
46
|
+
headerActions: /* @__PURE__ */ D(k, {
|
|
45
47
|
primary: {
|
|
46
48
|
label: "Add Warehouse",
|
|
47
|
-
icon: /* @__PURE__ */
|
|
48
|
-
onSelect: () =>
|
|
49
|
+
icon: /* @__PURE__ */ D(r, { size: 16 }),
|
|
50
|
+
onSelect: () => Q("inventory/warehouses/new")
|
|
49
51
|
},
|
|
50
52
|
actions: [{
|
|
53
|
+
label: M("movethewheels.palletPreview.title", "Pallet preview"),
|
|
54
|
+
onSelect: () => Q("inventory/warehouses/pallet-preview")
|
|
55
|
+
}, {
|
|
51
56
|
label: "Refresh",
|
|
52
|
-
icon: /* @__PURE__ */
|
|
53
|
-
onSelect: () =>
|
|
57
|
+
icon: /* @__PURE__ */ D(i, { size: 16 }),
|
|
58
|
+
onSelect: () => Y()
|
|
54
59
|
}]
|
|
55
60
|
}),
|
|
56
61
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
icon: /* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ D(A, {
|
|
63
|
+
icon: /* @__PURE__ */ D(a, { size: 18 }),
|
|
59
64
|
children: "Your storage and fulfilment sites. Watch space and pallet utilization across each warehouse to balance stock, spot capacity crunches, and decide where to fulfil an order from."
|
|
60
65
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
62
67
|
className: "mb-3 text-sm font-medium text-text-secondary",
|
|
63
68
|
children: "Network at a glance"
|
|
64
|
-
}), /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ O(C, {
|
|
65
70
|
columns: 3,
|
|
66
71
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ D(S, {
|
|
68
73
|
label: "Total sites",
|
|
69
|
-
value:
|
|
70
|
-
icon: /* @__PURE__ */
|
|
74
|
+
value: Z.total,
|
|
75
|
+
icon: /* @__PURE__ */ D(a, { size: 20 }),
|
|
71
76
|
accent: "brand"
|
|
72
77
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ D(S, {
|
|
74
79
|
label: "Active",
|
|
75
|
-
value:
|
|
76
|
-
icon: /* @__PURE__ */
|
|
80
|
+
value: Z.active,
|
|
81
|
+
icon: /* @__PURE__ */ D(e, { size: 20 }),
|
|
77
82
|
accent: "success",
|
|
78
83
|
subtitle: "Fulfilling orders"
|
|
79
84
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ D(S, {
|
|
81
86
|
label: "Avg utilization",
|
|
82
|
-
value:
|
|
83
|
-
icon: /* @__PURE__ */
|
|
87
|
+
value: Z.total > 0 ? `${Math.round(Z.avgUtilization * 100)}%` : "—",
|
|
88
|
+
icon: /* @__PURE__ */ D(n, { size: 20 }),
|
|
84
89
|
accent: "blue"
|
|
85
90
|
})
|
|
86
91
|
]
|
|
87
92
|
})] }),
|
|
88
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ D(p, { children: /* @__PURE__ */ D(m, {
|
|
89
94
|
className: "p-4",
|
|
90
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ O("div", {
|
|
91
96
|
className: "flex flex-wrap items-center gap-4",
|
|
92
97
|
children: [
|
|
93
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ O("div", {
|
|
94
99
|
className: "flex items-center gap-2",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ D(t, {
|
|
96
101
|
size: 16,
|
|
97
102
|
className: "text-text-secondary"
|
|
98
|
-
}), /* @__PURE__ */
|
|
103
|
+
}), /* @__PURE__ */ D("span", {
|
|
99
104
|
className: "text-sm font-medium",
|
|
100
105
|
children: "Filters:"
|
|
101
106
|
})]
|
|
102
107
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
value:
|
|
108
|
+
/* @__PURE__ */ O(g, {
|
|
109
|
+
value: V,
|
|
105
110
|
onValueChange: (e) => {
|
|
106
|
-
|
|
111
|
+
H(e), I(0);
|
|
107
112
|
},
|
|
108
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ D(y, {
|
|
109
114
|
className: "w-[180px]",
|
|
110
|
-
children: /* @__PURE__ */
|
|
111
|
-
}), /* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ D(b, { placeholder: "Status" })
|
|
116
|
+
}), /* @__PURE__ */ D(_, { children: j.map((e) => /* @__PURE__ */ D(v, {
|
|
112
117
|
value: e.value,
|
|
113
118
|
children: e.label
|
|
114
119
|
}, e.value)) })]
|
|
115
120
|
}),
|
|
116
|
-
|
|
121
|
+
X && /* @__PURE__ */ D(f, {
|
|
117
122
|
variant: "ghost",
|
|
118
123
|
size: "sm",
|
|
119
124
|
onClick: () => {
|
|
120
|
-
|
|
125
|
+
H("all"), B(""), I(0);
|
|
121
126
|
},
|
|
122
127
|
children: "Clear filters"
|
|
123
128
|
})
|
|
124
129
|
]
|
|
125
130
|
})
|
|
126
131
|
}) }),
|
|
127
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ D(w, {
|
|
128
133
|
columns: [
|
|
129
134
|
{
|
|
130
135
|
id: "name",
|
|
131
136
|
header: "Warehouse",
|
|
132
137
|
accessorKey: "name",
|
|
133
138
|
sortable: !0,
|
|
134
|
-
cell: (e) => /* @__PURE__ */
|
|
139
|
+
cell: (e) => /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
135
140
|
className: "font-medium",
|
|
136
141
|
children: e.name
|
|
137
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ D("p", {
|
|
138
143
|
className: "text-sm text-text-secondary",
|
|
139
144
|
children: e.code
|
|
140
145
|
})] })
|
|
@@ -142,7 +147,7 @@ function j() {
|
|
|
142
147
|
{
|
|
143
148
|
id: "location",
|
|
144
149
|
header: "Location",
|
|
145
|
-
cell: (e) => /* @__PURE__ */
|
|
150
|
+
cell: (e) => /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", { children: [e.address.city, e.address.state].filter(Boolean).join(", ") || "Not provided" }), /* @__PURE__ */ D("p", {
|
|
146
151
|
className: "text-sm text-text-secondary",
|
|
147
152
|
children: e.address.country || "Not provided"
|
|
148
153
|
})] })
|
|
@@ -151,7 +156,7 @@ function j() {
|
|
|
151
156
|
id: "type",
|
|
152
157
|
header: "Type",
|
|
153
158
|
accessorKey: "type",
|
|
154
|
-
cell: (e) => /* @__PURE__ */
|
|
159
|
+
cell: (e) => /* @__PURE__ */ D(d, {
|
|
155
160
|
variant: "outline",
|
|
156
161
|
className: "capitalize",
|
|
157
162
|
children: e.type.replace("_", " ")
|
|
@@ -162,15 +167,15 @@ function j() {
|
|
|
162
167
|
header: "Utilization",
|
|
163
168
|
cell: (e) => {
|
|
164
169
|
let { totalSpace: t, usedSpace: n } = e.capacity, r = typeof t == "number" && t > 0 && typeof n == "number" ? n / t * 100 : void 0;
|
|
165
|
-
return r === void 0 ? /* @__PURE__ */
|
|
170
|
+
return r === void 0 ? /* @__PURE__ */ D("span", {
|
|
166
171
|
className: "text-sm text-text-secondary",
|
|
167
172
|
children: "Not provided"
|
|
168
|
-
}) : /* @__PURE__ */
|
|
173
|
+
}) : /* @__PURE__ */ O("div", {
|
|
169
174
|
className: "flex items-center gap-2",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ D(h, {
|
|
171
176
|
value: r,
|
|
172
177
|
className: "w-16 h-2"
|
|
173
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ O("span", {
|
|
174
179
|
className: "text-sm",
|
|
175
180
|
children: [r.toFixed(0), "%"]
|
|
176
181
|
})]
|
|
@@ -182,7 +187,7 @@ function j() {
|
|
|
182
187
|
header: "Capacity",
|
|
183
188
|
cell: (e) => {
|
|
184
189
|
let { totalSpace: t, usedSpace: n } = e.capacity;
|
|
185
|
-
return typeof n == "number" && typeof t == "number" ? /* @__PURE__ */
|
|
190
|
+
return typeof n == "number" && typeof t == "number" ? /* @__PURE__ */ O("p", {
|
|
186
191
|
className: "text-sm",
|
|
187
192
|
children: [
|
|
188
193
|
n.toLocaleString(),
|
|
@@ -190,7 +195,7 @@ function j() {
|
|
|
190
195
|
t.toLocaleString(),
|
|
191
196
|
" sq ft"
|
|
192
197
|
]
|
|
193
|
-
}) : /* @__PURE__ */
|
|
198
|
+
}) : /* @__PURE__ */ D("span", {
|
|
194
199
|
className: "text-sm text-text-secondary",
|
|
195
200
|
children: "Not provided"
|
|
196
201
|
});
|
|
@@ -201,37 +206,37 @@ function j() {
|
|
|
201
206
|
header: "Status",
|
|
202
207
|
cell: (e) => {
|
|
203
208
|
let t = e.status?.toUpperCase() === "ACTIVE";
|
|
204
|
-
return e.status ? /* @__PURE__ */
|
|
209
|
+
return e.status ? /* @__PURE__ */ D(d, {
|
|
205
210
|
variant: t ? "default" : "secondary",
|
|
206
211
|
children: t ? "Active" : "Inactive"
|
|
207
|
-
}) : /* @__PURE__ */
|
|
212
|
+
}) : /* @__PURE__ */ D("span", {
|
|
208
213
|
className: "text-sm text-text-secondary",
|
|
209
214
|
children: "Not provided"
|
|
210
215
|
});
|
|
211
216
|
}
|
|
212
217
|
}
|
|
213
218
|
],
|
|
214
|
-
data:
|
|
215
|
-
isLoading:
|
|
216
|
-
error:
|
|
217
|
-
onRetry:
|
|
219
|
+
data: W,
|
|
220
|
+
isLoading: q,
|
|
221
|
+
error: J,
|
|
222
|
+
onRetry: Y,
|
|
218
223
|
searchable: !0,
|
|
219
224
|
searchPlaceholder: "Search warehouses...",
|
|
220
225
|
searchFields: ["name", "code"],
|
|
221
|
-
searchQuery:
|
|
226
|
+
searchQuery: z,
|
|
222
227
|
onSearchQueryChange: (e) => {
|
|
223
|
-
|
|
228
|
+
B(e), I(0);
|
|
224
229
|
},
|
|
225
|
-
onRowClick: (e) =>
|
|
230
|
+
onRowClick: (e) => Q(`inventory/warehouses/${e.id}`),
|
|
226
231
|
getRowId: (e) => e.id,
|
|
227
|
-
pageIndex:
|
|
228
|
-
pageSize:
|
|
229
|
-
onPageChange:
|
|
232
|
+
pageIndex: F,
|
|
233
|
+
pageSize: L,
|
|
234
|
+
onPageChange: I,
|
|
230
235
|
onPageSizeChange: (e) => {
|
|
231
|
-
|
|
236
|
+
R(e), I(0);
|
|
232
237
|
},
|
|
233
|
-
totalItems:
|
|
234
|
-
hasNextPage:
|
|
238
|
+
totalItems: G,
|
|
239
|
+
hasNextPage: K,
|
|
235
240
|
emptyIllustration: "empty-data",
|
|
236
241
|
emptyTitle: "No warehouses yet",
|
|
237
242
|
emptyDescription: "Add a warehouse to store inventory and fulfil orders from it."
|
|
@@ -240,4 +245,4 @@ function j() {
|
|
|
240
245
|
});
|
|
241
246
|
}
|
|
242
247
|
//#endregion
|
|
243
|
-
export {
|
|
248
|
+
export { M as default };
|