@burdenoff/microfe-movethewheels 2026.525.2 → 2026.529.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/package.json +1 -1
- package/dist/dev/main.d.ts +0 -1
- package/dist/generated/global-operations.d.ts +0 -1
- package/dist/generated/global-types.d.ts +0 -23526
- package/dist/generated/wspace-operations.d.ts +0 -3704
- package/dist/generated/wspace-types.d.ts +0 -57850
- package/dist/index.d.ts +0 -4
- package/dist/movethewheels/MoveTheWheelsRoot.d.ts +0 -25
- package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +0 -7
- package/dist/movethewheels/components/DataTable.d.ts +0 -32
- package/dist/movethewheels/components/MetricCard.d.ts +0 -43
- package/dist/movethewheels/components/PageLayout.d.ts +0 -68
- package/dist/movethewheels/components/StatusBadge.d.ts +0 -49
- package/dist/movethewheels/components/index.d.ts +0 -10
- package/dist/movethewheels/components/ui.d.ts +0 -22
- package/dist/movethewheels/constants/index.d.ts +0 -24
- package/dist/movethewheels/constants/mockData.d.ts +0 -33
- package/dist/movethewheels/hooks/index.d.ts +0 -12
- package/dist/movethewheels/hooks/useAnalytics.d.ts +0 -118
- package/dist/movethewheels/hooks/useCustomers.d.ts +0 -37
- package/dist/movethewheels/hooks/useFleet.d.ts +0 -71
- package/dist/movethewheels/hooks/useInventory.d.ts +0 -60
- package/dist/movethewheels/hooks/useOrders.d.ts +0 -47
- package/dist/movethewheels/hooks/useRoutes.d.ts +0 -41
- package/dist/movethewheels/hooks/useTracking.d.ts +0 -69
- package/dist/movethewheels/index.d.ts +0 -30
- package/dist/movethewheels/pages/AIAssistantPage.d.ts +0 -4
- package/dist/movethewheels/pages/AnalyticsPage.d.ts +0 -4
- package/dist/movethewheels/pages/CreateOrderPage.d.ts +0 -6
- package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +0 -4
- package/dist/movethewheels/pages/CustomersPage.d.ts +0 -4
- package/dist/movethewheels/pages/DashboardPage.d.ts +0 -6
- package/dist/movethewheels/pages/DriverDetailsPage.d.ts +0 -4
- package/dist/movethewheels/pages/DriversPage.d.ts +0 -4
- package/dist/movethewheels/pages/FinancePage.d.ts +0 -4
- package/dist/movethewheels/pages/FleetPage.d.ts +0 -6
- package/dist/movethewheels/pages/ImportExportPage.d.ts +0 -4
- package/dist/movethewheels/pages/InventoryPage.d.ts +0 -4
- package/dist/movethewheels/pages/LiveTrackingPage.d.ts +0 -6
- package/dist/movethewheels/pages/MarketplacePage.d.ts +0 -4
- package/dist/movethewheels/pages/OrderDetailsPage.d.ts +0 -6
- package/dist/movethewheels/pages/OrdersListPage.d.ts +0 -6
- package/dist/movethewheels/pages/ProductDetailsPage.d.ts +0 -4
- package/dist/movethewheels/pages/ProductsPage.d.ts +0 -4
- package/dist/movethewheels/pages/ReportsPage.d.ts +0 -4
- package/dist/movethewheels/pages/RouteDetailsPage.d.ts +0 -4
- package/dist/movethewheels/pages/RoutesPage.d.ts +0 -4
- package/dist/movethewheels/pages/SettingsPage.d.ts +0 -4
- package/dist/movethewheels/pages/TrackingPage.d.ts +0 -6
- package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +0 -4
- package/dist/movethewheels/pages/VehiclesPage.d.ts +0 -4
- package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +0 -4
- package/dist/movethewheels/pages/WarehousesPage.d.ts +0 -4
- package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +0 -16
- package/dist/movethewheels/store/movethewheelsStore.d.ts +0 -73
- package/dist/movethewheels/types/index.d.ts +0 -655
- package/dist/movethewheels/utils/cn.d.ts +0 -6
- package/dist/movethewheels/utils/formatters.d.ts +0 -60
- package/dist/movethewheels/utils/graphqlClient.d.ts +0 -11
- package/dist/movethewheels/utils/index.d.ts +0 -7
- package/dist/movethewheels/utils/navigation.d.ts +0 -23
package/dist/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { MoveTheWheelsRootProps } from './types';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Root component for the MoveTheWheels microfrontend.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* import { MoveTheWheelsRoot } from '@burdenoff/microfe-movethewheels';
|
|
10
|
-
*
|
|
11
|
-
* function App() {
|
|
12
|
-
* return (
|
|
13
|
-
* <MoveTheWheelsRoot
|
|
14
|
-
* basePath="/movethewheels"
|
|
15
|
-
* navigate={(path) => router.push(path)}
|
|
16
|
-
* currentUser={currentUser}
|
|
17
|
-
* workspaceId="ws-123"
|
|
18
|
-
* apiGatewayUrl="https://api.example.com"
|
|
19
|
-
* authToken="token"
|
|
20
|
-
* />
|
|
21
|
-
* );
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export declare const MoveTheWheelsRoot: FC<MoveTheWheelsRootProps>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface Column<T> {
|
|
4
|
-
id: string;
|
|
5
|
-
header: string | ReactNode;
|
|
6
|
-
accessorKey?: keyof T;
|
|
7
|
-
cell?: (row: T) => ReactNode;
|
|
8
|
-
sortable?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
headerClassName?: string;
|
|
11
|
-
}
|
|
12
|
-
interface DataTableProps<T> {
|
|
13
|
-
columns: Column<T>[];
|
|
14
|
-
data: T[];
|
|
15
|
-
isLoading?: boolean;
|
|
16
|
-
searchable?: boolean;
|
|
17
|
-
searchPlaceholder?: string;
|
|
18
|
-
searchFields?: (keyof T)[];
|
|
19
|
-
pagination?: boolean;
|
|
20
|
-
pageSize?: number;
|
|
21
|
-
pageSizeOptions?: number[];
|
|
22
|
-
onRowClick?: (row: T) => void;
|
|
23
|
-
rowClassName?: string | ((row: T) => string);
|
|
24
|
-
emptyMessage?: string;
|
|
25
|
-
className?: string;
|
|
26
|
-
getRowId?: (row: T) => string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* DataTable - A reusable data table component with sorting, search, and pagination
|
|
30
|
-
*/
|
|
31
|
-
export declare function DataTable<T extends object>({ columns, data, isLoading, searchable, searchPlaceholder, searchFields, pagination, pageSize: initialPageSize, pageSizeOptions, onRowClick, rowClassName, emptyMessage, className, getRowId, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
interface MetricCardProps {
|
|
4
|
-
/** Main value to display */
|
|
5
|
-
value: string | number;
|
|
6
|
-
/** Label describing the metric */
|
|
7
|
-
label: string;
|
|
8
|
-
/** Optional icon */
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
/** Change from previous period (e.g., "+12%", "-5%") */
|
|
11
|
-
change?: string;
|
|
12
|
-
/** Whether the change is positive, negative, or neutral */
|
|
13
|
-
changeType?: 'positive' | 'negative' | 'neutral';
|
|
14
|
-
/** Optional subtitle or additional info */
|
|
15
|
-
subtitle?: string;
|
|
16
|
-
/** Optional trend indicator */
|
|
17
|
-
trend?: 'up' | 'down' | 'flat';
|
|
18
|
-
/** Card size variant */
|
|
19
|
-
size?: 'sm' | 'md' | 'lg';
|
|
20
|
-
/** Optional click handler */
|
|
21
|
-
onClick?: () => void;
|
|
22
|
-
/** Additional CSS classes */
|
|
23
|
-
className?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* MetricCard - Displays a key metric with optional change indicator
|
|
27
|
-
*/
|
|
28
|
-
export declare function MetricCard({ value, label, icon, change, changeType, subtitle, trend, size, onClick, className, }: MetricCardProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
/**
|
|
30
|
-
* MetricCardSkeleton - Loading state for MetricCard
|
|
31
|
-
*/
|
|
32
|
-
export declare function MetricCardSkeleton({ size }: {
|
|
33
|
-
size?: 'sm' | 'md' | 'lg';
|
|
34
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
/**
|
|
36
|
-
* MetricGrid - Grid container for metric cards
|
|
37
|
-
*/
|
|
38
|
-
export declare function MetricGrid({ children, columns, className, }: {
|
|
39
|
-
children: ReactNode;
|
|
40
|
-
columns?: 2 | 3 | 4 | 5 | 6;
|
|
41
|
-
className?: string;
|
|
42
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
43
|
-
export {};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
interface PageLayoutProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
/** Page title */
|
|
6
|
-
title?: string;
|
|
7
|
-
/** Page subtitle/description */
|
|
8
|
-
subtitle?: string;
|
|
9
|
-
/** Icon component to display next to title */
|
|
10
|
-
icon?: ReactNode;
|
|
11
|
-
/** Actions to display in header (buttons, etc.) */
|
|
12
|
-
headerActions?: ReactNode;
|
|
13
|
-
/** Additional header content below title */
|
|
14
|
-
headerContent?: ReactNode;
|
|
15
|
-
/** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */
|
|
16
|
-
maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
17
|
-
/** Whether to show the header section */
|
|
18
|
-
showHeader?: boolean;
|
|
19
|
-
/** Additional CSS classes for the container */
|
|
20
|
-
className?: string;
|
|
21
|
-
/** Additional CSS classes for the content area */
|
|
22
|
-
contentClassName?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* PageLayout - A consistent page wrapper with responsive design
|
|
26
|
-
*
|
|
27
|
-
* Features:
|
|
28
|
-
* - Proper max-width constraints
|
|
29
|
-
* - Responsive padding
|
|
30
|
-
* - Animated entrance
|
|
31
|
-
* - Consistent header styling
|
|
32
|
-
*/
|
|
33
|
-
export declare function PageLayout({ children, title, subtitle, icon, headerActions, headerContent, maxWidth, showHeader, className, contentClassName, }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
/**
|
|
35
|
-
* PageSection - A section within a page with consistent spacing
|
|
36
|
-
*/
|
|
37
|
-
export declare function PageSection({ children, title, description, actions, className, }: {
|
|
38
|
-
children: ReactNode;
|
|
39
|
-
title?: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
actions?: ReactNode;
|
|
42
|
-
className?: string;
|
|
43
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
44
|
-
/**
|
|
45
|
-
* EmptyState - A consistent empty state component
|
|
46
|
-
*/
|
|
47
|
-
export declare function EmptyState({ icon, title, description, action, className, }: {
|
|
48
|
-
icon?: ReactNode;
|
|
49
|
-
title: string;
|
|
50
|
-
description?: string;
|
|
51
|
-
action?: ReactNode;
|
|
52
|
-
className?: string;
|
|
53
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
54
|
-
/**
|
|
55
|
-
* LoadingState - A consistent loading state component
|
|
56
|
-
*/
|
|
57
|
-
export declare function LoadingState({ message }: {
|
|
58
|
-
message?: string;
|
|
59
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
60
|
-
/**
|
|
61
|
-
* ErrorState - A consistent error state component
|
|
62
|
-
*/
|
|
63
|
-
export declare function ErrorState({ title, message, onRetry, }: {
|
|
64
|
-
title?: string;
|
|
65
|
-
message?: string;
|
|
66
|
-
onRetry?: () => void;
|
|
67
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
68
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
type StatusType = 'order' | 'vehicle' | 'driver' | 'custom';
|
|
2
|
-
interface StatusBadgeProps {
|
|
3
|
-
status: string;
|
|
4
|
-
type?: StatusType;
|
|
5
|
-
customColors?: {
|
|
6
|
-
bg: string;
|
|
7
|
-
text: string;
|
|
8
|
-
};
|
|
9
|
-
size?: 'sm' | 'md' | 'lg';
|
|
10
|
-
showDot?: boolean;
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* StatusBadge - Displays status with appropriate colors
|
|
15
|
-
*/
|
|
16
|
-
export declare function StatusBadge({ status, type, customColors, size, showDot, className, }: StatusBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
/**
|
|
18
|
-
* Priority Badge - Displays priority level
|
|
19
|
-
*/
|
|
20
|
-
export declare function PriorityBadge({ priority, size, className, }: {
|
|
21
|
-
priority: 'low' | 'normal' | 'high' | 'urgent';
|
|
22
|
-
size?: 'sm' | 'md' | 'lg';
|
|
23
|
-
className?: string;
|
|
24
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
/**
|
|
26
|
-
* TypeBadge - Displays B2B/B2C type
|
|
27
|
-
*/
|
|
28
|
-
export declare function TypeBadge({ type, size, className, }: {
|
|
29
|
-
type: 'b2b' | 'b2c';
|
|
30
|
-
size?: 'sm' | 'md' | 'lg';
|
|
31
|
-
className?: string;
|
|
32
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
/**
|
|
34
|
-
* PaymentStatusBadge - Displays payment status
|
|
35
|
-
*/
|
|
36
|
-
export declare function PaymentStatusBadge({ status, size, className, }: {
|
|
37
|
-
status: 'pending' | 'paid' | 'failed' | 'refunded';
|
|
38
|
-
size?: 'sm' | 'md' | 'lg';
|
|
39
|
-
className?: string;
|
|
40
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
41
|
-
/**
|
|
42
|
-
* VehicleTypeBadge - Displays vehicle type
|
|
43
|
-
*/
|
|
44
|
-
export declare function VehicleTypeBadge({ type, size, className, }: {
|
|
45
|
-
type: 'van' | 'truck' | 'motorcycle' | 'bicycle' | 'car';
|
|
46
|
-
size?: 'sm' | 'md' | 'lg';
|
|
47
|
-
className?: string;
|
|
48
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
49
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MoveTheWheels Components
|
|
3
|
-
*
|
|
4
|
-
* All shared components for the microfrontend.
|
|
5
|
-
*/
|
|
6
|
-
export * from './ui';
|
|
7
|
-
export { PageLayout, PageSection, EmptyState, LoadingState, ErrorState } from './PageLayout';
|
|
8
|
-
export { MetricCard, MetricCardSkeleton, MetricGrid } from './MetricCard';
|
|
9
|
-
export { StatusBadge, PriorityBadge, TypeBadge, PaymentStatusBadge, VehicleTypeBadge, } from './StatusBadge';
|
|
10
|
-
export { DataTable, type Column } from './DataTable';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* UI Component re-exports from @burdenoff/fe-libs
|
|
3
|
-
* All styled components are imported from the shared fe-libs package
|
|
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';
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
interface ProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
-
value?: number;
|
|
9
|
-
max?: number;
|
|
10
|
-
}
|
|
11
|
-
declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
export { Progress };
|
|
13
|
-
interface AvatarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
-
}
|
|
15
|
-
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
-
interface AvatarImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
17
|
-
}
|
|
18
|
-
declare const AvatarImage: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
|
|
19
|
-
interface AvatarFallbackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
20
|
-
}
|
|
21
|
-
declare const AvatarFallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constants barrel export
|
|
3
|
-
*/
|
|
4
|
-
export * from './mockData';
|
|
5
|
-
export declare const ORDER_STATUS_COLORS: Record<string, {
|
|
6
|
-
bg: string;
|
|
7
|
-
text: string;
|
|
8
|
-
border: string;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const VEHICLE_STATUS_COLORS: Record<string, {
|
|
11
|
-
bg: string;
|
|
12
|
-
text: string;
|
|
13
|
-
}>;
|
|
14
|
-
export declare const DRIVER_STATUS_COLORS: Record<string, {
|
|
15
|
-
bg: string;
|
|
16
|
-
text: string;
|
|
17
|
-
}>;
|
|
18
|
-
export declare const PRIORITY_COLORS: Record<string, {
|
|
19
|
-
bg: string;
|
|
20
|
-
text: string;
|
|
21
|
-
}>;
|
|
22
|
-
export declare const CUSTOMER_TYPE_LABELS: Record<string, string>;
|
|
23
|
-
export declare const VEHICLE_TYPE_LABELS: Record<string, string>;
|
|
24
|
-
export declare const WAREHOUSE_TYPE_LABELS: Record<string, string>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { User, Customer, Order, Vehicle, Driver, Warehouse, Inventory, Product, Route, Tracking, Notification, ServiceProvider, ServiceOffering, Analytics } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare const mockUsers: User[];
|
|
4
|
-
export declare const mockCustomers: Customer[];
|
|
5
|
-
export declare const mockProducts: Product[];
|
|
6
|
-
export declare const mockOrders: Order[];
|
|
7
|
-
export declare const mockVehicles: Vehicle[];
|
|
8
|
-
export declare const mockDrivers: Driver[];
|
|
9
|
-
export declare const mockWarehouses: Warehouse[];
|
|
10
|
-
export declare const mockInventory: Inventory[];
|
|
11
|
-
export declare const mockRoutes: Route[];
|
|
12
|
-
export declare const mockTracking: Tracking[];
|
|
13
|
-
export declare const mockNotifications: Notification[];
|
|
14
|
-
export declare const mockServiceProviders: ServiceProvider[];
|
|
15
|
-
export declare const mockServiceOfferings: ServiceOffering[];
|
|
16
|
-
export declare const mockAnalytics: Analytics;
|
|
17
|
-
export declare const mockData: {
|
|
18
|
-
users: User[];
|
|
19
|
-
customers: Customer[];
|
|
20
|
-
products: Product[];
|
|
21
|
-
orders: Order[];
|
|
22
|
-
vehicles: Vehicle[];
|
|
23
|
-
drivers: Driver[];
|
|
24
|
-
warehouses: Warehouse[];
|
|
25
|
-
inventory: Inventory[];
|
|
26
|
-
routes: Route[];
|
|
27
|
-
tracking: Tracking[];
|
|
28
|
-
notifications: Notification[];
|
|
29
|
-
serviceProviders: ServiceProvider[];
|
|
30
|
-
serviceOfferings: ServiceOffering[];
|
|
31
|
-
analytics: Analytics;
|
|
32
|
-
};
|
|
33
|
-
export default mockData;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MoveTheWheels Hooks
|
|
3
|
-
*
|
|
4
|
-
* All custom hooks for data access and operations.
|
|
5
|
-
*/
|
|
6
|
-
export { useOrders, useOrder, useOrderStats } from './useOrders';
|
|
7
|
-
export { useFleet, useVehicles, useVehicle, useDrivers, useDriver, useFleetStats, } from './useFleet';
|
|
8
|
-
export { useInventory, useProducts, useProduct, useWarehouses, useWarehouse, useInventoryStats, } from './useInventory';
|
|
9
|
-
export { useCustomers, useCustomer, useCustomerStats } from './useCustomers';
|
|
10
|
-
export { useRoutes, useRoute, useRouteStats } from './useRoutes';
|
|
11
|
-
export { useAnalytics, useDashboardMetrics, useRevenueAnalytics, useOrderAnalytics, useFleetAnalytics, usePerformanceAnalytics, } from './useAnalytics';
|
|
12
|
-
export { useTracking, useOrderTracking, useVehicleTracking, useDriverTracking, useLiveTracking, useTrackingAlerts, useGeofence, } from './useTracking';
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { Analytics } from '../types';
|
|
2
|
-
|
|
3
|
-
interface UseAnalyticsOptions {
|
|
4
|
-
dateRange?: {
|
|
5
|
-
from: Date;
|
|
6
|
-
to: Date;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
interface UseAnalyticsResult {
|
|
10
|
-
analytics: Analytics;
|
|
11
|
-
isLoading: boolean;
|
|
12
|
-
error: Error | null;
|
|
13
|
-
refetch: () => void;
|
|
14
|
-
}
|
|
15
|
-
export declare function useAnalytics(_options?: UseAnalyticsOptions): UseAnalyticsResult;
|
|
16
|
-
export declare function useDashboardMetrics(): {
|
|
17
|
-
metrics: {
|
|
18
|
-
orders: {
|
|
19
|
-
total: number;
|
|
20
|
-
pending: number;
|
|
21
|
-
inTransit: number;
|
|
22
|
-
delivered: number;
|
|
23
|
-
today: number;
|
|
24
|
-
};
|
|
25
|
-
fleet: {
|
|
26
|
-
totalVehicles: number;
|
|
27
|
-
activeVehicles: number;
|
|
28
|
-
totalDrivers: number;
|
|
29
|
-
availableDrivers: number;
|
|
30
|
-
};
|
|
31
|
-
revenue: {
|
|
32
|
-
total: number;
|
|
33
|
-
avgOrderValue: number;
|
|
34
|
-
currency: string;
|
|
35
|
-
};
|
|
36
|
-
performance: {
|
|
37
|
-
onTimeDeliveryRate: number;
|
|
38
|
-
avgDriverRating: number;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
isLoading: boolean;
|
|
42
|
-
error: Error | null;
|
|
43
|
-
};
|
|
44
|
-
export declare function useRevenueAnalytics(period?: 'daily' | 'weekly' | 'monthly'): {
|
|
45
|
-
revenueData: {
|
|
46
|
-
label: string;
|
|
47
|
-
value: number;
|
|
48
|
-
}[];
|
|
49
|
-
isLoading: boolean;
|
|
50
|
-
error: Error | null;
|
|
51
|
-
};
|
|
52
|
-
export declare function useOrderAnalytics(): {
|
|
53
|
-
orderData: {
|
|
54
|
-
byStatus: Array<{
|
|
55
|
-
status: string;
|
|
56
|
-
count: number;
|
|
57
|
-
}>;
|
|
58
|
-
byType: Array<{
|
|
59
|
-
type: string;
|
|
60
|
-
count: number;
|
|
61
|
-
}>;
|
|
62
|
-
byPriority: Array<{
|
|
63
|
-
priority: string;
|
|
64
|
-
count: number;
|
|
65
|
-
}>;
|
|
66
|
-
trends: Array<{
|
|
67
|
-
date: string;
|
|
68
|
-
orders: number;
|
|
69
|
-
}>;
|
|
70
|
-
};
|
|
71
|
-
isLoading: boolean;
|
|
72
|
-
error: Error | null;
|
|
73
|
-
};
|
|
74
|
-
export declare function useFleetAnalytics(): {
|
|
75
|
-
fleetData: {
|
|
76
|
-
vehicleUtilization: number;
|
|
77
|
-
avgFuelLevel: number;
|
|
78
|
-
vehiclesByType: Array<{
|
|
79
|
-
type: string;
|
|
80
|
-
count: number;
|
|
81
|
-
}>;
|
|
82
|
-
driverPerformance: Array<{
|
|
83
|
-
id: string;
|
|
84
|
-
name: string;
|
|
85
|
-
completedOrders: number;
|
|
86
|
-
rating: number;
|
|
87
|
-
onTimeRate: number;
|
|
88
|
-
}>;
|
|
89
|
-
fleetStats: {
|
|
90
|
-
utilization: number;
|
|
91
|
-
totalVehicles: number;
|
|
92
|
-
activeVehicles: number;
|
|
93
|
-
maintenanceVehicles: number;
|
|
94
|
-
outOfServiceVehicles: number;
|
|
95
|
-
fuelEfficiency: number;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
isLoading: boolean;
|
|
99
|
-
error: Error | null;
|
|
100
|
-
};
|
|
101
|
-
export declare function usePerformanceAnalytics(): {
|
|
102
|
-
performanceData: {
|
|
103
|
-
driverRatings: Array<{
|
|
104
|
-
name: string;
|
|
105
|
-
overall: number;
|
|
106
|
-
punctuality: number;
|
|
107
|
-
communication: number;
|
|
108
|
-
handling: number;
|
|
109
|
-
}>;
|
|
110
|
-
onTimePickup: number;
|
|
111
|
-
onTimeDelivery: number;
|
|
112
|
-
damagedItems: number;
|
|
113
|
-
customerComplaints: number;
|
|
114
|
-
};
|
|
115
|
-
isLoading: boolean;
|
|
116
|
-
error: Error | null;
|
|
117
|
-
};
|
|
118
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Customer, CustomerFilter } from '../types';
|
|
2
|
-
|
|
3
|
-
interface UseCustomersOptions {
|
|
4
|
-
filters?: CustomerFilter;
|
|
5
|
-
limit?: number;
|
|
6
|
-
offset?: number;
|
|
7
|
-
}
|
|
8
|
-
interface UseCustomersResult {
|
|
9
|
-
customers: Customer[];
|
|
10
|
-
totalCustomers: number;
|
|
11
|
-
isLoading: boolean;
|
|
12
|
-
error: Error | null;
|
|
13
|
-
refetch: () => void;
|
|
14
|
-
createCustomer: (customer: Partial<Customer>) => Promise<Customer>;
|
|
15
|
-
updateCustomer: (id: string, updates: Partial<Customer>) => Promise<Customer>;
|
|
16
|
-
deleteCustomer: (id: string) => Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
export declare function useCustomers(options?: UseCustomersOptions): UseCustomersResult;
|
|
19
|
-
export declare function useCustomer(customerId: string | undefined): {
|
|
20
|
-
customer: Customer | null;
|
|
21
|
-
isLoading: boolean;
|
|
22
|
-
error: Error | null;
|
|
23
|
-
refetch: () => void;
|
|
24
|
-
};
|
|
25
|
-
export declare function useCustomerStats(): {
|
|
26
|
-
stats: {
|
|
27
|
-
total: number;
|
|
28
|
-
b2b: number;
|
|
29
|
-
b2c: number;
|
|
30
|
-
active: number;
|
|
31
|
-
inactive: number;
|
|
32
|
-
avgRating: number;
|
|
33
|
-
};
|
|
34
|
-
isLoading: boolean;
|
|
35
|
-
error: Error | null;
|
|
36
|
-
};
|
|
37
|
-
export {};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Driver, DriverStatus, FleetFilter, Vehicle, VehicleStatus } from '../types';
|
|
2
|
-
|
|
3
|
-
interface UseFleetOptions {
|
|
4
|
-
filters?: FleetFilter;
|
|
5
|
-
}
|
|
6
|
-
interface UseFleetResult {
|
|
7
|
-
vehicles: Vehicle[];
|
|
8
|
-
drivers: Driver[];
|
|
9
|
-
totalVehicles: number;
|
|
10
|
-
totalDrivers: number;
|
|
11
|
-
isLoading: boolean;
|
|
12
|
-
error: Error | null;
|
|
13
|
-
refetch: () => void;
|
|
14
|
-
}
|
|
15
|
-
export declare function useFleet(options?: UseFleetOptions): UseFleetResult;
|
|
16
|
-
interface UseVehiclesResult {
|
|
17
|
-
vehicles: Vehicle[];
|
|
18
|
-
totalVehicles: number;
|
|
19
|
-
isLoading: boolean;
|
|
20
|
-
error: Error | null;
|
|
21
|
-
refetch: () => void;
|
|
22
|
-
updateVehicleStatus: (id: string, status: VehicleStatus) => Promise<Vehicle>;
|
|
23
|
-
assignDriver: (vehicleId: string, driverId: string) => Promise<Vehicle>;
|
|
24
|
-
}
|
|
25
|
-
export declare function useVehicles(): UseVehiclesResult;
|
|
26
|
-
export declare function useVehicle(vehicleId: string | undefined): {
|
|
27
|
-
vehicle: Vehicle | null;
|
|
28
|
-
isLoading: boolean;
|
|
29
|
-
error: Error | null;
|
|
30
|
-
refetch: () => void;
|
|
31
|
-
};
|
|
32
|
-
interface UseDriversResult {
|
|
33
|
-
drivers: Driver[];
|
|
34
|
-
totalDrivers: number;
|
|
35
|
-
isLoading: boolean;
|
|
36
|
-
error: Error | null;
|
|
37
|
-
refetch: () => void;
|
|
38
|
-
updateDriverStatus: (id: string, status: DriverStatus) => Promise<Driver>;
|
|
39
|
-
assignVehicle: (driverId: string, vehicleId: string) => Promise<Driver>;
|
|
40
|
-
}
|
|
41
|
-
export declare function useDrivers(): UseDriversResult;
|
|
42
|
-
export declare function useDriver(driverId: string | undefined): {
|
|
43
|
-
driver: Driver | null;
|
|
44
|
-
isLoading: boolean;
|
|
45
|
-
error: Error | null;
|
|
46
|
-
refetch: () => void;
|
|
47
|
-
};
|
|
48
|
-
export declare function useFleetStats(): {
|
|
49
|
-
stats: {
|
|
50
|
-
totalVehicles: number;
|
|
51
|
-
totalDrivers: number;
|
|
52
|
-
vehiclesByStatus: {
|
|
53
|
-
available: number;
|
|
54
|
-
assigned: number;
|
|
55
|
-
maintenance: number;
|
|
56
|
-
out_of_service: number;
|
|
57
|
-
};
|
|
58
|
-
driversByStatus: {
|
|
59
|
-
available: number;
|
|
60
|
-
busy: number;
|
|
61
|
-
offline: number;
|
|
62
|
-
on_break: number;
|
|
63
|
-
};
|
|
64
|
-
avgFuelLevel: number;
|
|
65
|
-
avgDriverRating: number;
|
|
66
|
-
utilization: number;
|
|
67
|
-
};
|
|
68
|
-
isLoading: boolean;
|
|
69
|
-
error: Error | null;
|
|
70
|
-
};
|
|
71
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Inventory, InventoryFilter, Product, Warehouse } from '../types';
|
|
2
|
-
|
|
3
|
-
interface UseInventoryOptions {
|
|
4
|
-
filters?: InventoryFilter;
|
|
5
|
-
}
|
|
6
|
-
interface UseInventoryResult {
|
|
7
|
-
inventory: Inventory[];
|
|
8
|
-
products: Product[];
|
|
9
|
-
warehouses: Warehouse[];
|
|
10
|
-
totalItems: number;
|
|
11
|
-
isLoading: boolean;
|
|
12
|
-
error: Error | null;
|
|
13
|
-
refetch: () => void;
|
|
14
|
-
updateStock: (inventoryId: string, quantity: number, reason: string) => Promise<Inventory>;
|
|
15
|
-
transferStock: (fromWarehouseId: string, toWarehouseId: string, productId: string, quantity: number) => Promise<void>;
|
|
16
|
-
}
|
|
17
|
-
export declare function useInventory(options?: UseInventoryOptions): UseInventoryResult;
|
|
18
|
-
export declare function useProducts(): {
|
|
19
|
-
products: Product[];
|
|
20
|
-
totalProducts: number;
|
|
21
|
-
isLoading: boolean;
|
|
22
|
-
error: Error | null;
|
|
23
|
-
refetch: () => undefined;
|
|
24
|
-
};
|
|
25
|
-
export declare function useProduct(productId: string | undefined): {
|
|
26
|
-
product: Product | null;
|
|
27
|
-
isLoading: boolean;
|
|
28
|
-
error: Error | null;
|
|
29
|
-
refetch: () => undefined;
|
|
30
|
-
};
|
|
31
|
-
export declare function useWarehouses(): {
|
|
32
|
-
warehouses: Warehouse[];
|
|
33
|
-
totalWarehouses: number;
|
|
34
|
-
isLoading: boolean;
|
|
35
|
-
error: Error | null;
|
|
36
|
-
refetch: () => undefined;
|
|
37
|
-
};
|
|
38
|
-
export declare function useWarehouse(warehouseId: string | undefined): {
|
|
39
|
-
warehouse: Warehouse | null;
|
|
40
|
-
isLoading: boolean;
|
|
41
|
-
error: Error | null;
|
|
42
|
-
refetch: () => undefined;
|
|
43
|
-
};
|
|
44
|
-
export declare function useInventoryStats(): {
|
|
45
|
-
stats: {
|
|
46
|
-
totalItems: number;
|
|
47
|
-
lowStockItems: number;
|
|
48
|
-
totalValue: number;
|
|
49
|
-
totalProducts: number;
|
|
50
|
-
totalWarehouses: number;
|
|
51
|
-
warehouseUtilization: Array<{
|
|
52
|
-
id: string;
|
|
53
|
-
name: string;
|
|
54
|
-
utilization: number;
|
|
55
|
-
}>;
|
|
56
|
-
};
|
|
57
|
-
isLoading: boolean;
|
|
58
|
-
error: Error | null;
|
|
59
|
-
};
|
|
60
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Order, OrderFilter, OrderStatus } from '../types';
|
|
2
|
-
|
|
3
|
-
interface UseOrdersOptions {
|
|
4
|
-
filters?: OrderFilter;
|
|
5
|
-
limit?: number;
|
|
6
|
-
offset?: number;
|
|
7
|
-
}
|
|
8
|
-
interface UseOrdersResult {
|
|
9
|
-
orders: Order[];
|
|
10
|
-
totalOrders: number;
|
|
11
|
-
isLoading: boolean;
|
|
12
|
-
error: Error | null;
|
|
13
|
-
refetch: () => void;
|
|
14
|
-
createOrder: (order: Partial<Order>) => Promise<Order>;
|
|
15
|
-
updateOrder: (id: string, updates: Partial<Order>) => Promise<Order>;
|
|
16
|
-
deleteOrder: (id: string) => Promise<void>;
|
|
17
|
-
updateOrderStatus: (id: string, status: OrderStatus) => Promise<Order>;
|
|
18
|
-
}
|
|
19
|
-
export declare function useOrders(options?: UseOrdersOptions): UseOrdersResult;
|
|
20
|
-
export declare function useOrder(orderId: string | undefined): {
|
|
21
|
-
order: Order | null;
|
|
22
|
-
isLoading: boolean;
|
|
23
|
-
error: Error | null;
|
|
24
|
-
refetch: () => void;
|
|
25
|
-
};
|
|
26
|
-
export declare function useOrderStats(): {
|
|
27
|
-
stats: {
|
|
28
|
-
total: number;
|
|
29
|
-
byStatus: {
|
|
30
|
-
pending: number;
|
|
31
|
-
confirmed: number;
|
|
32
|
-
assigned: number;
|
|
33
|
-
picked_up: number;
|
|
34
|
-
in_transit: number;
|
|
35
|
-
out_for_delivery: number;
|
|
36
|
-
delivered: number;
|
|
37
|
-
cancelled: number;
|
|
38
|
-
failed: number;
|
|
39
|
-
};
|
|
40
|
-
totalRevenue: number;
|
|
41
|
-
todayOrders: number;
|
|
42
|
-
avgOrderValue: number;
|
|
43
|
-
};
|
|
44
|
-
isLoading: boolean;
|
|
45
|
-
error: Error | null;
|
|
46
|
-
};
|
|
47
|
-
export {};
|