@burdenoff/microfe-movethewheels 2026.626.2 → 2026.703.2
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-AvsMbunM.js → AIAssistantPage-C3cPsWt-.js} +100 -73
- package/dist/AnalyticsPage-Dz6g2MvK.js +215 -0
- package/dist/{CreateOrderPage-CjlnEtk3.js → CreateOrderPage-C5iwnjp4.js} +36 -67
- package/dist/CustomerDetailsPage-B6nwFyLO.js +406 -0
- package/dist/{CustomersPage-CGGfD4ki.js → CustomersPage-2Y05LVyh.js} +26 -28
- package/dist/{DashboardPage-D2HRqwg9.js → DashboardPage-BVjQi0EB.js} +85 -83
- package/dist/{DataTable-CD9ZhpLB.js → DataTable-DmciIKKM.js} +3 -3
- package/dist/DriverDetailsPage-CN3WQ0B9.js +507 -0
- package/dist/{DriversPage-DKiynISH.js → DriversPage-B0Zpx8OQ.js} +25 -27
- package/dist/{FinancePage-Vg8WPs38.js → FinancePage-DEDykSOP.js} +9 -9
- package/dist/FleetPage-DqkFi3s3.js +365 -0
- package/dist/FormError-BlOjnXOq.js +15 -0
- package/dist/ImportExportPage-DKJRCezl.js +290 -0
- package/dist/InventoryPage-DwfgCUQq.js +253 -0
- package/dist/{LiveTrackingPage-DQ1q4Id3.js → LiveTrackingPage-DCX-K-LR.js} +60 -56
- package/dist/MarketplacePage-CIQ97_zp.js +247 -0
- package/dist/{MetricCard-B7yMyvMX.js → MetricCard-BY0QrMD4.js} +1 -1
- package/dist/{OrderDetailsPage-CFASgsYX.js → OrderDetailsPage-DYiZ-9UK.js} +83 -85
- package/dist/{OrdersListPage-BHeT8S5o.js → OrdersListPage-BjDlCKJd.js} +31 -33
- package/dist/{PageLayout-D3N8MCTm.js → PageLayout-D4LDHJJq.js} +483 -422
- package/dist/ProductDetailsPage-C9uOiYLp.js +350 -0
- package/dist/{ProductsPage--xEpbQ8A.js → ProductsPage-C1G9h7Xd.js} +22 -24
- package/dist/ReportsPage-Zp53q3_8.js +284 -0
- package/dist/RouteDetailsPage-DUStXSf9.js +531 -0
- package/dist/RoutesPage-DMfoicM1.js +144 -0
- package/dist/SettingsPage-Bn-v0mbQ.js +421 -0
- package/dist/StatusBadge-BZurYHMy.js +152 -0
- package/dist/{TrackingPage-CcRc_dva.js → TrackingPage-W-jtdM3Y.js} +59 -61
- package/dist/VehicleDetailsPage-Bceo5oz3.js +410 -0
- package/dist/{VehiclesPage-UlxPWP9K.js → VehiclesPage-VBtOep91.js} +20 -22
- package/dist/WarehouseDetailsPage-L_6sWigM.js +493 -0
- package/dist/{WarehousesPage-CuTO-OPp.js → WarehousesPage-DCbXXXWE.js} +16 -18
- package/dist/{arrow-left-CBpZKkpq.js → arrow-left-n48Y-Wis.js} +1 -1
- package/dist/{box-CAaiElsb.js → box-D9Pal4HM.js} +1 -1
- package/dist/{chart-column-D1Ym15-S.js → chart-column-BFIJysDR.js} +1 -1
- package/dist/{chevron-right-BIFGi0UA.js → chevron-right-EMIIyyJ1.js} +1 -1
- package/dist/{circle-alert-DjmNo5_L.js → circle-alert-iY24lSlp.js} +1 -1
- package/dist/{circle-check-big-CjuPVo3_.js → circle-check-big-w0TrLKMF.js} +1 -1
- package/dist/{clock-BjkdnddD.js → clock-DJZtdl8u.js} +1 -1
- package/dist/{dollar-sign-IB4O0wuQ.js → dollar-sign-CgKQRz_e.js} +1 -1
- package/dist/{download-Dpa9vqoG.js → download-DRXxoiQR.js} +1 -1
- package/dist/{file-text-C8Uioy11.js → file-text-DWWY6_f5.js} +1 -1
- package/dist/{filter-Da5OZaHI.js → filter-DloLC2eE.js} +1 -1
- package/dist/index.js +186 -162
- package/dist/{map-_Per4sT9.js → map-CkJaULb2.js} +1 -1
- package/dist/{map-pin-BSaf5IDL.js → map-pin-BGiCvyCs.js} +1 -1
- package/dist/{navigation-DaTbrhw2.js → navigation-D36prnAn.js} +1 -1
- package/dist/{package-BE7U0wQE.js → package-BChUzpJS.js} +1 -1
- package/dist/{phone-DV4StZiA.js → phone-Ac9s3mo_.js} +1 -1
- package/dist/{plus-Dl1rLeJR.js → plus-Z76q-FZm.js} +1 -1
- package/dist/{refresh-cw-CWfERAit.js → refresh-cw-DKt6f5T6.js} +1 -1
- package/dist/{save-XH8vydOn.js → save-CojywNhG.js} +1 -1
- package/dist/{search-OxoIiL_C.js → search-CDGefqb3.js} +1 -1
- package/dist/{square-pen-hLIbFQFV.js → square-pen-CopE9GmB.js} +1 -1
- package/dist/{star-YsVV3MNQ.js → star-nHlLjDKR.js} +1 -1
- package/dist/{store-RCBl7HB-.js → store-BR9Voi5E.js} +1 -1
- package/dist/trash-2-BKhar6Hs.js +32 -0
- package/dist/{trending-up-C-85AwGT.js → trending-up-Dohgd4t_.js} +1 -1
- package/dist/{triangle-alert-BOhfGgmh.js → triangle-alert-i-XQL9Rd.js} +1 -1
- package/dist/{truck-CtDjNFbi.js → truck-C0v_hbLR.js} +1 -1
- package/dist/{useAnalytics-ph7eTIK6.js → useAnalytics-DS8n0xgg.js} +40 -40
- package/dist/useAssistant-D4v3oxD3.js +84 -0
- package/dist/{useCustomers-bS3a4ytk.js → useCustomers-BmTNGxiI.js} +24 -24
- package/dist/{useFleet-BdETplNE.js → useFleet-DKqXZ16m.js} +133 -109
- package/dist/useImportExport-DHr-SWSw.js +55 -0
- package/dist/{useInventory-Dwn18FPz.js → useInventory-DkyiVY_A.js} +95 -75
- package/dist/{useOrders-D_3_hGMp.js → useOrders-Cfk1GLiq.js} +42 -42
- package/dist/useReports-CTqZr-AB.js +78 -0
- package/dist/{useRoutes-v4aBaS-E.js → useRoutes-BQWO607N.js} +31 -31
- package/dist/useSettings-CkDH_-gM.js +81 -0
- package/dist/{useTracking-De2KIUNu.js → useTracking-B-va1kO3.js} +22 -22
- package/dist/{user-Dz5TJZFs.js → user-jyFU3lXk.js} +1 -1
- package/dist/{users-g2N0eL-Z.js → users-DZ-ilS6B.js} +1 -1
- package/dist/{warehouse-D3WWDeTX.js → warehouse-6m5kXMLu.js} +1 -1
- package/dist/{wrench-CmxY1n4I.js → wrench-CANXWxF-.js} +1 -1
- package/package.json +1 -1
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +31 -3
- package/src/movethewheels/components/FormError.tsx +25 -0
- package/src/movethewheels/components/StatusBadge.tsx +18 -37
- package/src/movethewheels/constants/index.ts +67 -26
- package/src/movethewheels/hooks/index.ts +12 -0
- package/src/movethewheels/hooks/useAnalytics.ts +20 -6
- package/src/movethewheels/hooks/useAssistant.ts +74 -0
- package/src/movethewheels/hooks/useFleet.ts +170 -59
- package/src/movethewheels/hooks/useImportExport.ts +101 -0
- package/src/movethewheels/hooks/useInventory.ts +107 -0
- package/src/movethewheels/hooks/useReports.ts +158 -0
- package/src/movethewheels/hooks/useSettings.ts +120 -0
- package/src/movethewheels/pages/AIAssistantPage.tsx +53 -15
- package/src/movethewheels/pages/AnalyticsPage.tsx +67 -64
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +154 -21
- package/src/movethewheels/pages/CustomersPage.tsx +1 -1
- package/src/movethewheels/pages/DashboardPage.tsx +42 -22
- package/src/movethewheels/pages/DriverDetailsPage.tsx +160 -3
- package/src/movethewheels/pages/DriversPage.tsx +6 -2
- package/src/movethewheels/pages/FleetPage.tsx +96 -38
- package/src/movethewheels/pages/ImportExportPage.tsx +174 -68
- package/src/movethewheels/pages/InventoryPage.tsx +66 -28
- package/src/movethewheels/pages/LiveTrackingPage.tsx +12 -3
- package/src/movethewheels/pages/MarketplacePage.tsx +87 -45
- package/src/movethewheels/pages/OrderDetailsPage.tsx +2 -2
- package/src/movethewheels/pages/ProductDetailsPage.tsx +146 -3
- package/src/movethewheels/pages/ProductsPage.tsx +5 -1
- package/src/movethewheels/pages/ReportsPage.tsx +194 -90
- package/src/movethewheels/pages/RouteDetailsPage.tsx +290 -36
- package/src/movethewheels/pages/RoutesPage.tsx +4 -9
- package/src/movethewheels/pages/SettingsPage.tsx +234 -56
- package/src/movethewheels/pages/TrackingPage.tsx +6 -6
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +158 -2
- package/src/movethewheels/pages/VehiclesPage.tsx +5 -1
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +224 -2
- package/src/movethewheels/pages/WarehousesPage.tsx +5 -1
- package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +7 -6
- package/src/movethewheels/store/movethewheelsStore.ts +1 -1
- package/dist/AnalyticsPage-CCLfHgQZ.js +0 -212
- package/dist/CustomerDetailsPage-I6cdDHUi.js +0 -265
- package/dist/DriverDetailsPage-rg_pGNuP.js +0 -330
- package/dist/FleetPage-DddXt8r8.js +0 -332
- package/dist/ImportExportPage-BW6qO3kc.js +0 -248
- package/dist/InventoryPage-rMGuaJN-.js +0 -222
- package/dist/MarketplacePage-DKrXAv62.js +0 -219
- package/dist/ProductDetailsPage-CFGcbaHo.js +0 -195
- package/dist/ReportsPage-Bb7_90rK.js +0 -235
- package/dist/RouteDetailsPage-CVtDVb1N.js +0 -282
- package/dist/RoutesPage-s57PtgcQ.js +0 -163
- package/dist/SettingsPage-BYNCBOpN.js +0 -298
- package/dist/StatusBadge-CijYQXtb.js +0 -209
- package/dist/VehicleDetailsPage-3YDMPsPs.js +0 -220
- package/dist/WarehouseDetailsPage-Db7KeN-d.js +0 -238
- package/dist/graphqlClient-CdJyR_ed.js +0 -55
- package/dist/navigation-BgnOfsVd.js +0 -6
- package/dist/route-Dp9JiN_E.js +0 -51
- package/dist/settings-3Rw5NwFF.js +0 -28
- package/src/movethewheels/constants/mockData.ts +0 -1342
- /package/dist/{formatters-_vJlC-47.js → formatters-CF2S2l1m.js} +0 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import { A as e, ct as t, d as n, f as r, g as i, h as a, i as o, j as s, l as c, lt as l, n as u, ot as d, r as f, u as p } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
import { t as m } from "./arrow-left-n48Y-Wis.js";
|
|
3
|
+
import { t as h } from "./box-D9Pal4HM.js";
|
|
4
|
+
import { t as g } from "./dollar-sign-CgKQRz_e.js";
|
|
5
|
+
import { t as _ } from "./package-BChUzpJS.js";
|
|
6
|
+
import { t as v } from "./save-CojywNhG.js";
|
|
7
|
+
import { t as y } from "./square-pen-CopE9GmB.js";
|
|
8
|
+
import { r as b, t as x } from "./useInventory-DkyiVY_A.js";
|
|
9
|
+
import { n as S } from "./formatters-CF2S2l1m.js";
|
|
10
|
+
import { t as C } from "./FormError-BlOjnXOq.js";
|
|
11
|
+
import { useState as w } from "react";
|
|
12
|
+
import { useParams as T } from "react-router-dom";
|
|
13
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
14
|
+
import { EmphasisPanel as O, NextSteps as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
//#region node_modules/lucide-react/dist/esm/icons/tag.js
|
|
16
|
+
var j = l("Tag", [["path", {
|
|
17
|
+
d: "M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",
|
|
18
|
+
key: "vktsd0"
|
|
19
|
+
}], ["circle", {
|
|
20
|
+
cx: "7.5",
|
|
21
|
+
cy: "7.5",
|
|
22
|
+
r: ".5",
|
|
23
|
+
fill: "currentColor",
|
|
24
|
+
key: "kqv944"
|
|
25
|
+
}]]);
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/movethewheels/pages/ProductDetailsPage.tsx
|
|
28
|
+
function M() {
|
|
29
|
+
let { basePath: n, navigate: r } = d(), { createProduct: i } = x(), [a, c] = w({
|
|
30
|
+
name: "",
|
|
31
|
+
sku: "",
|
|
32
|
+
category: "",
|
|
33
|
+
brand: "",
|
|
34
|
+
weight: ""
|
|
35
|
+
}), [l, u] = w(!1), [f, h] = w(null), g = () => r?.(t(n, "inventory/products")), y = async (e) => {
|
|
36
|
+
if (e.preventDefault(), !a.name.trim() || !a.sku.trim()) {
|
|
37
|
+
h("Product name and SKU are required.");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
u(!0), h(null);
|
|
41
|
+
try {
|
|
42
|
+
let e = a.weight.trim() ? Number(a.weight) : void 0, o = await i({
|
|
43
|
+
name: a.name.trim(),
|
|
44
|
+
sku: a.sku.trim(),
|
|
45
|
+
category: a.category.trim() || void 0,
|
|
46
|
+
brand: a.brand.trim() || void 0,
|
|
47
|
+
weight: e !== void 0 && !Number.isNaN(e) ? e : void 0
|
|
48
|
+
});
|
|
49
|
+
r?.(t(n, `inventory/products/${o.id}`));
|
|
50
|
+
} catch (e) {
|
|
51
|
+
console.error("Failed to create product:", e), h(e instanceof Error ? e.message : "Failed to create product. Please try again."), u(!1);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ D(o, {
|
|
55
|
+
title: "Add Product",
|
|
56
|
+
subtitle: "Add an item to your catalog",
|
|
57
|
+
icon: /* @__PURE__ */ E(_, { size: 24 }),
|
|
58
|
+
headerActions: /* @__PURE__ */ D("div", {
|
|
59
|
+
className: "flex gap-2",
|
|
60
|
+
children: [/* @__PURE__ */ D(p, {
|
|
61
|
+
variant: "outline",
|
|
62
|
+
onClick: g,
|
|
63
|
+
disabled: l,
|
|
64
|
+
children: [/* @__PURE__ */ E(m, { size: 16 }), " Cancel"]
|
|
65
|
+
}), /* @__PURE__ */ D(p, {
|
|
66
|
+
onClick: y,
|
|
67
|
+
disabled: l,
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ E(v, { size: 16 }),
|
|
70
|
+
" ",
|
|
71
|
+
l ? "Saving..." : "Add Product"
|
|
72
|
+
]
|
|
73
|
+
})]
|
|
74
|
+
}),
|
|
75
|
+
children: [/* @__PURE__ */ E(A, {
|
|
76
|
+
icon: /* @__PURE__ */ E(_, { size: 18 }),
|
|
77
|
+
children: "Add a product so it can be added to orders and stocked in warehouses. A name and SKU are all it takes to start — category, brand and weight help with picking, pricing and routing."
|
|
78
|
+
}), /* @__PURE__ */ D("form", {
|
|
79
|
+
onSubmit: y,
|
|
80
|
+
className: "max-w-2xl space-y-6",
|
|
81
|
+
children: [/* @__PURE__ */ E(C, { message: f }), /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("h2", {
|
|
82
|
+
className: "text-base font-semibold text-text-primary mb-4",
|
|
83
|
+
children: "Product Details"
|
|
84
|
+
}), /* @__PURE__ */ D("div", {
|
|
85
|
+
className: "space-y-4",
|
|
86
|
+
children: [/* @__PURE__ */ D("div", {
|
|
87
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
88
|
+
children: [/* @__PURE__ */ D("div", {
|
|
89
|
+
className: "space-y-2",
|
|
90
|
+
children: [/* @__PURE__ */ D(s, {
|
|
91
|
+
htmlFor: "name",
|
|
92
|
+
children: ["Name ", /* @__PURE__ */ E("span", {
|
|
93
|
+
className: "text-status-error-text",
|
|
94
|
+
children: "*"
|
|
95
|
+
})]
|
|
96
|
+
}), /* @__PURE__ */ E(e, {
|
|
97
|
+
id: "name",
|
|
98
|
+
value: a.name,
|
|
99
|
+
onChange: (e) => c((t) => ({
|
|
100
|
+
...t,
|
|
101
|
+
name: e.target.value
|
|
102
|
+
})),
|
|
103
|
+
placeholder: "Wireless Headphones",
|
|
104
|
+
required: !0
|
|
105
|
+
})]
|
|
106
|
+
}), /* @__PURE__ */ D("div", {
|
|
107
|
+
className: "space-y-2",
|
|
108
|
+
children: [/* @__PURE__ */ D(s, {
|
|
109
|
+
htmlFor: "sku",
|
|
110
|
+
children: ["SKU ", /* @__PURE__ */ E("span", {
|
|
111
|
+
className: "text-status-error-text",
|
|
112
|
+
children: "*"
|
|
113
|
+
})]
|
|
114
|
+
}), /* @__PURE__ */ E(e, {
|
|
115
|
+
id: "sku",
|
|
116
|
+
value: a.sku,
|
|
117
|
+
onChange: (e) => c((t) => ({
|
|
118
|
+
...t,
|
|
119
|
+
sku: e.target.value
|
|
120
|
+
})),
|
|
121
|
+
placeholder: "SKU-001",
|
|
122
|
+
required: !0
|
|
123
|
+
})]
|
|
124
|
+
})]
|
|
125
|
+
}), /* @__PURE__ */ D("div", {
|
|
126
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
127
|
+
children: [
|
|
128
|
+
/* @__PURE__ */ D("div", {
|
|
129
|
+
className: "space-y-2",
|
|
130
|
+
children: [/* @__PURE__ */ E(s, {
|
|
131
|
+
htmlFor: "category",
|
|
132
|
+
children: "Category"
|
|
133
|
+
}), /* @__PURE__ */ E(e, {
|
|
134
|
+
id: "category",
|
|
135
|
+
value: a.category,
|
|
136
|
+
onChange: (e) => c((t) => ({
|
|
137
|
+
...t,
|
|
138
|
+
category: e.target.value
|
|
139
|
+
})),
|
|
140
|
+
placeholder: "Electronics"
|
|
141
|
+
})]
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ D("div", {
|
|
144
|
+
className: "space-y-2",
|
|
145
|
+
children: [/* @__PURE__ */ E(s, {
|
|
146
|
+
htmlFor: "brand",
|
|
147
|
+
children: "Brand"
|
|
148
|
+
}), /* @__PURE__ */ E(e, {
|
|
149
|
+
id: "brand",
|
|
150
|
+
value: a.brand,
|
|
151
|
+
onChange: (e) => c((t) => ({
|
|
152
|
+
...t,
|
|
153
|
+
brand: e.target.value
|
|
154
|
+
})),
|
|
155
|
+
placeholder: "Acme"
|
|
156
|
+
})]
|
|
157
|
+
}),
|
|
158
|
+
/* @__PURE__ */ D("div", {
|
|
159
|
+
className: "space-y-2",
|
|
160
|
+
children: [/* @__PURE__ */ E(s, {
|
|
161
|
+
htmlFor: "weight",
|
|
162
|
+
children: "Weight (kg)"
|
|
163
|
+
}), /* @__PURE__ */ E(e, {
|
|
164
|
+
id: "weight",
|
|
165
|
+
type: "number",
|
|
166
|
+
min: "0",
|
|
167
|
+
step: "0.01",
|
|
168
|
+
value: a.weight,
|
|
169
|
+
onChange: (e) => c((t) => ({
|
|
170
|
+
...t,
|
|
171
|
+
weight: e.target.value
|
|
172
|
+
})),
|
|
173
|
+
placeholder: "0.5"
|
|
174
|
+
})]
|
|
175
|
+
})
|
|
176
|
+
]
|
|
177
|
+
})]
|
|
178
|
+
})] })]
|
|
179
|
+
})]
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function N() {
|
|
183
|
+
let { productId: e } = T(), { basePath: s, navigate: l } = d(), { product: v, isLoading: x, error: C, refetch: w } = b(e), N = () => l?.(t(s, "inventory/products")), P = (e) => l?.(t(s, e));
|
|
184
|
+
return e ? x ? /* @__PURE__ */ E(f, { message: "Loading product details..." }) : C || !v ? /* @__PURE__ */ E(u, {
|
|
185
|
+
title: "Product not found",
|
|
186
|
+
onRetry: w
|
|
187
|
+
}) : /* @__PURE__ */ D(o, {
|
|
188
|
+
title: v.name,
|
|
189
|
+
subtitle: `SKU: ${v.sku}`,
|
|
190
|
+
icon: /* @__PURE__ */ E(_, { size: 24 }),
|
|
191
|
+
headerActions: /* @__PURE__ */ D("div", {
|
|
192
|
+
className: "flex gap-2",
|
|
193
|
+
children: [/* @__PURE__ */ D(p, {
|
|
194
|
+
variant: "outline",
|
|
195
|
+
onClick: N,
|
|
196
|
+
children: [/* @__PURE__ */ E(m, { size: 16 }), " Back"]
|
|
197
|
+
}), /* @__PURE__ */ D(p, { children: [/* @__PURE__ */ E(y, { size: 16 }), " Edit"] })]
|
|
198
|
+
}),
|
|
199
|
+
headerContent: /* @__PURE__ */ D("div", {
|
|
200
|
+
className: "flex gap-2",
|
|
201
|
+
children: [
|
|
202
|
+
/* @__PURE__ */ E(c, {
|
|
203
|
+
variant: "outline",
|
|
204
|
+
children: v.category
|
|
205
|
+
}),
|
|
206
|
+
v.brand && /* @__PURE__ */ E(c, {
|
|
207
|
+
variant: "secondary",
|
|
208
|
+
children: v.brand
|
|
209
|
+
}),
|
|
210
|
+
v.fragile && /* @__PURE__ */ E(c, {
|
|
211
|
+
variant: "destructive",
|
|
212
|
+
children: "Fragile"
|
|
213
|
+
}),
|
|
214
|
+
v.hazardous && /* @__PURE__ */ E(c, {
|
|
215
|
+
variant: "destructive",
|
|
216
|
+
children: "Hazardous"
|
|
217
|
+
}),
|
|
218
|
+
v.temperatureControlled && /* @__PURE__ */ E(c, {
|
|
219
|
+
variant: "secondary",
|
|
220
|
+
children: "Temp Controlled"
|
|
221
|
+
})
|
|
222
|
+
]
|
|
223
|
+
}),
|
|
224
|
+
children: [
|
|
225
|
+
/* @__PURE__ */ E(A, {
|
|
226
|
+
icon: /* @__PURE__ */ E(_, { size: 18 }),
|
|
227
|
+
children: "The catalog record for this item — its dimensions, weight, value and handling flags. These drive how it's packed, priced and routed, so keep them accurate before adding the product to an order or stocking it in a warehouse."
|
|
228
|
+
}),
|
|
229
|
+
/* @__PURE__ */ E(k, {
|
|
230
|
+
storageKey: "movethewheels-product-details",
|
|
231
|
+
steps: [{
|
|
232
|
+
id: "order",
|
|
233
|
+
label: "Add this product to an order",
|
|
234
|
+
description: "Include it on a new delivery.",
|
|
235
|
+
icon: /* @__PURE__ */ E(_, { size: 16 }),
|
|
236
|
+
onClick: () => P("orders/new")
|
|
237
|
+
}, {
|
|
238
|
+
id: "edit",
|
|
239
|
+
label: "Edit product details",
|
|
240
|
+
description: "Update dimensions, value or handling flags.",
|
|
241
|
+
icon: /* @__PURE__ */ E(j, { size: 16 }),
|
|
242
|
+
onClick: () => {}
|
|
243
|
+
}]
|
|
244
|
+
}),
|
|
245
|
+
/* @__PURE__ */ D("div", {
|
|
246
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
247
|
+
children: [/* @__PURE__ */ D("div", {
|
|
248
|
+
className: "lg:col-span-2 space-y-6",
|
|
249
|
+
children: [
|
|
250
|
+
/* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ E(i, { children: "Description" }) }), /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E("p", { children: v.description }) })] }),
|
|
251
|
+
/* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ D(i, {
|
|
252
|
+
className: "flex items-center gap-2",
|
|
253
|
+
children: [/* @__PURE__ */ E(h, { size: 18 }), " Dimensions & Weight"]
|
|
254
|
+
}) }), /* @__PURE__ */ E(r, { children: /* @__PURE__ */ D("div", {
|
|
255
|
+
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
256
|
+
children: [
|
|
257
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
258
|
+
className: "text-sm text-text-secondary",
|
|
259
|
+
children: "Length"
|
|
260
|
+
}), /* @__PURE__ */ D("p", {
|
|
261
|
+
className: "text-2xl font-bold",
|
|
262
|
+
children: [v.dimensions.length, /* @__PURE__ */ D("span", {
|
|
263
|
+
className: "text-sm font-normal",
|
|
264
|
+
children: [" ", v.dimensions.unit]
|
|
265
|
+
})]
|
|
266
|
+
})] }),
|
|
267
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
268
|
+
className: "text-sm text-text-secondary",
|
|
269
|
+
children: "Width"
|
|
270
|
+
}), /* @__PURE__ */ D("p", {
|
|
271
|
+
className: "text-2xl font-bold",
|
|
272
|
+
children: [v.dimensions.width, /* @__PURE__ */ D("span", {
|
|
273
|
+
className: "text-sm font-normal",
|
|
274
|
+
children: [" ", v.dimensions.unit]
|
|
275
|
+
})]
|
|
276
|
+
})] }),
|
|
277
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
278
|
+
className: "text-sm text-text-secondary",
|
|
279
|
+
children: "Height"
|
|
280
|
+
}), /* @__PURE__ */ D("p", {
|
|
281
|
+
className: "text-2xl font-bold",
|
|
282
|
+
children: [v.dimensions.height, /* @__PURE__ */ D("span", {
|
|
283
|
+
className: "text-sm font-normal",
|
|
284
|
+
children: [" ", v.dimensions.unit]
|
|
285
|
+
})]
|
|
286
|
+
})] }),
|
|
287
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
288
|
+
className: "text-sm text-text-secondary",
|
|
289
|
+
children: "Weight"
|
|
290
|
+
}), /* @__PURE__ */ D("p", {
|
|
291
|
+
className: "text-2xl font-bold",
|
|
292
|
+
children: [v.weight, /* @__PURE__ */ E("span", {
|
|
293
|
+
className: "text-sm font-normal",
|
|
294
|
+
children: " kg"
|
|
295
|
+
})]
|
|
296
|
+
})] })
|
|
297
|
+
]
|
|
298
|
+
}) })] }),
|
|
299
|
+
v.attributes.length > 0 && /* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ D(i, {
|
|
300
|
+
className: "flex items-center gap-2",
|
|
301
|
+
children: [/* @__PURE__ */ E(j, { size: 18 }), " Attributes"]
|
|
302
|
+
}) }), /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E("div", {
|
|
303
|
+
className: "grid grid-cols-2 md:grid-cols-3 gap-4",
|
|
304
|
+
children: v.attributes.map((e, t) => /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
305
|
+
className: "text-sm text-text-secondary",
|
|
306
|
+
children: e.name
|
|
307
|
+
}), /* @__PURE__ */ E("p", {
|
|
308
|
+
className: "font-medium",
|
|
309
|
+
children: e.value
|
|
310
|
+
})] }, t))
|
|
311
|
+
}) })] })
|
|
312
|
+
]
|
|
313
|
+
}), /* @__PURE__ */ D("div", {
|
|
314
|
+
className: "space-y-6",
|
|
315
|
+
children: [/* @__PURE__ */ D(O, { children: [
|
|
316
|
+
/* @__PURE__ */ D("h2", {
|
|
317
|
+
className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-3",
|
|
318
|
+
children: [/* @__PURE__ */ E(g, { size: 18 }), " Pricing"]
|
|
319
|
+
}),
|
|
320
|
+
/* @__PURE__ */ E("p", {
|
|
321
|
+
className: "text-3xl font-bold",
|
|
322
|
+
children: S(v.value)
|
|
323
|
+
}),
|
|
324
|
+
/* @__PURE__ */ E("p", {
|
|
325
|
+
className: "text-sm text-text-secondary",
|
|
326
|
+
children: "Unit price"
|
|
327
|
+
})
|
|
328
|
+
] }), /* @__PURE__ */ D(n, { children: [/* @__PURE__ */ E(a, { children: /* @__PURE__ */ E(i, { children: "Identifiers" }) }), /* @__PURE__ */ D(r, {
|
|
329
|
+
className: "space-y-3",
|
|
330
|
+
children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
331
|
+
className: "text-sm text-text-secondary",
|
|
332
|
+
children: "SKU"
|
|
333
|
+
}), /* @__PURE__ */ E("p", {
|
|
334
|
+
className: "font-mono",
|
|
335
|
+
children: v.sku
|
|
336
|
+
})] }), v.barcode && /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
337
|
+
className: "text-sm text-text-secondary",
|
|
338
|
+
children: "Barcode"
|
|
339
|
+
}), /* @__PURE__ */ E("p", {
|
|
340
|
+
className: "font-mono",
|
|
341
|
+
children: v.barcode
|
|
342
|
+
})] })]
|
|
343
|
+
})] })]
|
|
344
|
+
})]
|
|
345
|
+
})
|
|
346
|
+
]
|
|
347
|
+
}) : /* @__PURE__ */ E(M, {});
|
|
348
|
+
}
|
|
349
|
+
//#endregion
|
|
350
|
+
export { N as default };
|
|
@@ -1,41 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { n as l } from "./formatters-_vJlC-47.js";
|
|
10
|
-
import { t as u } from "./navigation-BgnOfsVd.js";
|
|
1
|
+
import { ct as e, i as t, l as n, ot as r } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
import { t as i } from "./DataTable-DmciIKKM.js";
|
|
3
|
+
import { t as a } from "./download-DRXxoiQR.js";
|
|
4
|
+
import { t as o } from "./package-BChUzpJS.js";
|
|
5
|
+
import { t as s } from "./plus-Z76q-FZm.js";
|
|
6
|
+
import { t as c } from "./refresh-cw-DKt6f5T6.js";
|
|
7
|
+
import { i as l } from "./useInventory-DkyiVY_A.js";
|
|
8
|
+
import { n as u } from "./formatters-CF2S2l1m.js";
|
|
11
9
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
10
|
import { CTAOverflowMenu as p, EmphasisPanel as m, PagePurpose as h } from "@burdenoff/fe-libs/ui";
|
|
13
11
|
//#region src/movethewheels/pages/ProductsPage.tsx
|
|
14
12
|
function g() {
|
|
15
|
-
let { basePath: g, navigate: _ } =
|
|
16
|
-
return /* @__PURE__ */ f(
|
|
13
|
+
let { basePath: g, navigate: _ } = r(), { products: v, totalProducts: y, isLoading: b, refetch: x } = l(), S = (t) => _?.(e(g, t));
|
|
14
|
+
return /* @__PURE__ */ f(t, {
|
|
17
15
|
title: "Products",
|
|
18
16
|
subtitle: `${y} products`,
|
|
19
|
-
icon: /* @__PURE__ */ d(
|
|
17
|
+
icon: /* @__PURE__ */ d(o, { size: 24 }),
|
|
20
18
|
headerActions: /* @__PURE__ */ d(p, {
|
|
21
19
|
primary: {
|
|
22
20
|
label: "Add Product",
|
|
23
|
-
icon: /* @__PURE__ */ d(
|
|
24
|
-
onSelect: () =>
|
|
21
|
+
icon: /* @__PURE__ */ d(s, { size: 16 }),
|
|
22
|
+
onSelect: () => S("inventory/products/new")
|
|
25
23
|
},
|
|
26
24
|
actions: [{
|
|
27
25
|
label: "Refresh",
|
|
28
|
-
icon: /* @__PURE__ */ d(
|
|
26
|
+
icon: /* @__PURE__ */ d(c, { size: 16 }),
|
|
29
27
|
onSelect: () => x()
|
|
30
28
|
}, {
|
|
31
29
|
label: "Export",
|
|
32
|
-
icon: /* @__PURE__ */ d(
|
|
30
|
+
icon: /* @__PURE__ */ d(a, { size: 16 }),
|
|
33
31
|
onSelect: () => {}
|
|
34
32
|
}]
|
|
35
33
|
}),
|
|
36
34
|
children: [
|
|
37
35
|
/* @__PURE__ */ d(h, {
|
|
38
|
-
icon: /* @__PURE__ */ d(
|
|
36
|
+
icon: /* @__PURE__ */ d(o, { size: 18 }),
|
|
39
37
|
children: "The catalog of items you ship. Each product's dimensions, weight, value and handling flags (fragile, hazardous, temperature-controlled) drive how it's packed, priced and routed — keep them accurate so shipments are quoted and handled correctly."
|
|
40
38
|
}),
|
|
41
39
|
/* @__PURE__ */ f(m, { children: [/* @__PURE__ */ d("p", {
|
|
@@ -67,7 +65,7 @@ function g() {
|
|
|
67
65
|
})] })
|
|
68
66
|
]
|
|
69
67
|
})] }),
|
|
70
|
-
/* @__PURE__ */ d(
|
|
68
|
+
/* @__PURE__ */ d(i, {
|
|
71
69
|
columns: [
|
|
72
70
|
{
|
|
73
71
|
id: "sku",
|
|
@@ -97,7 +95,7 @@ function g() {
|
|
|
97
95
|
header: "Category",
|
|
98
96
|
accessorKey: "category",
|
|
99
97
|
sortable: !0,
|
|
100
|
-
cell: (e) => /* @__PURE__ */ d(
|
|
98
|
+
cell: (e) => /* @__PURE__ */ d(n, {
|
|
101
99
|
variant: "outline",
|
|
102
100
|
children: e.category
|
|
103
101
|
})
|
|
@@ -121,7 +119,7 @@ function g() {
|
|
|
121
119
|
sortable: !0,
|
|
122
120
|
cell: (e) => /* @__PURE__ */ d("span", {
|
|
123
121
|
className: "font-medium",
|
|
124
|
-
children:
|
|
122
|
+
children: u(e.value)
|
|
125
123
|
})
|
|
126
124
|
},
|
|
127
125
|
{
|
|
@@ -130,17 +128,17 @@ function g() {
|
|
|
130
128
|
cell: (e) => /* @__PURE__ */ f("div", {
|
|
131
129
|
className: "flex gap-1",
|
|
132
130
|
children: [
|
|
133
|
-
e.fragile && /* @__PURE__ */ d(
|
|
131
|
+
e.fragile && /* @__PURE__ */ d(n, {
|
|
134
132
|
variant: "destructive",
|
|
135
133
|
className: "text-xs",
|
|
136
134
|
children: "Fragile"
|
|
137
135
|
}),
|
|
138
|
-
e.hazardous && /* @__PURE__ */ d(
|
|
136
|
+
e.hazardous && /* @__PURE__ */ d(n, {
|
|
139
137
|
variant: "destructive",
|
|
140
138
|
className: "text-xs",
|
|
141
139
|
children: "Hazardous"
|
|
142
140
|
}),
|
|
143
|
-
e.temperatureControlled && /* @__PURE__ */ d(
|
|
141
|
+
e.temperatureControlled && /* @__PURE__ */ d(n, {
|
|
144
142
|
variant: "secondary",
|
|
145
143
|
className: "text-xs",
|
|
146
144
|
children: "Temp Control"
|