@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,374 @@
|
|
|
1
|
+
import { M as e, a as t, d as n, f as r, g as i, h as a, i as o, l as s, u as c } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as l } from "./chevron-right-DhZVf20o.js";
|
|
3
|
+
import { t as u } from "./clock-CvwBKbQP.js";
|
|
4
|
+
import { t as d } from "./dollar-sign-CP9qeU5d.js";
|
|
5
|
+
import { t as f } from "./map-pin-CFBOmh-A.js";
|
|
6
|
+
import { t as p } from "./package-DVZbDRcV.js";
|
|
7
|
+
import { t as m } from "./trending-up-C1faflCI.js";
|
|
8
|
+
import { t as h } from "./triangle-alert-CUoVAA4L.js";
|
|
9
|
+
import { t as g } from "./truck-BmDAzu05.js";
|
|
10
|
+
import { t as _ } from "./users-i-igmsP4.js";
|
|
11
|
+
import { r as v } from "./graphqlClient-CdJyR_ed.js";
|
|
12
|
+
import { n as y, r as b } from "./useOrders-D_3_hGMp.js";
|
|
13
|
+
import { i as x } from "./useFleet-BdETplNE.js";
|
|
14
|
+
import { n as S } from "./useAnalytics-ph7eTIK6.js";
|
|
15
|
+
import { r as C } from "./useTracking-De2KIUNu.js";
|
|
16
|
+
import { r as w, t as T } from "./MetricCard-GTbxAk1a.js";
|
|
17
|
+
import { r as E } from "./StatusBadge-BrrwraIA.js";
|
|
18
|
+
import { n as D, r as O } from "./formatters-_vJlC-47.js";
|
|
19
|
+
import { t as k } from "./navigation-BgnOfsVd.js";
|
|
20
|
+
import { jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
21
|
+
import { useI18n as M } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
22
|
+
//#region src/movethewheels/pages/DashboardPage.tsx
|
|
23
|
+
function N() {
|
|
24
|
+
let { t: N } = M(), P = (e, t) => {
|
|
25
|
+
let n = N(e);
|
|
26
|
+
return n === e ? t : n;
|
|
27
|
+
}, { basePath: F, navigate: I } = v(), { metrics: L } = S(), { orders: R } = b({ limit: 5 }), { stats: z } = y(), { stats: B } = x(), { activeDeliveries: V } = C(), H = (e) => {
|
|
28
|
+
I && I(k(F, e));
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ j(o, {
|
|
31
|
+
title: P("movethewheels.dashboard.title", "Dashboard"),
|
|
32
|
+
subtitle: P("movethewheels.dashboard.subtitle", "Overview of your logistics operations"),
|
|
33
|
+
icon: /* @__PURE__ */ A(m, { size: 24 }),
|
|
34
|
+
headerActions: /* @__PURE__ */ j("div", {
|
|
35
|
+
className: "flex gap-2",
|
|
36
|
+
children: [/* @__PURE__ */ j(c, {
|
|
37
|
+
variant: "outline",
|
|
38
|
+
onClick: () => H("tracking/live"),
|
|
39
|
+
children: [/* @__PURE__ */ A(f, { size: 16 }), P("movethewheels.dashboard.actions.liveMap", "Live Map")]
|
|
40
|
+
}), /* @__PURE__ */ j(c, {
|
|
41
|
+
onClick: () => H("orders/new"),
|
|
42
|
+
children: [/* @__PURE__ */ A(p, { size: 16 }), P("movethewheels.dashboard.actions.newOrder", "New Order")]
|
|
43
|
+
})]
|
|
44
|
+
}),
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ j(w, {
|
|
47
|
+
columns: 4,
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ A(T, {
|
|
50
|
+
label: P("movethewheels.dashboard.metrics.totalOrders", "Total Orders"),
|
|
51
|
+
value: L.orders.total,
|
|
52
|
+
icon: /* @__PURE__ */ A(p, { size: 20 }),
|
|
53
|
+
change: `+${L.orders.today} ${P("movethewheels.dashboard.metrics.today", "today")}`,
|
|
54
|
+
changeType: "positive",
|
|
55
|
+
trend: "up",
|
|
56
|
+
onClick: () => H("orders")
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ A(T, {
|
|
59
|
+
label: P("movethewheels.dashboard.metrics.activeDeliveries", "Active Deliveries"),
|
|
60
|
+
value: L.orders.inTransit,
|
|
61
|
+
icon: /* @__PURE__ */ A(g, { size: 20 }),
|
|
62
|
+
subtitle: `${L.orders.pending} ${P("movethewheels.dashboard.metrics.pending", "pending")}`,
|
|
63
|
+
onClick: () => H("tracking")
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ A(T, {
|
|
66
|
+
label: P("movethewheels.dashboard.metrics.fleetUtilization", "Fleet Utilization"),
|
|
67
|
+
value: `${L.fleet.activeVehicles}/${L.fleet.totalVehicles}`,
|
|
68
|
+
icon: /* @__PURE__ */ A(g, { size: 20 }),
|
|
69
|
+
subtitle: `${L.fleet.availableDrivers} ${P("movethewheels.dashboard.metrics.driversAvailable", "drivers available")}`,
|
|
70
|
+
onClick: () => H("fleet")
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ A(T, {
|
|
73
|
+
label: P("movethewheels.dashboard.metrics.revenue", "Revenue"),
|
|
74
|
+
value: D(L.revenue.total),
|
|
75
|
+
icon: /* @__PURE__ */ A(d, { size: 20 }),
|
|
76
|
+
change: "+12.5%",
|
|
77
|
+
changeType: "positive",
|
|
78
|
+
trend: "up",
|
|
79
|
+
onClick: () => H("analytics")
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ j(w, {
|
|
84
|
+
columns: 4,
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ A(T, {
|
|
87
|
+
size: "sm",
|
|
88
|
+
label: P("movethewheels.dashboard.stats.onTimeDelivery", "On-Time Delivery"),
|
|
89
|
+
value: `${L.performance.onTimeDeliveryRate.toFixed(1)}%`,
|
|
90
|
+
changeType: L.performance.onTimeDeliveryRate >= 90 ? "positive" : "negative"
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ A(T, {
|
|
93
|
+
size: "sm",
|
|
94
|
+
label: P("movethewheels.dashboard.stats.avgOrderValue", "Avg Order Value"),
|
|
95
|
+
value: D(L.revenue.avgOrderValue)
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ A(T, {
|
|
98
|
+
size: "sm",
|
|
99
|
+
label: P("movethewheels.dashboard.stats.driverRating", "Driver Rating"),
|
|
100
|
+
value: L.performance.avgDriverRating.toFixed(1),
|
|
101
|
+
subtitle: P("movethewheels.dashboard.stats.outOfFive", "out of 5")
|
|
102
|
+
}),
|
|
103
|
+
/* @__PURE__ */ A(T, {
|
|
104
|
+
size: "sm",
|
|
105
|
+
label: P("movethewheels.dashboard.stats.deliveredToday", "Delivered Today"),
|
|
106
|
+
value: L.orders.delivered
|
|
107
|
+
})
|
|
108
|
+
]
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ j("div", {
|
|
111
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
112
|
+
children: [/* @__PURE__ */ A(t, {
|
|
113
|
+
title: P("movethewheels.dashboard.recentOrders.title", "Recent Orders"),
|
|
114
|
+
actions: /* @__PURE__ */ j(c, {
|
|
115
|
+
variant: "ghost",
|
|
116
|
+
size: "sm",
|
|
117
|
+
onClick: () => H("orders"),
|
|
118
|
+
children: [
|
|
119
|
+
P("movethewheels.dashboard.common.viewAll", "View all"),
|
|
120
|
+
" ",
|
|
121
|
+
/* @__PURE__ */ A(l, { size: 16 })
|
|
122
|
+
]
|
|
123
|
+
}),
|
|
124
|
+
children: /* @__PURE__ */ A(n, { children: /* @__PURE__ */ A(r, {
|
|
125
|
+
className: "p-0",
|
|
126
|
+
children: /* @__PURE__ */ j("div", {
|
|
127
|
+
className: "divide-y",
|
|
128
|
+
children: [R.slice(0, 5).map((e) => /* @__PURE__ */ A("div", {
|
|
129
|
+
className: "p-4 hover:bg-muted/50 cursor-pointer transition-colors",
|
|
130
|
+
onClick: () => H(`orders/${e.id}`),
|
|
131
|
+
children: /* @__PURE__ */ j("div", {
|
|
132
|
+
className: "flex items-center justify-between",
|
|
133
|
+
children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
134
|
+
className: "font-medium",
|
|
135
|
+
children: e.orderNumber
|
|
136
|
+
}), /* @__PURE__ */ A("p", {
|
|
137
|
+
className: "text-sm text-muted-foreground",
|
|
138
|
+
children: e.customerInfo.name
|
|
139
|
+
})] }), /* @__PURE__ */ j("div", {
|
|
140
|
+
className: "text-right",
|
|
141
|
+
children: [/* @__PURE__ */ A(E, {
|
|
142
|
+
status: e.status,
|
|
143
|
+
type: "order",
|
|
144
|
+
size: "sm"
|
|
145
|
+
}), /* @__PURE__ */ A("p", {
|
|
146
|
+
className: "text-sm text-muted-foreground mt-1",
|
|
147
|
+
children: D(e.pricing.total)
|
|
148
|
+
})]
|
|
149
|
+
})]
|
|
150
|
+
})
|
|
151
|
+
}, e.id)), R.length === 0 && /* @__PURE__ */ A("div", {
|
|
152
|
+
className: "p-8 text-center text-muted-foreground",
|
|
153
|
+
children: P("movethewheels.dashboard.recentOrders.empty", "No recent orders")
|
|
154
|
+
})]
|
|
155
|
+
})
|
|
156
|
+
}) })
|
|
157
|
+
}), /* @__PURE__ */ A(t, {
|
|
158
|
+
title: P("movethewheels.dashboard.activeDeliveries.title", "Active Deliveries"),
|
|
159
|
+
actions: /* @__PURE__ */ j(c, {
|
|
160
|
+
variant: "ghost",
|
|
161
|
+
size: "sm",
|
|
162
|
+
onClick: () => H("tracking/live"),
|
|
163
|
+
children: [
|
|
164
|
+
P("movethewheels.dashboard.activeDeliveries.liveTracking", "Live tracking"),
|
|
165
|
+
" ",
|
|
166
|
+
/* @__PURE__ */ A(l, { size: 16 })
|
|
167
|
+
]
|
|
168
|
+
}),
|
|
169
|
+
children: /* @__PURE__ */ A(n, { children: /* @__PURE__ */ A(r, {
|
|
170
|
+
className: "p-0",
|
|
171
|
+
children: /* @__PURE__ */ j("div", {
|
|
172
|
+
className: "divide-y",
|
|
173
|
+
children: [V.slice(0, 5).map((e) => e.order ? /* @__PURE__ */ A("div", {
|
|
174
|
+
className: "p-4 hover:bg-muted/50 cursor-pointer transition-colors",
|
|
175
|
+
onClick: () => H(`tracking?order=${e.order.id}`),
|
|
176
|
+
children: /* @__PURE__ */ j("div", {
|
|
177
|
+
className: "flex items-center justify-between",
|
|
178
|
+
children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
179
|
+
className: "font-medium",
|
|
180
|
+
children: e.order.orderNumber
|
|
181
|
+
}), /* @__PURE__ */ A("p", {
|
|
182
|
+
className: "text-sm text-muted-foreground",
|
|
183
|
+
children: e.driver?.fullName || P("movethewheels.dashboard.activeDeliveries.unassigned", "Unassigned")
|
|
184
|
+
})] }), /* @__PURE__ */ j("div", {
|
|
185
|
+
className: "text-right",
|
|
186
|
+
children: [/* @__PURE__ */ A(E, {
|
|
187
|
+
status: e.order.status,
|
|
188
|
+
type: "order",
|
|
189
|
+
size: "sm"
|
|
190
|
+
}), /* @__PURE__ */ j("p", {
|
|
191
|
+
className: "text-sm text-muted-foreground mt-1",
|
|
192
|
+
children: [
|
|
193
|
+
P("movethewheels.dashboard.activeDeliveries.eta", "ETA:"),
|
|
194
|
+
" ",
|
|
195
|
+
e.estimatedArrival ? O(e.estimatedArrival, "time") : P("movethewheels.dashboard.activeDeliveries.na", "N/A")
|
|
196
|
+
]
|
|
197
|
+
})]
|
|
198
|
+
})]
|
|
199
|
+
})
|
|
200
|
+
}, e.order.id) : null), V.length === 0 && /* @__PURE__ */ A("div", {
|
|
201
|
+
className: "p-8 text-center text-muted-foreground",
|
|
202
|
+
children: P("movethewheels.dashboard.activeDeliveries.empty", "No active deliveries")
|
|
203
|
+
})]
|
|
204
|
+
})
|
|
205
|
+
}) })
|
|
206
|
+
})]
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ j("div", {
|
|
209
|
+
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
210
|
+
children: [
|
|
211
|
+
/* @__PURE__ */ j(n, { children: [/* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(i, {
|
|
212
|
+
className: "text-base",
|
|
213
|
+
children: P("movethewheels.dashboard.orderStatus.title", "Order Status")
|
|
214
|
+
}) }), /* @__PURE__ */ A(r, {
|
|
215
|
+
className: "space-y-4",
|
|
216
|
+
children: /* @__PURE__ */ A("div", {
|
|
217
|
+
className: "space-y-3",
|
|
218
|
+
children: [
|
|
219
|
+
{
|
|
220
|
+
status: "pending",
|
|
221
|
+
count: z.byStatus.pending,
|
|
222
|
+
color: "bg-yellow-500"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
status: "in_transit",
|
|
226
|
+
count: z.byStatus.in_transit,
|
|
227
|
+
color: "bg-blue-500"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
status: "delivered",
|
|
231
|
+
count: z.byStatus.delivered,
|
|
232
|
+
color: "bg-green-500"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
status: "cancelled",
|
|
236
|
+
count: z.byStatus.cancelled,
|
|
237
|
+
color: "bg-red-500"
|
|
238
|
+
}
|
|
239
|
+
].map(({ status: e, count: t, color: n }) => /* @__PURE__ */ j("div", {
|
|
240
|
+
className: "flex items-center justify-between",
|
|
241
|
+
children: [/* @__PURE__ */ j("div", {
|
|
242
|
+
className: "flex items-center gap-2",
|
|
243
|
+
children: [/* @__PURE__ */ A("div", { className: `w-2 h-2 rounded-full ${n}` }), /* @__PURE__ */ A("span", {
|
|
244
|
+
className: "text-sm capitalize",
|
|
245
|
+
children: P(`movethewheels.dashboard.orderStatus.status.${e}`, e.replace("_", " "))
|
|
246
|
+
})]
|
|
247
|
+
}), /* @__PURE__ */ A(s, {
|
|
248
|
+
variant: "secondary",
|
|
249
|
+
children: t
|
|
250
|
+
})]
|
|
251
|
+
}, e))
|
|
252
|
+
})
|
|
253
|
+
})] }),
|
|
254
|
+
/* @__PURE__ */ j(n, { children: [/* @__PURE__ */ A(a, { children: /* @__PURE__ */ A(i, {
|
|
255
|
+
className: "text-base",
|
|
256
|
+
children: P("movethewheels.dashboard.fleetStatus.title", "Fleet Status")
|
|
257
|
+
}) }), /* @__PURE__ */ j(r, {
|
|
258
|
+
className: "space-y-4",
|
|
259
|
+
children: [/* @__PURE__ */ j("div", {
|
|
260
|
+
className: "space-y-2",
|
|
261
|
+
children: [/* @__PURE__ */ j("div", {
|
|
262
|
+
className: "flex justify-between text-sm",
|
|
263
|
+
children: [/* @__PURE__ */ A("span", { children: P("movethewheels.dashboard.fleetStatus.vehicleUtilization", "Vehicle Utilization") }), /* @__PURE__ */ j("span", { children: [B.utilization.toFixed(0), "%"] })]
|
|
264
|
+
}), /* @__PURE__ */ A(e, { value: B.utilization })]
|
|
265
|
+
}), /* @__PURE__ */ j("div", {
|
|
266
|
+
className: "grid grid-cols-2 gap-4 text-sm",
|
|
267
|
+
children: [
|
|
268
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
269
|
+
className: "text-muted-foreground",
|
|
270
|
+
children: P("movethewheels.dashboard.fleetStatus.available", "Available")
|
|
271
|
+
}), /* @__PURE__ */ A("p", {
|
|
272
|
+
className: "text-lg font-semibold text-green-600",
|
|
273
|
+
children: B.vehiclesByStatus.available
|
|
274
|
+
})] }),
|
|
275
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
276
|
+
className: "text-muted-foreground",
|
|
277
|
+
children: P("movethewheels.dashboard.fleetStatus.inUse", "In Use")
|
|
278
|
+
}), /* @__PURE__ */ A("p", {
|
|
279
|
+
className: "text-lg font-semibold text-blue-600",
|
|
280
|
+
children: B.vehiclesByStatus.assigned
|
|
281
|
+
})] }),
|
|
282
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
283
|
+
className: "text-muted-foreground",
|
|
284
|
+
children: P("movethewheels.dashboard.fleetStatus.maintenance", "Maintenance")
|
|
285
|
+
}), /* @__PURE__ */ A("p", {
|
|
286
|
+
className: "text-lg font-semibold text-yellow-600",
|
|
287
|
+
children: B.vehiclesByStatus.maintenance
|
|
288
|
+
})] }),
|
|
289
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
290
|
+
className: "text-muted-foreground",
|
|
291
|
+
children: P("movethewheels.dashboard.fleetStatus.avgFuel", "Avg Fuel")
|
|
292
|
+
}), /* @__PURE__ */ j("p", {
|
|
293
|
+
className: "text-lg font-semibold",
|
|
294
|
+
children: [B.avgFuelLevel.toFixed(0), "%"]
|
|
295
|
+
})] })
|
|
296
|
+
]
|
|
297
|
+
})]
|
|
298
|
+
})] }),
|
|
299
|
+
/* @__PURE__ */ j(n, { children: [/* @__PURE__ */ A(a, { children: /* @__PURE__ */ j(i, {
|
|
300
|
+
className: "text-base flex items-center gap-2",
|
|
301
|
+
children: [/* @__PURE__ */ A(h, {
|
|
302
|
+
size: 16,
|
|
303
|
+
className: "text-yellow-500"
|
|
304
|
+
}), P("movethewheels.dashboard.alerts.title", "Alerts")]
|
|
305
|
+
}) }), /* @__PURE__ */ A(r, { children: /* @__PURE__ */ j("div", {
|
|
306
|
+
className: "space-y-3",
|
|
307
|
+
children: [
|
|
308
|
+
z.byStatus.pending > 5 && /* @__PURE__ */ j("div", {
|
|
309
|
+
className: "flex items-start gap-3 p-2 rounded bg-yellow-50 dark:bg-yellow-900/20",
|
|
310
|
+
children: [/* @__PURE__ */ A(u, {
|
|
311
|
+
size: 16,
|
|
312
|
+
className: "text-yellow-600 mt-0.5"
|
|
313
|
+
}), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
314
|
+
className: "text-sm font-medium",
|
|
315
|
+
children: P("movethewheels.dashboard.alerts.pendingOrders.title", "Pending Orders")
|
|
316
|
+
}), /* @__PURE__ */ j("p", {
|
|
317
|
+
className: "text-xs text-muted-foreground",
|
|
318
|
+
children: [
|
|
319
|
+
z.byStatus.pending,
|
|
320
|
+
" ",
|
|
321
|
+
P("movethewheels.dashboard.alerts.pendingOrders.description", "orders awaiting confirmation")
|
|
322
|
+
]
|
|
323
|
+
})] })]
|
|
324
|
+
}),
|
|
325
|
+
B.vehiclesByStatus.maintenance > 0 && /* @__PURE__ */ j("div", {
|
|
326
|
+
className: "flex items-start gap-3 p-2 rounded bg-orange-50 dark:bg-orange-900/20",
|
|
327
|
+
children: [/* @__PURE__ */ A(g, {
|
|
328
|
+
size: 16,
|
|
329
|
+
className: "text-orange-600 mt-0.5"
|
|
330
|
+
}), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
331
|
+
className: "text-sm font-medium",
|
|
332
|
+
children: P("movethewheels.dashboard.alerts.maintenanceVehicles.title", "Vehicles in Maintenance")
|
|
333
|
+
}), /* @__PURE__ */ j("p", {
|
|
334
|
+
className: "text-xs text-muted-foreground",
|
|
335
|
+
children: [
|
|
336
|
+
B.vehiclesByStatus.maintenance,
|
|
337
|
+
" ",
|
|
338
|
+
P("movethewheels.dashboard.alerts.maintenanceVehicles.description", "vehicles unavailable")
|
|
339
|
+
]
|
|
340
|
+
})] })]
|
|
341
|
+
}),
|
|
342
|
+
B.driversByStatus.offline > 0 && /* @__PURE__ */ j("div", {
|
|
343
|
+
className: "flex items-start gap-3 p-2 rounded bg-gray-50 dark:bg-gray-800",
|
|
344
|
+
children: [/* @__PURE__ */ A(_, {
|
|
345
|
+
size: 16,
|
|
346
|
+
className: "text-gray-600 mt-0.5"
|
|
347
|
+
}), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
348
|
+
className: "text-sm font-medium",
|
|
349
|
+
children: P("movethewheels.dashboard.alerts.offlineDrivers.title", "Offline Drivers")
|
|
350
|
+
}), /* @__PURE__ */ j("p", {
|
|
351
|
+
className: "text-xs text-muted-foreground",
|
|
352
|
+
children: [
|
|
353
|
+
B.driversByStatus.offline,
|
|
354
|
+
" ",
|
|
355
|
+
P("movethewheels.dashboard.alerts.offlineDrivers.description", "drivers currently offline")
|
|
356
|
+
]
|
|
357
|
+
})] })]
|
|
358
|
+
}),
|
|
359
|
+
z.byStatus.pending <= 5 && B.vehiclesByStatus.maintenance === 0 && B.driversByStatus.offline === 0 && /* @__PURE__ */ A("div", {
|
|
360
|
+
className: "text-center py-4 text-muted-foreground",
|
|
361
|
+
children: /* @__PURE__ */ A("p", {
|
|
362
|
+
className: "text-sm",
|
|
363
|
+
children: P("movethewheels.dashboard.alerts.allOperational", "All systems operational")
|
|
364
|
+
})
|
|
365
|
+
})
|
|
366
|
+
]
|
|
367
|
+
}) })] })
|
|
368
|
+
]
|
|
369
|
+
})
|
|
370
|
+
]
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
//#endregion
|
|
374
|
+
export { N as default };
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { A as e, B as t, F as n, G as r, H as i, I as a, K as o, L as s, P as c, R as l, U as u, W as d, it as f, q as p, rt as m, u as h } from "./PageLayout-B7b0vl0R.js";
|
|
2
|
+
import { t as g } from "./chevron-right-DhZVf20o.js";
|
|
3
|
+
import { t as _ } from "./search-5pdn5eOO.js";
|
|
4
|
+
import { useMemo as v, useState as y } from "react";
|
|
5
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
6
|
+
//#region node_modules/lucide-react/dist/esm/icons/arrow-down.js
|
|
7
|
+
var S = f("ArrowDown", [["path", {
|
|
8
|
+
d: "M12 5v14",
|
|
9
|
+
key: "s699le"
|
|
10
|
+
}], ["path", {
|
|
11
|
+
d: "m19 12-7 7-7-7",
|
|
12
|
+
key: "1idqje"
|
|
13
|
+
}]]), C = f("ArrowUpDown", [
|
|
14
|
+
["path", {
|
|
15
|
+
d: "m21 16-4 4-4-4",
|
|
16
|
+
key: "f6ql7i"
|
|
17
|
+
}],
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M17 20V4",
|
|
20
|
+
key: "1ejh1v"
|
|
21
|
+
}],
|
|
22
|
+
["path", {
|
|
23
|
+
d: "m3 8 4-4 4 4",
|
|
24
|
+
key: "11wl7u"
|
|
25
|
+
}],
|
|
26
|
+
["path", {
|
|
27
|
+
d: "M7 4v16",
|
|
28
|
+
key: "1glfcx"
|
|
29
|
+
}]
|
|
30
|
+
]), w = f("ArrowUp", [["path", {
|
|
31
|
+
d: "m5 12 7-7 7 7",
|
|
32
|
+
key: "hav0vg"
|
|
33
|
+
}], ["path", {
|
|
34
|
+
d: "M12 19V5",
|
|
35
|
+
key: "x0mq9r"
|
|
36
|
+
}]]), T = f("ChevronLeft", [["path", {
|
|
37
|
+
d: "m15 18-6-6 6-6",
|
|
38
|
+
key: "1wnfg3"
|
|
39
|
+
}]]), E = f("ChevronsLeft", [["path", {
|
|
40
|
+
d: "m11 17-5-5 5-5",
|
|
41
|
+
key: "13zhaf"
|
|
42
|
+
}], ["path", {
|
|
43
|
+
d: "m18 17-5-5 5-5",
|
|
44
|
+
key: "h8a8et"
|
|
45
|
+
}]]), D = f("ChevronsRight", [["path", {
|
|
46
|
+
d: "m6 17 5-5-5-5",
|
|
47
|
+
key: "xnjwq"
|
|
48
|
+
}], ["path", {
|
|
49
|
+
d: "m13 17 5-5-5-5",
|
|
50
|
+
key: "17xmmf"
|
|
51
|
+
}]]);
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/movethewheels/components/DataTable.tsx
|
|
54
|
+
function O({ columns: f, data: O, isLoading: ee = !1, searchable: k = !1, searchPlaceholder: A = "Search...", searchFields: j, pagination: M = !0, pageSize: N = 10, pageSizeOptions: P = [
|
|
55
|
+
5,
|
|
56
|
+
10,
|
|
57
|
+
20,
|
|
58
|
+
50
|
|
59
|
+
], onRowClick: F, rowClassName: I, emptyMessage: L = "No data found", className: R, getRowId: z }) {
|
|
60
|
+
let [B, V] = y(""), [H, U] = y(null), [W, G] = y(null), [K, q] = y(1), [J, Y] = y(N), X = v(() => {
|
|
61
|
+
if (!B || !j || j.length === 0) return O;
|
|
62
|
+
let e = B.toLowerCase();
|
|
63
|
+
return O.filter((t) => j.some((n) => {
|
|
64
|
+
let r = t[n];
|
|
65
|
+
return r != null && String(r).toLowerCase().includes(e);
|
|
66
|
+
}));
|
|
67
|
+
}, [
|
|
68
|
+
O,
|
|
69
|
+
B,
|
|
70
|
+
j
|
|
71
|
+
]), Z = v(() => {
|
|
72
|
+
if (!H || !W) return X;
|
|
73
|
+
let e = f.find((e) => e.id === H);
|
|
74
|
+
return e?.accessorKey ? [...X].sort((t, n) => {
|
|
75
|
+
let r = t[e.accessorKey], i = n[e.accessorKey];
|
|
76
|
+
if (r == null) return 1;
|
|
77
|
+
if (i == null) return -1;
|
|
78
|
+
let a = 0;
|
|
79
|
+
return a = typeof r == "string" && typeof i == "string" ? r.localeCompare(i) : typeof r == "number" && typeof i == "number" ? r - i : r instanceof Date && i instanceof Date ? r.getTime() - i.getTime() : String(r).localeCompare(String(i)), W === "asc" ? a : -a;
|
|
80
|
+
}) : X;
|
|
81
|
+
}, [
|
|
82
|
+
X,
|
|
83
|
+
H,
|
|
84
|
+
W,
|
|
85
|
+
f
|
|
86
|
+
]), Q = v(() => {
|
|
87
|
+
if (!M) return Z;
|
|
88
|
+
let e = (K - 1) * J;
|
|
89
|
+
return Z.slice(e, e + J);
|
|
90
|
+
}, [
|
|
91
|
+
Z,
|
|
92
|
+
K,
|
|
93
|
+
J,
|
|
94
|
+
M
|
|
95
|
+
]), $ = Math.ceil(Z.length / J), te = (e) => {
|
|
96
|
+
H === e ? W === "asc" ? G("desc") : W === "desc" && (U(null), G(null)) : (U(e), G("asc"));
|
|
97
|
+
}, ne = (e) => H === e ? b(W === "asc" ? w : S, { className: "w-4 h-4 text-primary" }) : /* @__PURE__ */ b(C, { className: "w-4 h-4 text-muted-foreground/50" }), re = (e, t) => {
|
|
98
|
+
if (t.cell) return t.cell(e);
|
|
99
|
+
if (t.accessorKey) {
|
|
100
|
+
let n = e[t.accessorKey];
|
|
101
|
+
return n == null ? "-" : n instanceof Date ? n.toLocaleDateString() : String(n);
|
|
102
|
+
}
|
|
103
|
+
return "-";
|
|
104
|
+
};
|
|
105
|
+
return ee ? /* @__PURE__ */ x("div", {
|
|
106
|
+
className: m("space-y-4", R),
|
|
107
|
+
children: [k && /* @__PURE__ */ b("div", {
|
|
108
|
+
className: "flex items-center gap-4",
|
|
109
|
+
children: /* @__PURE__ */ b(t, { className: "h-10 w-64" })
|
|
110
|
+
}), /* @__PURE__ */ b("div", {
|
|
111
|
+
className: "rounded-md border",
|
|
112
|
+
children: /* @__PURE__ */ x(i, { children: [/* @__PURE__ */ b(o, { children: /* @__PURE__ */ b(p, { children: f.map((e) => /* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(t, { className: "h-4 w-20" }) }, e.id)) }) }), /* @__PURE__ */ b(u, { children: Array.from({ length: 5 }).map((e, n) => /* @__PURE__ */ b(p, { children: f.map((e) => /* @__PURE__ */ b(d, { children: /* @__PURE__ */ b(t, { className: "h-4 w-full max-w-[100px]" }) }, e.id)) }, n)) })] })
|
|
113
|
+
})]
|
|
114
|
+
}) : /* @__PURE__ */ x("div", {
|
|
115
|
+
className: m("space-y-4", R),
|
|
116
|
+
children: [
|
|
117
|
+
k && /* @__PURE__ */ b("div", {
|
|
118
|
+
className: "flex items-center gap-4",
|
|
119
|
+
children: /* @__PURE__ */ x("div", {
|
|
120
|
+
className: "relative flex-1 max-w-sm",
|
|
121
|
+
children: [/* @__PURE__ */ b(_, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" }), /* @__PURE__ */ b(e, {
|
|
122
|
+
placeholder: A,
|
|
123
|
+
value: B,
|
|
124
|
+
onChange: (e) => {
|
|
125
|
+
V(e.target.value), q(1);
|
|
126
|
+
},
|
|
127
|
+
className: "pl-9"
|
|
128
|
+
})]
|
|
129
|
+
})
|
|
130
|
+
}),
|
|
131
|
+
/* @__PURE__ */ b("div", {
|
|
132
|
+
className: "rounded-md border",
|
|
133
|
+
children: /* @__PURE__ */ x(i, { children: [/* @__PURE__ */ b(o, { children: /* @__PURE__ */ b(p, { children: f.map((e) => /* @__PURE__ */ b(r, {
|
|
134
|
+
className: m(e.sortable && "cursor-pointer select-none hover:bg-muted/50", e.headerClassName),
|
|
135
|
+
onClick: () => e.sortable && te(e.id),
|
|
136
|
+
children: /* @__PURE__ */ x("div", {
|
|
137
|
+
className: "flex items-center gap-2",
|
|
138
|
+
children: [e.header, e.sortable && ne(e.id)]
|
|
139
|
+
})
|
|
140
|
+
}, e.id)) }) }), /* @__PURE__ */ b(u, { children: Q.length === 0 ? /* @__PURE__ */ b(p, { children: /* @__PURE__ */ b(d, {
|
|
141
|
+
colSpan: f.length,
|
|
142
|
+
className: "h-24 text-center",
|
|
143
|
+
children: /* @__PURE__ */ b("p", {
|
|
144
|
+
className: "text-muted-foreground",
|
|
145
|
+
children: L
|
|
146
|
+
})
|
|
147
|
+
}) }) : Q.map((e, t) => {
|
|
148
|
+
let n = z ? z(e) : t, r = typeof I == "function" ? I(e) : I;
|
|
149
|
+
return /* @__PURE__ */ b(p, {
|
|
150
|
+
className: m(F && "cursor-pointer hover:bg-muted/50", r),
|
|
151
|
+
onClick: () => F?.(e),
|
|
152
|
+
children: f.map((t) => /* @__PURE__ */ b(d, {
|
|
153
|
+
className: t.className,
|
|
154
|
+
children: re(e, t)
|
|
155
|
+
}, t.id))
|
|
156
|
+
}, n);
|
|
157
|
+
}) })] })
|
|
158
|
+
}),
|
|
159
|
+
M && Z.length > 0 && /* @__PURE__ */ x("div", {
|
|
160
|
+
className: "flex items-center justify-between",
|
|
161
|
+
children: [/* @__PURE__ */ x("div", {
|
|
162
|
+
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ x("span", { children: [
|
|
165
|
+
"Showing ",
|
|
166
|
+
(K - 1) * J + 1,
|
|
167
|
+
" to",
|
|
168
|
+
" ",
|
|
169
|
+
Math.min(K * J, Z.length),
|
|
170
|
+
" of ",
|
|
171
|
+
Z.length
|
|
172
|
+
] }),
|
|
173
|
+
/* @__PURE__ */ x(c, {
|
|
174
|
+
value: String(J),
|
|
175
|
+
onValueChange: (e) => {
|
|
176
|
+
Y(Number(e)), q(1);
|
|
177
|
+
},
|
|
178
|
+
children: [/* @__PURE__ */ b(s, {
|
|
179
|
+
className: "w-[70px] h-8",
|
|
180
|
+
children: /* @__PURE__ */ b(l, {})
|
|
181
|
+
}), /* @__PURE__ */ b(n, { children: P.map((e) => /* @__PURE__ */ b(a, {
|
|
182
|
+
value: String(e),
|
|
183
|
+
children: e
|
|
184
|
+
}, e)) })]
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ b("span", { children: "per page" })
|
|
187
|
+
]
|
|
188
|
+
}), /* @__PURE__ */ x("div", {
|
|
189
|
+
className: "flex items-center gap-1",
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ b(h, {
|
|
192
|
+
variant: "outline",
|
|
193
|
+
size: "icon",
|
|
194
|
+
className: "h-8 w-8",
|
|
195
|
+
onClick: () => q(1),
|
|
196
|
+
disabled: K === 1,
|
|
197
|
+
children: /* @__PURE__ */ b(E, { className: "h-4 w-4" })
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ b(h, {
|
|
200
|
+
variant: "outline",
|
|
201
|
+
size: "icon",
|
|
202
|
+
className: "h-8 w-8",
|
|
203
|
+
onClick: () => q((e) => Math.max(1, e - 1)),
|
|
204
|
+
disabled: K === 1,
|
|
205
|
+
children: /* @__PURE__ */ b(T, { className: "h-4 w-4" })
|
|
206
|
+
}),
|
|
207
|
+
/* @__PURE__ */ x("span", {
|
|
208
|
+
className: "px-3 text-sm",
|
|
209
|
+
children: [
|
|
210
|
+
"Page ",
|
|
211
|
+
K,
|
|
212
|
+
" of ",
|
|
213
|
+
$
|
|
214
|
+
]
|
|
215
|
+
}),
|
|
216
|
+
/* @__PURE__ */ b(h, {
|
|
217
|
+
variant: "outline",
|
|
218
|
+
size: "icon",
|
|
219
|
+
className: "h-8 w-8",
|
|
220
|
+
onClick: () => q((e) => Math.min($, e + 1)),
|
|
221
|
+
disabled: K === $,
|
|
222
|
+
children: /* @__PURE__ */ b(g, { className: "h-4 w-4" })
|
|
223
|
+
}),
|
|
224
|
+
/* @__PURE__ */ b(h, {
|
|
225
|
+
variant: "outline",
|
|
226
|
+
size: "icon",
|
|
227
|
+
className: "h-8 w-8",
|
|
228
|
+
onClick: () => q($),
|
|
229
|
+
disabled: K === $,
|
|
230
|
+
children: /* @__PURE__ */ b(D, { className: "h-4 w-4" })
|
|
231
|
+
})
|
|
232
|
+
]
|
|
233
|
+
})]
|
|
234
|
+
})
|
|
235
|
+
]
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
export { O as t };
|