@burdenoff/microfe-movethewheels 2026.1117.1 → 2026.1123.2
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/MoveTheWheelsRoot.js +149 -133
- package/dist/MoveTheWheelsRoutes.js +157 -139
- package/dist/components/EntityConversationsCard.js +145 -0
- package/dist/components/maps/MapCanvas.js +4 -3
- package/dist/events/rybbit.js +87 -0
- package/dist/generated/tracking-quality-operations.d.ts +342 -0
- package/dist/hooks/useEntityComments.js +111 -0
- package/dist/hooks/useFleet.js +394 -311
- package/dist/hooks/useInventory.js +378 -313
- package/dist/hooks/useMultiModalShipments.js +58 -53
- package/dist/hooks/useOrders.js +178 -158
- package/dist/hooks/useRoutes.js +146 -130
- package/dist/index.js +35 -34
- package/dist/movethewheels/components/EntityConversationsCard.d.ts +8 -0
- package/dist/movethewheels/events/rybbit.d.ts +27 -0
- package/dist/movethewheels/hooks/useEntityComments.d.ts +26 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +73 -1
- package/dist/movethewheels/hooks/useInventory.d.ts +19 -0
- package/dist/movethewheels/index.d.ts +1 -0
- package/dist/movethewheels/pages/DocumentsLibraryPage.d.ts +1 -0
- package/dist/movethewheels/pages/NotificationsCenterPage.d.ts +1 -0
- package/dist/movethewheels/types/index.d.ts +95 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/check-check.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layers.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/message-square.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/send.js +10 -0
- package/dist/pages/DocumentsLibraryPage.js +235 -0
- package/dist/pages/DriverDetailsPage.js +625 -351
- package/dist/pages/NotificationsCenterPage.js +310 -0
- package/dist/pages/OrderDetailsPage.js +48 -42
- package/dist/pages/RouteDetailsPage.js +257 -251
- package/dist/pages/TrackingPage.js +202 -196
- package/dist/pages/VehicleDetailsPage.js +616 -314
- package/dist/pages/WarehouseDetailsPage.js +539 -253
- package/dist/stories/ControlTowerWidgets.stories.d.ts +10 -0
- package/dist/stories/DataTable.stories.d.ts +15 -0
- package/dist/stories/FleetCards.stories.d.ts +9 -0
- package/dist/stories/OrderForms.stories.d.ts +8 -0
- package/dist/stories/RouteMap.stories.d.ts +7 -0
- package/dist/stories/ShipmentTimeline.stories.d.ts +6 -0
- package/package.json +1 -1
- package/src/generated/tracking-quality-operations.ts +407 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +16 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +17 -2
- package/src/movethewheels/components/EntityConversationsCard.tsx +143 -0
- package/src/movethewheels/components/maps/MapCanvas.tsx +3 -3
- package/src/movethewheels/events/__tests__/rybbit.test.ts +98 -0
- package/src/movethewheels/events/rybbit.ts +191 -0
- package/src/movethewheels/hooks/useEntityComments.ts +258 -0
- package/src/movethewheels/hooks/useFleet.ts +300 -5
- package/src/movethewheels/hooks/useInventory.ts +231 -3
- package/src/movethewheels/hooks/useMultiModalShipments.ts +8 -1
- package/src/movethewheels/hooks/useOrders.ts +19 -3
- package/src/movethewheels/hooks/useRoutes.ts +14 -2
- package/src/movethewheels/index.ts +1 -0
- package/src/movethewheels/pages/DocumentsLibraryPage.tsx +229 -0
- package/src/movethewheels/pages/DriverDetailsPage.tsx +250 -1
- package/src/movethewheels/pages/NotificationsCenterPage.tsx +331 -0
- package/src/movethewheels/pages/OrderDetailsPage.tsx +8 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +6 -0
- package/src/movethewheels/pages/TrackingPage.tsx +8 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +255 -1
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +266 -2
- package/src/movethewheels/types/index.ts +103 -2
- package/src/stories/ControlTowerWidgets.stories.tsx +150 -0
- package/src/stories/DataTable.stories.tsx +94 -0
- package/src/stories/FleetCards.stories.tsx +77 -0
- package/src/stories/OrderForms.stories.tsx +84 -0
- package/src/stories/RouteMap.stories.tsx +43 -0
- package/src/stories/ShipmentTimeline.stories.tsx +128 -0
|
@@ -2,286 +2,304 @@ import { useMoveTheWheels as e } from "./providers/MoveTheWheelsProvider.js";
|
|
|
2
2
|
import { useModuleSettings as t } from "./providers/ModuleSettingsProvider.js";
|
|
3
3
|
import { useTr as n } from "./shared/hooks/useTr.js";
|
|
4
4
|
import "./hooks/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { emitPageViewed as r } from "./events/rybbit.js";
|
|
6
|
+
import { Suspense as i, lazy as a, useEffect as o } from "react";
|
|
7
|
+
import { Navigate as s, Route as c, Routes as l, useLocation as u, useNavigate as d } from "react-router";
|
|
8
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
import { NotFoundPage as m } from "@burdenoff/fe-libs/shared/pages";
|
|
10
|
+
import { useEventBus as h } from "@burdenoff/fe-libs/shared/events";
|
|
9
11
|
// src/movethewheels/MoveTheWheelsRoutes.tsx
|
|
10
|
-
function
|
|
11
|
-
let { navigate: t, basePath: r } = e(), i =
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
function g() {
|
|
13
|
+
let { navigate: t, basePath: r } = e(), i = d(), a = n();
|
|
14
|
+
return /* @__PURE__ */ f(m, {
|
|
13
15
|
homeLabel: a("movethewheels.root.notFound.homeLabel", "Back to MoveTheWheels"),
|
|
14
16
|
onGoHome: () => {
|
|
15
17
|
t ? t(r || "/") : i("/");
|
|
16
18
|
}
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
|
-
function
|
|
21
|
+
function ee() {
|
|
20
22
|
let e = n();
|
|
21
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ f("div", {
|
|
22
24
|
className: "flex items-center justify-center min-h-[400px]",
|
|
23
|
-
children: /* @__PURE__ */
|
|
25
|
+
children: /* @__PURE__ */ p("div", {
|
|
24
26
|
className: "flex flex-col items-center gap-3",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ f("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" }), /* @__PURE__ */ f("p", {
|
|
26
28
|
className: "text-sm text-text-secondary",
|
|
27
29
|
children: e("movethewheels.root.loading", "Loading...")
|
|
28
30
|
})]
|
|
29
31
|
})
|
|
30
32
|
});
|
|
31
33
|
}
|
|
32
|
-
var
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
var _ = a(() => import("./pages/DashboardPage.js")), v = a(() => import("./pages/OrdersListPage.js")), y = a(() => import("./pages/OrderDetailsPage.js")), b = a(() => import("./pages/CreateOrderPage.js")), x = a(() => import("./pages/TrackingPage.js")), S = a(() => import("./pages/TrackingEventQualityPage.js")), C = a(() => import("./pages/ShipmentStatusAuthorityPage.js")), w = a(() => import("./pages/LiveTrackingPage.js")), T = a(() => import("./pages/FleetPage.js")), E = a(() => import("./pages/VehiclesPage.js")), D = a(() => import("./pages/VehicleDetailsPage.js")), O = a(() => import("./pages/DriversPage.js")), k = a(() => import("./pages/DriverDetailsPage.js")), A = a(() => import("./pages/InventoryPage.js")), j = a(() => import("./pages/ProductsPage.js")), M = a(() => import("./pages/ProductDetailsPage.js")), N = a(() => import("./pages/PalletPreviewPage.js")), P = a(() => import("./pages/WarehousesPage.js")), F = a(() => import("./pages/WarehouseDetailsPage.js")), I = a(() => import("./pages/CustomersPage.js")), L = a(() => import("./pages/CustomerDetailsPage.js")), R = a(() => import("./pages/MarketplacePage.js")), z = a(() => import("./pages/ImportExportPage.js")), B = a(() => import("./pages/SettingsPage.js")), te = a(() => import("./pages/IntegrationsPage.js")), V = a(() => import("./pages/ReportsPage.js")), H = a(() => import("./pages/RoutesPage.js")), U = a(() => import("./pages/RouteDetailsPage.js")), W = a(() => import("./pages/AnalyticsPage.js")), G = a(() => import("./pages/FinancePage.js")), K = a(() => import("./pages/FreightEstimatePage.js")), q = a(() => import("./pages/FreightInvoicePage.js")), J = a(() => import("./pages/ConsolidationPage.js")), Y = a(() => import("./pages/LogisticsProceduresPage.js")), X = a(() => import("./pages/DeliveryCapturePage.js")), Z = a(() => import("./pages/MultiModalShipmentPage.js")), Q = a(() => import("./pages/ShippingRatesPage.js")), ne = a(() => import("./pages/ContainersPage.js")), re = a(() => import("./pages/ContainerConditionPage.js")), ie = a(() => import("./pages/FreeTimePage.js")), ae = a(() => import("./pages/PendingPickPage.js")), oe = a(() => import("./pages/StockObservationsPage.js")), $ = a(() => import("./pages/StockBindingPage.js")), se = a(() => import("./pages/TripUtilizationPage.js")), ce = a(() => import("./pages/DispatchPlanPage.js")), le = a(() => import("./pages/ConsumedFuelPreviewPage.js")), ue = a(() => import("./pages/EmptyReusePage.js")), de = a(() => import("./pages/NotificationsCenterPage.js")), fe = a(() => import("./pages/DocumentsLibraryPage.js"));
|
|
35
|
+
function pe() {
|
|
36
|
+
t();
|
|
37
|
+
let n = h(), a = u(), { workspaceId: d } = e();
|
|
38
|
+
return o(() => {
|
|
39
|
+
r(n, a.pathname, d);
|
|
40
|
+
}, [
|
|
41
|
+
n,
|
|
42
|
+
a.pathname,
|
|
43
|
+
d
|
|
44
|
+
]), /* @__PURE__ */ f(i, {
|
|
45
|
+
fallback: /* @__PURE__ */ f(ee, {}),
|
|
46
|
+
children: /* @__PURE__ */ p(l, { children: [
|
|
47
|
+
/* @__PURE__ */ f(c, {
|
|
38
48
|
index: !0,
|
|
39
|
-
element: /* @__PURE__ */
|
|
49
|
+
element: /* @__PURE__ */ f(_, {})
|
|
40
50
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ f(c, {
|
|
42
52
|
path: "orders",
|
|
43
|
-
element: /* @__PURE__ */
|
|
53
|
+
element: /* @__PURE__ */ f(v, {})
|
|
44
54
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ f(c, {
|
|
46
56
|
path: "orders/new",
|
|
47
|
-
element: /* @__PURE__ */
|
|
57
|
+
element: /* @__PURE__ */ f(b, {})
|
|
48
58
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ f(c, {
|
|
50
60
|
path: "orders/:orderId",
|
|
51
|
-
element: /* @__PURE__ */
|
|
61
|
+
element: /* @__PURE__ */ f(y, {})
|
|
52
62
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ f(c, {
|
|
54
64
|
path: "orders/:orderId/edit",
|
|
55
|
-
element: /* @__PURE__ */
|
|
65
|
+
element: /* @__PURE__ */ f(b, {})
|
|
56
66
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ f(c, {
|
|
58
68
|
path: "tracking",
|
|
59
|
-
element: /* @__PURE__ */
|
|
69
|
+
element: /* @__PURE__ */ f(x, {})
|
|
60
70
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ f(c, {
|
|
62
72
|
path: "tracking/live",
|
|
63
|
-
element: /* @__PURE__ */
|
|
73
|
+
element: /* @__PURE__ */ f(w, {})
|
|
64
74
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ f(c, {
|
|
66
76
|
path: "tracking/event-quality",
|
|
67
|
-
element: /* @__PURE__ */
|
|
77
|
+
element: /* @__PURE__ */ f(S, {})
|
|
68
78
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ f(c, {
|
|
70
80
|
path: "shipments/status-authority",
|
|
71
|
-
element: /* @__PURE__ */
|
|
81
|
+
element: /* @__PURE__ */ f(C, {})
|
|
72
82
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ f(c, {
|
|
74
84
|
path: "deliveries/mine",
|
|
75
|
-
element: /* @__PURE__ */
|
|
85
|
+
element: /* @__PURE__ */ f(X, {})
|
|
76
86
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ f(c, {
|
|
78
88
|
path: "shipments/multi-modal",
|
|
79
|
-
element: /* @__PURE__ */
|
|
89
|
+
element: /* @__PURE__ */ f(Z, {})
|
|
80
90
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ f(c, {
|
|
82
92
|
path: "shipments/rates",
|
|
83
|
-
element: /* @__PURE__ */
|
|
93
|
+
element: /* @__PURE__ */ f(Q, {})
|
|
84
94
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ f(c, {
|
|
86
96
|
path: "containers",
|
|
87
|
-
element: /* @__PURE__ */
|
|
97
|
+
element: /* @__PURE__ */ f(ne, {})
|
|
88
98
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ f(c, {
|
|
90
100
|
path: "containers/condition",
|
|
91
|
-
element: /* @__PURE__ */
|
|
101
|
+
element: /* @__PURE__ */ f(re, {})
|
|
92
102
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ f(c, {
|
|
94
104
|
path: "containers/free-time",
|
|
95
|
-
element: /* @__PURE__ */
|
|
105
|
+
element: /* @__PURE__ */ f(ie, {})
|
|
96
106
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ f(c, {
|
|
98
108
|
path: "containers/empty-reuse",
|
|
99
|
-
element: /* @__PURE__ */
|
|
109
|
+
element: /* @__PURE__ */ f(ue, {})
|
|
100
110
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ f(c, {
|
|
102
112
|
path: "containers/consolidation",
|
|
103
|
-
element: /* @__PURE__ */
|
|
113
|
+
element: /* @__PURE__ */ f(J, {})
|
|
104
114
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ f(c, {
|
|
106
116
|
path: "containers/procedures",
|
|
107
|
-
element: /* @__PURE__ */
|
|
117
|
+
element: /* @__PURE__ */ f(Y, {})
|
|
108
118
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ f(c, {
|
|
110
120
|
path: "fleet",
|
|
111
|
-
element: /* @__PURE__ */
|
|
121
|
+
element: /* @__PURE__ */ f(T, {})
|
|
112
122
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ f(c, {
|
|
114
124
|
path: "fleet/vehicles",
|
|
115
|
-
element: /* @__PURE__ */
|
|
125
|
+
element: /* @__PURE__ */ f(E, {})
|
|
116
126
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ f(c, {
|
|
118
128
|
path: "fleet/vehicles/new",
|
|
119
|
-
element: /* @__PURE__ */
|
|
129
|
+
element: /* @__PURE__ */ f(D, {})
|
|
120
130
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ f(c, {
|
|
122
132
|
path: "fleet/vehicles/:vehicleId",
|
|
123
|
-
element: /* @__PURE__ */
|
|
133
|
+
element: /* @__PURE__ */ f(D, {})
|
|
124
134
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ f(c, {
|
|
126
136
|
path: "fleet/vehicles/:vehicleId/edit",
|
|
127
|
-
element: /* @__PURE__ */
|
|
137
|
+
element: /* @__PURE__ */ f(D, {})
|
|
128
138
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ f(c, {
|
|
130
140
|
path: "fleet/drivers",
|
|
131
|
-
element: /* @__PURE__ */
|
|
141
|
+
element: /* @__PURE__ */ f(O, {})
|
|
132
142
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ f(c, {
|
|
134
144
|
path: "fleet/drivers/new",
|
|
135
|
-
element: /* @__PURE__ */
|
|
145
|
+
element: /* @__PURE__ */ f(k, {})
|
|
136
146
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ f(c, {
|
|
138
148
|
path: "fleet/drivers/:driverId",
|
|
139
|
-
element: /* @__PURE__ */
|
|
149
|
+
element: /* @__PURE__ */ f(k, {})
|
|
140
150
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ f(c, {
|
|
142
152
|
path: "fleet/drivers/:driverId/edit",
|
|
143
|
-
element: /* @__PURE__ */
|
|
153
|
+
element: /* @__PURE__ */ f(k, {})
|
|
144
154
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ f(c, {
|
|
146
156
|
path: "inventory",
|
|
147
|
-
element: /* @__PURE__ */
|
|
157
|
+
element: /* @__PURE__ */ f(A, {})
|
|
148
158
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ f(c, {
|
|
150
160
|
path: "inventory/source-assessments",
|
|
151
|
-
element: /* @__PURE__ */
|
|
161
|
+
element: /* @__PURE__ */ f($, {})
|
|
152
162
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ f(c, {
|
|
154
164
|
path: "inventory/reported-issues",
|
|
155
|
-
element: /* @__PURE__ */
|
|
165
|
+
element: /* @__PURE__ */ f(oe, {})
|
|
156
166
|
}),
|
|
157
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ f(c, {
|
|
158
168
|
path: "inventory/pending-picks",
|
|
159
|
-
element: /* @__PURE__ */
|
|
169
|
+
element: /* @__PURE__ */ f(ae, {})
|
|
160
170
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ f(c, {
|
|
162
172
|
path: "inventory/products",
|
|
163
|
-
element: /* @__PURE__ */
|
|
173
|
+
element: /* @__PURE__ */ f(j, {})
|
|
164
174
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ f(c, {
|
|
166
176
|
path: "inventory/products/new",
|
|
167
|
-
element: /* @__PURE__ */
|
|
177
|
+
element: /* @__PURE__ */ f(M, {})
|
|
168
178
|
}),
|
|
169
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ f(c, {
|
|
170
180
|
path: "inventory/products/:productId",
|
|
171
|
-
element: /* @__PURE__ */
|
|
181
|
+
element: /* @__PURE__ */ f(M, {})
|
|
172
182
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ f(c, {
|
|
174
184
|
path: "inventory/products/:productId/edit",
|
|
175
|
-
element: /* @__PURE__ */
|
|
185
|
+
element: /* @__PURE__ */ f(M, {})
|
|
176
186
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ f(c, {
|
|
178
188
|
path: "inventory/warehouses",
|
|
179
|
-
element: /* @__PURE__ */
|
|
189
|
+
element: /* @__PURE__ */ f(P, {})
|
|
180
190
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ f(c, {
|
|
182
192
|
path: "inventory/warehouses/pallet-preview",
|
|
183
|
-
element: /* @__PURE__ */
|
|
193
|
+
element: /* @__PURE__ */ f(N, {})
|
|
184
194
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ f(c, {
|
|
186
196
|
path: "inventory/warehouses/new",
|
|
187
|
-
element: /* @__PURE__ */
|
|
197
|
+
element: /* @__PURE__ */ f(F, {})
|
|
188
198
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ f(c, {
|
|
190
200
|
path: "inventory/warehouses/:warehouseId",
|
|
191
|
-
element: /* @__PURE__ */
|
|
201
|
+
element: /* @__PURE__ */ f(F, {})
|
|
192
202
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ f(c, {
|
|
194
204
|
path: "inventory/warehouses/:warehouseId/edit",
|
|
195
|
-
element: /* @__PURE__ */
|
|
205
|
+
element: /* @__PURE__ */ f(F, {})
|
|
196
206
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ f(c, {
|
|
198
208
|
path: "customers",
|
|
199
|
-
element: /* @__PURE__ */
|
|
209
|
+
element: /* @__PURE__ */ f(I, {})
|
|
200
210
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ f(c, {
|
|
202
212
|
path: "customers/new",
|
|
203
|
-
element: /* @__PURE__ */
|
|
213
|
+
element: /* @__PURE__ */ f(L, {})
|
|
204
214
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ f(c, {
|
|
206
216
|
path: "customers/:customerId",
|
|
207
|
-
element: /* @__PURE__ */
|
|
217
|
+
element: /* @__PURE__ */ f(L, {})
|
|
208
218
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ f(c, {
|
|
210
220
|
path: "marketplace",
|
|
211
|
-
element: /* @__PURE__ */
|
|
221
|
+
element: /* @__PURE__ */ f(R, {})
|
|
212
222
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ f(c, {
|
|
214
224
|
path: "import-export",
|
|
215
|
-
element: /* @__PURE__ */
|
|
225
|
+
element: /* @__PURE__ */ f(z, {})
|
|
216
226
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ f(c, {
|
|
218
228
|
path: "reports",
|
|
219
|
-
element: /* @__PURE__ */
|
|
229
|
+
element: /* @__PURE__ */ f(V, {})
|
|
220
230
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ f(c, {
|
|
222
232
|
path: "settings",
|
|
223
|
-
element: /* @__PURE__ */
|
|
233
|
+
element: /* @__PURE__ */ f(B, {})
|
|
224
234
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ f(c, {
|
|
236
|
+
path: "notifications",
|
|
237
|
+
element: /* @__PURE__ */ f(de, {})
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ f(c, {
|
|
240
|
+
path: "documents",
|
|
241
|
+
element: /* @__PURE__ */ f(fe, {})
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ f(c, {
|
|
226
244
|
path: "integrations",
|
|
227
|
-
element: /* @__PURE__ */
|
|
245
|
+
element: /* @__PURE__ */ f(te, {})
|
|
228
246
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ f(c, {
|
|
230
248
|
path: "routes",
|
|
231
|
-
element: /* @__PURE__ */
|
|
249
|
+
element: /* @__PURE__ */ f(H, {})
|
|
232
250
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ f(c, {
|
|
234
252
|
path: "routes/trip-utilization",
|
|
235
|
-
element: /* @__PURE__ */
|
|
253
|
+
element: /* @__PURE__ */ f(se, {})
|
|
236
254
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ f(c, {
|
|
238
256
|
path: "routes/dispatch-plan",
|
|
239
|
-
element: /* @__PURE__ */
|
|
257
|
+
element: /* @__PURE__ */ f(ce, {})
|
|
240
258
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ f(c, {
|
|
242
260
|
path: "fuel-preview",
|
|
243
|
-
element: /* @__PURE__ */
|
|
261
|
+
element: /* @__PURE__ */ f(le, {})
|
|
244
262
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ f(c, {
|
|
246
264
|
path: "routes/new",
|
|
247
|
-
element: /* @__PURE__ */
|
|
265
|
+
element: /* @__PURE__ */ f(U, {})
|
|
248
266
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ f(c, {
|
|
250
268
|
path: "routes/:routeId",
|
|
251
|
-
element: /* @__PURE__ */
|
|
269
|
+
element: /* @__PURE__ */ f(U, {})
|
|
252
270
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ f(c, {
|
|
254
272
|
path: "routes/:routeId/edit",
|
|
255
|
-
element: /* @__PURE__ */
|
|
273
|
+
element: /* @__PURE__ */ f(U, {})
|
|
256
274
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ f(c, {
|
|
258
276
|
path: "analytics",
|
|
259
|
-
element: /* @__PURE__ */
|
|
277
|
+
element: /* @__PURE__ */ f(W, {})
|
|
260
278
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ f(c, {
|
|
262
280
|
path: "finance",
|
|
263
|
-
element: /* @__PURE__ */
|
|
281
|
+
element: /* @__PURE__ */ f(G, {})
|
|
264
282
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ f(c, {
|
|
266
284
|
path: "finance/freight-estimates",
|
|
267
|
-
element: /* @__PURE__ */
|
|
285
|
+
element: /* @__PURE__ */ f(K, {})
|
|
268
286
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ f(c, {
|
|
270
288
|
path: "finance/freight-invoice-comparisons",
|
|
271
|
-
element: /* @__PURE__ */
|
|
289
|
+
element: /* @__PURE__ */ f(q, {})
|
|
272
290
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ f(c, {
|
|
274
292
|
path: "ai-assistant",
|
|
275
|
-
element: /* @__PURE__ */
|
|
293
|
+
element: /* @__PURE__ */ f(s, {
|
|
276
294
|
to: "/ai",
|
|
277
295
|
replace: !0
|
|
278
296
|
})
|
|
279
297
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ f(c, {
|
|
281
299
|
path: "*",
|
|
282
|
-
element: /* @__PURE__ */
|
|
300
|
+
element: /* @__PURE__ */ f(g, {})
|
|
283
301
|
})
|
|
284
302
|
] })
|
|
285
303
|
});
|
|
286
304
|
}
|
|
287
|
-
export {
|
|
305
|
+
export { pe as MoveTheWheelsRoutes };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import e from "../node_modules/lucide-react/dist/esm/icons/message-square.js";
|
|
2
|
+
import t from "../node_modules/lucide-react/dist/esm/icons/send.js";
|
|
3
|
+
import n from "../node_modules/lucide-react/dist/esm/icons/circle-check.js";
|
|
4
|
+
import r from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
|
|
5
|
+
import i from "../node_modules/lucide-react/dist/esm/icons/external-link.js";
|
|
6
|
+
import { Badge as a, Button as o, Card as s, CardContent as c, CardHeader as l, CardTitle as u, Textarea as d } from "./ui.js";
|
|
7
|
+
import { useMoveTheWheels as f } from "../providers/MoveTheWheelsProvider.js";
|
|
8
|
+
import { useEntityComments as p } from "../hooks/useEntityComments.js";
|
|
9
|
+
import { formatDate as m } from "../utils/formatters.js";
|
|
10
|
+
import { useState as h } from "react";
|
|
11
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
|
+
// src/movethewheels/components/EntityConversationsCard.tsx
|
|
13
|
+
function v({ entityType: v, entityId: y, title: b = "Conversations" }) {
|
|
14
|
+
let { navigate: x } = f(), { comments: S, total: C, isLoading: w, isSubmitting: T, error: E, addComment: D, toggleResolve: O, deleteComment: k, currentUserId: A } = p(v, y), [j, M] = h(""), [N, P] = h(null);
|
|
15
|
+
return /* @__PURE__ */ _(s, {
|
|
16
|
+
"data-testid": `entity-conversations-${v}`,
|
|
17
|
+
children: [/* @__PURE__ */ _(l, {
|
|
18
|
+
className: "flex flex-row items-center justify-between gap-2",
|
|
19
|
+
children: [/* @__PURE__ */ _(u, {
|
|
20
|
+
className: "flex items-center gap-2",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ g(e, {
|
|
23
|
+
size: 18,
|
|
24
|
+
"aria-hidden": "true"
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ g("span", { children: b }),
|
|
27
|
+
C > 0 && /* @__PURE__ */ g(a, {
|
|
28
|
+
variant: "secondary",
|
|
29
|
+
children: C
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
}), /* @__PURE__ */ _(o, {
|
|
33
|
+
variant: "ghost",
|
|
34
|
+
size: "sm",
|
|
35
|
+
onClick: () => x("/conversations"),
|
|
36
|
+
children: [/* @__PURE__ */ g(i, {
|
|
37
|
+
size: 14,
|
|
38
|
+
"aria-hidden": "true"
|
|
39
|
+
}), " All threads"]
|
|
40
|
+
})]
|
|
41
|
+
}), /* @__PURE__ */ _(c, {
|
|
42
|
+
className: "space-y-4",
|
|
43
|
+
children: [
|
|
44
|
+
E && /* @__PURE__ */ g("p", {
|
|
45
|
+
className: "text-sm text-status-error-text",
|
|
46
|
+
children: E.message
|
|
47
|
+
}),
|
|
48
|
+
N && /* @__PURE__ */ g("p", {
|
|
49
|
+
className: "text-sm text-status-error-text",
|
|
50
|
+
children: N
|
|
51
|
+
}),
|
|
52
|
+
w ? /* @__PURE__ */ g("p", {
|
|
53
|
+
className: "text-sm text-text-secondary py-2",
|
|
54
|
+
children: "Loading conversation…"
|
|
55
|
+
}) : S.length === 0 ? /* @__PURE__ */ g("p", {
|
|
56
|
+
className: "text-sm text-text-secondary py-2",
|
|
57
|
+
children: "No notes or comments on this record yet. Start a thread for dispatchers, drivers, or ops."
|
|
58
|
+
}) : /* @__PURE__ */ g("ul", {
|
|
59
|
+
className: "space-y-3",
|
|
60
|
+
"aria-label": b,
|
|
61
|
+
children: S.map((e) => {
|
|
62
|
+
let t = e.status.toUpperCase() === "RESOLVED", i = !!(A && e.authorId === A);
|
|
63
|
+
return /* @__PURE__ */ _("li", {
|
|
64
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-3 space-y-2",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ _("div", {
|
|
67
|
+
className: "flex items-center justify-between gap-2 text-xs text-text-secondary",
|
|
68
|
+
children: [/* @__PURE__ */ g("span", {
|
|
69
|
+
className: "font-medium text-text-primary",
|
|
70
|
+
children: i ? "You" : `Member ${e.authorId.slice(0, 8)}`
|
|
71
|
+
}), /* @__PURE__ */ _("div", {
|
|
72
|
+
className: "flex items-center gap-2",
|
|
73
|
+
children: [t && /* @__PURE__ */ g(a, {
|
|
74
|
+
variant: "outline",
|
|
75
|
+
children: "Resolved"
|
|
76
|
+
}), /* @__PURE__ */ g("span", { children: m(e.createdAt, "relative") })]
|
|
77
|
+
})]
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ g("p", {
|
|
80
|
+
className: "text-sm whitespace-pre-wrap text-text-primary",
|
|
81
|
+
children: e.text
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ _("div", {
|
|
84
|
+
className: "flex items-center gap-2 pt-1",
|
|
85
|
+
children: [/* @__PURE__ */ _(o, {
|
|
86
|
+
type: "button",
|
|
87
|
+
variant: "ghost",
|
|
88
|
+
size: "sm",
|
|
89
|
+
onClick: () => void O(e.id, !t),
|
|
90
|
+
children: [/* @__PURE__ */ g(n, {
|
|
91
|
+
size: 14,
|
|
92
|
+
"aria-hidden": "true"
|
|
93
|
+
}), t ? "Reopen" : "Resolve"]
|
|
94
|
+
}), i && /* @__PURE__ */ _(o, {
|
|
95
|
+
type: "button",
|
|
96
|
+
variant: "ghost",
|
|
97
|
+
size: "sm",
|
|
98
|
+
className: "text-status-error-text",
|
|
99
|
+
onClick: () => void k(e.id),
|
|
100
|
+
children: [/* @__PURE__ */ g(r, {
|
|
101
|
+
size: 14,
|
|
102
|
+
"aria-hidden": "true"
|
|
103
|
+
}), " Delete"]
|
|
104
|
+
})]
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
}, e.id);
|
|
108
|
+
})
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ _("form", {
|
|
111
|
+
onSubmit: async (e) => {
|
|
112
|
+
if (e.preventDefault(), j.trim()) {
|
|
113
|
+
P(null);
|
|
114
|
+
try {
|
|
115
|
+
await D(j), M("");
|
|
116
|
+
} catch (e) {
|
|
117
|
+
P(e instanceof Error ? e.message : "Failed to post message.");
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
className: "space-y-2 border-t border-border-seam pt-3",
|
|
122
|
+
children: [/* @__PURE__ */ g(d, {
|
|
123
|
+
value: j,
|
|
124
|
+
onChange: (e) => M(e.target.value),
|
|
125
|
+
placeholder: "Add an operational update or dispatch note...",
|
|
126
|
+
rows: 2,
|
|
127
|
+
"aria-label": "New conversation message"
|
|
128
|
+
}), /* @__PURE__ */ g("div", {
|
|
129
|
+
className: "flex justify-end",
|
|
130
|
+
children: /* @__PURE__ */ _(o, {
|
|
131
|
+
type: "submit",
|
|
132
|
+
size: "sm",
|
|
133
|
+
disabled: T || !j.trim(),
|
|
134
|
+
children: [/* @__PURE__ */ g(t, {
|
|
135
|
+
size: 14,
|
|
136
|
+
"aria-hidden": "true"
|
|
137
|
+
}), T ? "Posting…" : "Post note"]
|
|
138
|
+
})
|
|
139
|
+
})]
|
|
140
|
+
})
|
|
141
|
+
]
|
|
142
|
+
})]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
export { v as EntityConversationsCard };
|
|
@@ -16,18 +16,19 @@ function p() {
|
|
|
16
16
|
function m({ points: e, padding: t = 48, maxZoom: n = 13 }) {
|
|
17
17
|
let r = i();
|
|
18
18
|
return c(() => {
|
|
19
|
-
let e = setTimeout(() => r.invalidateSize(), 0);
|
|
19
|
+
let e = setTimeout(() => r.invalidateSize({ animate: !1 }), 0);
|
|
20
20
|
return () => clearTimeout(e);
|
|
21
21
|
}, [r]), c(() => {
|
|
22
22
|
if (e.length === 0) return;
|
|
23
23
|
if (e.length === 1) {
|
|
24
|
-
r.setView(e[0], Math.min(n, 12));
|
|
24
|
+
r.setView(e[0], Math.min(n, 12), { animate: !1 });
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
let i = f.default.latLngBounds(e);
|
|
28
28
|
r.fitBounds(i, {
|
|
29
29
|
padding: [t, t],
|
|
30
|
-
maxZoom: n
|
|
30
|
+
maxZoom: n,
|
|
31
|
+
animate: !1
|
|
31
32
|
});
|
|
32
33
|
}, [
|
|
33
34
|
r,
|