@burdenoff/microfe-movethewheels 2026.703.4 → 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-3YOnHO9Y.js → AIAssistantPage-D2gaEL1U.js} +16 -15
- package/dist/AnalyticsPage-DZMlEoBi.js +194 -0
- package/dist/{CreateOrderPage-DRAgGo9i.js → CreateOrderPage-CWHx8yys.js} +40 -40
- package/dist/{CustomerDetailsPage-BCeMmOFe.js → CustomerDetailsPage-nR4oZ_ju.js} +71 -71
- package/dist/CustomersPage-Bbvwvn8k.js +205 -0
- package/dist/DashboardPage-DrEhNf7N.js +542 -0
- package/dist/{DataTable-XvUcTjwi.js → DataTable-CqMUD4er.js} +31 -31
- package/dist/{DocumentsCard-U2lSe-cn.js → DocumentsCard-edDkgnJj.js} +25 -25
- package/dist/{DriverDetailsPage-BQrYd_Lp.js → DriverDetailsPage-whEMOWs9.js} +64 -64
- package/dist/DriversPage-CHF2ZEzd.js +221 -0
- package/dist/FinancePage-Dn9GrW-1.js +175 -0
- package/dist/{FleetPage-3ZHsB-TN.js → FleetPage-CrtGPy-p.js} +22 -22
- package/dist/{FormError-cuLV2jVD.js → FormError-BKcb_wT-.js} +1 -1
- package/dist/{ImportExportPage-C6f7DqhM.js → ImportExportPage-WYdwZomZ.js} +12 -12
- package/dist/InventoryPage-l5A1f753.js +259 -0
- package/dist/LiveTrackingPage-DhEaNKZ4.js +429 -0
- package/dist/{MarketplacePage-Bh_2ns4v.js → MarketplacePage-B9RYOb1Y.js} +116 -116
- package/dist/MetricCard-y3bWHKUQ.js +191 -0
- package/dist/{Notice-CSoDYKw9.js → Notice-DOO-tjpV.js} +2 -2
- package/dist/{OrderDetailsPage-zCj0lW0j.js → OrderDetailsPage-CwYHwk1K.js} +58 -58
- package/dist/OrdersListPage-DhZJoQeI.js +386 -0
- package/dist/{PageLayout-D4LDHJJq.js → PageLayout-BniRJaQ6.js} +1 -1
- package/dist/{ProductDetailsPage-wsxAQkA0.js → ProductDetailsPage-1Gm9JKy0.js} +55 -55
- package/dist/ProductsPage-C8sn-1tN.js +186 -0
- package/dist/ReportsPage-D1tb0dcz.js +377 -0
- package/dist/{RouteDetailsPage-DyMJE9AS.js → RouteDetailsPage-CkMyR9b_.js} +208 -181
- package/dist/{RoutesPage-Dtc669yc.js → RoutesPage-QkENzsE5.js} +12 -12
- package/dist/{SettingsPage-CpH9xhQg.js → SettingsPage-DV3_tU_X.js} +15 -15
- package/dist/Sparkline-K2RMJ58u.js +16729 -0
- package/dist/{StatusBadge-C87mDpDP.js → StatusBadge-BNHXYvZx.js} +7 -7
- package/dist/TrackingPage-BZrg4RCu.js +368 -0
- package/dist/{VehicleDetailsPage-DldYNsYV.js → VehicleDetailsPage-D-8XPZ2G.js} +53 -53
- package/dist/VehiclesPage-D5BELbtM.js +184 -0
- package/dist/{WarehouseDetailsPage-CMG7or6G.js → WarehouseDetailsPage-Cmg-8Frn.js} +64 -64
- package/dist/WarehousesPage-C1Y1M867.js +182 -0
- package/dist/{arrow-left-n48Y-Wis.js → arrow-left-ClW4Isj7.js} +1 -1
- package/dist/{arrow-right-Q3XQpTPR.js → arrow-right-CmKOmIkh.js} +1 -1
- package/dist/{arrow-up-xNF1zJUG.js → arrow-up-BJijRLAZ.js} +1 -1
- package/dist/{box-Eu05PXDh.js → box-BT3NsRQP.js} +1 -1
- package/dist/boxes-B_OGvQiW.js +54 -0
- package/dist/{chart-column-ouzgxIv_.js → chart-column-DQTTdUPk.js} +1 -1
- package/dist/charts-Tj_PPTfA.js +2018 -0
- package/dist/{chevron-left-B2_r0Elx.js → chevron-left-B1rZyWWb.js} +1 -1
- package/dist/{chevron-right-eV4LjaSi.js → chevron-right-BIcwUJZq.js} +1 -1
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/{circle-alert-Bzh2DBSF.js → circle-alert-CNkuDNc6.js} +1 -1
- package/dist/circle-check-Cs1OVjtV.js +13 -0
- package/dist/{circle-check-big-CGMSpQmD.js → circle-check-big-C-p4eNwn.js} +1 -1
- package/dist/{clock-Bl3ptexL.js → clock-dRGG4rkF.js} +1 -1
- package/dist/{dollar-sign-CAVU95SO.js → dollar-sign-B6RoYHHz.js} +1 -1
- package/dist/{download-C5NbvVDc.js → download-DP04iWTd.js} +1 -1
- package/dist/{file-text-D-1uvLZG.js → file-text-BuDx4hZp.js} +1 -1
- package/dist/{filter-DUfUg6BO.js → filter-BD483_8g.js} +1 -1
- package/dist/{fuel-B6_lnKDs.js → fuel-DLH1ag04.js} +1 -1
- package/dist/index.css +2 -0
- package/dist/index.js +214 -225
- package/dist/{map-C-M-FQLR.js → map-DNQn9fyY.js} +1 -1
- package/dist/{map-pin-Dznl5l40.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-BJSJl-VG.js → navigation-CgGUt2tR.js} +1 -1
- package/dist/{package-CcRttV2N.js → package-DmRF7iQD.js} +1 -1
- package/dist/{phone-DVSZHt_j.js → phone-Cl32EXKW.js} +1 -1
- package/dist/{plus-C_XZDwBz.js → plus-DlANgOFx.js} +1 -1
- package/dist/{refresh-cw-CfgN67l3.js → refresh-cw-rW59D4b7.js} +1 -1
- package/dist/route-CWjPrtAN.js +22 -0
- package/dist/{save-DJE8Fpdv.js → save-UDlog7hg.js} +1 -1
- package/dist/{search-D_VyGcZT.js → search-DNIG5Ck7.js} +1 -1
- package/dist/{square-pen-D-6JYrVQ.js → square-pen-BcfB3Grd.js} +1 -1
- package/dist/{star-BpRlUZuU.js → star-CVZHFwDx.js} +1 -1
- package/dist/{store-B-8HMuyZ.js → store-bwnmCK9f.js} +1 -1
- package/dist/{trash-2-8vmv-XV_.js → trash-2-B80G12d4.js} +1 -1
- package/dist/{trending-up-Dz6PqPRj.js → trending-up-CH4R4KOa.js} +1 -1
- package/dist/{triangle-alert-D7Y3J_4z.js → triangle-alert-CmS8AUU6.js} +1 -1
- package/dist/{truck-D-y2IDzv.js → truck-9rLDncav.js} +1 -1
- package/dist/{upload-CHZofOqb.js → upload-DanJY1Vo.js} +1 -1
- package/dist/{useAssistant-DVW4QgQb.js → useAssistant-CnEwkTLm.js} +11 -28
- package/dist/{useCustomers-BPW4__PR.js → useCustomers-ChJao1ET.js} +1 -1
- package/dist/{useFleet-ChBkxAd6.js → useFleet-g5Yri0G8.js} +1 -1
- package/dist/{useImportExport-DrPDHEDK.js → useImportExport-MYwIT3rE.js} +1 -1
- package/dist/{useInventory-CAAVMRp6.js → useInventory-BSOn-R1c.js} +1 -1
- package/dist/{useOrders-B465S2nt.js → useOrders-BSiqo61w.js} +1 -1
- package/dist/{useReports-jQ3GpNOm.js → useReports-fWESfsF9.js} +1 -1
- package/dist/{useRoutes-hS3d5-xr.js → useRoutes-zD8Yp323.js} +1 -1
- package/dist/{useSettings-BB8X2RLh.js → useSettings-B1lsWeZ1.js} +6 -6
- package/dist/{useTracking-RjGz9PZG.js → useTracking-BKG0I2ln.js} +3 -3
- package/dist/{user-DzfTn4dE.js → user-DU51el3m.js} +1 -1
- package/dist/{user-check-BEKRCi7v.js → user-check-IMhk-qkX.js} +1 -1
- package/dist/{users-CCrq-w0C.js → users-B8KhJBGg.js} +1 -1
- package/dist/{warehouse-CaqfmMKh.js → warehouse-CcMMioeY.js} +1 -1
- package/dist/{wrench-q_rgJfaP.js → wrench-Dg-sgH2e.js} +1 -1
- package/dist/{x-tMeDMcCw.js → x-C4ObLVEa.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/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
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { rt as e } from "./PageLayout-BniRJaQ6.js";
|
|
2
|
+
import { t } from "./Sparkline-K2RMJ58u.js";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { GlassCard as i } from "@burdenoff/fe-libs/ui";
|
|
5
|
+
//#region src/movethewheels/components/MetricCard.tsx
|
|
6
|
+
var a = {
|
|
7
|
+
sm: {
|
|
8
|
+
card: "p-3",
|
|
9
|
+
value: "text-xl font-bold",
|
|
10
|
+
label: "text-xs",
|
|
11
|
+
icon: "h-8 w-8"
|
|
12
|
+
},
|
|
13
|
+
md: {
|
|
14
|
+
card: "p-4",
|
|
15
|
+
value: "text-2xl font-bold",
|
|
16
|
+
label: "text-sm",
|
|
17
|
+
icon: "h-10 w-10"
|
|
18
|
+
},
|
|
19
|
+
lg: {
|
|
20
|
+
card: "p-5",
|
|
21
|
+
value: "text-3xl font-bold",
|
|
22
|
+
label: "text-sm",
|
|
23
|
+
icon: "h-11 w-11"
|
|
24
|
+
}
|
|
25
|
+
}, o = {
|
|
26
|
+
brand: "var(--color-brand-primary)",
|
|
27
|
+
blue: "var(--color-chart-1)",
|
|
28
|
+
success: "var(--color-status-success-text)",
|
|
29
|
+
warning: "var(--color-status-warning-text)",
|
|
30
|
+
error: "var(--color-status-error-text)",
|
|
31
|
+
neutral: "var(--color-text-secondary)"
|
|
32
|
+
}, s = {
|
|
33
|
+
brand: "bg-brand-primary/10 text-brand-primary",
|
|
34
|
+
blue: "bg-chart-1/10 text-chart-1",
|
|
35
|
+
success: "bg-status-success-bg-subtle text-status-success-text",
|
|
36
|
+
warning: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
37
|
+
error: "bg-status-error-bg-subtle text-status-error-text",
|
|
38
|
+
neutral: "bg-bg-sunken text-text-secondary"
|
|
39
|
+
};
|
|
40
|
+
function c({ direction: t }) {
|
|
41
|
+
return t === "flat" ? /* @__PURE__ */ n("svg", {
|
|
42
|
+
className: "h-3.5 w-3.5",
|
|
43
|
+
fill: "none",
|
|
44
|
+
viewBox: "0 0 24 24",
|
|
45
|
+
stroke: "currentColor",
|
|
46
|
+
"aria-hidden": !0,
|
|
47
|
+
children: /* @__PURE__ */ n("path", {
|
|
48
|
+
strokeLinecap: "round",
|
|
49
|
+
strokeLinejoin: "round",
|
|
50
|
+
strokeWidth: 2.5,
|
|
51
|
+
d: "M5 12h14"
|
|
52
|
+
})
|
|
53
|
+
}) : /* @__PURE__ */ n("svg", {
|
|
54
|
+
className: e("h-3.5 w-3.5", t === "down" && "rotate-180"),
|
|
55
|
+
fill: "none",
|
|
56
|
+
viewBox: "0 0 24 24",
|
|
57
|
+
stroke: "currentColor",
|
|
58
|
+
"aria-hidden": !0,
|
|
59
|
+
children: /* @__PURE__ */ n("path", {
|
|
60
|
+
strokeLinecap: "round",
|
|
61
|
+
strokeLinejoin: "round",
|
|
62
|
+
strokeWidth: 2.5,
|
|
63
|
+
d: "M12 19V5m0 0l-6 6m6-6l6 6"
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function l({ delta: t }) {
|
|
68
|
+
let i = t.direction === "flat" ? null : t.invert ? t.direction === "down" : t.direction === "up";
|
|
69
|
+
return /* @__PURE__ */ r("span", {
|
|
70
|
+
className: e("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-semibold tabular-nums", i == null ? "bg-bg-sunken text-text-secondary" : i ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"),
|
|
71
|
+
children: [/* @__PURE__ */ n(c, { direction: t.direction }), t.value]
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
var u = {
|
|
75
|
+
up: "M5 10l7-7m0 0l7 7m-7-7v18",
|
|
76
|
+
down: "M19 14l-7 7m0 0l-7-7m7 7V3",
|
|
77
|
+
flat: "M5 12h14"
|
|
78
|
+
};
|
|
79
|
+
function d({ value: c, label: d, icon: f, change: p, changeType: m = "neutral", subtitle: h, trend: g, size: _ = "md", onClick: v, className: y, treatment: b = "metric", glow: x = !1, sparklineData: S, delta: C, accent: w = "brand" }) {
|
|
80
|
+
let T = a[_], E = {
|
|
81
|
+
positive: "text-status-success-text",
|
|
82
|
+
negative: "text-status-error-text",
|
|
83
|
+
neutral: "text-text-secondary"
|
|
84
|
+
}, D = Array.isArray(S) && S.length >= 2;
|
|
85
|
+
return /* @__PURE__ */ r(i, {
|
|
86
|
+
treatment: b,
|
|
87
|
+
glow: x,
|
|
88
|
+
className: e("group relative overflow-hidden border-border-seam", v && "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg focus-visible:ring-offset-2 focus-visible:ring-offset-bg-base", y),
|
|
89
|
+
onClick: v,
|
|
90
|
+
...v ? {
|
|
91
|
+
role: "button",
|
|
92
|
+
tabIndex: 0,
|
|
93
|
+
onKeyDown: (e) => {
|
|
94
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), v());
|
|
95
|
+
}
|
|
96
|
+
} : {},
|
|
97
|
+
children: [/* @__PURE__ */ n("span", {
|
|
98
|
+
"aria-hidden": !0,
|
|
99
|
+
className: "absolute inset-x-0 top-0 h-0.5 opacity-70",
|
|
100
|
+
style: { background: `linear-gradient(90deg, ${o[w]}, transparent 85%)` }
|
|
101
|
+
}), /* @__PURE__ */ r("div", {
|
|
102
|
+
className: T.card,
|
|
103
|
+
children: [/* @__PURE__ */ r("div", {
|
|
104
|
+
className: "flex items-start justify-between gap-3",
|
|
105
|
+
children: [/* @__PURE__ */ r("div", {
|
|
106
|
+
className: "min-w-0 space-y-1",
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ n("p", {
|
|
109
|
+
className: e("text-text-secondary", T.label),
|
|
110
|
+
children: d
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ n("p", {
|
|
113
|
+
className: e("tracking-tight tabular-nums text-text-primary", T.value),
|
|
114
|
+
children: typeof c == "number" ? c.toLocaleString() : c
|
|
115
|
+
}),
|
|
116
|
+
h && /* @__PURE__ */ n("p", {
|
|
117
|
+
className: "text-xs text-text-secondary",
|
|
118
|
+
children: h
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
}), f && /* @__PURE__ */ n("div", {
|
|
122
|
+
className: e("flex shrink-0 items-center justify-center rounded-xl", s[w], T.icon),
|
|
123
|
+
children: f
|
|
124
|
+
})]
|
|
125
|
+
}), (C || D || p) && /* @__PURE__ */ r("div", {
|
|
126
|
+
className: "mt-3 flex items-end justify-between gap-3",
|
|
127
|
+
children: [/* @__PURE__ */ n("div", {
|
|
128
|
+
className: "flex items-center gap-2",
|
|
129
|
+
children: C ? /* @__PURE__ */ n(l, { delta: C }) : p && /* @__PURE__ */ r("span", {
|
|
130
|
+
className: e("flex items-center gap-1 text-sm tabular-nums", E[m]),
|
|
131
|
+
children: [g && /* @__PURE__ */ n("svg", {
|
|
132
|
+
className: "h-4 w-4",
|
|
133
|
+
fill: "none",
|
|
134
|
+
viewBox: "0 0 24 24",
|
|
135
|
+
stroke: "currentColor",
|
|
136
|
+
"aria-hidden": !0,
|
|
137
|
+
children: /* @__PURE__ */ n("path", {
|
|
138
|
+
strokeLinecap: "round",
|
|
139
|
+
strokeLinejoin: "round",
|
|
140
|
+
strokeWidth: 2,
|
|
141
|
+
d: u[g]
|
|
142
|
+
})
|
|
143
|
+
}), /* @__PURE__ */ n("span", { children: p })]
|
|
144
|
+
})
|
|
145
|
+
}), D && /* @__PURE__ */ n("div", {
|
|
146
|
+
className: "w-24 shrink-0 sm:w-28",
|
|
147
|
+
children: /* @__PURE__ */ n(t, {
|
|
148
|
+
data: S,
|
|
149
|
+
color: o[w],
|
|
150
|
+
height: 34
|
|
151
|
+
})
|
|
152
|
+
})]
|
|
153
|
+
})]
|
|
154
|
+
})]
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function f({ size: t = "md" }) {
|
|
158
|
+
let o = a[t];
|
|
159
|
+
return /* @__PURE__ */ n(i, {
|
|
160
|
+
treatment: "metric",
|
|
161
|
+
className: "overflow-hidden border-border-seam",
|
|
162
|
+
children: /* @__PURE__ */ n("div", {
|
|
163
|
+
className: o.card,
|
|
164
|
+
children: /* @__PURE__ */ r("div", {
|
|
165
|
+
className: "flex items-start justify-between",
|
|
166
|
+
children: [/* @__PURE__ */ r("div", {
|
|
167
|
+
className: "flex-1 space-y-2",
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ n("div", { className: "h-4 w-24 rounded bg-bg-sunken motion-safe:animate-vc-shimmer" }),
|
|
170
|
+
/* @__PURE__ */ n("div", { className: "h-8 w-32 rounded bg-bg-sunken motion-safe:animate-vc-shimmer" }),
|
|
171
|
+
/* @__PURE__ */ n("div", { className: "h-3 w-20 rounded bg-bg-sunken motion-safe:animate-vc-shimmer" })
|
|
172
|
+
]
|
|
173
|
+
}), /* @__PURE__ */ n("div", { className: e("rounded-xl bg-bg-sunken motion-safe:animate-vc-shimmer", o.icon) })]
|
|
174
|
+
})
|
|
175
|
+
})
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
function p({ children: t, columns: r = 4, className: i }) {
|
|
179
|
+
return /* @__PURE__ */ n("div", {
|
|
180
|
+
className: e("grid gap-4", {
|
|
181
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
182
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
183
|
+
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
184
|
+
5: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5",
|
|
185
|
+
6: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6"
|
|
186
|
+
}[r], i),
|
|
187
|
+
children: t
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
//#endregion
|
|
191
|
+
export { f as n, p as r, d as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./circle-check-big-
|
|
1
|
+
import { ut as e } from "./PageLayout-BniRJaQ6.js";
|
|
2
|
+
import { t } from "./circle-check-big-C-p4eNwn.js";
|
|
3
3
|
import { useCallback as n, useRef as r, useState as i } from "react";
|
|
4
4
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
5
|
//#region node_modules/lucide-react/dist/esm/icons/info.js
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { F as e, G as t, H as ee, I as n, K as te, L as r, P as i, R as a, U as ne, W as o,
|
|
2
|
-
import { t as se } from "./arrow-left-
|
|
3
|
-
import { t as ce } from "./arrow-right-
|
|
4
|
-
import { t as v } from "./circle-check-big-
|
|
5
|
-
import { t as le } from "./clock-
|
|
6
|
-
import { t as ue } from "./dollar-sign-
|
|
7
|
-
import { t as de } from "./DocumentsCard-
|
|
8
|
-
import { t as fe } from "./file-text-
|
|
9
|
-
import { n as pe, t as me } from "./Notice-
|
|
10
|
-
import { n as he, t as y } from "./phone-
|
|
11
|
-
import { t as b } from "./map-pin-
|
|
12
|
-
import { t as x } from "./package-
|
|
13
|
-
import { t as S } from "./square-pen-
|
|
14
|
-
import { t as ge } from "./truck-
|
|
15
|
-
import { t as _e } from "./user-check-
|
|
16
|
-
import { t as ve } from "./user-
|
|
17
|
-
import { r as ye, t as be } from "./useOrders-
|
|
18
|
-
import { r as xe } from "./useFleet-
|
|
19
|
-
import { i as Se, n as Ce, r as C, t as we } from "./StatusBadge-
|
|
20
|
-
import { t as Te } from "./FormError-
|
|
21
|
-
import { n as w, r as T, t as E } from "./formatters-
|
|
1
|
+
import { F as e, G as t, H as ee, I as n, K as te, L as r, P as i, R as a, U as ne, W as o, d as s, f as c, g as l, h as u, i as re, j as d, l as f, lt as p, n as ie, q as m, r as ae, st as oe, u as h, ut as g, z as _ } from "./PageLayout-BniRJaQ6.js";
|
|
2
|
+
import { t as se } from "./arrow-left-ClW4Isj7.js";
|
|
3
|
+
import { t as ce } from "./arrow-right-CmKOmIkh.js";
|
|
4
|
+
import { t as v } from "./circle-check-big-C-p4eNwn.js";
|
|
5
|
+
import { t as le } from "./clock-dRGG4rkF.js";
|
|
6
|
+
import { t as ue } from "./dollar-sign-B6RoYHHz.js";
|
|
7
|
+
import { t as de } from "./DocumentsCard-edDkgnJj.js";
|
|
8
|
+
import { t as fe } from "./file-text-BuDx4hZp.js";
|
|
9
|
+
import { n as pe, t as me } from "./Notice-DOO-tjpV.js";
|
|
10
|
+
import { n as he, t as y } from "./phone-Cl32EXKW.js";
|
|
11
|
+
import { t as b } from "./map-pin-CqN1bbT1.js";
|
|
12
|
+
import { t as x } from "./package-DmRF7iQD.js";
|
|
13
|
+
import { t as S } from "./square-pen-BcfB3Grd.js";
|
|
14
|
+
import { t as ge } from "./truck-9rLDncav.js";
|
|
15
|
+
import { t as _e } from "./user-check-IMhk-qkX.js";
|
|
16
|
+
import { t as ve } from "./user-DU51el3m.js";
|
|
17
|
+
import { r as ye, t as be } from "./useOrders-BSiqo61w.js";
|
|
18
|
+
import { r as xe } from "./useFleet-g5Yri0G8.js";
|
|
19
|
+
import { i as Se, n as Ce, r as C, t as we } from "./StatusBadge-BNHXYvZx.js";
|
|
20
|
+
import { t as Te } from "./FormError-BKcb_wT-.js";
|
|
21
|
+
import { n as w, r as T, t as E } from "./formatters-FWJDwTFv.js";
|
|
22
22
|
import { useState as D } from "react";
|
|
23
23
|
import { useParams as O } from "react-router-dom";
|
|
24
24
|
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
25
25
|
import { EmphasisPanel as j, NextSteps as Ee, PagePurpose as De } from "@burdenoff/fe-libs/ui";
|
|
26
26
|
//#region node_modules/lucide-react/dist/esm/icons/circle-x.js
|
|
27
|
-
var Oe =
|
|
27
|
+
var Oe = g("CircleX", [
|
|
28
28
|
["circle", {
|
|
29
29
|
cx: "12",
|
|
30
30
|
cy: "12",
|
|
@@ -39,7 +39,7 @@ var Oe = m("CircleX", [
|
|
|
39
39
|
d: "m9 9 6 6",
|
|
40
40
|
key: "z0biqf"
|
|
41
41
|
}]
|
|
42
|
-
]), M =
|
|
42
|
+
]), M = g("Printer", [
|
|
43
43
|
["path", {
|
|
44
44
|
d: "M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",
|
|
45
45
|
key: "143wyd"
|
|
@@ -80,14 +80,14 @@ function ke(e) {
|
|
|
80
80
|
return t === -1 || t >= N.length - 1 ? null : N[t + 1];
|
|
81
81
|
}
|
|
82
82
|
function F() {
|
|
83
|
-
let { orderId:
|
|
84
|
-
if (!
|
|
83
|
+
let { orderId: g } = O(), { basePath: N, navigate: F } = oe(), { order: I, isLoading: Ae, error: je, refetch: L } = be(g), { updateOrder: Me, updateOrderStatus: Ne } = ye(), { vehicles: Pe, drivers: Fe } = xe(), { message: R, notify: z } = pe(), [B, V] = D(""), [H, U] = D(""), [W, G] = D(!1), [K, q] = D(!1), [J, Y] = D(null), X = Pe.filter((e) => e.status === "available" || e.id === I?.vehicleId), Z = Fe.filter((e) => e.status === "available" || e.id === I?.driverId), Ie = async () => {
|
|
84
|
+
if (!g || !B && !H) {
|
|
85
85
|
Y("Pick a vehicle and/or a driver to assign.");
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
G(!0), Y(null);
|
|
89
89
|
try {
|
|
90
|
-
await Me(
|
|
90
|
+
await Me(g, {
|
|
91
91
|
vehicleId: B || void 0,
|
|
92
92
|
driverId: H || void 0
|
|
93
93
|
}), z("Assignment updated."), V(""), U(""), L();
|
|
@@ -97,10 +97,10 @@ function F() {
|
|
|
97
97
|
G(!1);
|
|
98
98
|
}
|
|
99
99
|
}, Q = async (e, t) => {
|
|
100
|
-
if (
|
|
100
|
+
if (g) {
|
|
101
101
|
q(!0), Y(null);
|
|
102
102
|
try {
|
|
103
|
-
await Ne(
|
|
103
|
+
await Ne(g, e), z(t), L();
|
|
104
104
|
} catch (e) {
|
|
105
105
|
Y(e instanceof Error ? e.message : "Failed to update status.");
|
|
106
106
|
} finally {
|
|
@@ -108,9 +108,9 @@ function F() {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}, $ = (e) => {
|
|
111
|
-
F && F(
|
|
111
|
+
F && F(p(N, e));
|
|
112
112
|
};
|
|
113
|
-
return Ae ? /* @__PURE__ */ k(
|
|
113
|
+
return Ae ? /* @__PURE__ */ k(ae, { message: "Loading order details..." }) : je || !I ? /* @__PURE__ */ k(ie, {
|
|
114
114
|
title: "Order not found",
|
|
115
115
|
message: "The order you're looking for doesn't exist or has been removed.",
|
|
116
116
|
onRetry: L
|
|
@@ -121,19 +121,19 @@ function F() {
|
|
|
121
121
|
headerActions: /* @__PURE__ */ A("div", {
|
|
122
122
|
className: "flex gap-2",
|
|
123
123
|
children: [
|
|
124
|
-
/* @__PURE__ */ A(
|
|
124
|
+
/* @__PURE__ */ A(h, {
|
|
125
125
|
variant: "outline",
|
|
126
126
|
onClick: () => {
|
|
127
|
-
F && F(
|
|
127
|
+
F && F(p(N, "orders"));
|
|
128
128
|
},
|
|
129
129
|
children: [/* @__PURE__ */ k(se, { size: 16 }), "Back"]
|
|
130
130
|
}),
|
|
131
|
-
/* @__PURE__ */ A(
|
|
131
|
+
/* @__PURE__ */ A(h, {
|
|
132
132
|
variant: "outline",
|
|
133
133
|
children: [/* @__PURE__ */ k(M, { size: 16 }), "Print"]
|
|
134
134
|
}),
|
|
135
|
-
/* @__PURE__ */ A(
|
|
136
|
-
onClick: () => $(`orders/${
|
|
135
|
+
/* @__PURE__ */ A(h, {
|
|
136
|
+
onClick: () => $(`orders/${g}/edit`),
|
|
137
137
|
children: [/* @__PURE__ */ k(S, { size: 16 }), "Edit"]
|
|
138
138
|
})
|
|
139
139
|
]
|
|
@@ -170,7 +170,7 @@ function F() {
|
|
|
170
170
|
label: "Edit order details",
|
|
171
171
|
description: "Update items, addresses or instructions before dispatch.",
|
|
172
172
|
icon: /* @__PURE__ */ k(S, { size: 16 }),
|
|
173
|
-
onClick: () => $(`orders/${
|
|
173
|
+
onClick: () => $(`orders/${g}/edit`)
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
id: "print",
|
|
@@ -186,10 +186,10 @@ function F() {
|
|
|
186
186
|
children: [/* @__PURE__ */ A("div", {
|
|
187
187
|
className: "lg:col-span-2 space-y-6",
|
|
188
188
|
children: [
|
|
189
|
-
/* @__PURE__ */ A(
|
|
189
|
+
/* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, { children: /* @__PURE__ */ A(l, {
|
|
190
190
|
className: "flex items-center gap-2",
|
|
191
191
|
children: [/* @__PURE__ */ k(ve, { size: 18 }), "Customer Information"]
|
|
192
|
-
}) }), /* @__PURE__ */ k(
|
|
192
|
+
}) }), /* @__PURE__ */ k(c, { children: /* @__PURE__ */ A("div", {
|
|
193
193
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
194
194
|
children: [/* @__PURE__ */ A("div", { children: [
|
|
195
195
|
/* @__PURE__ */ k("h4", {
|
|
@@ -233,15 +233,15 @@ function F() {
|
|
|
233
233
|
children: I.customerInfo.deliveryInstructions
|
|
234
234
|
})] })] })]
|
|
235
235
|
}) })] }),
|
|
236
|
-
/* @__PURE__ */ A(
|
|
236
|
+
/* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, { children: /* @__PURE__ */ A(l, {
|
|
237
237
|
className: "flex items-center gap-2",
|
|
238
238
|
children: [/* @__PURE__ */ k(b, { size: 18 }), "Addresses"]
|
|
239
|
-
}) }), /* @__PURE__ */ k(
|
|
239
|
+
}) }), /* @__PURE__ */ k(c, { children: /* @__PURE__ */ A("div", {
|
|
240
240
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
241
241
|
children: [/* @__PURE__ */ A("div", { children: [
|
|
242
242
|
/* @__PURE__ */ k("h4", {
|
|
243
243
|
className: "font-medium mb-2 flex items-center gap-2",
|
|
244
|
-
children: /* @__PURE__ */ k(
|
|
244
|
+
children: /* @__PURE__ */ k(f, {
|
|
245
245
|
variant: "outline",
|
|
246
246
|
children: "Pickup"
|
|
247
247
|
})
|
|
@@ -268,7 +268,7 @@ function F() {
|
|
|
268
268
|
] }), /* @__PURE__ */ A("div", { children: [
|
|
269
269
|
/* @__PURE__ */ k("h4", {
|
|
270
270
|
className: "font-medium mb-2 flex items-center gap-2",
|
|
271
|
-
children: /* @__PURE__ */ k(
|
|
271
|
+
children: /* @__PURE__ */ k(f, {
|
|
272
272
|
variant: "outline",
|
|
273
273
|
children: "Delivery"
|
|
274
274
|
})
|
|
@@ -294,7 +294,7 @@ function F() {
|
|
|
294
294
|
})
|
|
295
295
|
] })]
|
|
296
296
|
}) })] }),
|
|
297
|
-
/* @__PURE__ */ A(
|
|
297
|
+
/* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, { children: /* @__PURE__ */ A(l, {
|
|
298
298
|
className: "flex items-center gap-2",
|
|
299
299
|
children: [
|
|
300
300
|
/* @__PURE__ */ k(x, { size: 18 }),
|
|
@@ -302,9 +302,9 @@ function F() {
|
|
|
302
302
|
I.items.length,
|
|
303
303
|
")"
|
|
304
304
|
]
|
|
305
|
-
}) }), /* @__PURE__ */ k(
|
|
305
|
+
}) }), /* @__PURE__ */ k(c, {
|
|
306
306
|
className: "p-0",
|
|
307
|
-
children: /* @__PURE__ */ A(ee, { children: [/* @__PURE__ */ k(te, { children: /* @__PURE__ */ A(
|
|
307
|
+
children: /* @__PURE__ */ A(ee, { children: [/* @__PURE__ */ k(te, { children: /* @__PURE__ */ A(m, { children: [
|
|
308
308
|
/* @__PURE__ */ k(t, { children: "Item" }),
|
|
309
309
|
/* @__PURE__ */ k(t, { children: "SKU" }),
|
|
310
310
|
/* @__PURE__ */ k(t, {
|
|
@@ -319,7 +319,7 @@ function F() {
|
|
|
319
319
|
className: "text-right",
|
|
320
320
|
children: "Total"
|
|
321
321
|
})
|
|
322
|
-
] }) }), /* @__PURE__ */ k(ne, { children: I.items.map((e) => /* @__PURE__ */ A(
|
|
322
|
+
] }) }), /* @__PURE__ */ k(ne, { children: I.items.map((e) => /* @__PURE__ */ A(m, { children: [
|
|
323
323
|
/* @__PURE__ */ k(o, { children: /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
324
324
|
className: "font-medium",
|
|
325
325
|
children: e.name
|
|
@@ -345,10 +345,10 @@ function F() {
|
|
|
345
345
|
})
|
|
346
346
|
] }, e.id)) })] })
|
|
347
347
|
})] }),
|
|
348
|
-
/* @__PURE__ */ A(
|
|
348
|
+
/* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, { children: /* @__PURE__ */ A(l, {
|
|
349
349
|
className: "flex items-center gap-2",
|
|
350
350
|
children: [/* @__PURE__ */ k(le, { size: 18 }), "Order Timeline"]
|
|
351
|
-
}) }), /* @__PURE__ */ k(
|
|
351
|
+
}) }), /* @__PURE__ */ k(c, { children: /* @__PURE__ */ k("div", {
|
|
352
352
|
className: "relative",
|
|
353
353
|
children: I.timeline.map((e, t) => /* @__PURE__ */ A("div", {
|
|
354
354
|
className: "flex gap-4 pb-6 last:pb-0",
|
|
@@ -446,10 +446,10 @@ function F() {
|
|
|
446
446
|
})
|
|
447
447
|
]
|
|
448
448
|
})] }),
|
|
449
|
-
/* @__PURE__ */ A(
|
|
449
|
+
/* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, { children: /* @__PURE__ */ A(l, {
|
|
450
450
|
className: "flex items-center gap-2",
|
|
451
451
|
children: [/* @__PURE__ */ k(ge, { size: 18 }), "Assignment"]
|
|
452
|
-
}) }), /* @__PURE__ */ k(
|
|
452
|
+
}) }), /* @__PURE__ */ k(c, { children: /* @__PURE__ */ A("div", {
|
|
453
453
|
className: "space-y-4",
|
|
454
454
|
children: [
|
|
455
455
|
J && /* @__PURE__ */ k(Te, { message: J }),
|
|
@@ -467,7 +467,7 @@ function F() {
|
|
|
467
467
|
children: [
|
|
468
468
|
/* @__PURE__ */ A("div", {
|
|
469
469
|
className: "space-y-1.5",
|
|
470
|
-
children: [/* @__PURE__ */ k(
|
|
470
|
+
children: [/* @__PURE__ */ k(d, {
|
|
471
471
|
htmlFor: "assign-vehicle",
|
|
472
472
|
children: "Vehicle"
|
|
473
473
|
}), /* @__PURE__ */ A(i, {
|
|
@@ -493,7 +493,7 @@ function F() {
|
|
|
493
493
|
}),
|
|
494
494
|
/* @__PURE__ */ A("div", {
|
|
495
495
|
className: "space-y-1.5",
|
|
496
|
-
children: [/* @__PURE__ */ k(
|
|
496
|
+
children: [/* @__PURE__ */ k(d, {
|
|
497
497
|
htmlFor: "assign-driver",
|
|
498
498
|
children: "Driver"
|
|
499
499
|
}), /* @__PURE__ */ A(i, {
|
|
@@ -517,7 +517,7 @@ function F() {
|
|
|
517
517
|
}, e.id)) })]
|
|
518
518
|
})]
|
|
519
519
|
}),
|
|
520
|
-
/* @__PURE__ */ A(
|
|
520
|
+
/* @__PURE__ */ A(h, {
|
|
521
521
|
className: "w-full",
|
|
522
522
|
onClick: Ie,
|
|
523
523
|
disabled: W || !B && !H,
|
|
@@ -538,7 +538,7 @@ function F() {
|
|
|
538
538
|
}),
|
|
539
539
|
(() => {
|
|
540
540
|
let e = ke(I.status);
|
|
541
|
-
return e ? /* @__PURE__ */ A(
|
|
541
|
+
return e ? /* @__PURE__ */ A(h, {
|
|
542
542
|
variant: "outline",
|
|
543
543
|
className: "w-full",
|
|
544
544
|
onClick: () => Q(e, `Order advanced to ${P[e]}.`),
|
|
@@ -546,7 +546,7 @@ function F() {
|
|
|
546
546
|
children: [/* @__PURE__ */ k(ce, { size: 16 }), K ? "Updating…" : `Advance to ${P[e]}`]
|
|
547
547
|
}) : null;
|
|
548
548
|
})(),
|
|
549
|
-
I.status !== "cancelled" && I.status !== "delivered" && /* @__PURE__ */ A(
|
|
549
|
+
I.status !== "cancelled" && I.status !== "delivered" && /* @__PURE__ */ A(h, {
|
|
550
550
|
variant: "outline",
|
|
551
551
|
className: "w-full text-status-error-text",
|
|
552
552
|
onClick: () => Q("cancelled", "Order cancelled."),
|
|
@@ -555,7 +555,7 @@ function F() {
|
|
|
555
555
|
})
|
|
556
556
|
]
|
|
557
557
|
}),
|
|
558
|
-
/* @__PURE__ */ A(
|
|
558
|
+
/* @__PURE__ */ A(h, {
|
|
559
559
|
variant: "outline",
|
|
560
560
|
className: "w-full",
|
|
561
561
|
onClick: () => $(`tracking?order=${I.id}`),
|
|
@@ -567,10 +567,10 @@ function F() {
|
|
|
567
567
|
entityType: "order",
|
|
568
568
|
entityId: I.id
|
|
569
569
|
}),
|
|
570
|
-
I.specialInstructions && /* @__PURE__ */ A(
|
|
570
|
+
I.specialInstructions && /* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, { children: /* @__PURE__ */ A(l, {
|
|
571
571
|
className: "flex items-center gap-2",
|
|
572
572
|
children: [/* @__PURE__ */ k(fe, { size: 18 }), "Special Instructions"]
|
|
573
|
-
}) }), /* @__PURE__ */ k(
|
|
573
|
+
}) }), /* @__PURE__ */ k(c, { children: /* @__PURE__ */ k("p", {
|
|
574
574
|
className: "text-sm",
|
|
575
575
|
children: I.specialInstructions
|
|
576
576
|
}) })] })
|