@burdenoff/microfe-movethewheels 2026.626.2 → 2026.703.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-AvsMbunM.js → AIAssistantPage-C3ovZ0Fh.js} +100 -73
- package/dist/AnalyticsPage-O8SpY-V4.js +215 -0
- package/dist/{CreateOrderPage-CjlnEtk3.js → CreateOrderPage-CB1_-_mN.js} +33 -35
- package/dist/{CustomerDetailsPage-I6cdDHUi.js → CustomerDetailsPage-BaeKEI1D.js} +42 -44
- package/dist/{CustomersPage-CGGfD4ki.js → CustomersPage-DRaLuHMC.js} +26 -28
- package/dist/{DashboardPage-D2HRqwg9.js → DashboardPage-DPjhNfKB.js} +85 -83
- package/dist/{DataTable-CD9ZhpLB.js → DataTable-DmciIKKM.js} +3 -3
- package/dist/{DriverDetailsPage-rg_pGNuP.js → DriverDetailsPage-CSSQTOzn.js} +52 -54
- package/dist/{DriversPage-DKiynISH.js → DriversPage-C2Bk0w4Q.js} +24 -26
- package/dist/{FinancePage-Vg8WPs38.js → FinancePage-lmp0Sdsw.js} +9 -9
- package/dist/FleetPage-DZn5pIqd.js +365 -0
- package/dist/ImportExportPage-BIUJZc7O.js +290 -0
- package/dist/InventoryPage-Cxh1zYJd.js +253 -0
- package/dist/{LiveTrackingPage-DQ1q4Id3.js → LiveTrackingPage-BY1yAkIt.js} +60 -56
- package/dist/MarketplacePage-RMuL17EA.js +247 -0
- package/dist/{MetricCard-B7yMyvMX.js → MetricCard-7aYgzZHK.js} +1 -1
- package/dist/{OrderDetailsPage-CFASgsYX.js → OrderDetailsPage-C2Mf4KSy.js} +83 -85
- package/dist/{OrdersListPage-BHeT8S5o.js → OrdersListPage-BrPBtnhp.js} +31 -33
- package/dist/{PageLayout-D3N8MCTm.js → PageLayout-D4LDHJJq.js} +483 -422
- package/dist/{ProductDetailsPage-CFGcbaHo.js → ProductDetailsPage-CezzzZcj.js} +27 -29
- package/dist/{ProductsPage--xEpbQ8A.js → ProductsPage-I5DilIoY.js} +21 -23
- package/dist/ReportsPage-BDXNmUng.js +284 -0
- package/dist/RouteDetailsPage-BcomL20M.js +263 -0
- package/dist/RoutesPage-lqX9ylHP.js +144 -0
- package/dist/SettingsPage-CQVIOaNs.js +421 -0
- package/dist/StatusBadge-NpTeHVlw.js +152 -0
- package/dist/{TrackingPage-CcRc_dva.js → TrackingPage-BXrjz7V8.js} +59 -61
- package/dist/{VehicleDetailsPage-3YDMPsPs.js → VehicleDetailsPage-DZjLcJgr.js} +40 -42
- package/dist/{VehiclesPage-UlxPWP9K.js → VehiclesPage-6W39XT5W.js} +19 -21
- package/dist/{WarehouseDetailsPage-Db7KeN-d.js → WarehouseDetailsPage-C10pgRGW.js} +38 -40
- package/dist/{WarehousesPage-CuTO-OPp.js → WarehousesPage-CHvBqNaQ.js} +15 -17
- 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 +119 -111
- 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/{trending-up-C-85AwGT.js → trending-up-B7W-GL6P.js} +1 -1
- package/dist/{triangle-alert-BOhfGgmh.js → triangle-alert-BonHFFNz.js} +1 -1
- package/dist/{truck-CtDjNFbi.js → truck-DrlfSpRC.js} +1 -1
- package/dist/{useAnalytics-ph7eTIK6.js → useAnalytics-CgdzUfY_.js} +40 -40
- package/dist/useAssistant-D4v3oxD3.js +84 -0
- package/dist/{useCustomers-bS3a4ytk.js → useCustomers-QrlozybF.js} +24 -24
- package/dist/{useFleet-BdETplNE.js → useFleet-DiAC-IiH.js} +70 -67
- package/dist/useImportExport-BLMnAKCC.js +55 -0
- package/dist/{useInventory-Dwn18FPz.js → useInventory-DKoks37x.js} +33 -33
- package/dist/{useOrders-D_3_hGMp.js → useOrders-D3UZVy8Y.js} +42 -42
- package/dist/useReports-Puq4DCH9.js +78 -0
- package/dist/{useRoutes-v4aBaS-E.js → useRoutes-Do57LvRb.js} +31 -31
- package/dist/useSettings-CkDH_-gM.js +81 -0
- package/dist/{useTracking-De2KIUNu.js → useTracking-GJify4HN.js} +22 -22
- package/dist/{user-Dz5TJZFs.js → user-CjSoudeu.js} +1 -1
- package/dist/{users-g2N0eL-Z.js → users-BAM4gHTn.js} +1 -1
- package/dist/{warehouse-D3WWDeTX.js → warehouse-C7MSr47B.js} +1 -1
- package/dist/{wrench-CmxY1n4I.js → wrench-CANXWxF-.js} +1 -1
- package/package.json +1 -1
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +27 -3
- 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 +63 -59
- package/src/movethewheels/hooks/useImportExport.ts +101 -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 +1 -1
- package/src/movethewheels/pages/CustomersPage.tsx +1 -1
- package/src/movethewheels/pages/DashboardPage.tsx +42 -22
- package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/DriversPage.tsx +1 -1
- 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/ReportsPage.tsx +194 -90
- package/src/movethewheels/pages/RouteDetailsPage.tsx +5 -11
- 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/providers/MoveTheWheelsProvider.tsx +7 -6
- package/src/movethewheels/store/movethewheelsStore.ts +1 -1
- package/dist/AnalyticsPage-CCLfHgQZ.js +0 -212
- 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/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/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-DhKZ-eA1.js} +0 -0
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { r as
|
|
8
|
-
import {
|
|
9
|
-
import { n as _ } from "./formatters-_vJlC-47.js";
|
|
10
|
-
import { t as v } from "./navigation-BgnOfsVd.js";
|
|
1
|
+
import { ct as e, d as t, f as n, g as r, h as i, i as a, l as o, lt as s, n as c, ot as l, r as u, u as d } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
import { t as f } from "./arrow-left-n48Y-Wis.js";
|
|
3
|
+
import { t as p } from "./box-D9Pal4HM.js";
|
|
4
|
+
import { t as m } from "./dollar-sign-CgKQRz_e.js";
|
|
5
|
+
import { t as h } from "./package-BChUzpJS.js";
|
|
6
|
+
import { t as g } from "./square-pen-CopE9GmB.js";
|
|
7
|
+
import { r as _ } from "./useInventory-DKoks37x.js";
|
|
8
|
+
import { n as v } from "./formatters-DhKZ-eA1.js";
|
|
11
9
|
import { useParams as y } from "react-router-dom";
|
|
12
10
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
13
11
|
import { EmphasisPanel as S, NextSteps as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
|
|
14
12
|
//#region node_modules/lucide-react/dist/esm/icons/tag.js
|
|
15
|
-
var T =
|
|
13
|
+
var T = s("Tag", [["path", {
|
|
16
14
|
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",
|
|
17
15
|
key: "vktsd0"
|
|
18
16
|
}], ["circle", {
|
|
@@ -25,21 +23,21 @@ var T = a("Tag", [["path", {
|
|
|
25
23
|
//#endregion
|
|
26
24
|
//#region src/movethewheels/pages/ProductDetailsPage.tsx
|
|
27
25
|
function E() {
|
|
28
|
-
let { productId:
|
|
29
|
-
return k ? /* @__PURE__ */ b(
|
|
26
|
+
let { productId: s } = y(), { basePath: E, navigate: D } = l(), { product: O, isLoading: k, error: A, refetch: j } = _(s), M = () => D?.(e(E, "inventory/products")), N = (t) => D?.(e(E, t));
|
|
27
|
+
return k ? /* @__PURE__ */ b(u, { message: "Loading product details..." }) : A || !O ? /* @__PURE__ */ b(c, {
|
|
30
28
|
title: "Product not found",
|
|
31
29
|
onRetry: j
|
|
32
|
-
}) : /* @__PURE__ */ x(
|
|
30
|
+
}) : /* @__PURE__ */ x(a, {
|
|
33
31
|
title: O.name,
|
|
34
32
|
subtitle: `SKU: ${O.sku}`,
|
|
35
|
-
icon: /* @__PURE__ */ b(
|
|
33
|
+
icon: /* @__PURE__ */ b(h, { size: 24 }),
|
|
36
34
|
headerActions: /* @__PURE__ */ x("div", {
|
|
37
35
|
className: "flex gap-2",
|
|
38
|
-
children: [/* @__PURE__ */ x(
|
|
36
|
+
children: [/* @__PURE__ */ x(d, {
|
|
39
37
|
variant: "outline",
|
|
40
38
|
onClick: M,
|
|
41
|
-
children: [/* @__PURE__ */ b(
|
|
42
|
-
}), /* @__PURE__ */ x(
|
|
39
|
+
children: [/* @__PURE__ */ b(f, { size: 16 }), " Back"]
|
|
40
|
+
}), /* @__PURE__ */ x(d, { children: [/* @__PURE__ */ b(g, { size: 16 }), " Edit"] })]
|
|
43
41
|
}),
|
|
44
42
|
headerContent: /* @__PURE__ */ x("div", {
|
|
45
43
|
className: "flex gap-2",
|
|
@@ -68,7 +66,7 @@ function E() {
|
|
|
68
66
|
}),
|
|
69
67
|
children: [
|
|
70
68
|
/* @__PURE__ */ b(w, {
|
|
71
|
-
icon: /* @__PURE__ */ b(
|
|
69
|
+
icon: /* @__PURE__ */ b(h, { size: 18 }),
|
|
72
70
|
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."
|
|
73
71
|
}),
|
|
74
72
|
/* @__PURE__ */ b(C, {
|
|
@@ -77,7 +75,7 @@ function E() {
|
|
|
77
75
|
id: "order",
|
|
78
76
|
label: "Add this product to an order",
|
|
79
77
|
description: "Include it on a new delivery.",
|
|
80
|
-
icon: /* @__PURE__ */ b(
|
|
78
|
+
icon: /* @__PURE__ */ b(h, { size: 16 }),
|
|
81
79
|
onClick: () => N("orders/new")
|
|
82
80
|
}, {
|
|
83
81
|
id: "edit",
|
|
@@ -92,11 +90,11 @@ function E() {
|
|
|
92
90
|
children: [/* @__PURE__ */ x("div", {
|
|
93
91
|
className: "lg:col-span-2 space-y-6",
|
|
94
92
|
children: [
|
|
95
|
-
/* @__PURE__ */ x(
|
|
96
|
-
/* @__PURE__ */ x(
|
|
93
|
+
/* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(r, { children: "Description" }) }), /* @__PURE__ */ b(n, { children: /* @__PURE__ */ b("p", { children: O.description }) })] }),
|
|
94
|
+
/* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ x(r, {
|
|
97
95
|
className: "flex items-center gap-2",
|
|
98
|
-
children: [/* @__PURE__ */ b(
|
|
99
|
-
}) }), /* @__PURE__ */ b(
|
|
96
|
+
children: [/* @__PURE__ */ b(p, { size: 18 }), " Dimensions & Weight"]
|
|
97
|
+
}) }), /* @__PURE__ */ b(n, { children: /* @__PURE__ */ x("div", {
|
|
100
98
|
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
101
99
|
children: [
|
|
102
100
|
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
@@ -141,10 +139,10 @@ function E() {
|
|
|
141
139
|
})] })
|
|
142
140
|
]
|
|
143
141
|
}) })] }),
|
|
144
|
-
O.attributes.length > 0 && /* @__PURE__ */ x(
|
|
142
|
+
O.attributes.length > 0 && /* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ x(r, {
|
|
145
143
|
className: "flex items-center gap-2",
|
|
146
144
|
children: [/* @__PURE__ */ b(T, { size: 18 }), " Attributes"]
|
|
147
|
-
}) }), /* @__PURE__ */ b(
|
|
145
|
+
}) }), /* @__PURE__ */ b(n, { children: /* @__PURE__ */ b("div", {
|
|
148
146
|
className: "grid grid-cols-2 md:grid-cols-3 gap-4",
|
|
149
147
|
children: O.attributes.map((e, t) => /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
150
148
|
className: "text-sm text-text-secondary",
|
|
@@ -160,17 +158,17 @@ function E() {
|
|
|
160
158
|
children: [/* @__PURE__ */ x(S, { children: [
|
|
161
159
|
/* @__PURE__ */ x("h2", {
|
|
162
160
|
className: "flex items-center gap-2 text-base font-semibold text-text-primary mb-3",
|
|
163
|
-
children: [/* @__PURE__ */ b(
|
|
161
|
+
children: [/* @__PURE__ */ b(m, { size: 18 }), " Pricing"]
|
|
164
162
|
}),
|
|
165
163
|
/* @__PURE__ */ b("p", {
|
|
166
164
|
className: "text-3xl font-bold",
|
|
167
|
-
children:
|
|
165
|
+
children: v(O.value)
|
|
168
166
|
}),
|
|
169
167
|
/* @__PURE__ */ b("p", {
|
|
170
168
|
className: "text-sm text-text-secondary",
|
|
171
169
|
children: "Unit price"
|
|
172
170
|
})
|
|
173
|
-
] }), /* @__PURE__ */ x(
|
|
171
|
+
] }), /* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(r, { children: "Identifiers" }) }), /* @__PURE__ */ x(n, {
|
|
174
172
|
className: "space-y-3",
|
|
175
173
|
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
176
174
|
className: "text-sm text-text-secondary",
|
|
@@ -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-DKoks37x.js";
|
|
8
|
+
import { n as u } from "./formatters-DhKZ-eA1.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(
|
|
21
|
+
icon: /* @__PURE__ */ d(s, { size: 16 }),
|
|
24
22
|
onSelect: () => {}
|
|
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"
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { B as e, F as t, I as n, L as r, P as i, R as a, d as o, f as s, g as c, h as l, i as u, l as d, lt as f, u as p } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
+
import { t as m } from "./clock-DJZtdl8u.js";
|
|
3
|
+
import { t as h } from "./download-DRXxoiQR.js";
|
|
4
|
+
import { t as g } from "./filter-DloLC2eE.js";
|
|
5
|
+
import { t as _ } from "./plus-Z76q-FZm.js";
|
|
6
|
+
import { t as v } from "./useReports-Puq4DCH9.js";
|
|
7
|
+
import { r as y } from "./formatters-DhKZ-eA1.js";
|
|
8
|
+
import { useState as b } from "react";
|
|
9
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
10
|
+
import { EmphasisPanel as C, IllustratedEmptyState as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
|
|
11
|
+
//#region node_modules/lucide-react/dist/esm/icons/calendar.js
|
|
12
|
+
var E = f("Calendar", [
|
|
13
|
+
["path", {
|
|
14
|
+
d: "M8 2v4",
|
|
15
|
+
key: "1cmpym"
|
|
16
|
+
}],
|
|
17
|
+
["path", {
|
|
18
|
+
d: "M16 2v4",
|
|
19
|
+
key: "4m81vk"
|
|
20
|
+
}],
|
|
21
|
+
["rect", {
|
|
22
|
+
width: "18",
|
|
23
|
+
height: "18",
|
|
24
|
+
x: "3",
|
|
25
|
+
y: "4",
|
|
26
|
+
rx: "2",
|
|
27
|
+
key: "1hopcy"
|
|
28
|
+
}],
|
|
29
|
+
["path", {
|
|
30
|
+
d: "M3 10h18",
|
|
31
|
+
key: "8toen8"
|
|
32
|
+
}]
|
|
33
|
+
]), D = f("FileChartColumnIncreasing", [
|
|
34
|
+
["path", {
|
|
35
|
+
d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
|
|
36
|
+
key: "1rqfz7"
|
|
37
|
+
}],
|
|
38
|
+
["path", {
|
|
39
|
+
d: "M14 2v4a2 2 0 0 0 2 2h4",
|
|
40
|
+
key: "tnqrlb"
|
|
41
|
+
}],
|
|
42
|
+
["path", {
|
|
43
|
+
d: "M8 18v-2",
|
|
44
|
+
key: "qcmpov"
|
|
45
|
+
}],
|
|
46
|
+
["path", {
|
|
47
|
+
d: "M12 18v-4",
|
|
48
|
+
key: "q1q25u"
|
|
49
|
+
}],
|
|
50
|
+
["path", {
|
|
51
|
+
d: "M16 18v-6",
|
|
52
|
+
key: "15y0np"
|
|
53
|
+
}]
|
|
54
|
+
]), O = [
|
|
55
|
+
{
|
|
56
|
+
value: "operations",
|
|
57
|
+
label: "Operations Summary"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
value: "finance",
|
|
61
|
+
label: "Financial Report"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
value: "fleet",
|
|
65
|
+
label: "Fleet Utilization"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
value: "customers",
|
|
69
|
+
label: "Customer Analytics"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
value: "inventory",
|
|
73
|
+
label: "Inventory Status"
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
function k() {
|
|
77
|
+
let { reports: f, isLoading: k, error: A, refetch: j, createReport: M, generateReport: N } = v(), [P, F] = b("operations"), [I, L] = b(null), [R, z] = b(!1), [B, V] = b(null), H = (e) => O.find((t) => t.value === e)?.label ?? e, U = async (e) => {
|
|
78
|
+
z(!0), V(null);
|
|
79
|
+
let t = {
|
|
80
|
+
name: `${H(P)}${e ? " (Scheduled)" : ""}`,
|
|
81
|
+
type: P,
|
|
82
|
+
description: `${H(P)} generated from live operational data`,
|
|
83
|
+
...e ? { schedule: e } : {}
|
|
84
|
+
};
|
|
85
|
+
try {
|
|
86
|
+
await M(t), V({
|
|
87
|
+
tone: "success",
|
|
88
|
+
text: e ? "Scheduled report created." : "Report created."
|
|
89
|
+
});
|
|
90
|
+
} catch (e) {
|
|
91
|
+
V({
|
|
92
|
+
tone: "error",
|
|
93
|
+
text: e instanceof Error ? e.message : "Could not create report."
|
|
94
|
+
});
|
|
95
|
+
} finally {
|
|
96
|
+
z(!1);
|
|
97
|
+
}
|
|
98
|
+
}, W = async (e) => {
|
|
99
|
+
L(e), V(null);
|
|
100
|
+
try {
|
|
101
|
+
await N(e), V({
|
|
102
|
+
tone: "success",
|
|
103
|
+
text: "Report generated."
|
|
104
|
+
});
|
|
105
|
+
} catch (e) {
|
|
106
|
+
V({
|
|
107
|
+
tone: "error",
|
|
108
|
+
text: e instanceof Error ? e.message : "Could not generate report."
|
|
109
|
+
});
|
|
110
|
+
} finally {
|
|
111
|
+
L(null);
|
|
112
|
+
}
|
|
113
|
+
}, G = f.filter((e) => e.schedule);
|
|
114
|
+
return /* @__PURE__ */ S(u, {
|
|
115
|
+
title: "Reports",
|
|
116
|
+
subtitle: "Generate and schedule reports",
|
|
117
|
+
icon: /* @__PURE__ */ x(D, { size: 24 }),
|
|
118
|
+
headerActions: /* @__PURE__ */ S("div", {
|
|
119
|
+
className: "flex gap-2",
|
|
120
|
+
children: [/* @__PURE__ */ S(i, {
|
|
121
|
+
value: P,
|
|
122
|
+
onValueChange: F,
|
|
123
|
+
children: [/* @__PURE__ */ x(r, {
|
|
124
|
+
className: "w-[190px]",
|
|
125
|
+
children: /* @__PURE__ */ x(a, {})
|
|
126
|
+
}), /* @__PURE__ */ x(t, { children: O.map((e) => /* @__PURE__ */ x(n, {
|
|
127
|
+
value: e.value,
|
|
128
|
+
children: e.label
|
|
129
|
+
}, e.value)) })]
|
|
130
|
+
}), /* @__PURE__ */ S(p, {
|
|
131
|
+
onClick: () => void U(),
|
|
132
|
+
disabled: R,
|
|
133
|
+
children: [/* @__PURE__ */ x(_, { size: 16 }), " Create Report"]
|
|
134
|
+
})]
|
|
135
|
+
}),
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ x(T, {
|
|
138
|
+
icon: /* @__PURE__ */ x(D, { size: 18 }),
|
|
139
|
+
children: "Turn your operational data into shareable summaries. Generate one-off reports on orders, finance, fleet, customers or inventory, or schedule them to land in inboxes automatically — so stakeholders always have the latest numbers without logging in."
|
|
140
|
+
}),
|
|
141
|
+
B && /* @__PURE__ */ x("div", {
|
|
142
|
+
role: "status",
|
|
143
|
+
className: `rounded-lg p-3 text-sm ${B.tone === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
|
|
144
|
+
children: B.text
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ S("div", {
|
|
147
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
148
|
+
children: [/* @__PURE__ */ S("div", {
|
|
149
|
+
className: "lg:col-span-2 space-y-4",
|
|
150
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
151
|
+
className: "font-semibold",
|
|
152
|
+
children: "Available Reports"
|
|
153
|
+
}), k ? /* @__PURE__ */ x("div", {
|
|
154
|
+
className: "space-y-3",
|
|
155
|
+
children: Array.from({ length: 3 }).map((t, n) => /* @__PURE__ */ x(e, { className: "h-20 w-full rounded-lg" }, n))
|
|
156
|
+
}) : A ? /* @__PURE__ */ x(o, {
|
|
157
|
+
className: "border-status-error-border",
|
|
158
|
+
children: /* @__PURE__ */ S(s, {
|
|
159
|
+
className: "p-6 text-center space-y-3",
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ x("p", {
|
|
162
|
+
className: "text-status-error-text font-medium",
|
|
163
|
+
children: "Couldn't load reports"
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ x("p", {
|
|
166
|
+
className: "text-sm text-text-secondary",
|
|
167
|
+
children: A.message
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ x(p, {
|
|
170
|
+
variant: "outline",
|
|
171
|
+
onClick: j,
|
|
172
|
+
children: "Retry"
|
|
173
|
+
})
|
|
174
|
+
]
|
|
175
|
+
})
|
|
176
|
+
}) : f.length === 0 ? /* @__PURE__ */ x(o, { children: /* @__PURE__ */ x(s, {
|
|
177
|
+
className: "p-0",
|
|
178
|
+
children: /* @__PURE__ */ x(w, {
|
|
179
|
+
illustration: "empty-data",
|
|
180
|
+
title: "No reports yet",
|
|
181
|
+
description: "Create your first report to turn live operational data into a shareable summary.",
|
|
182
|
+
action: /* @__PURE__ */ S(p, {
|
|
183
|
+
onClick: () => void U(),
|
|
184
|
+
disabled: R,
|
|
185
|
+
children: [/* @__PURE__ */ x(_, {
|
|
186
|
+
size: 16,
|
|
187
|
+
className: "mr-1.5"
|
|
188
|
+
}), " Create Report"]
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
}) }) : f.map((e) => /* @__PURE__ */ x(o, { children: /* @__PURE__ */ x(s, {
|
|
192
|
+
className: "p-4",
|
|
193
|
+
children: /* @__PURE__ */ S("div", {
|
|
194
|
+
className: "flex items-center justify-between",
|
|
195
|
+
children: [/* @__PURE__ */ S("div", {
|
|
196
|
+
className: "flex items-center gap-3",
|
|
197
|
+
children: [/* @__PURE__ */ x("div", {
|
|
198
|
+
className: "w-10 h-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center",
|
|
199
|
+
children: /* @__PURE__ */ x(D, {
|
|
200
|
+
size: 20,
|
|
201
|
+
className: "text-primary"
|
|
202
|
+
})
|
|
203
|
+
}), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
|
|
204
|
+
className: "font-medium",
|
|
205
|
+
children: e.name
|
|
206
|
+
}), /* @__PURE__ */ x("p", {
|
|
207
|
+
className: "text-sm text-text-secondary",
|
|
208
|
+
children: e.description ?? H(e.type)
|
|
209
|
+
})] })]
|
|
210
|
+
}), /* @__PURE__ */ S("div", {
|
|
211
|
+
className: "flex items-center gap-3",
|
|
212
|
+
children: [/* @__PURE__ */ S("div", {
|
|
213
|
+
className: "text-right",
|
|
214
|
+
children: [/* @__PURE__ */ x(d, {
|
|
215
|
+
variant: "outline",
|
|
216
|
+
children: e.schedule ?? "On demand"
|
|
217
|
+
}), e.lastGenerated && /* @__PURE__ */ S("p", {
|
|
218
|
+
className: "text-xs text-text-secondary mt-1",
|
|
219
|
+
children: ["Last: ", y(new Date(e.lastGenerated), "short")]
|
|
220
|
+
})]
|
|
221
|
+
}), /* @__PURE__ */ x(p, {
|
|
222
|
+
variant: "outline",
|
|
223
|
+
size: "sm",
|
|
224
|
+
"aria-label": `Generate ${e.name}`,
|
|
225
|
+
disabled: I === e.id,
|
|
226
|
+
onClick: () => void W(e.id),
|
|
227
|
+
children: /* @__PURE__ */ x(h, { size: 14 })
|
|
228
|
+
})]
|
|
229
|
+
})]
|
|
230
|
+
})
|
|
231
|
+
}) }, e.id))]
|
|
232
|
+
}), /* @__PURE__ */ S("div", {
|
|
233
|
+
className: "space-y-6",
|
|
234
|
+
children: [/* @__PURE__ */ S(C, {
|
|
235
|
+
className: "space-y-3",
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ S("h2", {
|
|
238
|
+
className: "flex items-center gap-2 text-base font-semibold text-text-primary",
|
|
239
|
+
children: [/* @__PURE__ */ x(m, { size: 18 }), " Scheduled Reports"]
|
|
240
|
+
}),
|
|
241
|
+
G.length === 0 ? /* @__PURE__ */ x("p", {
|
|
242
|
+
className: "text-sm text-text-secondary",
|
|
243
|
+
children: "No scheduled reports yet. Schedule one to have it generated automatically."
|
|
244
|
+
}) : G.map((e) => /* @__PURE__ */ S("div", {
|
|
245
|
+
className: "p-3 border border-border-seam rounded-lg",
|
|
246
|
+
children: [/* @__PURE__ */ x("p", {
|
|
247
|
+
className: "font-medium",
|
|
248
|
+
children: e.name
|
|
249
|
+
}), /* @__PURE__ */ S("p", {
|
|
250
|
+
className: "text-sm text-text-secondary",
|
|
251
|
+
children: ["Schedule: ", e.schedule]
|
|
252
|
+
})]
|
|
253
|
+
}, e.id)),
|
|
254
|
+
/* @__PURE__ */ x(p, {
|
|
255
|
+
variant: "outline",
|
|
256
|
+
className: "w-full",
|
|
257
|
+
disabled: R,
|
|
258
|
+
onClick: () => void U("daily"),
|
|
259
|
+
children: "Schedule New Report"
|
|
260
|
+
})
|
|
261
|
+
]
|
|
262
|
+
}), /* @__PURE__ */ S(o, { children: [/* @__PURE__ */ x(l, { children: /* @__PURE__ */ x(c, { children: "Quick Actions" }) }), /* @__PURE__ */ S(s, {
|
|
263
|
+
className: "space-y-2",
|
|
264
|
+
children: [/* @__PURE__ */ S(p, {
|
|
265
|
+
variant: "outline",
|
|
266
|
+
className: "w-full justify-start",
|
|
267
|
+
disabled: R,
|
|
268
|
+
onClick: () => void U("weekly"),
|
|
269
|
+
children: [/* @__PURE__ */ x(E, { size: 16 }), " Schedule Report"]
|
|
270
|
+
}), /* @__PURE__ */ S(p, {
|
|
271
|
+
variant: "outline",
|
|
272
|
+
className: "w-full justify-start",
|
|
273
|
+
disabled: R,
|
|
274
|
+
onClick: () => void U(),
|
|
275
|
+
children: [/* @__PURE__ */ x(g, { size: 16 }), " Custom Report"]
|
|
276
|
+
})]
|
|
277
|
+
})] })]
|
|
278
|
+
})]
|
|
279
|
+
})
|
|
280
|
+
]
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
//#endregion
|
|
284
|
+
export { k as default };
|