@burdenoff/microfe-movethewheels 2026.703.4 → 2026.703.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AIAssistantPage-3YOnHO9Y.js → AIAssistantPage-BmILdHgO.js} +16 -15
- package/dist/AnalyticsPage-BSlsiSDE.js +194 -0
- package/dist/{CreateOrderPage-DRAgGo9i.js → CreateOrderPage-DaCgVaO3.js} +40 -40
- package/dist/{CustomerDetailsPage-BCeMmOFe.js → CustomerDetailsPage-DErpbafW.js} +71 -71
- package/dist/CustomersPage-C1lRU6xs.js +205 -0
- package/dist/DashboardPage-Q5-5EKAU.js +542 -0
- package/dist/{DataTable-XvUcTjwi.js → DataTable-KjzbwnRL.js} +31 -31
- package/dist/{DocumentsCard-U2lSe-cn.js → DocumentsCard-T9y6cv4-.js} +25 -25
- package/dist/{DriverDetailsPage-BQrYd_Lp.js → DriverDetailsPage-DnHGkDC7.js} +64 -64
- package/dist/DriversPage-C0ujWVOn.js +221 -0
- package/dist/FinancePage-CA2XEgsQ.js +175 -0
- package/dist/{FleetPage-3ZHsB-TN.js → FleetPage-DrvXW7wK.js} +22 -22
- package/dist/{FormError-cuLV2jVD.js → FormError-CRsMP7TQ.js} +1 -1
- package/dist/{ImportExportPage-C6f7DqhM.js → ImportExportPage-Cac9HjFx.js} +12 -12
- package/dist/InventoryPage-Ezf4gqKI.js +259 -0
- package/dist/LiveTrackingPage-CzbVwDqK.js +429 -0
- package/dist/{MarketplacePage-Bh_2ns4v.js → MarketplacePage-BHDmSQmo.js} +116 -116
- package/dist/MetricCard-DQlDNqmK.js +191 -0
- package/dist/{Notice-CSoDYKw9.js → Notice-GmA7JDR3.js} +2 -2
- package/dist/{OrderDetailsPage-zCj0lW0j.js → OrderDetailsPage-CR0Wc1aN.js} +58 -58
- package/dist/OrdersListPage-C8Bu6wXM.js +386 -0
- package/dist/{PageLayout-D4LDHJJq.js → PageLayout-DX1Ou6V6.js} +164 -134
- package/dist/{ProductDetailsPage-wsxAQkA0.js → ProductDetailsPage-B_ns2MOe.js} +55 -55
- package/dist/ProductsPage-c92BsEoA.js +186 -0
- package/dist/ReportsPage-CPLXtLT2.js +377 -0
- package/dist/{RouteDetailsPage-DyMJE9AS.js → RouteDetailsPage-DOfcRiFv.js} +208 -181
- package/dist/{RoutesPage-Dtc669yc.js → RoutesPage-BZGublby.js} +12 -12
- package/dist/{SettingsPage-CpH9xhQg.js → SettingsPage-5cweX_xh.js} +15 -15
- package/dist/Sparkline-zSXvG6vA.js +16729 -0
- package/dist/{StatusBadge-C87mDpDP.js → StatusBadge-oZjownr1.js} +7 -7
- package/dist/TrackingPage-Ln9qVflK.js +368 -0
- package/dist/{VehicleDetailsPage-DldYNsYV.js → VehicleDetailsPage-CrkzE0dN.js} +53 -53
- package/dist/VehiclesPage-CTQWH7af.js +184 -0
- package/dist/{WarehouseDetailsPage-CMG7or6G.js → WarehouseDetailsPage-CwDLaG65.js} +64 -64
- package/dist/WarehousesPage-KW02DvZg.js +182 -0
- package/dist/{arrow-left-n48Y-Wis.js → arrow-left-DJDw_Yqv.js} +1 -1
- package/dist/{arrow-right-Q3XQpTPR.js → arrow-right-Cb2fLTPJ.js} +1 -1
- package/dist/{arrow-up-xNF1zJUG.js → arrow-up-PxaOIyiT.js} +1 -1
- package/dist/{box-Eu05PXDh.js → box-hSJVtvGf.js} +1 -1
- package/dist/boxes-DDnxEkT5.js +54 -0
- package/dist/{chart-column-ouzgxIv_.js → chart-column-xXgAZvRl.js} +1 -1
- package/dist/charts-CfCwQg6o.js +2018 -0
- package/dist/{chevron-left-B2_r0Elx.js → chevron-left-dhEGJYdh.js} +1 -1
- package/dist/{chevron-right-eV4LjaSi.js → chevron-right-Cud2NDvm.js} +1 -1
- package/dist/chunk-BdsCSvBP.js +20 -0
- package/dist/{circle-alert-Bzh2DBSF.js → circle-alert-Rx0p3D5w.js} +1 -1
- package/dist/circle-check-BCxRFdFo.js +13 -0
- package/dist/{circle-check-big-CGMSpQmD.js → circle-check-big-BcIJ8xjx.js} +1 -1
- package/dist/{clock-Bl3ptexL.js → clock-B2_YxJgB.js} +1 -1
- package/dist/{dollar-sign-CAVU95SO.js → dollar-sign-CQmAICv4.js} +1 -1
- package/dist/{download-C5NbvVDc.js → download-CG4Tponq.js} +1 -1
- package/dist/{file-text-D-1uvLZG.js → file-text-CzH-zMub.js} +1 -1
- package/dist/{filter-DUfUg6BO.js → filter-C0u2Lwfn.js} +1 -1
- package/dist/{fuel-B6_lnKDs.js → fuel-C2KELcM-.js} +1 -1
- package/dist/index.css +2 -0
- package/dist/index.js +214 -225
- package/dist/{map-C-M-FQLR.js → map-FuPu5aTw.js} +1 -1
- package/dist/{map-pin-Dznl5l40.js → map-pin-czpLv9uy.js} +1 -1
- package/dist/mapMarkers-NCV9MRKR.js +28 -0
- package/dist/maps-D9m7PKrs.js +5070 -0
- package/dist/{navigation-BJSJl-VG.js → navigation-D5_pdCSS.js} +1 -1
- package/dist/{package-CcRttV2N.js → package-B0sdi6lU.js} +1 -1
- package/dist/{phone-DVSZHt_j.js → phone-V2nuzPu9.js} +1 -1
- package/dist/{plus-C_XZDwBz.js → plus-BqQxkfoU.js} +1 -1
- package/dist/{refresh-cw-CfgN67l3.js → refresh-cw-CEOAPEcV.js} +1 -1
- package/dist/route-CZWcW-Dw.js +22 -0
- package/dist/{save-DJE8Fpdv.js → save-DDFvrxWl.js} +1 -1
- package/dist/{search-D_VyGcZT.js → search-D7Ya6jxj.js} +1 -1
- package/dist/{square-pen-D-6JYrVQ.js → square-pen-DoZZS4Lw.js} +1 -1
- package/dist/{star-BpRlUZuU.js → star-B7PgVu5j.js} +1 -1
- package/dist/{store-B-8HMuyZ.js → store-YVzcIG4A.js} +1 -1
- package/dist/{trash-2-8vmv-XV_.js → trash-2-BegnBzwI.js} +1 -1
- package/dist/{trending-up-Dz6PqPRj.js → trending-up-DBd3XNdb.js} +1 -1
- package/dist/{triangle-alert-D7Y3J_4z.js → triangle-alert-Bxk3Kgs6.js} +1 -1
- package/dist/{truck-D-y2IDzv.js → truck-Clrn0oHp.js} +1 -1
- package/dist/{upload-CHZofOqb.js → upload-Df5JmMwH.js} +1 -1
- package/dist/{useAssistant-DVW4QgQb.js → useAssistant-Cb8nnIVC.js} +11 -28
- package/dist/{useCustomers-BPW4__PR.js → useCustomers-Dq2IR2HQ.js} +1 -1
- package/dist/{useFleet-ChBkxAd6.js → useFleet-CapnWBcA.js} +1 -1
- package/dist/{useImportExport-DrPDHEDK.js → useImportExport-BoGzrlJy.js} +1 -1
- package/dist/{useInventory-CAAVMRp6.js → useInventory-Ci6M2d9f.js} +1 -1
- package/dist/{useOrders-B465S2nt.js → useOrders-BuQU1OHX.js} +1 -1
- package/dist/{useReports-jQ3GpNOm.js → useReports-DIx8W7CO.js} +1 -1
- package/dist/{useRoutes-hS3d5-xr.js → useRoutes-D7EvI_pm.js} +1 -1
- package/dist/{useSettings-BB8X2RLh.js → useSettings-BhX251UQ.js} +6 -6
- package/dist/{useTracking-RjGz9PZG.js → useTracking-C40jmZ6W.js} +3 -3
- package/dist/{user-DzfTn4dE.js → user-BlcJrbtE.js} +1 -1
- package/dist/{user-check-BEKRCi7v.js → user-check-DtnQmimP.js} +1 -1
- package/dist/{users-CCrq-w0C.js → users-Cvwko-Dx.js} +1 -1
- package/dist/{warehouse-CaqfmMKh.js → warehouse-LWLVTk6G.js} +1 -1
- package/dist/{wrench-q_rgJfaP.js → wrench-Cme0RbyR.js} +1 -1
- package/dist/{x-tMeDMcCw.js → x-D8C9Pg5V.js} +1 -1
- package/package.json +5 -1
- package/src/movethewheels/components/GlassPanel.tsx +71 -0
- package/src/movethewheels/components/MetricCard.tsx +171 -73
- package/src/movethewheels/components/StatusBadge.tsx +7 -6
- package/src/movethewheels/components/charts/ChartShell.tsx +78 -0
- package/src/movethewheels/components/charts/Sparkline.tsx +85 -0
- package/src/movethewheels/components/charts/StatusDonut.tsx +115 -0
- package/src/movethewheels/components/charts/TrendChart.tsx +179 -0
- package/src/movethewheels/components/charts/VolumeBar.tsx +97 -0
- package/src/movethewheels/components/charts/chartTokens.ts +43 -0
- package/src/movethewheels/components/charts/index.ts +9 -0
- package/src/movethewheels/components/index.ts +44 -1
- package/src/movethewheels/components/maps/LogisticsMap.tsx +94 -0
- package/src/movethewheels/components/maps/MapCanvas.tsx +118 -0
- package/src/movethewheels/components/maps/RouteMap.tsx +71 -0
- package/src/movethewheels/components/maps/TrackingMap.tsx +102 -0
- package/src/movethewheels/components/maps/index.ts +16 -0
- package/src/movethewheels/components/maps/leaflet-setup.ts +124 -0
- package/src/movethewheels/components/maps/map-markers.css +121 -0
- package/src/movethewheels/hooks/useAnalytics.ts +14 -4
- package/src/movethewheels/pages/AnalyticsPage.tsx +93 -73
- package/src/movethewheels/pages/CreateOrderPage.tsx +4 -4
- package/src/movethewheels/pages/CustomersPage.tsx +29 -20
- package/src/movethewheels/pages/DashboardPage.tsx +238 -12
- package/src/movethewheels/pages/DriverDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/DriversPage.tsx +35 -24
- package/src/movethewheels/pages/FinancePage.tsx +68 -30
- package/src/movethewheels/pages/InventoryPage.tsx +15 -3
- package/src/movethewheels/pages/LiveTrackingPage.tsx +124 -16
- package/src/movethewheels/pages/OrdersListPage.tsx +46 -38
- package/src/movethewheels/pages/ProductsPage.tsx +28 -24
- package/src/movethewheels/pages/ReportsPage.tsx +23 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +46 -7
- package/src/movethewheels/pages/SettingsPage.tsx +2 -2
- package/src/movethewheels/pages/TrackingPage.tsx +76 -6
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/VehiclesPage.tsx +34 -24
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +1 -1
- package/src/movethewheels/pages/WarehousesPage.tsx +28 -22
- package/src/movethewheels/types/index.ts +1 -1
- package/src/movethewheels/utils/graphqlClient.ts +81 -31
- package/src/movethewheels/utils/mapMarkers.ts +58 -0
- package/dist/AnalyticsPage-CMpI1070.js +0 -215
- package/dist/CustomersPage-CaNBMXmM.js +0 -172
- package/dist/DashboardPage-DIKlXde3.js +0 -387
- package/dist/DriversPage-PYmdFiby.js +0 -176
- package/dist/FinancePage-Cwh9Bw4M.js +0 -136
- package/dist/InventoryPage-DpiqVu1v.js +0 -253
- package/dist/LiveTrackingPage-FAzzlVnX.js +0 -379
- package/dist/MetricCard-CVBVpu7o.js +0 -146
- package/dist/OrdersListPage-CAMsuUck.js +0 -384
- package/dist/ProductsPage-DC5qDLfz.js +0 -180
- package/dist/ReportsPage-BwUJ37eO.js +0 -356
- package/dist/TrackingPage-DaNEFG_h.js +0 -325
- package/dist/VehiclesPage-BFw13iMt.js +0 -176
- package/dist/WarehousesPage-Wkytnt86.js +0 -173
- package/dist/useAnalytics-D7HW2XRb.js +0 -347
- /package/dist/{formatters-BQr-aR5W.js → formatters-FWJDwTFv.js} +0 -0
|
@@ -1,356 +0,0 @@
|
|
|
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 ee, h as c, i as l, l as u, lt as d, u as f } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as p } from "./chevron-left-B2_r0Elx.js";
|
|
3
|
-
import { t as m } from "./chevron-right-eV4LjaSi.js";
|
|
4
|
-
import { t as h } from "./clock-Bl3ptexL.js";
|
|
5
|
-
import { t as g } from "./download-C5NbvVDc.js";
|
|
6
|
-
import { t as _ } from "./filter-DUfUg6BO.js";
|
|
7
|
-
import { t as v } from "./plus-C_XZDwBz.js";
|
|
8
|
-
import { t as y } from "./useReports-jQ3GpNOm.js";
|
|
9
|
-
import { r as b } from "./formatters-BQr-aR5W.js";
|
|
10
|
-
import { useState as x } from "react";
|
|
11
|
-
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
12
|
-
import { EmphasisPanel as w, IllustratedEmptyState as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
|
|
13
|
-
//#region node_modules/lucide-react/dist/esm/icons/calendar.js
|
|
14
|
-
var D = d("Calendar", [
|
|
15
|
-
["path", {
|
|
16
|
-
d: "M8 2v4",
|
|
17
|
-
key: "1cmpym"
|
|
18
|
-
}],
|
|
19
|
-
["path", {
|
|
20
|
-
d: "M16 2v4",
|
|
21
|
-
key: "4m81vk"
|
|
22
|
-
}],
|
|
23
|
-
["rect", {
|
|
24
|
-
width: "18",
|
|
25
|
-
height: "18",
|
|
26
|
-
x: "3",
|
|
27
|
-
y: "4",
|
|
28
|
-
rx: "2",
|
|
29
|
-
key: "1hopcy"
|
|
30
|
-
}],
|
|
31
|
-
["path", {
|
|
32
|
-
d: "M3 10h18",
|
|
33
|
-
key: "8toen8"
|
|
34
|
-
}]
|
|
35
|
-
]), O = d("FileChartColumnIncreasing", [
|
|
36
|
-
["path", {
|
|
37
|
-
d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
|
|
38
|
-
key: "1rqfz7"
|
|
39
|
-
}],
|
|
40
|
-
["path", {
|
|
41
|
-
d: "M14 2v4a2 2 0 0 0 2 2h4",
|
|
42
|
-
key: "tnqrlb"
|
|
43
|
-
}],
|
|
44
|
-
["path", {
|
|
45
|
-
d: "M8 18v-2",
|
|
46
|
-
key: "qcmpov"
|
|
47
|
-
}],
|
|
48
|
-
["path", {
|
|
49
|
-
d: "M12 18v-4",
|
|
50
|
-
key: "q1q25u"
|
|
51
|
-
}],
|
|
52
|
-
["path", {
|
|
53
|
-
d: "M16 18v-6",
|
|
54
|
-
key: "15y0np"
|
|
55
|
-
}]
|
|
56
|
-
]);
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/movethewheels/utils/download.ts
|
|
59
|
-
function k(e, t, n) {
|
|
60
|
-
if (typeof document > "u") return;
|
|
61
|
-
let r = new Blob([t], { type: n }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
62
|
-
a.href = i, a.download = e, document.body.appendChild(a), a.click(), a.remove(), URL.revokeObjectURL(i);
|
|
63
|
-
}
|
|
64
|
-
function A(e, t) {
|
|
65
|
-
k(e, JSON.stringify(t, null, 2), "application/json");
|
|
66
|
-
}
|
|
67
|
-
function j(e) {
|
|
68
|
-
if (!e || typeof e != "object") return null;
|
|
69
|
-
let t = Object.entries(e);
|
|
70
|
-
if (t.length === 0) return null;
|
|
71
|
-
let n = (e) => /[",\n]/.test(e) ? `"${e.replace(/"/g, "\"\"")}"` : e, r = (e) => e == null ? "" : typeof e == "object" ? JSON.stringify(e) : String(e), i = ["Field,Value"];
|
|
72
|
-
for (let [e, a] of t) i.push(`${n(e)},${n(r(a))}`);
|
|
73
|
-
return i.join("\n");
|
|
74
|
-
}
|
|
75
|
-
function M(e) {
|
|
76
|
-
return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "report";
|
|
77
|
-
}
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/movethewheels/pages/ReportsPage.tsx
|
|
80
|
-
var N = [
|
|
81
|
-
{
|
|
82
|
-
value: "operations",
|
|
83
|
-
label: "Operations Summary"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
value: "finance",
|
|
87
|
-
label: "Financial Report"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
value: "fleet",
|
|
91
|
-
label: "Fleet Utilization"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
value: "customers",
|
|
95
|
-
label: "Customer Analytics"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
value: "inventory",
|
|
99
|
-
label: "Inventory Status"
|
|
100
|
-
}
|
|
101
|
-
], P = 10;
|
|
102
|
-
function F() {
|
|
103
|
-
let [d, F] = x(0), { reports: I, hasMore: L, isLoading: R, error: z, refetch: B, createReport: V, generateReport: H } = y({
|
|
104
|
-
limit: P,
|
|
105
|
-
offset: d * P
|
|
106
|
-
}), [U, W] = x("operations"), [G, K] = x(null), [q, J] = x(!1), [Y, X] = x(null), Z = (e) => N.find((t) => t.value === e)?.label ?? e, Q = async (e) => {
|
|
107
|
-
J(!0), X(null);
|
|
108
|
-
let t = {
|
|
109
|
-
name: `${Z(U)}${e ? " (Scheduled)" : ""}`,
|
|
110
|
-
type: U,
|
|
111
|
-
description: `${Z(U)} generated from live operational data`,
|
|
112
|
-
...e ? { schedule: e } : {}
|
|
113
|
-
};
|
|
114
|
-
try {
|
|
115
|
-
await V(t), X({
|
|
116
|
-
tone: "success",
|
|
117
|
-
text: e ? "Scheduled report created." : "Report created."
|
|
118
|
-
});
|
|
119
|
-
} catch (e) {
|
|
120
|
-
X({
|
|
121
|
-
tone: "error",
|
|
122
|
-
text: e instanceof Error ? e.message : "Could not create report."
|
|
123
|
-
});
|
|
124
|
-
} finally {
|
|
125
|
-
J(!1);
|
|
126
|
-
}
|
|
127
|
-
}, te = async (e) => {
|
|
128
|
-
K(e), X(null);
|
|
129
|
-
try {
|
|
130
|
-
let t = await H(e), n = `${M(t.report.name)}-${t.generatedAt.slice(0, 10)}`, r = j(t.result ?? null);
|
|
131
|
-
r ? k(`${n}.csv`, r, "text/csv") : A(`${n}.json`, t), X({
|
|
132
|
-
tone: "success",
|
|
133
|
-
text: "Report generated and downloaded."
|
|
134
|
-
});
|
|
135
|
-
} catch (e) {
|
|
136
|
-
X({
|
|
137
|
-
tone: "error",
|
|
138
|
-
text: e instanceof Error ? e.message : "Could not generate report."
|
|
139
|
-
});
|
|
140
|
-
} finally {
|
|
141
|
-
K(null);
|
|
142
|
-
}
|
|
143
|
-
}, $ = I.filter((e) => e.schedule);
|
|
144
|
-
return /* @__PURE__ */ C(l, {
|
|
145
|
-
title: "Reports",
|
|
146
|
-
subtitle: "Generate and schedule reports",
|
|
147
|
-
icon: /* @__PURE__ */ S(O, { size: 24 }),
|
|
148
|
-
headerActions: /* @__PURE__ */ C("div", {
|
|
149
|
-
className: "flex gap-2",
|
|
150
|
-
children: [/* @__PURE__ */ C(i, {
|
|
151
|
-
value: U,
|
|
152
|
-
onValueChange: W,
|
|
153
|
-
children: [/* @__PURE__ */ S(r, {
|
|
154
|
-
className: "w-[190px]",
|
|
155
|
-
children: /* @__PURE__ */ S(a, {})
|
|
156
|
-
}), /* @__PURE__ */ S(t, { children: N.map((e) => /* @__PURE__ */ S(n, {
|
|
157
|
-
value: e.value,
|
|
158
|
-
children: e.label
|
|
159
|
-
}, e.value)) })]
|
|
160
|
-
}), /* @__PURE__ */ C(f, {
|
|
161
|
-
onClick: () => void Q(),
|
|
162
|
-
disabled: q,
|
|
163
|
-
children: [/* @__PURE__ */ S(v, { size: 16 }), " Create Report"]
|
|
164
|
-
})]
|
|
165
|
-
}),
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ S(E, {
|
|
168
|
-
icon: /* @__PURE__ */ S(O, { size: 18 }),
|
|
169
|
-
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."
|
|
170
|
-
}),
|
|
171
|
-
Y && /* @__PURE__ */ S("div", {
|
|
172
|
-
role: "status",
|
|
173
|
-
className: `rounded-lg p-3 text-sm ${Y.tone === "success" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-error-bg-subtle text-status-error-text"}`,
|
|
174
|
-
children: Y.text
|
|
175
|
-
}),
|
|
176
|
-
/* @__PURE__ */ C("div", {
|
|
177
|
-
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
178
|
-
children: [/* @__PURE__ */ C("div", {
|
|
179
|
-
className: "lg:col-span-2 space-y-4",
|
|
180
|
-
children: [
|
|
181
|
-
/* @__PURE__ */ S("h3", {
|
|
182
|
-
className: "font-semibold",
|
|
183
|
-
children: "Available Reports"
|
|
184
|
-
}),
|
|
185
|
-
R ? /* @__PURE__ */ S("div", {
|
|
186
|
-
className: "space-y-3",
|
|
187
|
-
children: Array.from({ length: 3 }).map((t, n) => /* @__PURE__ */ S(e, { className: "h-20 w-full rounded-lg" }, n))
|
|
188
|
-
}) : z ? /* @__PURE__ */ S(o, {
|
|
189
|
-
className: "border-status-error-border",
|
|
190
|
-
children: /* @__PURE__ */ C(s, {
|
|
191
|
-
className: "p-6 text-center space-y-3",
|
|
192
|
-
children: [
|
|
193
|
-
/* @__PURE__ */ S("p", {
|
|
194
|
-
className: "text-status-error-text font-medium",
|
|
195
|
-
children: "Couldn't load reports"
|
|
196
|
-
}),
|
|
197
|
-
/* @__PURE__ */ S("p", {
|
|
198
|
-
className: "text-sm text-text-secondary",
|
|
199
|
-
children: z.message
|
|
200
|
-
}),
|
|
201
|
-
/* @__PURE__ */ S(f, {
|
|
202
|
-
variant: "outline",
|
|
203
|
-
onClick: B,
|
|
204
|
-
children: "Retry"
|
|
205
|
-
})
|
|
206
|
-
]
|
|
207
|
-
})
|
|
208
|
-
}) : I.length === 0 ? /* @__PURE__ */ S(o, { children: /* @__PURE__ */ S(s, {
|
|
209
|
-
className: "p-0",
|
|
210
|
-
children: /* @__PURE__ */ S(T, {
|
|
211
|
-
illustration: "empty-data",
|
|
212
|
-
title: "No reports yet",
|
|
213
|
-
description: "Create your first report to turn live operational data into a shareable summary.",
|
|
214
|
-
action: /* @__PURE__ */ C(f, {
|
|
215
|
-
onClick: () => void Q(),
|
|
216
|
-
disabled: q,
|
|
217
|
-
children: [/* @__PURE__ */ S(v, {
|
|
218
|
-
size: 16,
|
|
219
|
-
className: "mr-1.5"
|
|
220
|
-
}), " Create Report"]
|
|
221
|
-
})
|
|
222
|
-
})
|
|
223
|
-
}) }) : I.map((e) => /* @__PURE__ */ S(o, { children: /* @__PURE__ */ S(s, {
|
|
224
|
-
className: "p-4",
|
|
225
|
-
children: /* @__PURE__ */ C("div", {
|
|
226
|
-
className: "flex items-center justify-between",
|
|
227
|
-
children: [/* @__PURE__ */ C("div", {
|
|
228
|
-
className: "flex items-center gap-3",
|
|
229
|
-
children: [/* @__PURE__ */ S("div", {
|
|
230
|
-
className: "w-10 h-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center",
|
|
231
|
-
children: /* @__PURE__ */ S(O, {
|
|
232
|
-
size: 20,
|
|
233
|
-
className: "text-primary"
|
|
234
|
-
})
|
|
235
|
-
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
236
|
-
className: "font-medium",
|
|
237
|
-
children: e.name
|
|
238
|
-
}), /* @__PURE__ */ S("p", {
|
|
239
|
-
className: "text-sm text-text-secondary",
|
|
240
|
-
children: e.description ?? Z(e.type)
|
|
241
|
-
})] })]
|
|
242
|
-
}), /* @__PURE__ */ C("div", {
|
|
243
|
-
className: "flex items-center gap-3",
|
|
244
|
-
children: [/* @__PURE__ */ C("div", {
|
|
245
|
-
className: "text-right",
|
|
246
|
-
children: [/* @__PURE__ */ S(u, {
|
|
247
|
-
variant: "outline",
|
|
248
|
-
children: e.schedule ?? "On demand"
|
|
249
|
-
}), e.lastGenerated && /* @__PURE__ */ C("p", {
|
|
250
|
-
className: "text-xs text-text-secondary mt-1",
|
|
251
|
-
children: ["Last: ", b(new Date(e.lastGenerated), "short")]
|
|
252
|
-
})]
|
|
253
|
-
}), /* @__PURE__ */ S(f, {
|
|
254
|
-
variant: "outline",
|
|
255
|
-
size: "sm",
|
|
256
|
-
"aria-label": `Generate ${e.name}`,
|
|
257
|
-
disabled: G === e.id,
|
|
258
|
-
onClick: () => void te(e.id),
|
|
259
|
-
children: /* @__PURE__ */ S(g, { size: 14 })
|
|
260
|
-
})]
|
|
261
|
-
})]
|
|
262
|
-
})
|
|
263
|
-
}) }, e.id)),
|
|
264
|
-
!R && !z && (I.length > 0 || d > 0) && /* @__PURE__ */ C("div", {
|
|
265
|
-
className: "flex flex-wrap items-center justify-between gap-3 pt-1",
|
|
266
|
-
children: [/* @__PURE__ */ C("span", {
|
|
267
|
-
className: "text-sm text-text-secondary",
|
|
268
|
-
children: [
|
|
269
|
-
"Showing ",
|
|
270
|
-
I.length === 0 ? 0 : d * P + 1,
|
|
271
|
-
" to",
|
|
272
|
-
" ",
|
|
273
|
-
d * P + I.length
|
|
274
|
-
]
|
|
275
|
-
}), /* @__PURE__ */ C("div", {
|
|
276
|
-
className: "flex items-center gap-1",
|
|
277
|
-
children: [
|
|
278
|
-
/* @__PURE__ */ S(f, {
|
|
279
|
-
variant: "outline",
|
|
280
|
-
size: "icon",
|
|
281
|
-
className: "h-8 w-8",
|
|
282
|
-
"aria-label": "Previous page",
|
|
283
|
-
onClick: () => F((e) => Math.max(0, e - 1)),
|
|
284
|
-
disabled: d === 0,
|
|
285
|
-
children: /* @__PURE__ */ S(p, { className: "h-4 w-4" })
|
|
286
|
-
}),
|
|
287
|
-
/* @__PURE__ */ C("span", {
|
|
288
|
-
className: "px-3 text-sm",
|
|
289
|
-
children: ["Page ", d + 1]
|
|
290
|
-
}),
|
|
291
|
-
/* @__PURE__ */ S(f, {
|
|
292
|
-
variant: "outline",
|
|
293
|
-
size: "icon",
|
|
294
|
-
className: "h-8 w-8",
|
|
295
|
-
"aria-label": "Next page",
|
|
296
|
-
onClick: () => F((e) => e + 1),
|
|
297
|
-
disabled: !L,
|
|
298
|
-
children: /* @__PURE__ */ S(m, { className: "h-4 w-4" })
|
|
299
|
-
})
|
|
300
|
-
]
|
|
301
|
-
})]
|
|
302
|
-
})
|
|
303
|
-
]
|
|
304
|
-
}), /* @__PURE__ */ C("div", {
|
|
305
|
-
className: "space-y-6",
|
|
306
|
-
children: [/* @__PURE__ */ C(w, {
|
|
307
|
-
className: "space-y-3",
|
|
308
|
-
children: [
|
|
309
|
-
/* @__PURE__ */ C("h2", {
|
|
310
|
-
className: "flex items-center gap-2 text-base font-semibold text-text-primary",
|
|
311
|
-
children: [/* @__PURE__ */ S(h, { size: 18 }), " Scheduled Reports"]
|
|
312
|
-
}),
|
|
313
|
-
$.length === 0 ? /* @__PURE__ */ S("p", {
|
|
314
|
-
className: "text-sm text-text-secondary",
|
|
315
|
-
children: "No scheduled reports yet. Schedule one to have it generated automatically."
|
|
316
|
-
}) : $.map((e) => /* @__PURE__ */ C("div", {
|
|
317
|
-
className: "p-3 border border-border-seam rounded-lg",
|
|
318
|
-
children: [/* @__PURE__ */ S("p", {
|
|
319
|
-
className: "font-medium",
|
|
320
|
-
children: e.name
|
|
321
|
-
}), /* @__PURE__ */ C("p", {
|
|
322
|
-
className: "text-sm text-text-secondary",
|
|
323
|
-
children: ["Schedule: ", e.schedule]
|
|
324
|
-
})]
|
|
325
|
-
}, e.id)),
|
|
326
|
-
/* @__PURE__ */ S(f, {
|
|
327
|
-
variant: "outline",
|
|
328
|
-
className: "w-full",
|
|
329
|
-
disabled: q,
|
|
330
|
-
onClick: () => void Q("daily"),
|
|
331
|
-
children: "Schedule New Report"
|
|
332
|
-
})
|
|
333
|
-
]
|
|
334
|
-
}), /* @__PURE__ */ C(o, { children: [/* @__PURE__ */ S(c, { children: /* @__PURE__ */ S(ee, { children: "Quick Actions" }) }), /* @__PURE__ */ C(s, {
|
|
335
|
-
className: "space-y-2",
|
|
336
|
-
children: [/* @__PURE__ */ C(f, {
|
|
337
|
-
variant: "outline",
|
|
338
|
-
className: "w-full justify-start",
|
|
339
|
-
disabled: q,
|
|
340
|
-
onClick: () => void Q("weekly"),
|
|
341
|
-
children: [/* @__PURE__ */ S(D, { size: 16 }), " Schedule Report"]
|
|
342
|
-
}), /* @__PURE__ */ C(f, {
|
|
343
|
-
variant: "outline",
|
|
344
|
-
className: "w-full justify-start",
|
|
345
|
-
disabled: q,
|
|
346
|
-
onClick: () => void Q(),
|
|
347
|
-
children: [/* @__PURE__ */ S(_, { size: 16 }), " Custom Report"]
|
|
348
|
-
})]
|
|
349
|
-
})] })]
|
|
350
|
-
})]
|
|
351
|
-
})
|
|
352
|
-
]
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
//#endregion
|
|
356
|
-
export { F as default };
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { A as e, ct as t, d as n, f as r, g as i, h as a, i as o, ot as s, t as c, u as l } from "./PageLayout-D4LDHJJq.js";
|
|
2
|
-
import { t as u } from "./circle-alert-Bzh2DBSF.js";
|
|
3
|
-
import { t as d } from "./circle-check-big-CGMSpQmD.js";
|
|
4
|
-
import { t as f } from "./clock-Bl3ptexL.js";
|
|
5
|
-
import { t as p } from "./map-pin-Dznl5l40.js";
|
|
6
|
-
import { t as m } from "./package-CcRttV2N.js";
|
|
7
|
-
import { t as h } from "./search-D_VyGcZT.js";
|
|
8
|
-
import { t as g } from "./truck-D-y2IDzv.js";
|
|
9
|
-
import { i as _ } from "./useTracking-RjGz9PZG.js";
|
|
10
|
-
import { r as v } from "./StatusBadge-C87mDpDP.js";
|
|
11
|
-
import { r as y, t as b } from "./formatters-BQr-aR5W.js";
|
|
12
|
-
import { useState as x } from "react";
|
|
13
|
-
import { useSearchParams as S } from "react-router-dom";
|
|
14
|
-
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
15
|
-
import { EmphasisPanel as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
|
|
16
|
-
import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
|
-
//#region src/movethewheels/pages/TrackingPage.tsx
|
|
18
|
-
function O() {
|
|
19
|
-
let { t: O } = D(), k = (e, t) => {
|
|
20
|
-
let n = O(e);
|
|
21
|
-
return n === e ? t : n;
|
|
22
|
-
}, { basePath: A, navigate: j } = s(), [M] = S(), N = M.get("order") || "", [P, F] = x(N), [I, L] = x(N), { tracking: R, order: z, isLoading: B, error: V } = _(I || void 0), H = (e) => {
|
|
23
|
-
e.preventDefault(), L(P);
|
|
24
|
-
}, U = (e) => {
|
|
25
|
-
j && j(t(A, e));
|
|
26
|
-
};
|
|
27
|
-
return /* @__PURE__ */ w(o, {
|
|
28
|
-
title: k("movethewheels.tracking.title", "Track Shipment"),
|
|
29
|
-
subtitle: k("movethewheels.tracking.subtitle", "Enter a tracking number or order ID to track your shipment"),
|
|
30
|
-
icon: /* @__PURE__ */ C(p, { size: 24 }),
|
|
31
|
-
headerActions: /* @__PURE__ */ w(l, {
|
|
32
|
-
variant: "outline",
|
|
33
|
-
onClick: () => U("tracking/live"),
|
|
34
|
-
children: [/* @__PURE__ */ C(p, { size: 16 }), k("movethewheels.tracking.actions.liveMapView", "Live Map View")]
|
|
35
|
-
}),
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ C(E, {
|
|
38
|
-
icon: /* @__PURE__ */ C(p, { size: 18 }),
|
|
39
|
-
children: k("movethewheels.tracking.purpose", "Look up any single shipment by its tracking number or order ID to see exactly where it is, its progress through pickup and delivery, the current location and any alerts — the same view you can share with a customer.")
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ C(n, { children: /* @__PURE__ */ C(r, {
|
|
42
|
-
className: "p-6",
|
|
43
|
-
children: /* @__PURE__ */ w("form", {
|
|
44
|
-
onSubmit: H,
|
|
45
|
-
className: "flex gap-4",
|
|
46
|
-
children: [/* @__PURE__ */ w("div", {
|
|
47
|
-
className: "flex-1 relative",
|
|
48
|
-
children: [/* @__PURE__ */ C(h, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-text-secondary" }), /* @__PURE__ */ C(e, {
|
|
49
|
-
value: P,
|
|
50
|
-
onChange: (e) => F(e.target.value),
|
|
51
|
-
placeholder: k("movethewheels.tracking.search.placeholder", "Enter tracking number or order ID (e.g., order-1 or TRK123456789)"),
|
|
52
|
-
className: "pl-10 h-12 text-lg"
|
|
53
|
-
})]
|
|
54
|
-
}), /* @__PURE__ */ C(l, {
|
|
55
|
-
type: "submit",
|
|
56
|
-
size: "lg",
|
|
57
|
-
disabled: !P || B,
|
|
58
|
-
children: B ? k("movethewheels.tracking.search.searching", "Searching...") : k("movethewheels.tracking.search.track", "Track")
|
|
59
|
-
})]
|
|
60
|
-
})
|
|
61
|
-
}) }),
|
|
62
|
-
V && /* @__PURE__ */ C(n, {
|
|
63
|
-
className: "border-status-error-border",
|
|
64
|
-
children: /* @__PURE__ */ C(r, {
|
|
65
|
-
className: "p-6",
|
|
66
|
-
children: /* @__PURE__ */ w("div", {
|
|
67
|
-
className: "flex items-center gap-4",
|
|
68
|
-
children: [/* @__PURE__ */ C(u, { className: "w-8 h-8 text-status-error-text" }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
69
|
-
className: "font-medium text-status-error-text",
|
|
70
|
-
children: k("movethewheels.tracking.error.title", "Unable to find shipment")
|
|
71
|
-
}), /* @__PURE__ */ C("p", {
|
|
72
|
-
className: "text-sm text-text-secondary",
|
|
73
|
-
children: k("movethewheels.tracking.error.description", "Please check the tracking number and try again")
|
|
74
|
-
})] })]
|
|
75
|
-
})
|
|
76
|
-
})
|
|
77
|
-
}),
|
|
78
|
-
!I && !V && /* @__PURE__ */ C(c, {
|
|
79
|
-
illustration: "onboarding",
|
|
80
|
-
title: k("movethewheels.tracking.empty.title", "Enter a tracking number"),
|
|
81
|
-
description: k("movethewheels.tracking.empty.description", "Use your tracking number or order ID to see the current status of your shipment")
|
|
82
|
-
}),
|
|
83
|
-
z && R && /* @__PURE__ */ w("div", {
|
|
84
|
-
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
85
|
-
children: [/* @__PURE__ */ w("div", {
|
|
86
|
-
className: "lg:col-span-2 space-y-6",
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ w(T, { children: [/* @__PURE__ */ w("div", {
|
|
89
|
-
className: "flex items-center justify-between mb-4",
|
|
90
|
-
children: [/* @__PURE__ */ w("h2", {
|
|
91
|
-
className: "flex items-center gap-2 text-base font-semibold text-text-primary",
|
|
92
|
-
children: [
|
|
93
|
-
/* @__PURE__ */ C(m, { size: 20 }),
|
|
94
|
-
k("movethewheels.tracking.orderLabel", "Order"),
|
|
95
|
-
" ",
|
|
96
|
-
z.orderNumber
|
|
97
|
-
]
|
|
98
|
-
}), /* @__PURE__ */ C(v, {
|
|
99
|
-
status: z.status,
|
|
100
|
-
type: "order"
|
|
101
|
-
})]
|
|
102
|
-
}), /* @__PURE__ */ w("div", {
|
|
103
|
-
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
106
|
-
className: "text-sm text-text-secondary",
|
|
107
|
-
children: k("movethewheels.tracking.details.trackingNumber", "Tracking Number")
|
|
108
|
-
}), /* @__PURE__ */ C("p", {
|
|
109
|
-
className: "font-mono font-medium",
|
|
110
|
-
children: z.trackingNumber
|
|
111
|
-
})] }),
|
|
112
|
-
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
113
|
-
className: "text-sm text-text-secondary",
|
|
114
|
-
children: k("movethewheels.tracking.details.estimatedDelivery", "Estimated Delivery")
|
|
115
|
-
}), /* @__PURE__ */ C("p", {
|
|
116
|
-
className: "font-medium",
|
|
117
|
-
children: R.estimatedArrival ? y(R.estimatedArrival, "full") : z.scheduledDelivery ? y(z.scheduledDelivery, "full") : k("movethewheels.tracking.details.tbd", "TBD")
|
|
118
|
-
})] }),
|
|
119
|
-
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
120
|
-
className: "text-sm text-text-secondary",
|
|
121
|
-
children: k("movethewheels.tracking.details.items", "Items")
|
|
122
|
-
}), /* @__PURE__ */ w("p", {
|
|
123
|
-
className: "font-medium",
|
|
124
|
-
children: [
|
|
125
|
-
z.items.length,
|
|
126
|
-
" ",
|
|
127
|
-
k("movethewheels.tracking.details.itemsSuffix", "items")
|
|
128
|
-
]
|
|
129
|
-
})] }),
|
|
130
|
-
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
131
|
-
className: "text-sm text-text-secondary",
|
|
132
|
-
children: k("movethewheels.tracking.details.lastUpdated", "Last Updated")
|
|
133
|
-
}), /* @__PURE__ */ C("p", {
|
|
134
|
-
className: "font-medium",
|
|
135
|
-
children: y(R.lastUpdated, "relative")
|
|
136
|
-
})] })
|
|
137
|
-
]
|
|
138
|
-
})] }),
|
|
139
|
-
/* @__PURE__ */ w(n, { children: [/* @__PURE__ */ C(a, { children: /* @__PURE__ */ w(i, {
|
|
140
|
-
className: "flex items-center gap-2",
|
|
141
|
-
children: [/* @__PURE__ */ C(f, { size: 18 }), k("movethewheels.tracking.progress.title", "Shipment Progress")]
|
|
142
|
-
}) }), /* @__PURE__ */ w(r, { children: [/* @__PURE__ */ C("div", {
|
|
143
|
-
className: "relative",
|
|
144
|
-
children: /* @__PURE__ */ C("div", {
|
|
145
|
-
className: "flex justify-between mb-4",
|
|
146
|
-
children: [
|
|
147
|
-
{
|
|
148
|
-
status: "confirmed",
|
|
149
|
-
label: k("movethewheels.tracking.progress.confirmed", "Confirmed"),
|
|
150
|
-
icon: d
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
status: "picked_up",
|
|
154
|
-
label: k("movethewheels.tracking.progress.pickedUp", "Picked Up"),
|
|
155
|
-
icon: m
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
status: "in_transit",
|
|
159
|
-
label: k("movethewheels.tracking.progress.inTransit", "In Transit"),
|
|
160
|
-
icon: g
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
status: "delivered",
|
|
164
|
-
label: k("movethewheels.tracking.progress.delivered", "Delivered"),
|
|
165
|
-
icon: p
|
|
166
|
-
}
|
|
167
|
-
].map((e, t) => {
|
|
168
|
-
let n = [
|
|
169
|
-
"pending",
|
|
170
|
-
"confirmed",
|
|
171
|
-
"assigned",
|
|
172
|
-
"picked_up",
|
|
173
|
-
"in_transit",
|
|
174
|
-
"out_for_delivery",
|
|
175
|
-
"delivered"
|
|
176
|
-
], r = n.indexOf(z.status), i = n.indexOf(e.status) <= r, a = e.status === z.status || z.status === "out_for_delivery" && e.status === "in_transit";
|
|
177
|
-
return /* @__PURE__ */ w("div", {
|
|
178
|
-
className: "flex flex-col items-center flex-1",
|
|
179
|
-
children: [
|
|
180
|
-
/* @__PURE__ */ C("div", {
|
|
181
|
-
className: `w-10 h-10 rounded-full flex items-center justify-center ${i ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"} ${a ? "ring-4 ring-primary/20" : ""}`,
|
|
182
|
-
children: /* @__PURE__ */ C(e.icon, { size: 20 })
|
|
183
|
-
}),
|
|
184
|
-
/* @__PURE__ */ C("p", {
|
|
185
|
-
className: `text-xs mt-2 text-center ${i ? "font-medium" : "text-text-secondary"}`,
|
|
186
|
-
children: e.label
|
|
187
|
-
}),
|
|
188
|
-
t < 3 && /* @__PURE__ */ C("div", {
|
|
189
|
-
className: `absolute top-5 h-0.5 ${i ? "bg-action-primary-bg" : "bg-bg-sunken"}`,
|
|
190
|
-
style: {
|
|
191
|
-
left: `calc(${(t + .5) * 25}% + 20px)`,
|
|
192
|
-
width: "calc(25% - 40px)"
|
|
193
|
-
}
|
|
194
|
-
})
|
|
195
|
-
]
|
|
196
|
-
}, e.status);
|
|
197
|
-
})
|
|
198
|
-
})
|
|
199
|
-
}), /* @__PURE__ */ C("div", {
|
|
200
|
-
className: "mt-8 space-y-4",
|
|
201
|
-
children: z.timeline.slice().reverse().map((e, t) => /* @__PURE__ */ w("div", {
|
|
202
|
-
className: "flex gap-4",
|
|
203
|
-
children: [/* @__PURE__ */ w("div", {
|
|
204
|
-
className: "relative",
|
|
205
|
-
children: [/* @__PURE__ */ C("div", { className: `w-3 h-3 rounded-full ${t === 0 ? "bg-action-primary-bg" : "bg-bg-sunken"}` }), t < z.timeline.length - 1 && /* @__PURE__ */ C("div", { className: "absolute top-3 left-1.5 w-px h-8 -ml-px bg-border" })]
|
|
206
|
-
}), /* @__PURE__ */ w("div", {
|
|
207
|
-
className: "flex-1 pb-4",
|
|
208
|
-
children: [
|
|
209
|
-
/* @__PURE__ */ w("div", {
|
|
210
|
-
className: "flex items-center gap-2",
|
|
211
|
-
children: [/* @__PURE__ */ C(v, {
|
|
212
|
-
status: e.status,
|
|
213
|
-
type: "order",
|
|
214
|
-
size: "sm"
|
|
215
|
-
}), /* @__PURE__ */ C("span", {
|
|
216
|
-
className: "text-sm text-text-secondary",
|
|
217
|
-
children: y(e.timestamp, "full")
|
|
218
|
-
})]
|
|
219
|
-
}),
|
|
220
|
-
e.notes && /* @__PURE__ */ C("p", {
|
|
221
|
-
className: "text-sm mt-1",
|
|
222
|
-
children: e.notes
|
|
223
|
-
}),
|
|
224
|
-
e.location && /* @__PURE__ */ w("p", {
|
|
225
|
-
className: "text-xs text-text-secondary mt-1",
|
|
226
|
-
children: [/* @__PURE__ */ C(p, {
|
|
227
|
-
size: 12,
|
|
228
|
-
className: "inline mr-1"
|
|
229
|
-
}), b(e.location)]
|
|
230
|
-
})
|
|
231
|
-
]
|
|
232
|
-
})]
|
|
233
|
-
}, t))
|
|
234
|
-
})] })] }),
|
|
235
|
-
R.alerts && R.alerts.length > 0 && /* @__PURE__ */ w(n, { children: [/* @__PURE__ */ C(a, { children: /* @__PURE__ */ w(i, {
|
|
236
|
-
className: "flex items-center gap-2",
|
|
237
|
-
children: [/* @__PURE__ */ C(u, { size: 18 }), k("movethewheels.tracking.alerts.title", "Alerts")]
|
|
238
|
-
}) }), /* @__PURE__ */ C(r, { children: /* @__PURE__ */ C("div", {
|
|
239
|
-
className: "space-y-3",
|
|
240
|
-
children: R.alerts.map((e) => /* @__PURE__ */ w("div", {
|
|
241
|
-
className: `flex items-start gap-3 p-3 rounded-lg ${e.severity === "critical" ? "bg-status-error-bg-subtle" : (e.severity, "bg-status-warning-bg-subtle")}`,
|
|
242
|
-
children: [/* @__PURE__ */ C(u, {
|
|
243
|
-
size: 16,
|
|
244
|
-
className: e.severity === "critical" ? "text-status-error-text" : (e.severity, "text-status-warning-text")
|
|
245
|
-
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
246
|
-
className: "text-sm font-medium",
|
|
247
|
-
children: e.message
|
|
248
|
-
}), /* @__PURE__ */ w("p", {
|
|
249
|
-
className: "text-xs text-text-secondary",
|
|
250
|
-
children: [y(e.timestamp, "relative"), e.resolvedAt && ` - ${k("movethewheels.tracking.alerts.resolved", "Resolved")}`]
|
|
251
|
-
})] })]
|
|
252
|
-
}, e.id))
|
|
253
|
-
}) })] })
|
|
254
|
-
]
|
|
255
|
-
}), /* @__PURE__ */ w("div", {
|
|
256
|
-
className: "space-y-6",
|
|
257
|
-
children: [
|
|
258
|
-
/* @__PURE__ */ w(n, { children: [/* @__PURE__ */ C(a, { children: /* @__PURE__ */ w(i, {
|
|
259
|
-
className: "flex items-center gap-2",
|
|
260
|
-
children: [/* @__PURE__ */ C(p, { size: 18 }), k("movethewheels.tracking.location.title", "Current Location")]
|
|
261
|
-
}) }), /* @__PURE__ */ w(r, { children: [
|
|
262
|
-
/* @__PURE__ */ C("div", {
|
|
263
|
-
className: "aspect-video bg-bg-sunken rounded-lg flex items-center justify-center mb-4",
|
|
264
|
-
children: /* @__PURE__ */ w("div", {
|
|
265
|
-
className: "text-center text-text-secondary",
|
|
266
|
-
children: [/* @__PURE__ */ C(p, {
|
|
267
|
-
size: 32,
|
|
268
|
-
className: "mx-auto mb-2"
|
|
269
|
-
}), /* @__PURE__ */ C("p", {
|
|
270
|
-
className: "text-sm",
|
|
271
|
-
children: k("movethewheels.tracking.location.mapView", "Map View")
|
|
272
|
-
})]
|
|
273
|
-
})
|
|
274
|
-
}),
|
|
275
|
-
/* @__PURE__ */ C("p", {
|
|
276
|
-
className: "text-sm",
|
|
277
|
-
children: R.currentLocation.address || k("movethewheels.tracking.location.updating", "Location updating...")
|
|
278
|
-
}),
|
|
279
|
-
/* @__PURE__ */ w("p", {
|
|
280
|
-
className: "text-xs text-text-secondary mt-1",
|
|
281
|
-
children: [
|
|
282
|
-
k("movethewheels.tracking.location.updated", "Updated"),
|
|
283
|
-
" ",
|
|
284
|
-
y(R.currentLocation.timestamp || /* @__PURE__ */ new Date(), "relative")
|
|
285
|
-
]
|
|
286
|
-
})
|
|
287
|
-
] })] }),
|
|
288
|
-
/* @__PURE__ */ w(n, { children: [/* @__PURE__ */ C(a, { children: /* @__PURE__ */ C(i, { children: k("movethewheels.tracking.deliveryAddress.title", "Delivery Address") }) }), /* @__PURE__ */ w(r, { children: [/* @__PURE__ */ C("p", {
|
|
289
|
-
className: "text-sm",
|
|
290
|
-
children: z.customerInfo.name
|
|
291
|
-
}), /* @__PURE__ */ C("p", {
|
|
292
|
-
className: "text-sm text-text-secondary mt-2",
|
|
293
|
-
children: b(z.deliveryAddress)
|
|
294
|
-
})] })] }),
|
|
295
|
-
/* @__PURE__ */ C(n, { children: /* @__PURE__ */ w(r, {
|
|
296
|
-
className: "p-4 space-y-2",
|
|
297
|
-
children: [/* @__PURE__ */ C(l, {
|
|
298
|
-
variant: "outline",
|
|
299
|
-
className: "w-full",
|
|
300
|
-
onClick: () => U(`orders/${z.id}`),
|
|
301
|
-
children: k("movethewheels.tracking.actions.viewOrderDetails", "View Order Details")
|
|
302
|
-
}), /* @__PURE__ */ C(l, {
|
|
303
|
-
variant: "outline",
|
|
304
|
-
className: "w-full",
|
|
305
|
-
children: k("movethewheels.tracking.actions.contactDriver", "Contact Driver")
|
|
306
|
-
})]
|
|
307
|
-
}) })
|
|
308
|
-
]
|
|
309
|
-
})]
|
|
310
|
-
}),
|
|
311
|
-
I && !z && !B && !V && /* @__PURE__ */ C(c, {
|
|
312
|
-
illustration: "empty-search",
|
|
313
|
-
title: k("movethewheels.tracking.notFound.title", "Shipment not found"),
|
|
314
|
-
description: `${k("movethewheels.tracking.notFound.descriptionPrefix", "No shipment found with tracking number")} "${I}"`,
|
|
315
|
-
action: /* @__PURE__ */ C(l, {
|
|
316
|
-
variant: "outline",
|
|
317
|
-
onClick: () => F(""),
|
|
318
|
-
children: k("movethewheels.tracking.notFound.tryAnother", "Try another number")
|
|
319
|
-
})
|
|
320
|
-
})
|
|
321
|
-
]
|
|
322
|
-
});
|
|
323
|
-
}
|
|
324
|
-
//#endregion
|
|
325
|
-
export { O as default };
|