@burdenoff/microfe-movethewheels 2026.703.4 → 2026.703.6
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-3YOnHO9Y.js → AIAssistantPage-BmILdHgO.js} +16 -15
- package/dist/AnalyticsPage-BSlsiSDE.js +194 -0
- package/dist/{CreateOrderPage-DRAgGo9i.js → CreateOrderPage-DaCgVaO3.js} +40 -40
- package/dist/{CustomerDetailsPage-BCeMmOFe.js → CustomerDetailsPage-DErpbafW.js} +71 -71
- package/dist/CustomersPage-C1lRU6xs.js +205 -0
- package/dist/DashboardPage-Q5-5EKAU.js +542 -0
- package/dist/{DataTable-XvUcTjwi.js → DataTable-KjzbwnRL.js} +31 -31
- package/dist/{DocumentsCard-U2lSe-cn.js → DocumentsCard-T9y6cv4-.js} +25 -25
- package/dist/{DriverDetailsPage-BQrYd_Lp.js → DriverDetailsPage-DnHGkDC7.js} +64 -64
- package/dist/DriversPage-C0ujWVOn.js +221 -0
- package/dist/FinancePage-CA2XEgsQ.js +175 -0
- package/dist/{FleetPage-3ZHsB-TN.js → FleetPage-DrvXW7wK.js} +22 -22
- package/dist/{FormError-cuLV2jVD.js → FormError-CRsMP7TQ.js} +1 -1
- package/dist/{ImportExportPage-C6f7DqhM.js → ImportExportPage-Cac9HjFx.js} +12 -12
- package/dist/InventoryPage-Ezf4gqKI.js +259 -0
- package/dist/LiveTrackingPage-CzbVwDqK.js +429 -0
- package/dist/{MarketplacePage-Bh_2ns4v.js → MarketplacePage-BHDmSQmo.js} +116 -116
- package/dist/MetricCard-DQlDNqmK.js +191 -0
- package/dist/{Notice-CSoDYKw9.js → Notice-GmA7JDR3.js} +2 -2
- package/dist/{OrderDetailsPage-zCj0lW0j.js → OrderDetailsPage-CR0Wc1aN.js} +58 -58
- package/dist/OrdersListPage-C8Bu6wXM.js +386 -0
- package/dist/{PageLayout-D4LDHJJq.js → PageLayout-DX1Ou6V6.js} +164 -134
- package/dist/{ProductDetailsPage-wsxAQkA0.js → ProductDetailsPage-B_ns2MOe.js} +55 -55
- package/dist/ProductsPage-c92BsEoA.js +186 -0
- package/dist/ReportsPage-CPLXtLT2.js +377 -0
- package/dist/{RouteDetailsPage-DyMJE9AS.js → RouteDetailsPage-DOfcRiFv.js} +208 -181
- package/dist/{RoutesPage-Dtc669yc.js → RoutesPage-BZGublby.js} +12 -12
- package/dist/{SettingsPage-CpH9xhQg.js → SettingsPage-5cweX_xh.js} +15 -15
- package/dist/Sparkline-zSXvG6vA.js +16729 -0
- package/dist/{StatusBadge-C87mDpDP.js → StatusBadge-oZjownr1.js} +7 -7
- package/dist/TrackingPage-Ln9qVflK.js +368 -0
- package/dist/{VehicleDetailsPage-DldYNsYV.js → VehicleDetailsPage-CrkzE0dN.js} +53 -53
- package/dist/VehiclesPage-CTQWH7af.js +184 -0
- package/dist/{WarehouseDetailsPage-CMG7or6G.js → WarehouseDetailsPage-CwDLaG65.js} +64 -64
- package/dist/WarehousesPage-KW02DvZg.js +182 -0
- package/dist/{arrow-left-n48Y-Wis.js → arrow-left-DJDw_Yqv.js} +1 -1
- package/dist/{arrow-right-Q3XQpTPR.js → arrow-right-Cb2fLTPJ.js} +1 -1
- package/dist/{arrow-up-xNF1zJUG.js → arrow-up-PxaOIyiT.js} +1 -1
- package/dist/{box-Eu05PXDh.js → box-hSJVtvGf.js} +1 -1
- package/dist/boxes-DDnxEkT5.js +54 -0
- package/dist/{chart-column-ouzgxIv_.js → chart-column-xXgAZvRl.js} +1 -1
- package/dist/charts-CfCwQg6o.js +2018 -0
- package/dist/{chevron-left-B2_r0Elx.js → chevron-left-dhEGJYdh.js} +1 -1
- package/dist/{chevron-right-eV4LjaSi.js → chevron-right-Cud2NDvm.js} +1 -1
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/{circle-alert-Bzh2DBSF.js → circle-alert-Rx0p3D5w.js} +1 -1
- package/dist/circle-check-BCxRFdFo.js +13 -0
- package/dist/{circle-check-big-CGMSpQmD.js → circle-check-big-BcIJ8xjx.js} +1 -1
- package/dist/{clock-Bl3ptexL.js → clock-B2_YxJgB.js} +1 -1
- package/dist/{dollar-sign-CAVU95SO.js → dollar-sign-CQmAICv4.js} +1 -1
- package/dist/{download-C5NbvVDc.js → download-CG4Tponq.js} +1 -1
- package/dist/{file-text-D-1uvLZG.js → file-text-CzH-zMub.js} +1 -1
- package/dist/{filter-DUfUg6BO.js → filter-C0u2Lwfn.js} +1 -1
- package/dist/{fuel-B6_lnKDs.js → fuel-C2KELcM-.js} +1 -1
- package/dist/index.css +2 -0
- package/dist/index.js +214 -225
- package/dist/{map-C-M-FQLR.js → map-FuPu5aTw.js} +1 -1
- package/dist/{map-pin-Dznl5l40.js → map-pin-czpLv9uy.js} +1 -1
- package/dist/mapMarkers-NCV9MRKR.js +28 -0
- package/dist/maps-D9m7PKrs.js +5070 -0
- package/dist/{navigation-BJSJl-VG.js → navigation-D5_pdCSS.js} +1 -1
- package/dist/{package-CcRttV2N.js → package-B0sdi6lU.js} +1 -1
- package/dist/{phone-DVSZHt_j.js → phone-V2nuzPu9.js} +1 -1
- package/dist/{plus-C_XZDwBz.js → plus-BqQxkfoU.js} +1 -1
- package/dist/{refresh-cw-CfgN67l3.js → refresh-cw-CEOAPEcV.js} +1 -1
- package/dist/route-CZWcW-Dw.js +22 -0
- package/dist/{save-DJE8Fpdv.js → save-DDFvrxWl.js} +1 -1
- package/dist/{search-D_VyGcZT.js → search-D7Ya6jxj.js} +1 -1
- package/dist/{square-pen-D-6JYrVQ.js → square-pen-DoZZS4Lw.js} +1 -1
- package/dist/{star-BpRlUZuU.js → star-B7PgVu5j.js} +1 -1
- package/dist/{store-B-8HMuyZ.js → store-YVzcIG4A.js} +1 -1
- package/dist/{trash-2-8vmv-XV_.js → trash-2-BegnBzwI.js} +1 -1
- package/dist/{trending-up-Dz6PqPRj.js → trending-up-DBd3XNdb.js} +1 -1
- package/dist/{triangle-alert-D7Y3J_4z.js → triangle-alert-Bxk3Kgs6.js} +1 -1
- package/dist/{truck-D-y2IDzv.js → truck-Clrn0oHp.js} +1 -1
- package/dist/{upload-CHZofOqb.js → upload-Df5JmMwH.js} +1 -1
- package/dist/{useAssistant-DVW4QgQb.js → useAssistant-Cb8nnIVC.js} +11 -28
- package/dist/{useCustomers-BPW4__PR.js → useCustomers-Dq2IR2HQ.js} +1 -1
- package/dist/{useFleet-ChBkxAd6.js → useFleet-CapnWBcA.js} +1 -1
- package/dist/{useImportExport-DrPDHEDK.js → useImportExport-BoGzrlJy.js} +1 -1
- package/dist/{useInventory-CAAVMRp6.js → useInventory-Ci6M2d9f.js} +1 -1
- package/dist/{useOrders-B465S2nt.js → useOrders-BuQU1OHX.js} +1 -1
- package/dist/{useReports-jQ3GpNOm.js → useReports-DIx8W7CO.js} +1 -1
- package/dist/{useRoutes-hS3d5-xr.js → useRoutes-D7EvI_pm.js} +1 -1
- package/dist/{useSettings-BB8X2RLh.js → useSettings-BhX251UQ.js} +6 -6
- package/dist/{useTracking-RjGz9PZG.js → useTracking-C40jmZ6W.js} +3 -3
- package/dist/{user-DzfTn4dE.js → user-BlcJrbtE.js} +1 -1
- package/dist/{user-check-BEKRCi7v.js → user-check-DtnQmimP.js} +1 -1
- package/dist/{users-CCrq-w0C.js → users-Cvwko-Dx.js} +1 -1
- package/dist/{warehouse-CaqfmMKh.js → warehouse-LWLVTk6G.js} +1 -1
- package/dist/{wrench-q_rgJfaP.js → wrench-Cme0RbyR.js} +1 -1
- package/dist/{x-tMeDMcCw.js → x-D8C9Pg5V.js} +1 -1
- package/package.json +5 -1
- package/src/movethewheels/components/GlassPanel.tsx +71 -0
- package/src/movethewheels/components/MetricCard.tsx +171 -73
- package/src/movethewheels/components/StatusBadge.tsx +7 -6
- package/src/movethewheels/components/charts/ChartShell.tsx +78 -0
- package/src/movethewheels/components/charts/Sparkline.tsx +85 -0
- package/src/movethewheels/components/charts/StatusDonut.tsx +115 -0
- package/src/movethewheels/components/charts/TrendChart.tsx +179 -0
- package/src/movethewheels/components/charts/VolumeBar.tsx +97 -0
- package/src/movethewheels/components/charts/chartTokens.ts +43 -0
- package/src/movethewheels/components/charts/index.ts +9 -0
- package/src/movethewheels/components/index.ts +44 -1
- package/src/movethewheels/components/maps/LogisticsMap.tsx +94 -0
- package/src/movethewheels/components/maps/MapCanvas.tsx +118 -0
- package/src/movethewheels/components/maps/RouteMap.tsx +71 -0
- package/src/movethewheels/components/maps/TrackingMap.tsx +102 -0
- package/src/movethewheels/components/maps/index.ts +16 -0
- package/src/movethewheels/components/maps/leaflet-setup.ts +124 -0
- package/src/movethewheels/components/maps/map-markers.css +121 -0
- package/src/movethewheels/hooks/useAnalytics.ts +14 -4
- package/src/movethewheels/pages/AnalyticsPage.tsx +93 -73
- package/src/movethewheels/pages/CreateOrderPage.tsx +4 -4
- package/src/movethewheels/pages/CustomersPage.tsx +29 -20
- package/src/movethewheels/pages/DashboardPage.tsx +238 -12
- package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/DriversPage.tsx +35 -24
- package/src/movethewheels/pages/FinancePage.tsx +68 -30
- package/src/movethewheels/pages/InventoryPage.tsx +15 -3
- package/src/movethewheels/pages/LiveTrackingPage.tsx +124 -16
- package/src/movethewheels/pages/OrdersListPage.tsx +46 -38
- package/src/movethewheels/pages/ProductsPage.tsx +28 -24
- package/src/movethewheels/pages/ReportsPage.tsx +23 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +46 -7
- package/src/movethewheels/pages/SettingsPage.tsx +2 -2
- package/src/movethewheels/pages/TrackingPage.tsx +76 -6
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/VehiclesPage.tsx +34 -24
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/WarehousesPage.tsx +28 -22
- package/src/movethewheels/types/index.ts +1 -1
- package/src/movethewheels/utils/graphqlClient.ts +81 -31
- package/src/movethewheels/utils/mapMarkers.ts +58 -0
- package/dist/AnalyticsPage-CMpI1070.js +0 -215
- package/dist/CustomersPage-CaNBMXmM.js +0 -172
- package/dist/DashboardPage-DIKlXde3.js +0 -387
- package/dist/DriversPage-PYmdFiby.js +0 -176
- package/dist/FinancePage-Cwh9Bw4M.js +0 -136
- package/dist/InventoryPage-DpiqVu1v.js +0 -253
- package/dist/LiveTrackingPage-FAzzlVnX.js +0 -379
- package/dist/MetricCard-CVBVpu7o.js +0 -146
- package/dist/OrdersListPage-CAMsuUck.js +0 -384
- package/dist/ProductsPage-DC5qDLfz.js +0 -180
- package/dist/ReportsPage-BwUJ37eO.js +0 -356
- package/dist/TrackingPage-DaNEFG_h.js +0 -325
- package/dist/VehiclesPage-BFw13iMt.js +0 -176
- package/dist/WarehousesPage-Wkytnt86.js +0 -173
- package/dist/useAnalytics-D7HW2XRb.js +0 -347
- /package/dist/{formatters-BQr-aR5W.js → formatters-FWJDwTFv.js} +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import { t as m } from "./arrow-left-
|
|
3
|
-
import { t as h } from "./box-
|
|
4
|
-
import { t as g } from "./dollar-sign-
|
|
5
|
-
import { t as _ } from "./package-
|
|
6
|
-
import { t as v } from "./save-
|
|
7
|
-
import { t as y } from "./square-pen-
|
|
8
|
-
import { r as b, t as x } from "./useInventory-
|
|
9
|
-
import { t as S } from "./FormError-
|
|
10
|
-
import { n as C } from "./formatters-
|
|
1
|
+
import { A as e, d as t, f as n, g as r, h as i, i as a, j as o, l as s, lt as c, n as l, r as u, st as d, u as f, ut as p } from "./PageLayout-DX1Ou6V6.js";
|
|
2
|
+
import { t as m } from "./arrow-left-DJDw_Yqv.js";
|
|
3
|
+
import { t as h } from "./box-hSJVtvGf.js";
|
|
4
|
+
import { t as g } from "./dollar-sign-CQmAICv4.js";
|
|
5
|
+
import { t as _ } from "./package-B0sdi6lU.js";
|
|
6
|
+
import { t as v } from "./save-DDFvrxWl.js";
|
|
7
|
+
import { t as y } from "./square-pen-DoZZS4Lw.js";
|
|
8
|
+
import { r as b, t as x } from "./useInventory-Ci6M2d9f.js";
|
|
9
|
+
import { t as S } from "./FormError-CRsMP7TQ.js";
|
|
10
|
+
import { n as C } from "./formatters-FWJDwTFv.js";
|
|
11
11
|
import { useState as w } from "react";
|
|
12
12
|
import { useParams as T } from "react-router-dom";
|
|
13
13
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
14
14
|
import { EmphasisPanel as O, NextSteps as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region node_modules/lucide-react/dist/esm/icons/tag.js
|
|
16
|
-
var j =
|
|
16
|
+
var j = p("Tag", [["path", {
|
|
17
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
18
|
key: "vktsd0"
|
|
19
19
|
}], ["circle", {
|
|
@@ -26,43 +26,43 @@ var j = l("Tag", [["path", {
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/movethewheels/pages/ProductDetailsPage.tsx
|
|
28
28
|
function M() {
|
|
29
|
-
let { basePath:
|
|
29
|
+
let { basePath: t, navigate: n } = d(), { createProduct: r } = x(), [i, s] = w({
|
|
30
30
|
name: "",
|
|
31
31
|
sku: "",
|
|
32
32
|
category: "",
|
|
33
33
|
brand: "",
|
|
34
34
|
weight: ""
|
|
35
|
-
}), [l, u] = w(!1), [
|
|
36
|
-
if (e.preventDefault(), !
|
|
35
|
+
}), [l, u] = w(!1), [p, h] = w(null), g = () => n?.(c(t, "inventory/products")), y = async (e) => {
|
|
36
|
+
if (e.preventDefault(), !i.name.trim() || !i.sku.trim()) {
|
|
37
37
|
h("Product name and SKU are required.");
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
40
|
u(!0), h(null);
|
|
41
41
|
try {
|
|
42
|
-
let e =
|
|
43
|
-
name:
|
|
44
|
-
sku:
|
|
45
|
-
category:
|
|
46
|
-
brand:
|
|
42
|
+
let e = i.weight.trim() ? Number(i.weight) : void 0, a = await r({
|
|
43
|
+
name: i.name.trim(),
|
|
44
|
+
sku: i.sku.trim(),
|
|
45
|
+
category: i.category.trim() || void 0,
|
|
46
|
+
brand: i.brand.trim() || void 0,
|
|
47
47
|
weight: e !== void 0 && !Number.isNaN(e) ? e : void 0
|
|
48
48
|
});
|
|
49
|
-
|
|
49
|
+
n?.(c(t, `inventory/products/${a.id}`));
|
|
50
50
|
} catch (e) {
|
|
51
51
|
console.error("Failed to create product:", e), h(e instanceof Error ? e.message : "Failed to create product. Please try again."), u(!1);
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
return /* @__PURE__ */ D(
|
|
54
|
+
return /* @__PURE__ */ D(a, {
|
|
55
55
|
title: "Add Product",
|
|
56
56
|
subtitle: "Add an item to your catalog",
|
|
57
57
|
icon: /* @__PURE__ */ E(_, { size: 24 }),
|
|
58
58
|
headerActions: /* @__PURE__ */ D("div", {
|
|
59
59
|
className: "flex gap-2",
|
|
60
|
-
children: [/* @__PURE__ */ D(
|
|
60
|
+
children: [/* @__PURE__ */ D(f, {
|
|
61
61
|
variant: "outline",
|
|
62
62
|
onClick: g,
|
|
63
63
|
disabled: l,
|
|
64
64
|
children: [/* @__PURE__ */ E(m, { size: 16 }), " Cancel"]
|
|
65
|
-
}), /* @__PURE__ */ D(
|
|
65
|
+
}), /* @__PURE__ */ D(f, {
|
|
66
66
|
onClick: y,
|
|
67
67
|
disabled: l,
|
|
68
68
|
children: [
|
|
@@ -78,7 +78,7 @@ function M() {
|
|
|
78
78
|
}), /* @__PURE__ */ D("form", {
|
|
79
79
|
onSubmit: y,
|
|
80
80
|
className: "max-w-2xl space-y-6",
|
|
81
|
-
children: [/* @__PURE__ */ E(S, { message:
|
|
81
|
+
children: [/* @__PURE__ */ E(S, { message: p }), /* @__PURE__ */ D(O, { children: [/* @__PURE__ */ E("h2", {
|
|
82
82
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
83
83
|
children: "Product Details"
|
|
84
84
|
}), /* @__PURE__ */ D("div", {
|
|
@@ -87,7 +87,7 @@ function M() {
|
|
|
87
87
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
88
88
|
children: [/* @__PURE__ */ D("div", {
|
|
89
89
|
className: "space-y-2",
|
|
90
|
-
children: [/* @__PURE__ */ D(
|
|
90
|
+
children: [/* @__PURE__ */ D(o, {
|
|
91
91
|
htmlFor: "name",
|
|
92
92
|
children: ["Name ", /* @__PURE__ */ E("span", {
|
|
93
93
|
className: "text-status-error-text",
|
|
@@ -95,8 +95,8 @@ function M() {
|
|
|
95
95
|
})]
|
|
96
96
|
}), /* @__PURE__ */ E(e, {
|
|
97
97
|
id: "name",
|
|
98
|
-
value:
|
|
99
|
-
onChange: (e) =>
|
|
98
|
+
value: i.name,
|
|
99
|
+
onChange: (e) => s((t) => ({
|
|
100
100
|
...t,
|
|
101
101
|
name: e.target.value
|
|
102
102
|
})),
|
|
@@ -105,7 +105,7 @@ function M() {
|
|
|
105
105
|
})]
|
|
106
106
|
}), /* @__PURE__ */ D("div", {
|
|
107
107
|
className: "space-y-2",
|
|
108
|
-
children: [/* @__PURE__ */ D(
|
|
108
|
+
children: [/* @__PURE__ */ D(o, {
|
|
109
109
|
htmlFor: "sku",
|
|
110
110
|
children: ["SKU ", /* @__PURE__ */ E("span", {
|
|
111
111
|
className: "text-status-error-text",
|
|
@@ -113,8 +113,8 @@ function M() {
|
|
|
113
113
|
})]
|
|
114
114
|
}), /* @__PURE__ */ E(e, {
|
|
115
115
|
id: "sku",
|
|
116
|
-
value:
|
|
117
|
-
onChange: (e) =>
|
|
116
|
+
value: i.sku,
|
|
117
|
+
onChange: (e) => s((t) => ({
|
|
118
118
|
...t,
|
|
119
119
|
sku: e.target.value
|
|
120
120
|
})),
|
|
@@ -127,13 +127,13 @@ function M() {
|
|
|
127
127
|
children: [
|
|
128
128
|
/* @__PURE__ */ D("div", {
|
|
129
129
|
className: "space-y-2",
|
|
130
|
-
children: [/* @__PURE__ */ E(
|
|
130
|
+
children: [/* @__PURE__ */ E(o, {
|
|
131
131
|
htmlFor: "category",
|
|
132
132
|
children: "Category"
|
|
133
133
|
}), /* @__PURE__ */ E(e, {
|
|
134
134
|
id: "category",
|
|
135
|
-
value:
|
|
136
|
-
onChange: (e) =>
|
|
135
|
+
value: i.category,
|
|
136
|
+
onChange: (e) => s((t) => ({
|
|
137
137
|
...t,
|
|
138
138
|
category: e.target.value
|
|
139
139
|
})),
|
|
@@ -142,13 +142,13 @@ function M() {
|
|
|
142
142
|
}),
|
|
143
143
|
/* @__PURE__ */ D("div", {
|
|
144
144
|
className: "space-y-2",
|
|
145
|
-
children: [/* @__PURE__ */ E(
|
|
145
|
+
children: [/* @__PURE__ */ E(o, {
|
|
146
146
|
htmlFor: "brand",
|
|
147
147
|
children: "Brand"
|
|
148
148
|
}), /* @__PURE__ */ E(e, {
|
|
149
149
|
id: "brand",
|
|
150
|
-
value:
|
|
151
|
-
onChange: (e) =>
|
|
150
|
+
value: i.brand,
|
|
151
|
+
onChange: (e) => s((t) => ({
|
|
152
152
|
...t,
|
|
153
153
|
brand: e.target.value
|
|
154
154
|
})),
|
|
@@ -157,7 +157,7 @@ function M() {
|
|
|
157
157
|
}),
|
|
158
158
|
/* @__PURE__ */ D("div", {
|
|
159
159
|
className: "space-y-2",
|
|
160
|
-
children: [/* @__PURE__ */ E(
|
|
160
|
+
children: [/* @__PURE__ */ E(o, {
|
|
161
161
|
htmlFor: "weight",
|
|
162
162
|
children: "Weight (kg)"
|
|
163
163
|
}), /* @__PURE__ */ E(e, {
|
|
@@ -165,8 +165,8 @@ function M() {
|
|
|
165
165
|
type: "number",
|
|
166
166
|
min: "0",
|
|
167
167
|
step: "0.01",
|
|
168
|
-
value:
|
|
169
|
-
onChange: (e) =>
|
|
168
|
+
value: i.weight,
|
|
169
|
+
onChange: (e) => s((t) => ({
|
|
170
170
|
...t,
|
|
171
171
|
weight: e.target.value
|
|
172
172
|
})),
|
|
@@ -180,42 +180,42 @@ function M() {
|
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
function N() {
|
|
183
|
-
let { productId: e } = T(), { basePath:
|
|
184
|
-
return e ? x ? /* @__PURE__ */ E(
|
|
183
|
+
let { productId: e } = T(), { basePath: o, navigate: p } = d(), { product: v, isLoading: x, error: S, refetch: w } = b(e), N = () => p?.(c(o, "inventory/products")), P = (e) => p?.(c(o, e));
|
|
184
|
+
return e ? x ? /* @__PURE__ */ E(u, { message: "Loading product details..." }) : S || !v ? /* @__PURE__ */ E(l, {
|
|
185
185
|
title: "Product not found",
|
|
186
186
|
onRetry: w
|
|
187
|
-
}) : /* @__PURE__ */ D(
|
|
187
|
+
}) : /* @__PURE__ */ D(a, {
|
|
188
188
|
title: v.name,
|
|
189
189
|
subtitle: `SKU: ${v.sku}`,
|
|
190
190
|
icon: /* @__PURE__ */ E(_, { size: 24 }),
|
|
191
191
|
headerActions: /* @__PURE__ */ D("div", {
|
|
192
192
|
className: "flex gap-2",
|
|
193
|
-
children: [/* @__PURE__ */ D(
|
|
193
|
+
children: [/* @__PURE__ */ D(f, {
|
|
194
194
|
variant: "outline",
|
|
195
195
|
onClick: N,
|
|
196
196
|
children: [/* @__PURE__ */ E(m, { size: 16 }), " Back"]
|
|
197
|
-
}), /* @__PURE__ */ D(
|
|
197
|
+
}), /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(y, { size: 16 }), " Edit"] })]
|
|
198
198
|
}),
|
|
199
199
|
headerContent: /* @__PURE__ */ D("div", {
|
|
200
200
|
className: "flex gap-2",
|
|
201
201
|
children: [
|
|
202
|
-
/* @__PURE__ */ E(
|
|
202
|
+
/* @__PURE__ */ E(s, {
|
|
203
203
|
variant: "outline",
|
|
204
204
|
children: v.category
|
|
205
205
|
}),
|
|
206
|
-
v.brand && /* @__PURE__ */ E(
|
|
206
|
+
v.brand && /* @__PURE__ */ E(s, {
|
|
207
207
|
variant: "secondary",
|
|
208
208
|
children: v.brand
|
|
209
209
|
}),
|
|
210
|
-
v.fragile && /* @__PURE__ */ E(
|
|
210
|
+
v.fragile && /* @__PURE__ */ E(s, {
|
|
211
211
|
variant: "destructive",
|
|
212
212
|
children: "Fragile"
|
|
213
213
|
}),
|
|
214
|
-
v.hazardous && /* @__PURE__ */ E(
|
|
214
|
+
v.hazardous && /* @__PURE__ */ E(s, {
|
|
215
215
|
variant: "destructive",
|
|
216
216
|
children: "Hazardous"
|
|
217
217
|
}),
|
|
218
|
-
v.temperatureControlled && /* @__PURE__ */ E(
|
|
218
|
+
v.temperatureControlled && /* @__PURE__ */ E(s, {
|
|
219
219
|
variant: "secondary",
|
|
220
220
|
children: "Temp Controlled"
|
|
221
221
|
})
|
|
@@ -247,11 +247,11 @@ function N() {
|
|
|
247
247
|
children: [/* @__PURE__ */ D("div", {
|
|
248
248
|
className: "lg:col-span-2 space-y-6",
|
|
249
249
|
children: [
|
|
250
|
-
/* @__PURE__ */ D(
|
|
251
|
-
/* @__PURE__ */ D(
|
|
250
|
+
/* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ E(r, { children: "Description" }) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E("p", { children: v.description }) })] }),
|
|
251
|
+
/* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ D(r, {
|
|
252
252
|
className: "flex items-center gap-2",
|
|
253
253
|
children: [/* @__PURE__ */ E(h, { size: 18 }), " Dimensions & Weight"]
|
|
254
|
-
}) }), /* @__PURE__ */ E(
|
|
254
|
+
}) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ D("div", {
|
|
255
255
|
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
256
256
|
children: [
|
|
257
257
|
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
@@ -296,10 +296,10 @@ function N() {
|
|
|
296
296
|
})] })
|
|
297
297
|
]
|
|
298
298
|
}) })] }),
|
|
299
|
-
v.attributes.length > 0 && /* @__PURE__ */ D(
|
|
299
|
+
v.attributes.length > 0 && /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ D(r, {
|
|
300
300
|
className: "flex items-center gap-2",
|
|
301
301
|
children: [/* @__PURE__ */ E(j, { size: 18 }), " Attributes"]
|
|
302
|
-
}) }), /* @__PURE__ */ E(
|
|
302
|
+
}) }), /* @__PURE__ */ E(n, { children: /* @__PURE__ */ E("div", {
|
|
303
303
|
className: "grid grid-cols-2 md:grid-cols-3 gap-4",
|
|
304
304
|
children: v.attributes.map((e, t) => /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
305
305
|
className: "text-sm text-text-secondary",
|
|
@@ -325,7 +325,7 @@ function N() {
|
|
|
325
325
|
className: "text-sm text-text-secondary",
|
|
326
326
|
children: "Unit price"
|
|
327
327
|
})
|
|
328
|
-
] }), /* @__PURE__ */ D(
|
|
328
|
+
] }), /* @__PURE__ */ D(t, { children: [/* @__PURE__ */ E(i, { children: /* @__PURE__ */ E(r, { children: "Identifiers" }) }), /* @__PURE__ */ D(n, {
|
|
329
329
|
className: "space-y-3",
|
|
330
330
|
children: [/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
331
331
|
className: "text-sm text-text-secondary",
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { i as e, l as t, lt as n, st as r, ut as i } from "./PageLayout-DX1Ou6V6.js";
|
|
2
|
+
import { t as a } from "./DataTable-KjzbwnRL.js";
|
|
3
|
+
import { t as o } from "./download-CG4Tponq.js";
|
|
4
|
+
import { t as s } from "./package-B0sdi6lU.js";
|
|
5
|
+
import { t as c } from "./plus-BqQxkfoU.js";
|
|
6
|
+
import { t as l } from "./refresh-cw-CEOAPEcV.js";
|
|
7
|
+
import { t as u } from "./triangle-alert-Bxk3Kgs6.js";
|
|
8
|
+
import { a as d, i as f } from "./useInventory-Ci6M2d9f.js";
|
|
9
|
+
import { r as p, t as m } from "./MetricCard-DQlDNqmK.js";
|
|
10
|
+
import { n as h } from "./formatters-FWJDwTFv.js";
|
|
11
|
+
import { useState as g } from "react";
|
|
12
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
13
|
+
import { CTAOverflowMenu as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
//#region node_modules/lucide-react/dist/esm/icons/thermometer.js
|
|
15
|
+
var x = i("Thermometer", [["path", {
|
|
16
|
+
d: "M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",
|
|
17
|
+
key: "17jzev"
|
|
18
|
+
}]]);
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/movethewheels/pages/ProductsPage.tsx
|
|
21
|
+
function S() {
|
|
22
|
+
let { basePath: i, navigate: S } = r(), [C, w] = g(0), [T, E] = g(25), { products: D, hasMore: O, isLoading: k, refetch: A } = d({
|
|
23
|
+
limit: T,
|
|
24
|
+
offset: C * T
|
|
25
|
+
}), { stats: j } = f(), M = (e) => S?.(n(i, e));
|
|
26
|
+
return /* @__PURE__ */ v(e, {
|
|
27
|
+
title: "Products",
|
|
28
|
+
subtitle: `${j.total} products`,
|
|
29
|
+
icon: /* @__PURE__ */ _(s, { size: 24 }),
|
|
30
|
+
headerActions: /* @__PURE__ */ _(y, {
|
|
31
|
+
primary: {
|
|
32
|
+
label: "Add Product",
|
|
33
|
+
icon: /* @__PURE__ */ _(c, { size: 16 }),
|
|
34
|
+
onSelect: () => M("inventory/products/new")
|
|
35
|
+
},
|
|
36
|
+
actions: [{
|
|
37
|
+
label: "Refresh",
|
|
38
|
+
icon: /* @__PURE__ */ _(l, { size: 16 }),
|
|
39
|
+
onSelect: () => A()
|
|
40
|
+
}, {
|
|
41
|
+
label: "Export",
|
|
42
|
+
icon: /* @__PURE__ */ _(o, { size: 16 }),
|
|
43
|
+
onSelect: () => M("import-export")
|
|
44
|
+
}]
|
|
45
|
+
}),
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ _(b, {
|
|
48
|
+
icon: /* @__PURE__ */ _(s, { size: 18 }),
|
|
49
|
+
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."
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
52
|
+
className: "mb-3 text-sm font-medium text-text-secondary",
|
|
53
|
+
children: "Catalog at a glance"
|
|
54
|
+
}), /* @__PURE__ */ v(p, {
|
|
55
|
+
columns: 3,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ _(m, {
|
|
58
|
+
label: "Total products",
|
|
59
|
+
value: j.total,
|
|
60
|
+
icon: /* @__PURE__ */ _(s, { size: 20 }),
|
|
61
|
+
accent: "brand"
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ _(m, {
|
|
64
|
+
label: "Special handling",
|
|
65
|
+
value: j.specialHandling,
|
|
66
|
+
icon: /* @__PURE__ */ _(u, { size: 20 }),
|
|
67
|
+
accent: "warning",
|
|
68
|
+
subtitle: "Fragile or hazardous"
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ _(m, {
|
|
71
|
+
label: "Temp-controlled",
|
|
72
|
+
value: j.temperatureControlled,
|
|
73
|
+
icon: /* @__PURE__ */ _(x, { size: 20 }),
|
|
74
|
+
accent: "blue"
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
})] }),
|
|
78
|
+
/* @__PURE__ */ _(a, {
|
|
79
|
+
columns: [
|
|
80
|
+
{
|
|
81
|
+
id: "sku",
|
|
82
|
+
header: "SKU",
|
|
83
|
+
accessorKey: "sku",
|
|
84
|
+
sortable: !0,
|
|
85
|
+
cell: (e) => /* @__PURE__ */ _("span", {
|
|
86
|
+
className: "font-mono",
|
|
87
|
+
children: e.sku
|
|
88
|
+
})
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "name",
|
|
92
|
+
header: "Product Name",
|
|
93
|
+
accessorKey: "name",
|
|
94
|
+
sortable: !0,
|
|
95
|
+
cell: (e) => /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
96
|
+
className: "font-medium",
|
|
97
|
+
children: e.name
|
|
98
|
+
}), /* @__PURE__ */ _("p", {
|
|
99
|
+
className: "text-sm text-text-secondary line-clamp-1",
|
|
100
|
+
children: e.description
|
|
101
|
+
})] })
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: "category",
|
|
105
|
+
header: "Category",
|
|
106
|
+
accessorKey: "category",
|
|
107
|
+
sortable: !0,
|
|
108
|
+
cell: (e) => /* @__PURE__ */ _(t, {
|
|
109
|
+
variant: "outline",
|
|
110
|
+
children: e.category
|
|
111
|
+
})
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: "dimensions",
|
|
115
|
+
header: "Dimensions",
|
|
116
|
+
cell: (e) => `${e.dimensions.length}x${e.dimensions.width}x${e.dimensions.height} ${e.dimensions.unit}`
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: "weight",
|
|
120
|
+
header: "Weight",
|
|
121
|
+
accessorKey: "weight",
|
|
122
|
+
sortable: !0,
|
|
123
|
+
cell: (e) => `${e.weight} kg`
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "value",
|
|
127
|
+
header: "Value",
|
|
128
|
+
accessorKey: "value",
|
|
129
|
+
sortable: !0,
|
|
130
|
+
cell: (e) => /* @__PURE__ */ _("span", {
|
|
131
|
+
className: "font-medium",
|
|
132
|
+
children: h(e.value)
|
|
133
|
+
})
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: "flags",
|
|
137
|
+
header: "Flags",
|
|
138
|
+
cell: (e) => /* @__PURE__ */ v("div", {
|
|
139
|
+
className: "flex gap-1",
|
|
140
|
+
children: [
|
|
141
|
+
e.fragile && /* @__PURE__ */ _(t, {
|
|
142
|
+
variant: "destructive",
|
|
143
|
+
className: "text-xs",
|
|
144
|
+
children: "Fragile"
|
|
145
|
+
}),
|
|
146
|
+
e.hazardous && /* @__PURE__ */ _(t, {
|
|
147
|
+
variant: "destructive",
|
|
148
|
+
className: "text-xs",
|
|
149
|
+
children: "Hazardous"
|
|
150
|
+
}),
|
|
151
|
+
e.temperatureControlled && /* @__PURE__ */ _(t, {
|
|
152
|
+
variant: "secondary",
|
|
153
|
+
className: "text-xs",
|
|
154
|
+
children: "Temp Control"
|
|
155
|
+
})
|
|
156
|
+
]
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
data: D,
|
|
161
|
+
isLoading: k,
|
|
162
|
+
searchable: !0,
|
|
163
|
+
searchPlaceholder: "Search products...",
|
|
164
|
+
searchFields: [
|
|
165
|
+
"name",
|
|
166
|
+
"sku",
|
|
167
|
+
"category"
|
|
168
|
+
],
|
|
169
|
+
onRowClick: (e) => M(`inventory/products/${e.id}`),
|
|
170
|
+
getRowId: (e) => e.id,
|
|
171
|
+
pageIndex: C,
|
|
172
|
+
pageSize: T,
|
|
173
|
+
onPageChange: w,
|
|
174
|
+
onPageSizeChange: (e) => {
|
|
175
|
+
E(e), w(0);
|
|
176
|
+
},
|
|
177
|
+
hasNextPage: O,
|
|
178
|
+
emptyIllustration: "empty-files",
|
|
179
|
+
emptyTitle: "No products yet",
|
|
180
|
+
emptyDescription: "Add products to your catalog so they can be added to orders and stocked in warehouses."
|
|
181
|
+
})
|
|
182
|
+
]
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
export { S as default };
|