@burdenoff/microfe-movethewheels 2026.510.105
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/README.md +82 -0
- package/dist/AIAssistantPage-hD0VYJdH.js +210 -0
- package/dist/AnalyticsPage-DHTHCUtr.js +201 -0
- package/dist/CreateOrderPage-Cprg4Y9V.js +471 -0
- package/dist/CustomerDetailsPage-DNDEw7IW.js +239 -0
- package/dist/CustomersPage-CDjjeCEL.js +119 -0
- package/dist/DashboardPage-8iTPXRAG.js +374 -0
- package/dist/DataTable-CRIKfdIN.js +239 -0
- package/dist/DriverDetailsPage-CRyRCno7.js +297 -0
- package/dist/DriversPage-16O8fVmf.js +127 -0
- package/dist/FinancePage-BYUxK5dR.js +154 -0
- package/dist/FleetPage-CHYETCWT.js +293 -0
- package/dist/ImportExportPage-C3MKKxfc.js +232 -0
- package/dist/InventoryPage--822AxZM.js +223 -0
- package/dist/LiveTrackingPage-Dp3rTJDr.js +332 -0
- package/dist/MarketplacePage-DjEqudfM.js +192 -0
- package/dist/MetricCard-GTbxAk1a.js +135 -0
- package/dist/OrderDetailsPage-BIuYG0ub.js +398 -0
- package/dist/OrdersListPage-CW5V0Uvh.js +257 -0
- package/dist/PageLayout-B7b0vl0R.js +1894 -0
- package/dist/ProductDetailsPage-Q3X7AT-7.js +168 -0
- package/dist/ProductsPage-CUj9JpnW.js +131 -0
- package/dist/ReportsPage-DblO5CdJ.js +227 -0
- package/dist/RouteDetailsPage-CLctgk6A.js +240 -0
- package/dist/RoutesPage-8hrv6RWT.js +116 -0
- package/dist/SettingsPage-BJ5BQeqn.js +247 -0
- package/dist/StatusBadge-BrrwraIA.js +206 -0
- package/dist/TrackingPage-BGqHDh-w.js +322 -0
- package/dist/VehicleDetailsPage-XnDH4iQR.js +194 -0
- package/dist/VehiclesPage-Cs4XxHkA.js +127 -0
- package/dist/WarehouseDetailsPage-GemdMvr_.js +215 -0
- package/dist/WarehousesPage-QTiuDuXy.js +121 -0
- package/dist/arrow-left-6CiLhqVp.js +11 -0
- package/dist/box-BunB_4UH.js +18 -0
- package/dist/chart-column-DWwVEVQ-.js +22 -0
- package/dist/chevron-right-DhZVf20o.js +8 -0
- package/dist/circle-alert-D5f6RZxt.js +26 -0
- package/dist/circle-check-big-D-JMHcTe.js +11 -0
- package/dist/clock-CvwBKbQP.js +13 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/dollar-sign-CP9qeU5d.js +14 -0
- package/dist/download-CIuG04pJ.js +21 -0
- package/dist/file-text-Dd_thxkn.js +26 -0
- package/dist/filter-DyRMX9CU.js +8 -0
- package/dist/formatters-_vJlC-47.js +50 -0
- package/dist/generated/global-operations.d.ts +1 -0
- package/dist/generated/global-types.d.ts +20715 -0
- package/dist/generated/wspace-operations.d.ts +3704 -0
- package/dist/generated/wspace-types.d.ts +53362 -0
- package/dist/graphqlClient-CdJyR_ed.js +55 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +772 -0
- package/dist/map-BqH1cBJi.js +18 -0
- package/dist/map-pin-CFBOmh-A.js +13 -0
- package/dist/movethewheels/MoveTheWheelsRoot.d.ts +25 -0
- package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +7 -0
- package/dist/movethewheels/components/DataTable.d.ts +32 -0
- package/dist/movethewheels/components/MetricCard.d.ts +43 -0
- package/dist/movethewheels/components/PageLayout.d.ts +68 -0
- package/dist/movethewheels/components/StatusBadge.d.ts +49 -0
- package/dist/movethewheels/components/index.d.ts +10 -0
- package/dist/movethewheels/components/ui.d.ts +22 -0
- package/dist/movethewheels/constants/index.d.ts +24 -0
- package/dist/movethewheels/constants/mockData.d.ts +33 -0
- package/dist/movethewheels/hooks/index.d.ts +12 -0
- package/dist/movethewheels/hooks/useAnalytics.d.ts +118 -0
- package/dist/movethewheels/hooks/useCustomers.d.ts +37 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +71 -0
- package/dist/movethewheels/hooks/useInventory.d.ts +60 -0
- package/dist/movethewheels/hooks/useOrders.d.ts +47 -0
- package/dist/movethewheels/hooks/useRoutes.d.ts +41 -0
- package/dist/movethewheels/hooks/useTracking.d.ts +69 -0
- package/dist/movethewheels/index.d.ts +30 -0
- package/dist/movethewheels/pages/AIAssistantPage.d.ts +4 -0
- package/dist/movethewheels/pages/AnalyticsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CreateOrderPage.d.ts +6 -0
- package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/CustomersPage.d.ts +4 -0
- package/dist/movethewheels/pages/DashboardPage.d.ts +6 -0
- package/dist/movethewheels/pages/DriverDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/DriversPage.d.ts +4 -0
- package/dist/movethewheels/pages/FinancePage.d.ts +4 -0
- package/dist/movethewheels/pages/FleetPage.d.ts +6 -0
- package/dist/movethewheels/pages/ImportExportPage.d.ts +4 -0
- package/dist/movethewheels/pages/InventoryPage.d.ts +4 -0
- package/dist/movethewheels/pages/LiveTrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/MarketplacePage.d.ts +4 -0
- package/dist/movethewheels/pages/OrderDetailsPage.d.ts +6 -0
- package/dist/movethewheels/pages/OrdersListPage.d.ts +6 -0
- package/dist/movethewheels/pages/ProductDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ProductsPage.d.ts +4 -0
- package/dist/movethewheels/pages/ReportsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RouteDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/RoutesPage.d.ts +4 -0
- package/dist/movethewheels/pages/SettingsPage.d.ts +4 -0
- package/dist/movethewheels/pages/TrackingPage.d.ts +6 -0
- package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/VehiclesPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +4 -0
- package/dist/movethewheels/pages/WarehousesPage.d.ts +4 -0
- package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +16 -0
- package/dist/movethewheels/store/movethewheelsStore.d.ts +73 -0
- package/dist/movethewheels/types/index.d.ts +655 -0
- package/dist/movethewheels/utils/cn.d.ts +6 -0
- package/dist/movethewheels/utils/formatters.d.ts +60 -0
- package/dist/movethewheels/utils/graphqlClient.d.ts +11 -0
- package/dist/movethewheels/utils/index.d.ts +7 -0
- package/dist/movethewheels/utils/navigation.d.ts +23 -0
- package/dist/navigation-BgnOfsVd.js +6 -0
- package/dist/navigation-C2fY_aS9.js +8 -0
- package/dist/package-DVZbDRcV.js +22 -0
- package/dist/phone-KdwpVmC4.js +18 -0
- package/dist/plus-Bl7uX6Ji.js +11 -0
- package/dist/refresh-cw-BYjl3K-8.js +22 -0
- package/dist/route-Ce_poKFi.js +51 -0
- package/dist/save-C-qDVat-.js +18 -0
- package/dist/search-5pdn5eOO.js +13 -0
- package/dist/settings-C4kIDsYg.js +28 -0
- package/dist/square-pen-BwQ67vLE.js +11 -0
- package/dist/star-BlVsC3Ad.js +8 -0
- package/dist/store-DTmQT5M0.js +26 -0
- package/dist/trending-up-C1faflCI.js +11 -0
- package/dist/triangle-alert-CUoVAA4L.js +18 -0
- package/dist/truck-BmDAzu05.js +30 -0
- package/dist/useAnalytics-ph7eTIK6.js +297 -0
- package/dist/useCustomers-bS3a4ytk.js +186 -0
- package/dist/useFleet-BdETplNE.js +398 -0
- package/dist/useInventory-Dwn18FPz.js +323 -0
- package/dist/useOrders-D_3_hGMp.js +324 -0
- package/dist/useRoutes-v4aBaS-E.js +224 -0
- package/dist/useTracking-De2KIUNu.js +261 -0
- package/dist/user-BplzDrLP.js +13 -0
- package/dist/users-i-igmsP4.js +24 -0
- package/dist/warehouse-DewG0PXh.js +25 -0
- package/dist/wrench-CoSDEIC7.js +31 -0
- package/package.json +107 -0
- package/src/dev/main.tsx +110 -0
- package/src/dev/styles.css +139 -0
- package/src/generated/global-operations.ts +2 -0
- package/src/generated/global-types.ts +24048 -0
- package/src/generated/wspace-operations.ts +3734 -0
- package/src/generated/wspace-types.ts +60715 -0
- package/src/index.ts +4 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +258 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +119 -0
- package/src/movethewheels/components/DataTable.tsx +367 -0
- package/src/movethewheels/components/MetricCard.tsx +180 -0
- package/src/movethewheels/components/PageLayout.tsx +234 -0
- package/src/movethewheels/components/StatusBadge.tsx +243 -0
- package/src/movethewheels/components/index.ts +26 -0
- package/src/movethewheels/components/ui.tsx +124 -0
- package/src/movethewheels/constants/index.ts +65 -0
- package/src/movethewheels/constants/mockData.ts +1342 -0
- package/src/movethewheels/hooks/index.ts +55 -0
- package/src/movethewheels/hooks/useAnalytics.ts +476 -0
- package/src/movethewheels/hooks/useCustomers.ts +359 -0
- package/src/movethewheels/hooks/useFleet.ts +778 -0
- package/src/movethewheels/hooks/useInventory.ts +632 -0
- package/src/movethewheels/hooks/useOrders.ts +703 -0
- package/src/movethewheels/hooks/useRoutes.ts +453 -0
- package/src/movethewheels/hooks/useTracking.ts +505 -0
- package/src/movethewheels/index.ts +68 -0
- package/src/movethewheels/pages/AIAssistantPage.tsx +160 -0
- package/src/movethewheels/pages/AnalyticsPage.tsx +190 -0
- package/src/movethewheels/pages/CreateOrderPage.tsx +454 -0
- package/src/movethewheels/pages/CustomerDetailsPage.tsx +207 -0
- package/src/movethewheels/pages/CustomersPage.tsx +115 -0
- package/src/movethewheels/pages/DashboardPage.tsx +414 -0
- package/src/movethewheels/pages/DriverDetailsPage.tsx +261 -0
- package/src/movethewheels/pages/DriversPage.tsx +118 -0
- package/src/movethewheels/pages/FinancePage.tsx +141 -0
- package/src/movethewheels/pages/FleetPage.tsx +289 -0
- package/src/movethewheels/pages/ImportExportPage.tsx +165 -0
- package/src/movethewheels/pages/InventoryPage.tsx +212 -0
- package/src/movethewheels/pages/LiveTrackingPage.tsx +325 -0
- package/src/movethewheels/pages/MarketplacePage.tsx +235 -0
- package/src/movethewheels/pages/OrderDetailsPage.tsx +387 -0
- package/src/movethewheels/pages/OrdersListPage.tsx +241 -0
- package/src/movethewheels/pages/ProductDetailsPage.tsx +155 -0
- package/src/movethewheels/pages/ProductsPage.tsx +124 -0
- package/src/movethewheels/pages/ReportsPage.tsx +164 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +245 -0
- package/src/movethewheels/pages/RoutesPage.tsx +104 -0
- package/src/movethewheels/pages/SettingsPage.tsx +242 -0
- package/src/movethewheels/pages/TrackingPage.tsx +419 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +218 -0
- package/src/movethewheels/pages/VehiclesPage.tsx +124 -0
- package/src/movethewheels/pages/WarehouseDetailsPage.tsx +216 -0
- package/src/movethewheels/pages/WarehousesPage.tsx +122 -0
- package/src/movethewheels/providers/MoveTheWheelsProvider.tsx +66 -0
- package/src/movethewheels/store/movethewheelsStore.ts +136 -0
- package/src/movethewheels/types/index.ts +744 -0
- package/src/movethewheels/utils/cn.ts +9 -0
- package/src/movethewheels/utils/formatters.ts +215 -0
- package/src/movethewheels/utils/graphqlClient.ts +63 -0
- package/src/movethewheels/utils/index.ts +8 -0
- package/src/movethewheels/utils/navigation.ts +70 -0
- package/src/operations/global/.gitkeep +0 -0
- package/src/operations/wspace/movethewheels/fragments/core.graphql +191 -0
- package/src/operations/wspace/movethewheels/mutations/entities.graphql +87 -0
- package/src/operations/wspace/movethewheels/mutations/logistics.graphql +86 -0
- package/src/operations/wspace/movethewheels/mutations/marketplace-reports.graphql +81 -0
- package/src/operations/wspace/movethewheels/mutations/orders.graphql +21 -0
- package/src/operations/wspace/movethewheels/queries/dashboard.graphql +61 -0
- package/src/operations/wspace/movethewheels/queries/entities.graphql +83 -0
- package/src/operations/wspace/movethewheels/queries/logistics.graphql +84 -0
- package/src/operations/wspace/movethewheels/queries/marketplace-reports.graphql +40 -0
- package/src/operations/wspace/movethewheels/queries/orders.graphql +43 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { M as e, a as t, d as n, f as r, g as i, h as a, i as o, o as s, s as c, u as l } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as u } from "./chevron-right-DhZVf20o.js";
|
|
3
|
+
import { n as d, t as f } from "./wrench-CoSDEIC7.js";
|
|
4
|
+
import { t as p } from "./star-BlVsC3Ad.js";
|
|
5
|
+
import { t as m } from "./truck-BmDAzu05.js";
|
|
6
|
+
import { t as h } from "./users-i-igmsP4.js";
|
|
7
|
+
import { r as g } from "./graphqlClient-CdJyR_ed.js";
|
|
8
|
+
import { i as _, n as v, o as y } from "./useFleet-BdETplNE.js";
|
|
9
|
+
import { r as b, t as x } from "./MetricCard-GTbxAk1a.js";
|
|
10
|
+
import { a as S, r as C } from "./StatusBadge-BrrwraIA.js";
|
|
11
|
+
import { t as w } from "./navigation-BgnOfsVd.js";
|
|
12
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
13
|
+
import { useI18n as D } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
|
+
//#region src/movethewheels/pages/FleetPage.tsx
|
|
15
|
+
function O() {
|
|
16
|
+
let { t: O } = D(), k = (e, t) => {
|
|
17
|
+
let n = O(e);
|
|
18
|
+
return n === e ? t : n;
|
|
19
|
+
}, { basePath: A, navigate: j } = g(), { stats: M } = _(), { vehicles: N } = y(), { drivers: P } = v(), F = (e) => {
|
|
20
|
+
j && j(w(A, e));
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ E(o, {
|
|
23
|
+
title: k("movethewheels.fleet.title", "Fleet Management"),
|
|
24
|
+
subtitle: k("movethewheels.fleet.subtitle", "Manage your vehicles and drivers"),
|
|
25
|
+
icon: /* @__PURE__ */ T(m, { size: 24 }),
|
|
26
|
+
headerActions: /* @__PURE__ */ E("div", {
|
|
27
|
+
className: "flex gap-2",
|
|
28
|
+
children: [/* @__PURE__ */ E(l, {
|
|
29
|
+
variant: "outline",
|
|
30
|
+
onClick: () => F("fleet/vehicles"),
|
|
31
|
+
children: [/* @__PURE__ */ T(m, { size: 16 }), k("movethewheels.fleet.actions.allVehicles", "All Vehicles")]
|
|
32
|
+
}), /* @__PURE__ */ E(l, {
|
|
33
|
+
variant: "outline",
|
|
34
|
+
onClick: () => F("fleet/drivers"),
|
|
35
|
+
children: [/* @__PURE__ */ T(h, { size: 16 }), k("movethewheels.fleet.actions.allDrivers", "All Drivers")]
|
|
36
|
+
})]
|
|
37
|
+
}),
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ E(b, {
|
|
40
|
+
columns: 4,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ T(x, {
|
|
43
|
+
label: k("movethewheels.fleet.metrics.totalVehicles", "Total Vehicles"),
|
|
44
|
+
value: M.totalVehicles,
|
|
45
|
+
icon: /* @__PURE__ */ T(m, { size: 20 }),
|
|
46
|
+
subtitle: `${M.vehiclesByStatus.available} ${k("movethewheels.fleet.metrics.available", "available")}`,
|
|
47
|
+
onClick: () => F("fleet/vehicles")
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ T(x, {
|
|
50
|
+
label: k("movethewheels.fleet.metrics.totalDrivers", "Total Drivers"),
|
|
51
|
+
value: M.totalDrivers,
|
|
52
|
+
icon: /* @__PURE__ */ T(h, { size: 20 }),
|
|
53
|
+
subtitle: `${M.driversByStatus.available} ${k("movethewheels.fleet.metrics.available", "available")}`,
|
|
54
|
+
onClick: () => F("fleet/drivers")
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ T(x, {
|
|
57
|
+
label: k("movethewheels.fleet.metrics.utilization", "Fleet Utilization"),
|
|
58
|
+
value: `${M.utilization.toFixed(0)}%`,
|
|
59
|
+
icon: /* @__PURE__ */ T(m, { size: 20 }),
|
|
60
|
+
changeType: M.utilization >= 70 ? "positive" : "neutral"
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ T(x, {
|
|
63
|
+
label: k("movethewheels.fleet.metrics.avgDriverRating", "Avg Driver Rating"),
|
|
64
|
+
value: M.avgDriverRating.toFixed(1),
|
|
65
|
+
icon: /* @__PURE__ */ T(p, { size: 20 }),
|
|
66
|
+
subtitle: k("movethewheels.fleet.metrics.outOfFive", "out of 5"),
|
|
67
|
+
changeType: M.avgDriverRating >= 4.5 ? "positive" : "neutral"
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ E("div", {
|
|
72
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
73
|
+
children: [/* @__PURE__ */ T(t, {
|
|
74
|
+
title: k("movethewheels.fleet.vehicles.title", "Vehicles"),
|
|
75
|
+
actions: /* @__PURE__ */ E(l, {
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
size: "sm",
|
|
78
|
+
onClick: () => F("fleet/vehicles"),
|
|
79
|
+
children: [
|
|
80
|
+
k("movethewheels.fleet.common.viewAll", "View all"),
|
|
81
|
+
" ",
|
|
82
|
+
/* @__PURE__ */ T(u, { size: 16 })
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
children: /* @__PURE__ */ T(n, { children: /* @__PURE__ */ T(r, {
|
|
86
|
+
className: "p-0",
|
|
87
|
+
children: /* @__PURE__ */ T("div", {
|
|
88
|
+
className: "divide-y",
|
|
89
|
+
children: N.slice(0, 5).map((t) => /* @__PURE__ */ T("div", {
|
|
90
|
+
className: "p-4 hover:bg-muted/50 cursor-pointer transition-colors",
|
|
91
|
+
onClick: () => F(`fleet/vehicles/${t.id}`),
|
|
92
|
+
children: /* @__PURE__ */ E("div", {
|
|
93
|
+
className: "flex items-center justify-between",
|
|
94
|
+
children: [/* @__PURE__ */ E("div", {
|
|
95
|
+
className: "flex items-center gap-3",
|
|
96
|
+
children: [/* @__PURE__ */ T("div", {
|
|
97
|
+
className: "w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",
|
|
98
|
+
children: /* @__PURE__ */ T(m, {
|
|
99
|
+
size: 20,
|
|
100
|
+
className: "text-primary"
|
|
101
|
+
})
|
|
102
|
+
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("div", {
|
|
103
|
+
className: "flex items-center gap-2",
|
|
104
|
+
children: [/* @__PURE__ */ T("span", {
|
|
105
|
+
className: "font-medium",
|
|
106
|
+
children: t.vehicleNumber
|
|
107
|
+
}), /* @__PURE__ */ T(S, {
|
|
108
|
+
type: t.type,
|
|
109
|
+
size: "sm"
|
|
110
|
+
})]
|
|
111
|
+
}), /* @__PURE__ */ E("p", {
|
|
112
|
+
className: "text-sm text-muted-foreground",
|
|
113
|
+
children: [
|
|
114
|
+
t.make,
|
|
115
|
+
" ",
|
|
116
|
+
t.model,
|
|
117
|
+
" (",
|
|
118
|
+
t.year,
|
|
119
|
+
")"
|
|
120
|
+
]
|
|
121
|
+
})] })]
|
|
122
|
+
}), /* @__PURE__ */ E("div", {
|
|
123
|
+
className: "text-right",
|
|
124
|
+
children: [/* @__PURE__ */ T(C, {
|
|
125
|
+
status: t.status,
|
|
126
|
+
type: "vehicle",
|
|
127
|
+
size: "sm"
|
|
128
|
+
}), t.fuelLevel !== void 0 && /* @__PURE__ */ E("div", {
|
|
129
|
+
className: "mt-2 flex items-center gap-2",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ T(d, {
|
|
132
|
+
size: 12,
|
|
133
|
+
className: "text-muted-foreground"
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ T(e, {
|
|
136
|
+
value: t.fuelLevel,
|
|
137
|
+
className: "w-16 h-2"
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ E("span", {
|
|
140
|
+
className: "text-xs text-muted-foreground",
|
|
141
|
+
children: [t.fuelLevel, "%"]
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
})]
|
|
145
|
+
})]
|
|
146
|
+
})
|
|
147
|
+
}, t.id))
|
|
148
|
+
})
|
|
149
|
+
}) })
|
|
150
|
+
}), /* @__PURE__ */ T(t, {
|
|
151
|
+
title: k("movethewheels.fleet.drivers.title", "Drivers"),
|
|
152
|
+
actions: /* @__PURE__ */ E(l, {
|
|
153
|
+
variant: "ghost",
|
|
154
|
+
size: "sm",
|
|
155
|
+
onClick: () => F("fleet/drivers"),
|
|
156
|
+
children: [
|
|
157
|
+
k("movethewheels.fleet.common.viewAll", "View all"),
|
|
158
|
+
" ",
|
|
159
|
+
/* @__PURE__ */ T(u, { size: 16 })
|
|
160
|
+
]
|
|
161
|
+
}),
|
|
162
|
+
children: /* @__PURE__ */ T(n, { children: /* @__PURE__ */ T(r, {
|
|
163
|
+
className: "p-0",
|
|
164
|
+
children: /* @__PURE__ */ T("div", {
|
|
165
|
+
className: "divide-y",
|
|
166
|
+
children: P.slice(0, 5).map((e) => /* @__PURE__ */ T("div", {
|
|
167
|
+
className: "p-4 hover:bg-muted/50 cursor-pointer transition-colors",
|
|
168
|
+
onClick: () => F(`fleet/drivers/${e.id}`),
|
|
169
|
+
children: /* @__PURE__ */ E("div", {
|
|
170
|
+
className: "flex items-center justify-between",
|
|
171
|
+
children: [/* @__PURE__ */ E("div", {
|
|
172
|
+
className: "flex items-center gap-3",
|
|
173
|
+
children: [/* @__PURE__ */ T(s, { children: /* @__PURE__ */ T(c, { children: e.fullName.split(" ").map((e) => e[0]).join("") }) }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
174
|
+
className: "font-medium",
|
|
175
|
+
children: e.fullName
|
|
176
|
+
}), /* @__PURE__ */ E("p", {
|
|
177
|
+
className: "text-sm text-muted-foreground",
|
|
178
|
+
children: [
|
|
179
|
+
e.employeeId,
|
|
180
|
+
" - ",
|
|
181
|
+
e.completedOrders,
|
|
182
|
+
" ",
|
|
183
|
+
k("movethewheels.fleet.drivers.deliveries", "deliveries")
|
|
184
|
+
]
|
|
185
|
+
})] })]
|
|
186
|
+
}), /* @__PURE__ */ E("div", {
|
|
187
|
+
className: "text-right",
|
|
188
|
+
children: [/* @__PURE__ */ T(C, {
|
|
189
|
+
status: e.status,
|
|
190
|
+
type: "driver",
|
|
191
|
+
size: "sm"
|
|
192
|
+
}), /* @__PURE__ */ E("div", {
|
|
193
|
+
className: "mt-1 flex items-center gap-1 justify-end",
|
|
194
|
+
children: [/* @__PURE__ */ T(p, {
|
|
195
|
+
size: 12,
|
|
196
|
+
className: "text-yellow-500 fill-yellow-500"
|
|
197
|
+
}), /* @__PURE__ */ T("span", {
|
|
198
|
+
className: "text-sm font-medium",
|
|
199
|
+
children: e.ratings.overall.toFixed(1)
|
|
200
|
+
})]
|
|
201
|
+
})]
|
|
202
|
+
})]
|
|
203
|
+
})
|
|
204
|
+
}, e.id))
|
|
205
|
+
})
|
|
206
|
+
}) })
|
|
207
|
+
})]
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ E("div", {
|
|
210
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
211
|
+
children: [/* @__PURE__ */ E(n, { children: [/* @__PURE__ */ T(a, { children: /* @__PURE__ */ T(i, { children: k("movethewheels.fleet.status.vehicleTitle", "Vehicle Status") }) }), /* @__PURE__ */ T(r, { children: /* @__PURE__ */ T("div", {
|
|
212
|
+
className: "space-y-4",
|
|
213
|
+
children: Object.entries(M.vehiclesByStatus).map(([t, n]) => /* @__PURE__ */ E("div", {
|
|
214
|
+
className: "flex items-center justify-between",
|
|
215
|
+
children: [/* @__PURE__ */ T("div", {
|
|
216
|
+
className: "flex items-center gap-3",
|
|
217
|
+
children: /* @__PURE__ */ T(C, {
|
|
218
|
+
status: t,
|
|
219
|
+
type: "vehicle"
|
|
220
|
+
})
|
|
221
|
+
}), /* @__PURE__ */ E("div", {
|
|
222
|
+
className: "flex items-center gap-3",
|
|
223
|
+
children: [/* @__PURE__ */ T("span", {
|
|
224
|
+
className: "font-medium",
|
|
225
|
+
children: n
|
|
226
|
+
}), /* @__PURE__ */ T(e, {
|
|
227
|
+
value: n / M.totalVehicles * 100,
|
|
228
|
+
className: "w-24 h-2"
|
|
229
|
+
})]
|
|
230
|
+
})]
|
|
231
|
+
}, t))
|
|
232
|
+
}) })] }), /* @__PURE__ */ E(n, { children: [/* @__PURE__ */ T(a, { children: /* @__PURE__ */ T(i, { children: k("movethewheels.fleet.status.driverTitle", "Driver Status") }) }), /* @__PURE__ */ T(r, { children: /* @__PURE__ */ T("div", {
|
|
233
|
+
className: "space-y-4",
|
|
234
|
+
children: Object.entries(M.driversByStatus).map(([t, n]) => /* @__PURE__ */ E("div", {
|
|
235
|
+
className: "flex items-center justify-between",
|
|
236
|
+
children: [/* @__PURE__ */ T("div", {
|
|
237
|
+
className: "flex items-center gap-3",
|
|
238
|
+
children: /* @__PURE__ */ T(C, {
|
|
239
|
+
status: t,
|
|
240
|
+
type: "driver"
|
|
241
|
+
})
|
|
242
|
+
}), /* @__PURE__ */ E("div", {
|
|
243
|
+
className: "flex items-center gap-3",
|
|
244
|
+
children: [/* @__PURE__ */ T("span", {
|
|
245
|
+
className: "font-medium",
|
|
246
|
+
children: n
|
|
247
|
+
}), /* @__PURE__ */ T(e, {
|
|
248
|
+
value: n / M.totalDrivers * 100,
|
|
249
|
+
className: "w-24 h-2"
|
|
250
|
+
})]
|
|
251
|
+
})]
|
|
252
|
+
}, t))
|
|
253
|
+
}) })] })]
|
|
254
|
+
}),
|
|
255
|
+
M.vehiclesByStatus.maintenance > 0 && /* @__PURE__ */ E(n, {
|
|
256
|
+
className: "border-yellow-200 dark:border-yellow-800",
|
|
257
|
+
children: [/* @__PURE__ */ T(a, { children: /* @__PURE__ */ E(i, {
|
|
258
|
+
className: "flex items-center gap-2 text-yellow-600",
|
|
259
|
+
children: [/* @__PURE__ */ T(f, { size: 18 }), k("movethewheels.fleet.maintenance.title", "Maintenance Required")]
|
|
260
|
+
}) }), /* @__PURE__ */ T(r, { children: /* @__PURE__ */ T("div", {
|
|
261
|
+
className: "space-y-3",
|
|
262
|
+
children: N.filter((e) => e.status === "maintenance").map((e) => /* @__PURE__ */ E("div", {
|
|
263
|
+
className: "flex items-center justify-between p-3 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg",
|
|
264
|
+
children: [/* @__PURE__ */ E("div", {
|
|
265
|
+
className: "flex items-center gap-3",
|
|
266
|
+
children: [/* @__PURE__ */ T(m, {
|
|
267
|
+
size: 20,
|
|
268
|
+
className: "text-yellow-600"
|
|
269
|
+
}), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
270
|
+
className: "font-medium",
|
|
271
|
+
children: e.vehicleNumber
|
|
272
|
+
}), /* @__PURE__ */ E("p", {
|
|
273
|
+
className: "text-sm text-muted-foreground",
|
|
274
|
+
children: [
|
|
275
|
+
e.make,
|
|
276
|
+
" ",
|
|
277
|
+
e.model
|
|
278
|
+
]
|
|
279
|
+
})] })]
|
|
280
|
+
}), /* @__PURE__ */ T(l, {
|
|
281
|
+
variant: "outline",
|
|
282
|
+
size: "sm",
|
|
283
|
+
onClick: () => F(`fleet/vehicles/${e.id}`),
|
|
284
|
+
children: k("movethewheels.fleet.maintenance.viewDetails", "View Details")
|
|
285
|
+
})]
|
|
286
|
+
}, e.id))
|
|
287
|
+
}) })]
|
|
288
|
+
})
|
|
289
|
+
]
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
//#endregion
|
|
293
|
+
export { O as default };
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { d as e, f as t, g as n, h as r, i, it as a, l as o, u as s } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as c } from "./download-CIuG04pJ.js";
|
|
3
|
+
import { t as l } from "./file-text-Dd_thxkn.js";
|
|
4
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
|
+
//#region node_modules/lucide-react/dist/esm/icons/check.js
|
|
6
|
+
var f = a("Check", [["path", {
|
|
7
|
+
d: "M20 6 9 17l-5-5",
|
|
8
|
+
key: "1gmf2c"
|
|
9
|
+
}]]), p = a("FileSpreadsheet", [
|
|
10
|
+
["path", {
|
|
11
|
+
d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",
|
|
12
|
+
key: "1rqfz7"
|
|
13
|
+
}],
|
|
14
|
+
["path", {
|
|
15
|
+
d: "M14 2v4a2 2 0 0 0 2 2h4",
|
|
16
|
+
key: "tnqrlb"
|
|
17
|
+
}],
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M8 13h2",
|
|
20
|
+
key: "yr2amv"
|
|
21
|
+
}],
|
|
22
|
+
["path", {
|
|
23
|
+
d: "M14 13h2",
|
|
24
|
+
key: "un5t4a"
|
|
25
|
+
}],
|
|
26
|
+
["path", {
|
|
27
|
+
d: "M8 17h2",
|
|
28
|
+
key: "2yhykz"
|
|
29
|
+
}],
|
|
30
|
+
["path", {
|
|
31
|
+
d: "M14 17h2",
|
|
32
|
+
key: "10kma7"
|
|
33
|
+
}]
|
|
34
|
+
]), m = a("Upload", [
|
|
35
|
+
["path", {
|
|
36
|
+
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
37
|
+
key: "ih7n3h"
|
|
38
|
+
}],
|
|
39
|
+
["polyline", {
|
|
40
|
+
points: "17 8 12 3 7 8",
|
|
41
|
+
key: "t8dd8p"
|
|
42
|
+
}],
|
|
43
|
+
["line", {
|
|
44
|
+
x1: "12",
|
|
45
|
+
x2: "12",
|
|
46
|
+
y1: "3",
|
|
47
|
+
y2: "15",
|
|
48
|
+
key: "widbto"
|
|
49
|
+
}]
|
|
50
|
+
]);
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/movethewheels/pages/ImportExportPage.tsx
|
|
53
|
+
function h() {
|
|
54
|
+
return /* @__PURE__ */ d(i, {
|
|
55
|
+
title: "Import / Export",
|
|
56
|
+
subtitle: "Import and export your data",
|
|
57
|
+
icon: /* @__PURE__ */ u(l, { size: 24 }),
|
|
58
|
+
children: [/* @__PURE__ */ d("div", {
|
|
59
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
60
|
+
children: [/* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u(r, { children: /* @__PURE__ */ d(n, {
|
|
61
|
+
className: "flex items-center gap-2",
|
|
62
|
+
children: [/* @__PURE__ */ u(m, { size: 18 }), " Import Data"]
|
|
63
|
+
}) }), /* @__PURE__ */ u(t, {
|
|
64
|
+
className: "space-y-4",
|
|
65
|
+
children: [
|
|
66
|
+
{
|
|
67
|
+
name: "Orders",
|
|
68
|
+
description: "Import orders from CSV or Excel",
|
|
69
|
+
icon: p,
|
|
70
|
+
format: "CSV, XLSX"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "Customers",
|
|
74
|
+
description: "Import customer database",
|
|
75
|
+
icon: p,
|
|
76
|
+
format: "CSV, XLSX"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "Products",
|
|
80
|
+
description: "Import product catalog",
|
|
81
|
+
icon: p,
|
|
82
|
+
format: "CSV, XLSX"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "Inventory",
|
|
86
|
+
description: "Import inventory levels",
|
|
87
|
+
icon: p,
|
|
88
|
+
format: "CSV, XLSX"
|
|
89
|
+
}
|
|
90
|
+
].map((e) => /* @__PURE__ */ d("div", {
|
|
91
|
+
className: "flex items-center justify-between p-4 border rounded-lg hover:border-primary/50 transition-colors",
|
|
92
|
+
children: [/* @__PURE__ */ d("div", {
|
|
93
|
+
className: "flex items-center gap-3",
|
|
94
|
+
children: [/* @__PURE__ */ u("div", {
|
|
95
|
+
className: "w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",
|
|
96
|
+
children: /* @__PURE__ */ u(e.icon, {
|
|
97
|
+
size: 20,
|
|
98
|
+
className: "text-primary"
|
|
99
|
+
})
|
|
100
|
+
}), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
101
|
+
className: "font-medium",
|
|
102
|
+
children: e.name
|
|
103
|
+
}), /* @__PURE__ */ u("p", {
|
|
104
|
+
className: "text-sm text-muted-foreground",
|
|
105
|
+
children: e.description
|
|
106
|
+
})] })]
|
|
107
|
+
}), /* @__PURE__ */ d("div", {
|
|
108
|
+
className: "text-right",
|
|
109
|
+
children: [/* @__PURE__ */ u(o, {
|
|
110
|
+
variant: "outline",
|
|
111
|
+
children: e.format
|
|
112
|
+
}), /* @__PURE__ */ u(s, {
|
|
113
|
+
variant: "outline",
|
|
114
|
+
size: "sm",
|
|
115
|
+
className: "ml-2",
|
|
116
|
+
children: /* @__PURE__ */ u(m, { size: 14 })
|
|
117
|
+
})]
|
|
118
|
+
})]
|
|
119
|
+
}, e.name))
|
|
120
|
+
})] }), /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u(r, { children: /* @__PURE__ */ d(n, {
|
|
121
|
+
className: "flex items-center gap-2",
|
|
122
|
+
children: [/* @__PURE__ */ u(c, { size: 18 }), " Export Data"]
|
|
123
|
+
}) }), /* @__PURE__ */ u(t, {
|
|
124
|
+
className: "space-y-4",
|
|
125
|
+
children: [
|
|
126
|
+
{
|
|
127
|
+
name: "Orders Report",
|
|
128
|
+
description: "Export all orders data",
|
|
129
|
+
formats: [
|
|
130
|
+
"CSV",
|
|
131
|
+
"Excel",
|
|
132
|
+
"PDF"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "Financial Report",
|
|
137
|
+
description: "Export revenue and payments",
|
|
138
|
+
formats: [
|
|
139
|
+
"CSV",
|
|
140
|
+
"Excel",
|
|
141
|
+
"PDF"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "Fleet Report",
|
|
146
|
+
description: "Export vehicle and driver data",
|
|
147
|
+
formats: ["CSV", "Excel"]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: "Analytics Report",
|
|
151
|
+
description: "Export performance metrics",
|
|
152
|
+
formats: [
|
|
153
|
+
"CSV",
|
|
154
|
+
"Excel",
|
|
155
|
+
"PDF"
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
].map((e) => /* @__PURE__ */ d("div", {
|
|
159
|
+
className: "flex items-center justify-between p-4 border rounded-lg hover:border-primary/50 transition-colors",
|
|
160
|
+
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
161
|
+
className: "font-medium",
|
|
162
|
+
children: e.name
|
|
163
|
+
}), /* @__PURE__ */ u("p", {
|
|
164
|
+
className: "text-sm text-muted-foreground",
|
|
165
|
+
children: e.description
|
|
166
|
+
})] }), /* @__PURE__ */ u("div", {
|
|
167
|
+
className: "flex gap-1",
|
|
168
|
+
children: e.formats.map((e) => /* @__PURE__ */ u(s, {
|
|
169
|
+
variant: "outline",
|
|
170
|
+
size: "sm",
|
|
171
|
+
children: e
|
|
172
|
+
}, e))
|
|
173
|
+
})]
|
|
174
|
+
}, e.name))
|
|
175
|
+
})] })]
|
|
176
|
+
}), /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u(r, { children: /* @__PURE__ */ u(n, { children: "Recent Activity" }) }), /* @__PURE__ */ u(t, { children: /* @__PURE__ */ u("div", {
|
|
177
|
+
className: "space-y-3",
|
|
178
|
+
children: [
|
|
179
|
+
{
|
|
180
|
+
type: "export",
|
|
181
|
+
name: "Orders Report",
|
|
182
|
+
date: "2024-01-15",
|
|
183
|
+
status: "completed"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
type: "import",
|
|
187
|
+
name: "Customer Data",
|
|
188
|
+
date: "2024-01-14",
|
|
189
|
+
status: "completed"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
type: "export",
|
|
193
|
+
name: "Financial Report",
|
|
194
|
+
date: "2024-01-13",
|
|
195
|
+
status: "completed"
|
|
196
|
+
}
|
|
197
|
+
].map((e, t) => /* @__PURE__ */ d("div", {
|
|
198
|
+
className: "flex items-center justify-between p-3 bg-muted/50 rounded-lg",
|
|
199
|
+
children: [/* @__PURE__ */ d("div", {
|
|
200
|
+
className: "flex items-center gap-3",
|
|
201
|
+
children: [e.type === "import" ? /* @__PURE__ */ u(m, {
|
|
202
|
+
size: 16,
|
|
203
|
+
className: "text-primary"
|
|
204
|
+
}) : /* @__PURE__ */ u(c, {
|
|
205
|
+
size: 16,
|
|
206
|
+
className: "text-primary"
|
|
207
|
+
}), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
208
|
+
className: "font-medium",
|
|
209
|
+
children: e.name
|
|
210
|
+
}), /* @__PURE__ */ d("p", {
|
|
211
|
+
className: "text-sm text-muted-foreground",
|
|
212
|
+
children: [
|
|
213
|
+
e.type === "import" ? "Imported" : "Exported",
|
|
214
|
+
" on ",
|
|
215
|
+
e.date
|
|
216
|
+
]
|
|
217
|
+
})] })]
|
|
218
|
+
}), /* @__PURE__ */ d(o, {
|
|
219
|
+
variant: "default",
|
|
220
|
+
className: "gap-1",
|
|
221
|
+
children: [
|
|
222
|
+
/* @__PURE__ */ u(f, { size: 12 }),
|
|
223
|
+
" ",
|
|
224
|
+
e.status
|
|
225
|
+
]
|
|
226
|
+
})]
|
|
227
|
+
}, t))
|
|
228
|
+
}) })] })]
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
//#endregion
|
|
232
|
+
export { h as default };
|