@burdenoff/microfe-movethewheels 2026.703.3 → 2026.703.5
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-C3cPsWt-.js → AIAssistantPage-D2gaEL1U.js} +16 -15
- package/dist/AnalyticsPage-DZMlEoBi.js +194 -0
- package/dist/CreateOrderPage-CWHx8yys.js +490 -0
- package/dist/CustomerDetailsPage-nR4oZ_ju.js +615 -0
- package/dist/CustomersPage-Bbvwvn8k.js +205 -0
- package/dist/DashboardPage-DrEhNf7N.js +542 -0
- package/dist/DataTable-CqMUD4er.js +340 -0
- package/dist/DocumentsCard-edDkgnJj.js +169 -0
- package/dist/DriverDetailsPage-whEMOWs9.js +490 -0
- package/dist/DriversPage-CHF2ZEzd.js +221 -0
- package/dist/FinancePage-Dn9GrW-1.js +175 -0
- package/dist/{FleetPage-DqkFi3s3.js → FleetPage-CrtGPy-p.js} +36 -35
- package/dist/{FormError-BlOjnXOq.js → FormError-BKcb_wT-.js} +1 -1
- package/dist/{ImportExportPage-DKJRCezl.js → ImportExportPage-WYdwZomZ.js} +52 -72
- package/dist/InventoryPage-l5A1f753.js +259 -0
- package/dist/LiveTrackingPage-DhEaNKZ4.js +429 -0
- package/dist/MarketplacePage-B9RYOb1Y.js +426 -0
- package/dist/MetricCard-y3bWHKUQ.js +191 -0
- package/dist/Notice-DOO-tjpV.js +46 -0
- package/dist/OrderDetailsPage-CwYHwk1K.js +584 -0
- package/dist/OrdersListPage-DhZJoQeI.js +386 -0
- package/dist/{PageLayout-D4LDHJJq.js → PageLayout-BniRJaQ6.js} +1 -1
- package/dist/{ProductDetailsPage-C9uOiYLp.js → ProductDetailsPage-1Gm9JKy0.js} +56 -56
- package/dist/ProductsPage-C8sn-1tN.js +186 -0
- package/dist/ReportsPage-D1tb0dcz.js +377 -0
- package/dist/RouteDetailsPage-CkMyR9b_.js +610 -0
- package/dist/{RoutesPage-DMfoicM1.js → RoutesPage-QkENzsE5.js} +58 -47
- package/dist/{SettingsPage-Bn-v0mbQ.js → SettingsPage-DV3_tU_X.js} +16 -38
- package/dist/Sparkline-K2RMJ58u.js +16729 -0
- package/dist/{StatusBadge-BZurYHMy.js → StatusBadge-BNHXYvZx.js} +7 -7
- package/dist/TrackingPage-BZrg4RCu.js +368 -0
- package/dist/VehicleDetailsPage-D-8XPZ2G.js +393 -0
- package/dist/VehiclesPage-D5BELbtM.js +184 -0
- package/dist/{WarehouseDetailsPage-L_6sWigM.js → WarehouseDetailsPage-Cmg-8Frn.js} +70 -70
- package/dist/WarehousesPage-C1Y1M867.js +182 -0
- package/dist/{arrow-left-n48Y-Wis.js → arrow-left-ClW4Isj7.js} +1 -1
- package/dist/arrow-right-CmKOmIkh.js +11 -0
- package/dist/arrow-up-BJijRLAZ.js +17 -0
- package/dist/{box-D9Pal4HM.js → box-BT3NsRQP.js} +1 -1
- package/dist/boxes-B_OGvQiW.js +54 -0
- package/dist/{chart-column-BFIJysDR.js → chart-column-DQTTdUPk.js} +1 -1
- package/dist/charts-Tj_PPTfA.js +2018 -0
- package/dist/chevron-left-B1rZyWWb.js +8 -0
- package/dist/{chevron-right-EMIIyyJ1.js → chevron-right-BIcwUJZq.js} +1 -1
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/{circle-alert-iY24lSlp.js → circle-alert-CNkuDNc6.js} +1 -1
- package/dist/circle-check-Cs1OVjtV.js +13 -0
- package/dist/{circle-check-big-w0TrLKMF.js → circle-check-big-C-p4eNwn.js} +1 -1
- package/dist/{clock-DJZtdl8u.js → clock-dRGG4rkF.js} +1 -1
- package/dist/{dollar-sign-CgKQRz_e.js → dollar-sign-B6RoYHHz.js} +1 -1
- package/dist/{download-DRXxoiQR.js → download-DP04iWTd.js} +1 -1
- package/dist/{file-text-DWWY6_f5.js → file-text-BuDx4hZp.js} +1 -1
- package/dist/{filter-DloLC2eE.js → filter-BD483_8g.js} +1 -1
- package/dist/{wrench-CANXWxF-.js → fuel-DLH1ag04.js} +3 -6
- package/dist/index.css +2 -0
- package/dist/index.js +150 -172
- package/dist/{map-CkJaULb2.js → map-DNQn9fyY.js} +1 -1
- package/dist/{map-pin-BGiCvyCs.js → map-pin-CqN1bbT1.js} +1 -1
- package/dist/mapMarkers-NCV9MRKR.js +28 -0
- package/dist/maps-yzLqiK_C.js +5070 -0
- package/dist/{navigation-D36prnAn.js → navigation-CgGUt2tR.js} +1 -1
- package/dist/{package-BChUzpJS.js → package-DmRF7iQD.js} +1 -1
- package/dist/{phone-Ac9s3mo_.js → phone-Cl32EXKW.js} +1 -1
- package/dist/{plus-Z76q-FZm.js → plus-DlANgOFx.js} +1 -1
- package/dist/{refresh-cw-DKt6f5T6.js → refresh-cw-rW59D4b7.js} +1 -1
- package/dist/route-CWjPrtAN.js +22 -0
- package/dist/{save-CojywNhG.js → save-UDlog7hg.js} +1 -1
- package/dist/{search-CDGefqb3.js → search-DNIG5Ck7.js} +1 -1
- package/dist/{square-pen-CopE9GmB.js → square-pen-BcfB3Grd.js} +1 -1
- package/dist/{star-nHlLjDKR.js → star-CVZHFwDx.js} +1 -1
- package/dist/{store-BR9Voi5E.js → store-bwnmCK9f.js} +1 -1
- package/dist/{trash-2-BKhar6Hs.js → trash-2-B80G12d4.js} +1 -1
- package/dist/{trending-up-Dohgd4t_.js → trending-up-CH4R4KOa.js} +1 -1
- package/dist/{triangle-alert-i-XQL9Rd.js → triangle-alert-CmS8AUU6.js} +1 -1
- package/dist/{truck-C0v_hbLR.js → truck-9rLDncav.js} +1 -1
- package/dist/upload-DanJY1Vo.js +21 -0
- package/dist/{useAssistant-D4v3oxD3.js → useAssistant-CnEwkTLm.js} +11 -28
- package/dist/{useCustomers-BmTNGxiI.js → useCustomers-ChJao1ET.js} +30 -27
- package/dist/{useFleet-DKqXZ16m.js → useFleet-g5Yri0G8.js} +82 -70
- package/dist/{useImportExport-DHr-SWSw.js → useImportExport-MYwIT3rE.js} +1 -1
- package/dist/{useInventory-DkyiVY_A.js → useInventory-BSOn-R1c.js} +84 -39
- package/dist/{useOrders-Cfk1GLiq.js → useOrders-BSiqo61w.js} +59 -48
- package/dist/{useReports-CTqZr-AB.js → useReports-fWESfsF9.js} +41 -35
- package/dist/{useRoutes-BQWO607N.js → useRoutes-zD8Yp323.js} +50 -42
- package/dist/{useSettings-CkDH_-gM.js → useSettings-B1lsWeZ1.js} +6 -6
- package/dist/{useTracking-B-va1kO3.js → useTracking-BKG0I2ln.js} +3 -3
- package/dist/{user-jyFU3lXk.js → user-DU51el3m.js} +1 -1
- package/dist/user-check-IMhk-qkX.js +20 -0
- package/dist/{users-DZ-ilS6B.js → users-B8KhJBGg.js} +1 -1
- package/dist/{warehouse-6m5kXMLu.js → warehouse-CcMMioeY.js} +1 -1
- package/dist/wrench-Dg-sgH2e.js +8 -0
- package/dist/x-C4ObLVEa.js +11 -0
- package/package.json +5 -1
- package/src/movethewheels/components/DataTable.tsx +252 -84
- package/src/movethewheels/components/DocumentsCard.tsx +102 -0
- package/src/movethewheels/components/GlassPanel.tsx +71 -0
- package/src/movethewheels/components/MetricCard.tsx +171 -73
- package/src/movethewheels/components/Notice.tsx +61 -0
- 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 +51 -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/index.ts +9 -0
- package/src/movethewheels/hooks/useAnalytics.ts +109 -4
- package/src/movethewheels/hooks/useCustomers.ts +11 -4
- package/src/movethewheels/hooks/useEntityDocuments.ts +132 -0
- package/src/movethewheels/hooks/useFleet.ts +26 -7
- package/src/movethewheels/hooks/useInventory.ts +70 -7
- package/src/movethewheels/hooks/useOrders.ts +32 -2
- package/src/movethewheels/hooks/useReports.ts +14 -4
- package/src/movethewheels/hooks/useRoutes.ts +20 -3
- package/src/movethewheels/pages/AnalyticsPage.tsx +93 -73
- package/src/movethewheels/pages/CreateOrderPage.tsx +48 -20
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +239 -33
- package/src/movethewheels/pages/CustomersPage.tsx +53 -28
- package/src/movethewheels/pages/DashboardPage.tsx +238 -12
- package/src/movethewheels/pages/DriverDetailsPage.tsx +17 -31
- package/src/movethewheels/pages/DriversPage.tsx +59 -31
- package/src/movethewheels/pages/FinancePage.tsx +103 -82
- package/src/movethewheels/pages/InventoryPage.tsx +15 -3
- package/src/movethewheels/pages/LiveTrackingPage.tsx +124 -16
- package/src/movethewheels/pages/MarketplacePage.tsx +265 -50
- package/src/movethewheels/pages/OrderDetailsPage.tsx +214 -10
- package/src/movethewheels/pages/OrdersListPage.tsx +118 -47
- package/src/movethewheels/pages/ProductsPage.tsx +52 -28
- package/src/movethewheels/pages/ReportsPage.tsx +88 -4
- package/src/movethewheels/pages/RouteDetailsPage.tsx +119 -19
- package/src/movethewheels/pages/RoutesPage.tsx +22 -6
- package/src/movethewheels/pages/SettingsPage.tsx +5 -21
- package/src/movethewheels/pages/TrackingPage.tsx +76 -6
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +4 -34
- package/src/movethewheels/pages/VehiclesPage.tsx +58 -27
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/WarehousesPage.tsx +47 -36
- package/src/movethewheels/types/index.ts +9 -1
- package/src/movethewheels/utils/download.ts +62 -0
- package/src/movethewheels/utils/mapMarkers.ts +58 -0
- package/dist/AnalyticsPage-Dz6g2MvK.js +0 -215
- package/dist/CreateOrderPage-C5iwnjp4.js +0 -479
- package/dist/CustomerDetailsPage-B6nwFyLO.js +0 -406
- package/dist/CustomersPage-BKxMS1AV.js +0 -161
- package/dist/DashboardPage-BVjQi0EB.js +0 -387
- package/dist/DataTable-DmciIKKM.js +0 -249
- package/dist/DriverDetailsPage-CN3WQ0B9.js +0 -507
- package/dist/DriversPage-CH9rjQC-.js +0 -165
- package/dist/FinancePage-DEDykSOP.js +0 -158
- package/dist/InventoryPage-e0ze63iX.js +0 -253
- package/dist/LiveTrackingPage-DCX-K-LR.js +0 -379
- package/dist/MarketplacePage-CIQ97_zp.js +0 -247
- package/dist/MetricCard-BY0QrMD4.js +0 -146
- package/dist/OrderDetailsPage-DYiZ-9UK.js +0 -429
- package/dist/OrdersListPage-Cn90P1Xx.js +0 -307
- package/dist/ProductsPage-QJfHHpqB.js +0 -169
- package/dist/ReportsPage-Zp53q3_8.js +0 -284
- package/dist/RouteDetailsPage-DUStXSf9.js +0 -531
- package/dist/TrackingPage-W-jtdM3Y.js +0 -325
- package/dist/VehicleDetailsPage-Bceo5oz3.js +0 -410
- package/dist/VehiclesPage-ApKThYeG.js +0 -165
- package/dist/WarehousesPage-DCbXXXWE.js +0 -162
- package/dist/useAnalytics-DS8n0xgg.js +0 -297
- /package/dist/{formatters-CF2S2l1m.js → formatters-FWJDwTFv.js} +0 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { F as e, I as t, L as n, P as r, R as i, d as ee, f as a, i as o, l as s, lt as c, st as l, u, ut as d } from "./PageLayout-BniRJaQ6.js";
|
|
2
|
+
import { t as te } from "./DataTable-CqMUD4er.js";
|
|
3
|
+
import { t as ne } from "./circle-check-Cs1OVjtV.js";
|
|
4
|
+
import { t as f } from "./clock-dRGG4rkF.js";
|
|
5
|
+
import { t as p } from "./download-DP04iWTd.js";
|
|
6
|
+
import { t as m } from "./filter-BD483_8g.js";
|
|
7
|
+
import { t as h } from "./package-DmRF7iQD.js";
|
|
8
|
+
import { t as g } from "./plus-DlANgOFx.js";
|
|
9
|
+
import { t as re } from "./refresh-cw-rW59D4b7.js";
|
|
10
|
+
import { t as _ } from "./truck-9rLDncav.js";
|
|
11
|
+
import { t as v } from "./user-check-IMhk-qkX.js";
|
|
12
|
+
import { n as y, r as b } from "./useOrders-BSiqo61w.js";
|
|
13
|
+
import { r as x, t as S } from "./MetricCard-y3bWHKUQ.js";
|
|
14
|
+
import { i as C, n as w, r as T } from "./StatusBadge-BNHXYvZx.js";
|
|
15
|
+
import { n as E, r as D } from "./formatters-FWJDwTFv.js";
|
|
16
|
+
import { useState as O } from "react";
|
|
17
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
18
|
+
import { CTAOverflowMenu as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
|
|
19
|
+
import { useI18n as N } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
20
|
+
//#region node_modules/lucide-react/dist/esm/icons/user-plus.js
|
|
21
|
+
var P = d("UserPlus", [
|
|
22
|
+
["path", {
|
|
23
|
+
d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",
|
|
24
|
+
key: "1yyitq"
|
|
25
|
+
}],
|
|
26
|
+
["circle", {
|
|
27
|
+
cx: "9",
|
|
28
|
+
cy: "7",
|
|
29
|
+
r: "4",
|
|
30
|
+
key: "nufk8"
|
|
31
|
+
}],
|
|
32
|
+
["line", {
|
|
33
|
+
x1: "19",
|
|
34
|
+
x2: "19",
|
|
35
|
+
y1: "8",
|
|
36
|
+
y2: "14",
|
|
37
|
+
key: "1bvyxn"
|
|
38
|
+
}],
|
|
39
|
+
["line", {
|
|
40
|
+
x1: "22",
|
|
41
|
+
x2: "16",
|
|
42
|
+
y1: "11",
|
|
43
|
+
y2: "11",
|
|
44
|
+
key: "1shjgl"
|
|
45
|
+
}]
|
|
46
|
+
]);
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/movethewheels/pages/OrdersListPage.tsx
|
|
49
|
+
function F() {
|
|
50
|
+
let { t: d } = N(), F = (e, t) => {
|
|
51
|
+
let n = d(e);
|
|
52
|
+
return n === e ? t : n;
|
|
53
|
+
}, { basePath: I, navigate: L } = l(), [R, z] = O("all"), [B, V] = O("all"), [H, U] = O(!1), [W, G] = O(0), [K, q] = O(25), J = R !== "all" || B !== "all" || H, { orders: Y, hasMore: ie, isLoading: ae, refetch: oe } = b({
|
|
54
|
+
filters: {
|
|
55
|
+
status: R === "all" ? void 0 : R,
|
|
56
|
+
orderType: B === "all" ? void 0 : B,
|
|
57
|
+
unassigned: H || void 0
|
|
58
|
+
},
|
|
59
|
+
limit: K,
|
|
60
|
+
offset: W * K
|
|
61
|
+
}), { stats: X } = y(), Z = X.total, Q = (e) => {
|
|
62
|
+
L && L(c(I, e));
|
|
63
|
+
}, $ = () => G(0), se = [
|
|
64
|
+
{
|
|
65
|
+
id: "orderNumber",
|
|
66
|
+
header: F("movethewheels.orders.table.orderNumber", "Order #"),
|
|
67
|
+
accessorKey: "orderNumber",
|
|
68
|
+
sortable: !0,
|
|
69
|
+
className: "min-w-[100px] whitespace-nowrap",
|
|
70
|
+
cell: (e) => /* @__PURE__ */ k("span", {
|
|
71
|
+
className: "font-medium text-primary",
|
|
72
|
+
children: e.orderNumber
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "customer",
|
|
77
|
+
header: F("movethewheels.orders.table.customer", "Customer"),
|
|
78
|
+
className: "min-w-[180px] max-w-[220px]",
|
|
79
|
+
cell: (e) => /* @__PURE__ */ A("div", {
|
|
80
|
+
className: "min-w-0",
|
|
81
|
+
children: [/* @__PURE__ */ k("p", {
|
|
82
|
+
className: "font-medium truncate",
|
|
83
|
+
children: e.customerInfo.name
|
|
84
|
+
}), /* @__PURE__ */ k("p", {
|
|
85
|
+
className: "text-sm text-text-secondary truncate",
|
|
86
|
+
children: e.customerInfo.email
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "status",
|
|
92
|
+
header: F("movethewheels.orders.table.status", "Status"),
|
|
93
|
+
accessorKey: "status",
|
|
94
|
+
sortable: !0,
|
|
95
|
+
className: "min-w-[130px] whitespace-nowrap",
|
|
96
|
+
cell: (e) => /* @__PURE__ */ k(T, {
|
|
97
|
+
status: e.status,
|
|
98
|
+
type: "order"
|
|
99
|
+
})
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "type",
|
|
103
|
+
header: F("movethewheels.orders.table.type", "Type"),
|
|
104
|
+
accessorKey: "orderType",
|
|
105
|
+
className: "min-w-[70px] whitespace-nowrap",
|
|
106
|
+
cell: (e) => /* @__PURE__ */ k(C, { type: e.orderType })
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "priority",
|
|
110
|
+
header: F("movethewheels.orders.table.priority", "Priority"),
|
|
111
|
+
accessorKey: "priority",
|
|
112
|
+
sortable: !0,
|
|
113
|
+
className: "min-w-[90px] whitespace-nowrap",
|
|
114
|
+
cell: (e) => /* @__PURE__ */ k(w, { priority: e.priority })
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "items",
|
|
118
|
+
header: F("movethewheels.orders.table.items", "Items"),
|
|
119
|
+
className: "min-w-[80px] whitespace-nowrap",
|
|
120
|
+
cell: (e) => /* @__PURE__ */ A(s, {
|
|
121
|
+
variant: "secondary",
|
|
122
|
+
children: [
|
|
123
|
+
e.items.length,
|
|
124
|
+
" ",
|
|
125
|
+
F("movethewheels.orders.table.itemsSuffix", "items")
|
|
126
|
+
]
|
|
127
|
+
})
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
id: "total",
|
|
131
|
+
header: F("movethewheels.orders.table.total", "Total"),
|
|
132
|
+
accessorKey: "pricing",
|
|
133
|
+
sortable: !0,
|
|
134
|
+
className: "min-w-[100px] whitespace-nowrap text-right",
|
|
135
|
+
cell: (e) => /* @__PURE__ */ k("span", {
|
|
136
|
+
className: "font-medium",
|
|
137
|
+
children: E(e.pricing.total)
|
|
138
|
+
})
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
id: "scheduledDelivery",
|
|
142
|
+
header: F("movethewheels.orders.table.deliveryDate", "Delivery Date"),
|
|
143
|
+
accessorKey: "scheduledDelivery",
|
|
144
|
+
sortable: !0,
|
|
145
|
+
className: "min-w-[110px] whitespace-nowrap",
|
|
146
|
+
cell: (e) => e.scheduledDelivery ? D(e.scheduledDelivery) : "-"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: "createdAt",
|
|
150
|
+
header: F("movethewheels.orders.table.created", "Created"),
|
|
151
|
+
accessorKey: "createdAt",
|
|
152
|
+
sortable: !0,
|
|
153
|
+
className: "min-w-[100px] whitespace-nowrap",
|
|
154
|
+
cell: (e) => D(e.createdAt, "relative")
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
id: "driver",
|
|
158
|
+
header: F("movethewheels.orders.table.driver", "Driver"),
|
|
159
|
+
className: "min-w-[120px] whitespace-nowrap",
|
|
160
|
+
cell: (e) => e.driverId ? /* @__PURE__ */ A("span", {
|
|
161
|
+
className: "inline-flex items-center gap-1 text-sm text-status-success-text",
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ k(v, { size: 14 }),
|
|
164
|
+
" ",
|
|
165
|
+
F("movethewheels.orders.table.assigned", "Assigned")
|
|
166
|
+
]
|
|
167
|
+
}) : /* @__PURE__ */ A(u, {
|
|
168
|
+
variant: "outline",
|
|
169
|
+
size: "sm",
|
|
170
|
+
onClick: (t) => {
|
|
171
|
+
t.stopPropagation(), Q(`orders/${e.id}`);
|
|
172
|
+
},
|
|
173
|
+
children: [/* @__PURE__ */ k(P, {
|
|
174
|
+
size: 14,
|
|
175
|
+
className: "mr-1"
|
|
176
|
+
}), F("movethewheels.orders.table.assign", "Assign")]
|
|
177
|
+
})
|
|
178
|
+
}
|
|
179
|
+
], ce = [
|
|
180
|
+
{
|
|
181
|
+
value: "all",
|
|
182
|
+
label: F("movethewheels.orders.filters.allStatuses", "All Statuses")
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
value: "pending",
|
|
186
|
+
label: F("movethewheels.orders.status.pending", "Pending")
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
value: "confirmed",
|
|
190
|
+
label: F("movethewheels.orders.status.confirmed", "Confirmed")
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
value: "assigned",
|
|
194
|
+
label: F("movethewheels.orders.status.assigned", "Assigned")
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
value: "picked_up",
|
|
198
|
+
label: F("movethewheels.orders.status.pickedUp", "Picked Up")
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
value: "in_transit",
|
|
202
|
+
label: F("movethewheels.orders.status.inTransit", "In Transit")
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
value: "out_for_delivery",
|
|
206
|
+
label: F("movethewheels.orders.status.outForDelivery", "Out for Delivery")
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
value: "delivered",
|
|
210
|
+
label: F("movethewheels.orders.status.delivered", "Delivered")
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
value: "cancelled",
|
|
214
|
+
label: F("movethewheels.orders.status.cancelled", "Cancelled")
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
value: "failed",
|
|
218
|
+
label: F("movethewheels.orders.status.failed", "Failed")
|
|
219
|
+
}
|
|
220
|
+
];
|
|
221
|
+
return /* @__PURE__ */ A(o, {
|
|
222
|
+
title: F("movethewheels.orders.title", "Orders"),
|
|
223
|
+
subtitle: `${Z} ${F("movethewheels.orders.subtitle", "total orders")}`,
|
|
224
|
+
icon: /* @__PURE__ */ k(h, { size: 24 }),
|
|
225
|
+
headerActions: /* @__PURE__ */ k(j, {
|
|
226
|
+
primary: {
|
|
227
|
+
label: F("movethewheels.orders.actions.newOrder", "New Order"),
|
|
228
|
+
icon: /* @__PURE__ */ k(g, { size: 16 }),
|
|
229
|
+
onSelect: () => Q("orders/new")
|
|
230
|
+
},
|
|
231
|
+
actions: [{
|
|
232
|
+
label: F("movethewheels.orders.actions.refresh", "Refresh"),
|
|
233
|
+
icon: /* @__PURE__ */ k(re, { size: 16 }),
|
|
234
|
+
onSelect: () => oe()
|
|
235
|
+
}, {
|
|
236
|
+
label: F("movethewheels.orders.actions.export", "Export"),
|
|
237
|
+
icon: /* @__PURE__ */ k(p, { size: 16 }),
|
|
238
|
+
onSelect: () => Q("import-export")
|
|
239
|
+
}]
|
|
240
|
+
}),
|
|
241
|
+
children: [
|
|
242
|
+
/* @__PURE__ */ k(M, {
|
|
243
|
+
icon: /* @__PURE__ */ k(h, { size: 18 }),
|
|
244
|
+
children: F("movethewheels.orders.purpose", "Every delivery job lives here — B2B and B2C orders, their status, priority and value. Use this list to find an order, filter by status or type, and open one to assign a driver, track it, or update fulfilment.")
|
|
245
|
+
}),
|
|
246
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
247
|
+
className: "mb-3 text-sm font-medium text-text-secondary",
|
|
248
|
+
children: F("movethewheels.orders.glance.title", "Pipeline at a glance")
|
|
249
|
+
}), /* @__PURE__ */ A(x, {
|
|
250
|
+
columns: 4,
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ k(S, {
|
|
253
|
+
label: F("movethewheels.orders.glance.total", "Total orders"),
|
|
254
|
+
value: Z,
|
|
255
|
+
icon: /* @__PURE__ */ k(h, { size: 20 }),
|
|
256
|
+
accent: "brand"
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ k(S, {
|
|
259
|
+
label: F("movethewheels.orders.glance.pending", "Pending"),
|
|
260
|
+
value: X.byStatus.pending,
|
|
261
|
+
icon: /* @__PURE__ */ k(f, { size: 20 }),
|
|
262
|
+
accent: "warning",
|
|
263
|
+
subtitle: F("movethewheels.orders.glance.pendingSub", "Awaiting fulfilment")
|
|
264
|
+
}),
|
|
265
|
+
/* @__PURE__ */ k(S, {
|
|
266
|
+
label: F("movethewheels.orders.glance.inTransit", "In transit"),
|
|
267
|
+
value: X.byStatus.in_transit + X.byStatus.out_for_delivery,
|
|
268
|
+
icon: /* @__PURE__ */ k(_, { size: 20 }),
|
|
269
|
+
accent: "blue",
|
|
270
|
+
subtitle: F("movethewheels.orders.glance.inTransitSub", "On the road now")
|
|
271
|
+
}),
|
|
272
|
+
/* @__PURE__ */ k(S, {
|
|
273
|
+
label: F("movethewheels.orders.glance.delivered", "Delivered"),
|
|
274
|
+
value: X.byStatus.delivered,
|
|
275
|
+
icon: /* @__PURE__ */ k(ne, { size: 20 }),
|
|
276
|
+
accent: "success"
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
})] }),
|
|
280
|
+
/* @__PURE__ */ k(ee, { children: /* @__PURE__ */ k(a, {
|
|
281
|
+
className: "p-4",
|
|
282
|
+
children: /* @__PURE__ */ A("div", {
|
|
283
|
+
className: "flex flex-wrap items-center gap-4",
|
|
284
|
+
children: [
|
|
285
|
+
/* @__PURE__ */ A("div", {
|
|
286
|
+
className: "flex items-center gap-2",
|
|
287
|
+
children: [/* @__PURE__ */ k(m, {
|
|
288
|
+
size: 16,
|
|
289
|
+
className: "text-text-secondary"
|
|
290
|
+
}), /* @__PURE__ */ k("span", {
|
|
291
|
+
className: "text-sm font-medium",
|
|
292
|
+
children: F("movethewheels.orders.filters.label", "Filters:")
|
|
293
|
+
})]
|
|
294
|
+
}),
|
|
295
|
+
/* @__PURE__ */ A(r, {
|
|
296
|
+
value: R,
|
|
297
|
+
onValueChange: (e) => {
|
|
298
|
+
z(e), $();
|
|
299
|
+
},
|
|
300
|
+
children: [/* @__PURE__ */ k(n, {
|
|
301
|
+
className: "w-[180px]",
|
|
302
|
+
children: /* @__PURE__ */ k(i, { placeholder: F("movethewheels.orders.filters.status", "Status") })
|
|
303
|
+
}), /* @__PURE__ */ k(e, { children: ce.map((e) => /* @__PURE__ */ k(t, {
|
|
304
|
+
value: e.value,
|
|
305
|
+
children: e.label
|
|
306
|
+
}, e.value)) })]
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ A(r, {
|
|
309
|
+
value: B,
|
|
310
|
+
onValueChange: (e) => {
|
|
311
|
+
V(e), $();
|
|
312
|
+
},
|
|
313
|
+
children: [/* @__PURE__ */ k(n, {
|
|
314
|
+
className: "w-[150px]",
|
|
315
|
+
children: /* @__PURE__ */ k(i, { placeholder: F("movethewheels.orders.filters.type", "Type") })
|
|
316
|
+
}), /* @__PURE__ */ A(e, { children: [
|
|
317
|
+
/* @__PURE__ */ k(t, {
|
|
318
|
+
value: "all",
|
|
319
|
+
children: F("movethewheels.orders.filters.allTypes", "All Types")
|
|
320
|
+
}),
|
|
321
|
+
/* @__PURE__ */ k(t, {
|
|
322
|
+
value: "b2b",
|
|
323
|
+
children: "B2B"
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ k(t, {
|
|
326
|
+
value: "b2c",
|
|
327
|
+
children: "B2C"
|
|
328
|
+
})
|
|
329
|
+
] })]
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ A(u, {
|
|
332
|
+
variant: H ? "default" : "outline",
|
|
333
|
+
size: "sm",
|
|
334
|
+
onClick: () => {
|
|
335
|
+
U((e) => !e), $();
|
|
336
|
+
},
|
|
337
|
+
children: [/* @__PURE__ */ k(P, {
|
|
338
|
+
size: 14,
|
|
339
|
+
className: "mr-1"
|
|
340
|
+
}), F("movethewheels.orders.filters.unassigned", "Needs driver")]
|
|
341
|
+
}),
|
|
342
|
+
J && /* @__PURE__ */ k(u, {
|
|
343
|
+
variant: "ghost",
|
|
344
|
+
size: "sm",
|
|
345
|
+
onClick: () => {
|
|
346
|
+
z("all"), V("all"), U(!1), $();
|
|
347
|
+
},
|
|
348
|
+
children: F("movethewheels.orders.filters.clear", "Clear filters")
|
|
349
|
+
})
|
|
350
|
+
]
|
|
351
|
+
})
|
|
352
|
+
}) }),
|
|
353
|
+
/* @__PURE__ */ k(te, {
|
|
354
|
+
columns: se,
|
|
355
|
+
data: Y,
|
|
356
|
+
isLoading: ae,
|
|
357
|
+
searchable: !0,
|
|
358
|
+
searchPlaceholder: F("movethewheels.orders.searchPlaceholder", "Search orders..."),
|
|
359
|
+
searchFields: ["orderNumber", "customerInfo"],
|
|
360
|
+
onRowClick: (e) => Q(`orders/${e.id}`),
|
|
361
|
+
getRowId: (e) => e.id,
|
|
362
|
+
pageIndex: W,
|
|
363
|
+
pageSize: K,
|
|
364
|
+
onPageChange: G,
|
|
365
|
+
onPageSizeChange: (e) => {
|
|
366
|
+
q(e), G(0);
|
|
367
|
+
},
|
|
368
|
+
totalItems: J ? void 0 : Z,
|
|
369
|
+
hasNextPage: ie,
|
|
370
|
+
emptyMessage: F("movethewheels.orders.empty", "No orders found"),
|
|
371
|
+
emptyIllustration: "empty-data",
|
|
372
|
+
emptyTitle: F("movethewheels.orders.emptyTitle", "No orders yet"),
|
|
373
|
+
emptyDescription: F("movethewheels.orders.emptyDescription", "Create your first order to start moving shipments through the pipeline."),
|
|
374
|
+
emptyAction: /* @__PURE__ */ A(u, {
|
|
375
|
+
onClick: () => Q("orders/new"),
|
|
376
|
+
children: [/* @__PURE__ */ k(g, {
|
|
377
|
+
size: 16,
|
|
378
|
+
className: "mr-1.5"
|
|
379
|
+
}), F("movethewheels.orders.actions.newOrder", "New Order")]
|
|
380
|
+
})
|
|
381
|
+
})
|
|
382
|
+
]
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
//#endregion
|
|
386
|
+
export { F as default };
|
|
@@ -2012,4 +2012,4 @@ function an({ title: e = "Something went wrong", message: t, onRetry: n }) {
|
|
|
2012
2012
|
});
|
|
2013
2013
|
}
|
|
2014
2014
|
//#endregion
|
|
2015
|
-
export { ge as $, k as A, P as B, C, ie as D, w as E, oe as F, L as G, F as H, se as I, de as J, R as K, ce as L, Yt as M, j as N, T as O, ae as P, he as Q, M as R, S, re as T, ue as U, le as V, I as W, pe as X, fe as Y, me as Z, _, tn as a,
|
|
2015
|
+
export { ge as $, k as A, P as B, C, ie as D, w as E, oe as F, L as G, F as H, se as I, de as J, R as K, ce as L, Yt as M, j as N, T as O, ae as P, he as Q, M as R, S, re as T, ue as U, le as V, I as W, pe as X, fe as Y, me as Z, _, tn as a, je as at, b, Zt as c, ke as ct, p as d, _e as et, m as f, te as g, ee as h, en as i, Ne as it, A as j, E as k, d as l, Te as lt, g as m, an as n, ye as nt, Xt as o, De as ot, h as p, z as q, rn as r, $ as rt, Qt as s, Oe as st, nn as t, ve as tt, f as u, we as ut, v, ne as w, x, y, N as z };
|
|
@@ -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 {
|
|
10
|
-
import {
|
|
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-BniRJaQ6.js";
|
|
2
|
+
import { t as m } from "./arrow-left-ClW4Isj7.js";
|
|
3
|
+
import { t as h } from "./box-BT3NsRQP.js";
|
|
4
|
+
import { t as g } from "./dollar-sign-B6RoYHHz.js";
|
|
5
|
+
import { t as _ } from "./package-DmRF7iQD.js";
|
|
6
|
+
import { t as v } from "./save-UDlog7hg.js";
|
|
7
|
+
import { t as y } from "./square-pen-BcfB3Grd.js";
|
|
8
|
+
import { r as b, t as x } from "./useInventory-BSOn-R1c.js";
|
|
9
|
+
import { t as S } from "./FormError-BKcb_wT-.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(
|
|
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",
|
|
@@ -319,13 +319,13 @@ function N() {
|
|
|
319
319
|
}),
|
|
320
320
|
/* @__PURE__ */ E("p", {
|
|
321
321
|
className: "text-3xl font-bold",
|
|
322
|
-
children:
|
|
322
|
+
children: C(v.value)
|
|
323
323
|
}),
|
|
324
324
|
/* @__PURE__ */ E("p", {
|
|
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",
|