@burdenoff/microfe-movethewheels 2026.921.1 → 2026.924.1
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/components/CustomerPicker.js +94 -101
- package/dist/components/EntityCombobox.js +105 -0
- package/dist/components/ui.js +2 -2
- package/dist/generated/wspace-types.d.ts +1676 -3
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useFleet.js +57 -51
- package/dist/hooks/useOrders.js +89 -84
- package/dist/hooks/useRoutes.js +1 -1
- package/dist/index.js +27 -27
- package/dist/movethewheels/components/CustomerPicker.d.ts +3 -2
- package/dist/movethewheels/components/EntityCombobox.d.ts +40 -0
- package/dist/movethewheels/components/ui.d.ts +1 -1
- package/dist/movethewheels/hooks/useFleet.d.ts +4 -0
- package/dist/movethewheels/hooks/useOrders.d.ts +15 -0
- package/dist/movethewheels/hooks/useRoutes.d.ts +16 -0
- package/dist/movethewheels/types/index.d.ts +5 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js +11 -0
- package/dist/pages/CreateOrderPage.js +196 -134
- package/dist/pages/OrderDetailsPage.js +328 -263
- package/dist/pages/RouteDetailsPage.js +277 -266
- package/package.json +1 -1
- package/src/generated/wspace-types.ts +1948 -3
- package/src/movethewheels/components/CustomerPicker.tsx +26 -36
- package/src/movethewheels/components/EntityCombobox.tsx +237 -0
- package/src/movethewheels/components/ui.tsx +9 -0
- package/src/movethewheels/hooks/useFleet.ts +19 -6
- package/src/movethewheels/hooks/useOrders.ts +35 -0
- package/src/movethewheels/hooks/useRoutes.ts +1 -1
- package/src/movethewheels/pages/CreateOrderPage.tsx +108 -5
- package/src/movethewheels/pages/OrderDetailsPage.tsx +130 -60
- package/src/movethewheels/pages/RouteDetailsPage.tsx +57 -47
- package/src/movethewheels/types/index.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useMoveTheWheels as e, useMoveTheWheelsNavigate as t } from "./providers/MoveTheWheelsProvider.js";
|
|
2
2
|
import { useTr as n } from "./shared/hooks/useTr.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useRoute as r, useRouteStats as i, useRoutes as a } from "./hooks/useRoutes.js";
|
|
4
|
+
import { useOrder as o, useOrderStats as s, useOrders as c } from "./hooks/useOrders.js";
|
|
5
|
+
import { useDriver as l, useDriverStatusCounts as u, useDrivers as d, useFleet as f, useFleetStats as p, useVehicle as m, useVehicleDrivers as h, useVehicles as g } from "./hooks/useFleet.js";
|
|
6
|
+
import { useInventory as _, useInventoryStats as v, useInventoryTransactions as y, useProduct as b, useProductStockLevels as x, useProducts as S, useWarehouse as C, useWarehouses as w } from "./hooks/useInventory.js";
|
|
7
|
+
import { useCustomer as T, useCustomerStats as E, useCustomers as D } from "./hooks/useCustomers.js";
|
|
8
8
|
import { useAnalytics as O, useDashboardMetrics as k, useEmissionsSummary as A, useFinanceMetrics as j, useFleetAnalytics as M, useOrderAnalytics as N, usePerformanceAnalytics as P, useRevenueAnalytics as F } from "./hooks/useAnalytics.js";
|
|
9
9
|
import { useDriverTracking as I, useGeofence as L, useLiveTracking as R, useOrderTracking as z, useTracking as B, useTrackingAlerts as V, useVehicleTracking as H } from "./hooks/useTracking.js";
|
|
10
10
|
import { useReports as U } from "./hooks/useReports.js";
|
|
@@ -16,26 +16,26 @@ import "./hooks/index.js";
|
|
|
16
16
|
import { MoveTheWheelsRoot as Q } from "./MoveTheWheelsRoot.js";
|
|
17
17
|
import { useMoveTheWheelsStore as $ } from "./store/movethewheelsStore.js";
|
|
18
18
|
import { useSandboxAssistantTransport as ee } from "./services/createSandboxAssistantTransport.js";
|
|
19
|
-
import { Avatar as te, AvatarFallback as ne, AvatarImage as re, Badge as ie, Button as ae, Card as oe, CardContent as se, CardDescription as ce, CardFooter as le, CardHeader as ue, CardTitle as de, Checkbox as fe,
|
|
20
|
-
import { EmptyState as
|
|
21
|
-
import { chartTokens as
|
|
22
|
-
import { Sparkline as
|
|
23
|
-
import { MetricCard as
|
|
24
|
-
import { GlassPanel as
|
|
25
|
-
import { ChartEmpty as
|
|
26
|
-
import { TrendChart as
|
|
27
|
-
import { VolumeBar as
|
|
28
|
-
import { StatusDonut as
|
|
29
|
-
import { createCurrentIcon as
|
|
30
|
-
import { MapCanvas as
|
|
31
|
-
import { LogisticsMap as
|
|
32
|
-
import { RouteMap as
|
|
33
|
-
import { TrackingMap as
|
|
34
|
-
import { PaymentStatusBadge as
|
|
35
|
-
import { DataTable as
|
|
36
|
-
import { FormError as
|
|
37
|
-
import { Notice as
|
|
38
|
-
import { DocumentsCard as
|
|
39
|
-
import { CarbonFootprintPanel as
|
|
19
|
+
import { Avatar as te, AvatarFallback as ne, AvatarImage as re, Badge as ie, Button as ae, Card as oe, CardContent as se, CardDescription as ce, CardFooter as le, CardHeader as ue, CardTitle as de, Checkbox as fe, Command as pe, CommandEmpty as me, CommandGroup as he, CommandInput as ge, CommandItem as _e, CommandList as ve, Dialog as ye, DialogContent as be, DialogDescription as xe, DialogFooter as Se, DialogHeader as Ce, DialogTitle as we, DialogTrigger as Te, DropdownMenu as Ee, DropdownMenuContent as De, DropdownMenuItem as Oe, DropdownMenuSeparator as ke, DropdownMenuTrigger as Ae, Input as je, Label as Me, Popover as Ne, PopoverContent as Pe, PopoverTrigger as Fe, Progress as Ie, ScrollArea as Le, Select as Re, SelectContent as ze, SelectItem as Be, SelectTrigger as Ve, SelectValue as He, Separator as Ue, Skeleton as We, Switch as Ge, Table as Ke, TableBody as qe, TableCell as Je, TableHead as Ye, TableHeader as Xe, TableRow as Ze, Tabs as Qe, TabsContent as $e, TabsList as et, TabsTrigger as tt, Textarea as nt, Tooltip as rt, TooltipContent as it, TooltipProvider as at, TooltipTrigger as ot } from "./components/ui.js";
|
|
20
|
+
import { EmptyState as st, ErrorState as ct, LoadingState as lt, PageLayout as ut, PageSection as dt } from "./components/PageLayout.js";
|
|
21
|
+
import { chartTokens as ft, seriesColor as pt } from "./components/charts/chartTokens.js";
|
|
22
|
+
import { Sparkline as mt } from "./components/charts/Sparkline.js";
|
|
23
|
+
import { MetricCard as ht, MetricCardSkeleton as gt, MetricGrid as _t } from "./components/MetricCard.js";
|
|
24
|
+
import { GlassPanel as vt } from "./components/GlassPanel.js";
|
|
25
|
+
import { ChartEmpty as yt, ChartTooltip as bt } from "./components/charts/ChartShell.js";
|
|
26
|
+
import { TrendChart as xt } from "./components/charts/TrendChart.js";
|
|
27
|
+
import { VolumeBar as St } from "./components/charts/VolumeBar.js";
|
|
28
|
+
import { StatusDonut as Ct } from "./components/charts/StatusDonut.js";
|
|
29
|
+
import { createCurrentIcon as wt, createPinIcon as Tt, createStopIcon as Et, isRealCoord as Dt } from "./components/maps/leaflet-setup.js";
|
|
30
|
+
import { MapCanvas as Ot } from "./components/maps/MapCanvas.js";
|
|
31
|
+
import { LogisticsMap as kt } from "./components/maps/LogisticsMap.js";
|
|
32
|
+
import { RouteMap as At } from "./components/maps/RouteMap.js";
|
|
33
|
+
import { TrackingMap as jt } from "./components/maps/TrackingMap.js";
|
|
34
|
+
import { PaymentStatusBadge as Mt, PriorityBadge as Nt, StatusBadge as Pt, TypeBadge as Ft, VehicleTypeBadge as It } from "./components/StatusBadge.js";
|
|
35
|
+
import { DataTable as Lt } from "./components/DataTable.js";
|
|
36
|
+
import { FormError as Rt } from "./components/FormError.js";
|
|
37
|
+
import { Notice as zt, useNotice as Bt } from "./components/Notice.js";
|
|
38
|
+
import { DocumentsCard as Vt } from "./components/DocumentsCard.js";
|
|
39
|
+
import { CarbonFootprintPanel as Ht } from "./components/CarbonFootprintPanel.js";
|
|
40
40
|
import "./components/index.js";
|
|
41
|
-
export { te as Avatar, ne as AvatarFallback, re as AvatarImage, ie as Badge, ae as Button,
|
|
41
|
+
export { te as Avatar, ne as AvatarFallback, re as AvatarImage, ie as Badge, ae as Button, Ht as CarbonFootprintPanel, oe as Card, se as CardContent, ce as CardDescription, le as CardFooter, ue as CardHeader, de as CardTitle, yt as ChartEmpty, bt as ChartTooltip, fe as Checkbox, pe as Command, me as CommandEmpty, he as CommandGroup, ge as CommandInput, _e as CommandItem, ve as CommandList, Lt as DataTable, ye as Dialog, be as DialogContent, xe as DialogDescription, Se as DialogFooter, Ce as DialogHeader, we as DialogTitle, Te as DialogTrigger, Vt as DocumentsCard, Ee as DropdownMenu, De as DropdownMenuContent, Oe as DropdownMenuItem, ke as DropdownMenuSeparator, Ae as DropdownMenuTrigger, st as EmptyState, ct as ErrorState, Rt as FormError, vt as GlassPanel, je as Input, Me as Label, lt as LoadingState, kt as LogisticsMap, Ot as MapCanvas, ht as MetricCard, gt as MetricCardSkeleton, _t as MetricGrid, Q as MoveTheWheelsRoot, zt as Notice, ut as PageLayout, dt as PageSection, Mt as PaymentStatusBadge, Ne as Popover, Pe as PopoverContent, Fe as PopoverTrigger, Nt as PriorityBadge, Ie as Progress, At as RouteMap, Le as ScrollArea, Re as Select, ze as SelectContent, Be as SelectItem, Ve as SelectTrigger, He as SelectValue, Ue as Separator, We as Skeleton, mt as Sparkline, Pt as StatusBadge, Ct as StatusDonut, Ge as Switch, Ke as Table, qe as TableBody, Je as TableCell, Ye as TableHead, Xe as TableHeader, Ze as TableRow, Qe as Tabs, $e as TabsContent, et as TabsList, tt as TabsTrigger, nt as Textarea, rt as Tooltip, it as TooltipContent, at as TooltipProvider, ot as TooltipTrigger, jt as TrackingMap, xt as TrendChart, Ft as TypeBadge, It as VehicleTypeBadge, St as VolumeBar, ft as chartTokens, wt as createCurrentIcon, Tt as createPinIcon, Et as createStopIcon, Dt as isRealCoord, pt as seriesColor, O as useAnalytics, q as useCaptureEpod, T as useCustomer, E as useCustomerStats, D as useCustomers, k as useDashboardMetrics, l as useDriver, u as useDriverStatusCounts, I as useDriverTracking, d as useDrivers, A as useEmissionsSummary, K as useEntityDocuments, J as useEpod, Y as useEpodPhotoUpload, X as useEpodPhotoUrl, j as useFinanceMetrics, f as useFleet, M as useFleetAnalytics, p as useFleetStats, L as useGeofence, W as useImportExport, _ as useInventory, v as useInventoryStats, y as useInventoryTransactions, R as useLiveTracking, G as useModuleSettings, e as useMoveTheWheels, t as useMoveTheWheelsNavigate, $ as useMoveTheWheelsStore, Z as useMyPendingEpodDeliveryJobs, Bt as useNotice, o as useOrder, N as useOrderAnalytics, s as useOrderStats, z as useOrderTracking, c as useOrders, P as usePerformanceAnalytics, b as useProduct, x as useProductStockLevels, S as useProducts, U as useReports, F as useRevenueAnalytics, r as useRoute, i as useRouteStats, a as useRoutes, ee as useSandboxAssistantTransport, n as useTr, B as useTracking, V as useTrackingAlerts, m as useVehicle, h as useVehicleDrivers, H as useVehicleTracking, g as useVehicles, C as useWarehouse, w as useWarehouses };
|
|
@@ -11,9 +11,10 @@ interface CustomerPickerProps {
|
|
|
11
11
|
onRetry: () => void;
|
|
12
12
|
onOpenCustomers?: () => void;
|
|
13
13
|
selectedCustomer?: Customer | null;
|
|
14
|
-
|
|
14
|
+
/** Called with the (already debounced) query text as the user types in the
|
|
15
|
+
* combobox's search box, so the caller can re-fetch `customers` server-side. */
|
|
15
16
|
onSearchQueryChange?: (query: string) => void;
|
|
16
17
|
disabled?: boolean;
|
|
17
18
|
}
|
|
18
|
-
export declare function CustomerPicker({ customers, value, onValueChange, onCreated, createCustomer, isLoading, error, onRetry, onOpenCustomers, selectedCustomer,
|
|
19
|
+
export declare function CustomerPicker({ customers, value, onValueChange, onCreated, createCustomer, isLoading, error, onRetry, onOpenCustomers, selectedCustomer, onSearchQueryChange, disabled, }: CustomerPickerProps): import("react").JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
interface EntityComboboxProps<T> {
|
|
2
|
+
/** Selected record id (controlled). Empty string = nothing selected. */
|
|
3
|
+
value: string;
|
|
4
|
+
/** Called with the selected record id ('' when cleared). */
|
|
5
|
+
onChange: (id: string) => void;
|
|
6
|
+
/** The current (already fetched/filtered) page of selectable records. */
|
|
7
|
+
options: T[];
|
|
8
|
+
/** True while `options` is (re)loading. */
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
getId: (option: T) => string;
|
|
11
|
+
/** Rich content for a list row. */
|
|
12
|
+
renderOption: (option: T) => React.ReactNode;
|
|
13
|
+
/** Plain-text label for the trigger button (must be a string, not JSX). */
|
|
14
|
+
getLabel: (option: T) => string;
|
|
15
|
+
/** Independently-loaded current selection, so its label still renders even
|
|
16
|
+
* when it isn't present in `options` (filtered out or paginated away). */
|
|
17
|
+
selectedOption?: T | null;
|
|
18
|
+
selectedLoading?: boolean;
|
|
19
|
+
/** Renders a clearable "None" row when true (hidden when `required`). */
|
|
20
|
+
required?: boolean;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
searchPlaceholder?: string;
|
|
23
|
+
emptyText?: string;
|
|
24
|
+
noneLabel?: string;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
id?: string;
|
|
27
|
+
/** Toggles the invalid border + aria-invalid. */
|
|
28
|
+
error?: string;
|
|
29
|
+
/** Extra classes merged onto the trigger button. */
|
|
30
|
+
className?: string;
|
|
31
|
+
/** Server-side search callback (debounced). Omit to hide the built-in search
|
|
32
|
+
* input when a caller already provides one elsewhere for the same list. */
|
|
33
|
+
onSearchChange?: (value: string) => void;
|
|
34
|
+
/** True when the source hook's page doesn't hold every matching record —
|
|
35
|
+
* paired with `totalCount` to render a "keep typing to narrow" hint. */
|
|
36
|
+
hasMore?: boolean;
|
|
37
|
+
totalCount?: number;
|
|
38
|
+
}
|
|
39
|
+
export declare function EntityCombobox<T>({ value, onChange, options, loading, getId, renderOption, getLabel, selectedOption, selectedLoading, required, placeholder, searchPlaceholder, emptyText, noneLabel, disabled, id, error, className, onSearchChange, hasMore, totalCount, }: EntityComboboxProps<T>): import("react").JSX.Element;
|
|
40
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* UI Component re-exports from @burdenoff/fe-libs
|
|
3
3
|
* All styled components are imported from the shared fe-libs package
|
|
4
4
|
*/
|
|
5
|
-
export { Button, Badge, Card, CardContent, CardHeader, CardTitle, CardDescription, CardFooter, Input, Skeleton, Separator, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Tabs, TabsList, TabsTrigger, TabsContent, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, DropdownMenuSeparator, Label, Textarea, Switch, Checkbox, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, ScrollArea, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '@burdenoff/fe-libs/ui';
|
|
5
|
+
export { Button, Badge, Card, CardContent, CardHeader, CardTitle, CardDescription, CardFooter, Input, Skeleton, Separator, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, Popover, PopoverContent, PopoverTrigger, Tabs, TabsList, TabsTrigger, TabsContent, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, DropdownMenuSeparator, Label, Textarea, Switch, Checkbox, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, ScrollArea, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from '@burdenoff/fe-libs/ui';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
8
|
value?: number;
|
|
@@ -81,6 +81,8 @@ interface UseVehiclesOptions extends UseListOptions {
|
|
|
81
81
|
search?: string;
|
|
82
82
|
status?: VehicleStatus;
|
|
83
83
|
vehicleType?: Vehicle['type'];
|
|
84
|
+
/** Narrows to vehicles linked to this driver server-side (VehicleFilterInput.driverId). */
|
|
85
|
+
driverId?: string;
|
|
84
86
|
}
|
|
85
87
|
interface UseVehiclesResult {
|
|
86
88
|
vehicles: Vehicle[];
|
|
@@ -116,6 +118,8 @@ interface UseDriversOptions extends UseListOptions {
|
|
|
116
118
|
status?: DriverStatus;
|
|
117
119
|
search?: string;
|
|
118
120
|
licenseClass?: string;
|
|
121
|
+
/** Narrows to drivers linked to this vehicle server-side (DriverFilterInput.vehicleId). */
|
|
122
|
+
vehicleId?: string;
|
|
119
123
|
}
|
|
120
124
|
export declare function useDrivers(options?: UseDriversOptions): UseDriversResult;
|
|
121
125
|
export declare function useDriver(driverId: string | undefined): {
|
|
@@ -43,6 +43,21 @@ export interface ApiOrder {
|
|
|
43
43
|
scheduledDelivery?: string | null;
|
|
44
44
|
vehicleId?: string | null;
|
|
45
45
|
driverId?: string | null;
|
|
46
|
+
routeId?: string | null;
|
|
47
|
+
route?: {
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
status: string;
|
|
51
|
+
vehicleId?: string | null;
|
|
52
|
+
driverId?: string | null;
|
|
53
|
+
waypoints?: unknown;
|
|
54
|
+
estimatedDistance?: number | null;
|
|
55
|
+
estimatedDuration?: number | null;
|
|
56
|
+
fuelCost?: number | null;
|
|
57
|
+
actualDistance?: number | null;
|
|
58
|
+
actualDuration?: number | null;
|
|
59
|
+
createdAt: string;
|
|
60
|
+
} | null;
|
|
46
61
|
createdAt: string;
|
|
47
62
|
updatedAt: string;
|
|
48
63
|
customer?: {
|
|
@@ -22,6 +22,22 @@ interface UseRoutesResult {
|
|
|
22
22
|
optimizeRoute: (routeId: string) => Promise<Route>;
|
|
23
23
|
updateStopStatus: (routeId: string, stopId: string, status: RouteStop['status']) => Promise<Route>;
|
|
24
24
|
}
|
|
25
|
+
interface ApiRoute {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
status: string;
|
|
29
|
+
shipmentId?: string | null;
|
|
30
|
+
vehicleId?: string | null;
|
|
31
|
+
driverId?: string | null;
|
|
32
|
+
waypoints?: unknown;
|
|
33
|
+
estimatedDistance?: number | null;
|
|
34
|
+
estimatedDuration?: number | null;
|
|
35
|
+
fuelCost?: number | null;
|
|
36
|
+
actualDistance?: number | null;
|
|
37
|
+
actualDuration?: number | null;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function mapRoute(route: ApiRoute): Route;
|
|
25
41
|
export declare function useRoutes(options?: UseRoutesOptions): UseRoutesResult;
|
|
26
42
|
export declare function useRoute(routeId: string | undefined): {
|
|
27
43
|
route: Route | null;
|
|
@@ -223,6 +223,8 @@ export interface Order {
|
|
|
223
223
|
actualDelivery?: Date;
|
|
224
224
|
driverId?: string;
|
|
225
225
|
vehicleId?: string;
|
|
226
|
+
routeId?: string;
|
|
227
|
+
route?: Route;
|
|
226
228
|
trackingNumber: string;
|
|
227
229
|
specialInstructions?: string;
|
|
228
230
|
pricing: OrderPricing;
|
|
@@ -671,7 +673,10 @@ export interface OrderFilter {
|
|
|
671
673
|
export interface FleetFilter {
|
|
672
674
|
vehicleType?: VehicleType;
|
|
673
675
|
status?: VehicleStatus;
|
|
676
|
+
/** Filter vehicles to those linked to this driver. */
|
|
674
677
|
driverId?: string;
|
|
678
|
+
/** Filter drivers to those linked to this vehicle. */
|
|
679
|
+
vehicleId?: string;
|
|
675
680
|
search?: string;
|
|
676
681
|
}
|
|
677
682
|
export interface InventoryFilter {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createLucideIcon as e } from "../createLucideIcon.js";
|
|
2
|
+
//#region node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js
|
|
3
|
+
var t = e("ChevronsUpDown", [["path", {
|
|
4
|
+
d: "m7 15 5 5 5-5",
|
|
5
|
+
key: "1hf1tw"
|
|
6
|
+
}], ["path", {
|
|
7
|
+
d: "m7 9 5-5 5 5",
|
|
8
|
+
key: "sgt6xg"
|
|
9
|
+
}]]);
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as ChevronsUpDown };
|