@burdenoff/microfe-movethewheels 2026.1028.1 → 2026.1031.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/MoveTheWheelsRoot.js +130 -122
- package/dist/MoveTheWheelsRoutes.js +55 -51
- package/dist/components/ExportStatusBanner.js +53 -0
- package/dist/components/marketplace/MarketplaceDialogs.js +524 -0
- package/dist/generated/wspace-types.d.ts +30737 -8505
- package/dist/hooks/useEntityExport.js +85 -0
- package/dist/hooks/useMarketplace.js +265 -0
- package/dist/movethewheels/components/ExportStatusBanner.d.ts +7 -0
- package/dist/movethewheels/components/marketplace/MarketplaceDialogs.d.ts +18 -0
- package/dist/movethewheels/hooks/useEntityExport.d.ts +32 -0
- package/dist/movethewheels/hooks/useMarketplace.d.ts +121 -0
- package/dist/movethewheels/pages/MarketplacePage.d.ts +1 -0
- package/dist/movethewheels/utils/entityExport.d.ts +64 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/badge-check.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +8 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +8 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/pencil.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/store.js +26 -0
- package/dist/pages/CustomersPage.js +64 -58
- package/dist/pages/DriversPage.js +113 -107
- package/dist/pages/MarketplacePage.js +503 -0
- package/dist/pages/OrdersListPage.js +85 -79
- package/dist/pages/ProductsPage.js +63 -57
- package/dist/pages/VehiclesPage.js +91 -85
- package/dist/utils/entityExport.js +54 -0
- package/package.json +3 -2
- package/src/generated/wspace-types.ts +34017 -8803
- package/src/movethewheels/MoveTheWheelsRoot.tsx +8 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
- package/src/movethewheels/components/ExportStatusBanner.tsx +78 -0
- package/src/movethewheels/components/marketplace/MarketplaceDialogs.tsx +633 -0
- package/src/movethewheels/hooks/useEntityExport.ts +130 -0
- package/src/movethewheels/hooks/useMarketplace.ts +526 -0
- package/src/movethewheels/pages/CustomersPage.tsx +11 -2
- package/src/movethewheels/pages/DriversPage.tsx +11 -2
- package/src/movethewheels/pages/MarketplacePage.tsx +571 -0
- package/src/movethewheels/pages/OrdersListPage.tsx +13 -2
- package/src/movethewheels/pages/ProductsPage.tsx +11 -2
- package/src/movethewheels/pages/VehiclesPage.tsx +11 -2
- package/src/movethewheels/utils/entityExport.ts +140 -0
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
ClipboardList,
|
|
23
23
|
DollarSign,
|
|
24
24
|
Bot,
|
|
25
|
+
Store,
|
|
25
26
|
} from 'lucide-react';
|
|
26
27
|
import { MoveTheWheelsProvider } from './providers/MoveTheWheelsProvider';
|
|
27
28
|
import { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';
|
|
@@ -233,6 +234,13 @@ const NavRegistrar: FC<Pick<MoveTheWheelsRootProps, 'registerNavItems' | 'basePa
|
|
|
233
234
|
icon: <Users size={16} />,
|
|
234
235
|
order: 6,
|
|
235
236
|
},
|
|
237
|
+
{
|
|
238
|
+
id: 'mtw-marketplace',
|
|
239
|
+
label: tr('movethewheels.root.nav.marketplace', 'Marketplace'),
|
|
240
|
+
path: joinPath(basePath, 'marketplace'),
|
|
241
|
+
icon: <Store size={16} />,
|
|
242
|
+
order: 6,
|
|
243
|
+
},
|
|
236
244
|
{
|
|
237
245
|
id: 'mtw-routes',
|
|
238
246
|
label: tr('movethewheels.root.nav.routes', 'Routes'),
|
|
@@ -71,6 +71,7 @@ const WarehousesPage = lazy(() => import('./pages/WarehousesPage'));
|
|
|
71
71
|
const WarehouseDetailsPage = lazy(() => import('./pages/WarehouseDetailsPage'));
|
|
72
72
|
const CustomersPage = lazy(() => import('./pages/CustomersPage'));
|
|
73
73
|
const CustomerDetailsPage = lazy(() => import('./pages/CustomerDetailsPage'));
|
|
74
|
+
const MarketplacePage = lazy(() => import('./pages/MarketplacePage'));
|
|
74
75
|
const RoutesPage = lazy(() => import('./pages/RoutesPage'));
|
|
75
76
|
const RouteDetailsPage = lazy(() => import('./pages/RouteDetailsPage'));
|
|
76
77
|
const AnalyticsPage = lazy(() => import('./pages/AnalyticsPage'));
|
|
@@ -156,6 +157,9 @@ export function MoveTheWheelsRoutes() {
|
|
|
156
157
|
<Route path="customers/new" element={<CustomerDetailsPage />} />
|
|
157
158
|
<Route path="customers/:customerId" element={<CustomerDetailsPage />} />
|
|
158
159
|
|
|
160
|
+
{/* Marketplace — service providers and offerings (BOFF-3988) */}
|
|
161
|
+
<Route path="marketplace" element={<MarketplacePage />} />
|
|
162
|
+
|
|
159
163
|
{/* Routes */}
|
|
160
164
|
<Route path="routes" element={<RoutesPage />} />
|
|
161
165
|
<Route path="routes/trip-utilization" element={<TripUtilizationPage />} />
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExportStatusBanner — inline feedback for a list page's "Export" action.
|
|
3
|
+
*
|
|
4
|
+
* The MFE does not mount its own toaster, so export progress, success and
|
|
5
|
+
* failure are shown inline. A job that outlives the wait budget links to the
|
|
6
|
+
* host shell's shared Exports page, where it can be downloaded once ready.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { AlertCircle, CheckCircle, Info, Loader2, X } from 'lucide-react';
|
|
10
|
+
import type { EntityExportState } from '../hooks/useEntityExport';
|
|
11
|
+
import { useMoveTheWheels } from '../providers/MoveTheWheelsProvider';
|
|
12
|
+
|
|
13
|
+
interface ExportStatusBannerProps {
|
|
14
|
+
state: EntityExportState;
|
|
15
|
+
onDismiss: () => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Host-shell route of the shared export module (microfe-export). */
|
|
19
|
+
const EXPORTS_PATH = '/export';
|
|
20
|
+
|
|
21
|
+
export function ExportStatusBanner({ state, onDismiss }: ExportStatusBannerProps) {
|
|
22
|
+
const { navigate } = useMoveTheWheels();
|
|
23
|
+
if (state.phase === 'idle') return null;
|
|
24
|
+
|
|
25
|
+
const tone =
|
|
26
|
+
state.phase === 'error'
|
|
27
|
+
? 'border-status-error-border bg-status-error-bg-subtle text-status-error-text'
|
|
28
|
+
: state.phase === 'ready'
|
|
29
|
+
? 'border-status-success-border bg-status-success-bg-subtle text-status-success-text'
|
|
30
|
+
: 'border-status-info-border bg-status-info-bg-subtle text-status-info-text';
|
|
31
|
+
|
|
32
|
+
const icon =
|
|
33
|
+
state.phase === 'error' ? (
|
|
34
|
+
<AlertCircle size={18} className="mt-0.5 shrink-0" />
|
|
35
|
+
) : state.phase === 'ready' ? (
|
|
36
|
+
<CheckCircle size={18} className="mt-0.5 shrink-0" />
|
|
37
|
+
) : state.phase === 'running' ? (
|
|
38
|
+
<Loader2 size={18} className="mt-0.5 shrink-0 animate-spin" />
|
|
39
|
+
) : (
|
|
40
|
+
<Info size={18} className="mt-0.5 shrink-0" />
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<div
|
|
45
|
+
role={state.phase === 'error' ? 'alert' : 'status'}
|
|
46
|
+
data-testid="mtw-export-status"
|
|
47
|
+
data-phase={state.phase}
|
|
48
|
+
className={`flex items-start gap-2 rounded-lg border px-4 py-3 text-sm ${tone}`}
|
|
49
|
+
>
|
|
50
|
+
{icon}
|
|
51
|
+
<span className="flex-1">
|
|
52
|
+
{state.message}
|
|
53
|
+
{state.phase === 'pending' ? (
|
|
54
|
+
<>
|
|
55
|
+
{' '}
|
|
56
|
+
<button
|
|
57
|
+
type="button"
|
|
58
|
+
className="font-medium underline underline-offset-2"
|
|
59
|
+
onClick={() => navigate(`${EXPORTS_PATH}/${state.jobId}`)}
|
|
60
|
+
>
|
|
61
|
+
Open Exports
|
|
62
|
+
</button>
|
|
63
|
+
</>
|
|
64
|
+
) : null}
|
|
65
|
+
</span>
|
|
66
|
+
{state.phase !== 'running' ? (
|
|
67
|
+
<button
|
|
68
|
+
type="button"
|
|
69
|
+
aria-label="Dismiss export status"
|
|
70
|
+
className="shrink-0 opacity-70 hover:opacity-100"
|
|
71
|
+
onClick={onDismiss}
|
|
72
|
+
>
|
|
73
|
+
<X size={16} />
|
|
74
|
+
</button>
|
|
75
|
+
) : null}
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|