@burdenoff/microfe-theglobalfuel 2026.709.1 → 2026.709.2
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 +3 -0
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +18199 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +43046 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
- package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
- package/dist/theglobalfuel/TheGlobalFuelRoot.js +106 -104
- package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
- package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
- package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js +60 -38
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
- package/dist/theglobalfuel/components/DataTable.d.ts +30 -0
- package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
- package/dist/theglobalfuel/components/DataTable.js.map +1 -1
- package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
- package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
- package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
- package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
- package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
- package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
- package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
- package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
- package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
- package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
- package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
- package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
- package/dist/theglobalfuel/components/PageLayout.d.ts +18 -0
- package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
- package/dist/theglobalfuel/components/PageLayout.js +2 -1
- package/dist/theglobalfuel/components/PageLayout.js.map +1 -1
- package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
- package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
- package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
- package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
- package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
- package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
- package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
- package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
- package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
- package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
- package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
- package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
- package/dist/theglobalfuel/components/WorldMap.d.ts +18 -0
- package/dist/theglobalfuel/components/WorldMap.d.ts.map +1 -0
- package/dist/theglobalfuel/components/WorldMap.js.map +1 -1
- package/dist/theglobalfuel/components/index.d.ts +21 -0
- package/dist/theglobalfuel/components/index.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/AllocationBar.d.ts +21 -0
- package/dist/theglobalfuel/components/viz/AllocationBar.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/AreaChart.d.ts +18 -0
- package/dist/theglobalfuel/components/viz/AreaChart.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/AvatarStack.d.ts +13 -0
- package/dist/theglobalfuel/components/viz/AvatarStack.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/BarChart.d.ts +17 -0
- package/dist/theglobalfuel/components/viz/BarChart.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/CertificateCard.d.ts +14 -0
- package/dist/theglobalfuel/components/viz/CertificateCard.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/DonutChart.d.ts +20 -0
- package/dist/theglobalfuel/components/viz/DonutChart.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts +17 -0
- package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/Heatmap.d.ts +26 -0
- package/dist/theglobalfuel/components/viz/Heatmap.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts +17 -0
- package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/LineChart.d.ts +20 -0
- package/dist/theglobalfuel/components/viz/LineChart.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/OrgTree.d.ts +14 -0
- package/dist/theglobalfuel/components/viz/OrgTree.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/PathSteps.d.ts +17 -0
- package/dist/theglobalfuel/components/viz/PathSteps.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/ProgressRing.d.ts +20 -0
- package/dist/theglobalfuel/components/viz/ProgressRing.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/RatingStars.d.ts +14 -0
- package/dist/theglobalfuel/components/viz/RatingStars.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts +26 -0
- package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/SkillBar.d.ts +17 -0
- package/dist/theglobalfuel/components/viz/SkillBar.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/Sparkline.d.ts +16 -0
- package/dist/theglobalfuel/components/viz/Sparkline.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/StatCard.d.ts +22 -0
- package/dist/theglobalfuel/components/viz/StatCard.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/StepProgress.d.ts +17 -0
- package/dist/theglobalfuel/components/viz/StepProgress.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/Timeline.d.ts +21 -0
- package/dist/theglobalfuel/components/viz/Timeline.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/index.d.ts +35 -0
- package/dist/theglobalfuel/components/viz/index.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts +15 -0
- package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts +44 -0
- package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts +27 -0
- package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/format.d.ts +10 -0
- package/dist/theglobalfuel/components/viz/lib/format.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/geometry.d.ts +41 -0
- package/dist/theglobalfuel/components/viz/lib/geometry.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/hooks.d.ts +18 -0
- package/dist/theglobalfuel/components/viz/lib/hooks.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/palette.d.ts +31 -0
- package/dist/theglobalfuel/components/viz/lib/palette.d.ts.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/types.d.ts +27 -0
- package/dist/theglobalfuel/components/viz/lib/types.d.ts.map +1 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
- package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
- package/dist/theglobalfuel/context/index.d.ts +6 -0
- package/dist/theglobalfuel/context/index.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/index.d.ts +15 -0
- package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/index.js +3 -0
- package/dist/theglobalfuel/hooks/useCursorPager.d.ts +26 -0
- package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useNotify.d.ts +23 -0
- package/dist/theglobalfuel/hooks/useNotify.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts +38 -0
- package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheAnalytics.js +1 -0
- package/dist/theglobalfuel/hooks/useTheAnalytics.js.map +1 -1
- package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
- package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
- package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +79 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +2 -9
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -1
- package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts +20 -0
- package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheNativeControls.js +22 -0
- package/dist/theglobalfuel/hooks/useTheNativeControls.js.map +1 -0
- package/dist/theglobalfuel/hooks/useThePageView.d.ts +10 -0
- package/dist/theglobalfuel/hooks/useThePageView.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useThePageView.js +13 -0
- package/dist/theglobalfuel/hooks/useThePageView.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
- package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheTranslation.d.ts +4 -0
- package/dist/theglobalfuel/hooks/useTheTranslation.d.ts.map +1 -0
- package/dist/theglobalfuel/hooks/useTheTranslation.js +12 -0
- package/dist/theglobalfuel/hooks/useTheTranslation.js.map +1 -0
- package/dist/theglobalfuel/index.d.ts +11 -0
- package/dist/theglobalfuel/index.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +452 -415
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
- package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetsPage.js +138 -135
- package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/compliance/CompliancePage.js +233 -229
- package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +410 -389
- package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -1
- package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js +140 -137
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +17 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +83 -83
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +13 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +154 -150
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js +151 -147
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
- package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.js +175 -171
- package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts +23 -0
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +153 -146
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -1
- package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/reserves/ReservesPage.js +168 -164
- package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +11 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +179 -175
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
- package/dist/theglobalfuel/services/assistantApi.d.ts +25 -0
- package/dist/theglobalfuel/services/assistantApi.d.ts.map +1 -0
- package/dist/theglobalfuel/services/assistantApi.js.map +1 -1
- package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts +38 -0
- package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts.map +1 -0
- package/dist/theglobalfuel/services/createSandboxAssistantTransport.js.map +1 -1
- package/dist/theglobalfuel/services/index.d.ts +7 -0
- package/dist/theglobalfuel/services/index.d.ts.map +1 -0
- package/dist/theglobalfuel/types/assistant.d.ts +65 -0
- package/dist/theglobalfuel/types/assistant.d.ts.map +1 -0
- package/dist/theglobalfuel/types/index.d.ts +376 -0
- package/dist/theglobalfuel/types/index.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/cn.d.ts +4 -0
- package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/formatters.d.ts +44 -0
- package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/i18n.d.ts +5 -0
- package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/i18n.js +15 -0
- package/dist/theglobalfuel/utils/i18n.js.map +1 -0
- package/dist/theglobalfuel/utils/index.d.ts +10 -0
- package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
- package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/pageContext.d.ts +26 -0
- package/dist/theglobalfuel/utils/pageContext.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/transitions.d.ts +17 -0
- package/dist/theglobalfuel/utils/transitions.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
2
|
import { MetricsCard as t } from "../../components/MetricsCard.js";
|
|
3
|
-
import { formatDate as n, formatEnumLabel as r, formatVolume as i, toBackendDate as
|
|
4
|
-
import { StatusBadge as
|
|
5
|
-
import { DataTable as
|
|
6
|
-
import { ErrorView as
|
|
7
|
-
import { EmptyState as
|
|
8
|
-
import { AllocationBar as
|
|
9
|
-
import { PathSteps as
|
|
10
|
-
import { useTheContracts as
|
|
11
|
-
import { useCursorPager as
|
|
12
|
-
import { useNotify as
|
|
3
|
+
import { formatDate as n, formatEnumLabel as r, formatVolume as i, toBackendDate as ee } from "../../utils/formatters.js";
|
|
4
|
+
import { StatusBadge as a } from "../../components/StatusBadge.js";
|
|
5
|
+
import { DataTable as te } from "../../components/DataTable.js";
|
|
6
|
+
import { ErrorView as ne, LoadingView as re } from "../../components/StateViews.js";
|
|
7
|
+
import { EmptyState as ie } from "../../components/EmptyState.js";
|
|
8
|
+
import { AllocationBar as ae } from "../../components/viz/AllocationBar.js";
|
|
9
|
+
import { PathSteps as oe } from "../../components/viz/PathSteps.js";
|
|
10
|
+
import { useTheContracts as se, useTheDeliverShipment as ce, useTheScheduleShipment as le, useTheShipments as o, useTheTransitionShipment as ue } from "../../hooks/useTheGlobalFuelApi.js";
|
|
11
|
+
import { useCursorPager as de } from "../../hooks/useCursorPager.js";
|
|
12
|
+
import { useNotify as fe } from "../../hooks/useNotify.js";
|
|
13
|
+
import { useThePageView as pe } from "../../hooks/useThePageView.js";
|
|
14
|
+
import { useTheTranslation as me } from "../../hooks/useTheTranslation.js";
|
|
13
15
|
import "../../hooks/index.js";
|
|
14
|
-
import { SHIPMENT_DELIVERABLE_FROM as
|
|
15
|
-
import { FilterTabs as
|
|
16
|
-
import { Pagination as
|
|
17
|
-
import { EvidenceUpload as
|
|
18
|
-
import { FileLink as
|
|
16
|
+
import { SHIPMENT_DELIVERABLE_FROM as he, SHIPMENT_TRANSITIONS as ge, nextStatuses as _e } from "../../utils/transitions.js";
|
|
17
|
+
import { FilterTabs as ve } from "../../components/FilterTabs.js";
|
|
18
|
+
import { Pagination as ye } from "../../components/Pagination.js";
|
|
19
|
+
import { EvidenceUpload as be } from "../../components/EvidenceUpload.js";
|
|
20
|
+
import { FileLink as xe } from "../../components/FileLink.js";
|
|
19
21
|
import "../../components/index.js";
|
|
20
|
-
import { useMemo as
|
|
21
|
-
import { ArrowRight as
|
|
22
|
-
import { Fragment as
|
|
23
|
-
import { Button as h, Input as g, Label as _, ResponsiveDialog as
|
|
22
|
+
import { useMemo as s, useState as c } from "react";
|
|
23
|
+
import { ArrowRight as Se, CalendarClock as Ce, MapPin as we, PackageCheck as l, Plus as u, Ship as d, Truck as Te } from "lucide-react";
|
|
24
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
25
|
+
import { Button as h, Input as g, Label as _, ResponsiveDialog as Ee, ResponsiveDialogContent as De, ResponsiveDialogDescription as Oe, ResponsiveDialogFooter as ke, ResponsiveDialogHeader as Ae, ResponsiveDialogTitle as je, Select as v, SelectContent as y, SelectItem as b, SelectTrigger as x, SelectValue as S, Textarea as Me } from "@burdenoff/fe-libs/ui";
|
|
24
26
|
//#region src/theglobalfuel/pages/shipments/ShipmentsPage.tsx
|
|
25
|
-
var
|
|
27
|
+
var Ne = [
|
|
26
28
|
{
|
|
27
29
|
value: "ALL",
|
|
28
30
|
label: "All"
|
|
@@ -47,14 +49,14 @@ var je = [
|
|
|
47
49
|
value: "CANCELLED",
|
|
48
50
|
label: "Cancelled"
|
|
49
51
|
}
|
|
50
|
-
],
|
|
52
|
+
], Pe = [
|
|
51
53
|
"PIPELINE",
|
|
52
54
|
"TANKER",
|
|
53
55
|
"VESSEL_BULK",
|
|
54
56
|
"RAIL",
|
|
55
57
|
"TRUCK",
|
|
56
58
|
"GRID"
|
|
57
|
-
],
|
|
59
|
+
], Fe = [
|
|
58
60
|
"BARRELS",
|
|
59
61
|
"CUBIC_METERS",
|
|
60
62
|
"TONNES",
|
|
@@ -62,35 +64,35 @@ var je = [
|
|
|
62
64
|
"MWH",
|
|
63
65
|
"GJ",
|
|
64
66
|
"MCF"
|
|
65
|
-
], C = 25,
|
|
67
|
+
], C = 25, Ie = [
|
|
66
68
|
"SCHEDULED",
|
|
67
69
|
"LOADING",
|
|
68
70
|
"IN_TRANSIT",
|
|
69
71
|
"DELIVERED",
|
|
70
72
|
"CANCELLED"
|
|
71
|
-
],
|
|
73
|
+
], Le = {
|
|
72
74
|
SCHEDULED: "Scheduled",
|
|
73
75
|
LOADING: "Loading",
|
|
74
76
|
IN_TRANSIT: "In transit",
|
|
75
77
|
DELIVERED: "Delivered",
|
|
76
78
|
CANCELLED: "Cancelled"
|
|
77
|
-
},
|
|
79
|
+
}, Re = {
|
|
78
80
|
SCHEDULED: "var(--color-text-muted)",
|
|
79
81
|
LOADING: "var(--color-accent-blue)",
|
|
80
82
|
IN_TRANSIT: "var(--color-status-warning-text)",
|
|
81
83
|
DELIVERED: "var(--color-status-success-text)",
|
|
82
84
|
CANCELLED: "var(--color-status-error-text)"
|
|
83
|
-
},
|
|
84
|
-
let t = e.status === "CANCELLED", n = e.status === "DELIVERED", i = e.status === "IN_TRANSIT",
|
|
85
|
+
}, ze = (e) => {
|
|
86
|
+
let t = e.status === "CANCELLED", n = e.status === "DELIVERED", i = e.status === "IN_TRANSIT", ee = n || i, a = t ? "Cancelled" : n ? "Delivered" : i ? "In transit" : r(e.status);
|
|
85
87
|
return [
|
|
86
88
|
{
|
|
87
89
|
label: (e.origin ?? "").trim(),
|
|
88
90
|
meta: "Origin",
|
|
89
|
-
state: t ? "todo" :
|
|
91
|
+
state: t ? "todo" : ee ? "done" : "active"
|
|
90
92
|
},
|
|
91
93
|
{
|
|
92
94
|
label: r(e.mode),
|
|
93
|
-
meta:
|
|
95
|
+
meta: a,
|
|
94
96
|
state: t ? "locked" : n ? "done" : i ? "active" : "todo"
|
|
95
97
|
},
|
|
96
98
|
{
|
|
@@ -112,64 +114,65 @@ var je = [
|
|
|
112
114
|
notes: ""
|
|
113
115
|
};
|
|
114
116
|
function T() {
|
|
115
|
-
|
|
117
|
+
pe("shipments");
|
|
118
|
+
let T = me(), [E, Be] = c("ALL"), [D, Ve] = c("ALL"), O = de(), [He, k] = c(!1), [A, j] = c(w), [M, N] = c(null), [P, F] = c(null), [Ue, I] = c(null), [L, We] = c(null), R = fe(), z = D === "ALL" ? void 0 : D, { data: B, isLoading: Ge, isError: Ke, refetch: qe } = o(z, E === "ALL" ? void 0 : E, {
|
|
116
119
|
limit: C,
|
|
117
|
-
offset:
|
|
118
|
-
}),
|
|
120
|
+
offset: O.page * C
|
|
121
|
+
}), V = o(z, void 0, { limit: 200 }), H = se({ pagination: { limit: 100 } }), U = s(() => H.data?.items ?? [], [H.data]), W = s(() => {
|
|
119
122
|
let e = /* @__PURE__ */ new Map();
|
|
120
|
-
for (let t of
|
|
123
|
+
for (let t of U) e.set(t.id, t);
|
|
121
124
|
return e;
|
|
122
|
-
}, [
|
|
125
|
+
}, [U]), G = le(), K = ce(), Je = ue(), q = s(() => B?.items ?? [], [B]), J = s(() => V.data?.items ?? [], [V.data]), Ye = J.filter((e) => e.status === "SCHEDULED").length, Xe = J.filter((e) => e.status === "IN_TRANSIT").length, Ze = J.filter((e) => e.status === "DELIVERED").length, Y = s(() => {
|
|
123
126
|
let e = {};
|
|
124
|
-
for (let t of
|
|
127
|
+
for (let t of J) e[t.status] = (e[t.status] ?? 0) + 1;
|
|
125
128
|
return e;
|
|
126
|
-
}, [
|
|
129
|
+
}, [J]), Qe = Ne.map((e) => ({
|
|
127
130
|
value: e.value,
|
|
128
131
|
label: e.label,
|
|
129
|
-
count: e.value === "ALL" ?
|
|
130
|
-
})),
|
|
131
|
-
label:
|
|
132
|
-
value:
|
|
133
|
-
color:
|
|
134
|
-
})), [
|
|
132
|
+
count: e.value === "ALL" ? J.length : Y[e.value] ?? 0
|
|
133
|
+
})), $e = s(() => Ie.filter((e) => (Y[e] ?? 0) > 0).map((e) => ({
|
|
134
|
+
label: Le[e],
|
|
135
|
+
value: Y[e] ?? 0,
|
|
136
|
+
color: Re[e]
|
|
137
|
+
})), [Y]), X = s(() => J.filter((e) => (e.origin ?? "").trim() && (e.destination ?? "").trim()), [J]), et = s(() => {
|
|
135
138
|
let e = /* @__PURE__ */ new Set();
|
|
136
139
|
for (let t of X) e.add(`${(t.origin ?? "").trim()} → ${(t.destination ?? "").trim()}`);
|
|
137
140
|
return e.size;
|
|
138
|
-
}, [X]), Z =
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
if (!
|
|
142
|
-
|
|
141
|
+
}, [X]), Z = s(() => X.find((e) => e.id === L) ?? X[0] ?? null, [X, L]), Q = () => {
|
|
142
|
+
j(w), N(null), F(null);
|
|
143
|
+
}, tt = async () => {
|
|
144
|
+
if (!A.contractId) {
|
|
145
|
+
F("Select the contract this shipment fulfils.");
|
|
143
146
|
return;
|
|
144
147
|
}
|
|
145
|
-
if (!
|
|
146
|
-
|
|
148
|
+
if (!A.reference.trim()) {
|
|
149
|
+
F("A shipment reference is required.");
|
|
147
150
|
return;
|
|
148
151
|
}
|
|
149
|
-
let e = Number(
|
|
150
|
-
if (!
|
|
151
|
-
|
|
152
|
+
let e = Number(A.volume);
|
|
153
|
+
if (!A.volume || Number.isNaN(e) || e <= 0) {
|
|
154
|
+
F("Enter a volume greater than zero."), R.error("Enter a volume greater than zero.");
|
|
152
155
|
return;
|
|
153
156
|
}
|
|
154
|
-
|
|
157
|
+
F(null);
|
|
155
158
|
try {
|
|
156
|
-
await
|
|
157
|
-
contractId:
|
|
158
|
-
reference:
|
|
159
|
-
mode:
|
|
160
|
-
carrier:
|
|
161
|
-
origin:
|
|
162
|
-
destination:
|
|
159
|
+
await G.mutateAsync({
|
|
160
|
+
contractId: A.contractId,
|
|
161
|
+
reference: A.reference.trim(),
|
|
162
|
+
mode: A.mode,
|
|
163
|
+
carrier: A.carrier.trim() || null,
|
|
164
|
+
origin: A.origin.trim() || null,
|
|
165
|
+
destination: A.destination.trim() || null,
|
|
163
166
|
volume: e,
|
|
164
|
-
unit:
|
|
165
|
-
scheduledAt:
|
|
166
|
-
documentFileId:
|
|
167
|
-
notes:
|
|
168
|
-
}),
|
|
167
|
+
unit: A.unit,
|
|
168
|
+
scheduledAt: ee(A.scheduledAt) ?? null,
|
|
169
|
+
documentFileId: M?.fileId ?? null,
|
|
170
|
+
notes: A.notes.trim() || null
|
|
171
|
+
}), R.success("Shipment scheduled"), k(!1), Q();
|
|
169
172
|
} catch (e) {
|
|
170
|
-
|
|
173
|
+
F(e instanceof Error ? e.message : "Failed to schedule shipment."), R.fromError(e);
|
|
171
174
|
}
|
|
172
|
-
},
|
|
175
|
+
}, nt = [
|
|
173
176
|
{
|
|
174
177
|
key: "reference",
|
|
175
178
|
header: "Shipment",
|
|
@@ -189,7 +192,7 @@ function T() {
|
|
|
189
192
|
header: "Contract",
|
|
190
193
|
hideOnMobile: !0,
|
|
191
194
|
render: (e) => {
|
|
192
|
-
let t =
|
|
195
|
+
let t = W.get(e.contractId);
|
|
193
196
|
return t ? /* @__PURE__ */ m("div", {
|
|
194
197
|
className: "min-w-0",
|
|
195
198
|
children: [/* @__PURE__ */ p("p", {
|
|
@@ -217,7 +220,7 @@ function T() {
|
|
|
217
220
|
{
|
|
218
221
|
key: "status",
|
|
219
222
|
header: "Status",
|
|
220
|
-
render: (e) => /* @__PURE__ */ p(
|
|
223
|
+
render: (e) => /* @__PURE__ */ p(a, { status: e.status })
|
|
221
224
|
},
|
|
222
225
|
{
|
|
223
226
|
key: "route",
|
|
@@ -235,7 +238,7 @@ function T() {
|
|
|
235
238
|
className: "truncate",
|
|
236
239
|
children: t ?? "—"
|
|
237
240
|
}),
|
|
238
|
-
/* @__PURE__ */ p(
|
|
241
|
+
/* @__PURE__ */ p(Se, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }),
|
|
239
242
|
/* @__PURE__ */ p("span", {
|
|
240
243
|
className: "truncate",
|
|
241
244
|
children: n ?? "—"
|
|
@@ -269,7 +272,7 @@ function T() {
|
|
|
269
272
|
key: "document",
|
|
270
273
|
header: "Document",
|
|
271
274
|
hideOnMobile: !0,
|
|
272
|
-
render: (e) => e.document?.id ? /* @__PURE__ */ p(
|
|
275
|
+
render: (e) => e.document?.id ? /* @__PURE__ */ p(xe, { fileId: e.document.id }) : /* @__PURE__ */ p("span", {
|
|
273
276
|
className: "text-text-tertiary",
|
|
274
277
|
children: "—"
|
|
275
278
|
})
|
|
@@ -279,7 +282,7 @@ function T() {
|
|
|
279
282
|
header: "",
|
|
280
283
|
align: "right",
|
|
281
284
|
render: (e) => {
|
|
282
|
-
let t =
|
|
285
|
+
let t = _e(ge, e.status), n = he.includes(e.status), i = Ue === e.id;
|
|
283
286
|
return t.length === 0 && !n ? /* @__PURE__ */ p("span", {
|
|
284
287
|
className: "text-text-tertiary",
|
|
285
288
|
children: "—"
|
|
@@ -289,13 +292,13 @@ function T() {
|
|
|
289
292
|
value: e.status,
|
|
290
293
|
disabled: i,
|
|
291
294
|
onValueChange: (t) => {
|
|
292
|
-
t !== e.status && (
|
|
295
|
+
t !== e.status && (I(e.id), Je.mutate({
|
|
293
296
|
id: e.id,
|
|
294
297
|
status: t
|
|
295
298
|
}, {
|
|
296
|
-
onSuccess: () =>
|
|
297
|
-
onError: (e) =>
|
|
298
|
-
onSettled: () =>
|
|
299
|
+
onSuccess: () => R.success("Shipment updated"),
|
|
300
|
+
onError: (e) => R.fromError(e),
|
|
301
|
+
onSettled: () => I(null)
|
|
299
302
|
}));
|
|
300
303
|
},
|
|
301
304
|
children: [/* @__PURE__ */ p(x, {
|
|
@@ -309,23 +312,24 @@ function T() {
|
|
|
309
312
|
}), n && /* @__PURE__ */ m(h, {
|
|
310
313
|
size: "sm",
|
|
311
314
|
variant: "outline",
|
|
312
|
-
disabled:
|
|
313
|
-
onClick: () =>
|
|
314
|
-
onSuccess: () =>
|
|
315
|
-
onError: (e) =>
|
|
315
|
+
disabled: K.isPending || i,
|
|
316
|
+
onClick: () => K.mutate(e.id, {
|
|
317
|
+
onSuccess: () => R.success("Shipment delivered"),
|
|
318
|
+
onError: (e) => R.fromError(e)
|
|
316
319
|
}),
|
|
317
|
-
children: [/* @__PURE__ */ p(
|
|
320
|
+
children: [/* @__PURE__ */ p(l, { className: "mr-1.5 h-4 w-4" }), " Mark delivered"]
|
|
318
321
|
})]
|
|
319
322
|
});
|
|
320
323
|
}
|
|
321
324
|
}
|
|
322
|
-
], $ =
|
|
325
|
+
], $ = E !== "ALL" || D !== "ALL";
|
|
323
326
|
return /* @__PURE__ */ m(e, {
|
|
324
|
-
title: "Shipments",
|
|
325
|
-
description: "Cargo movements delivering offtake contracts — pipelines, tankers, vessels, rail & grid.",
|
|
327
|
+
title: T("theglobalfuel.pages.shipments.title", "Shipments"),
|
|
328
|
+
description: T("theglobalfuel.pages.shipments.description", "Cargo movements delivering offtake contracts — pipelines, tankers, vessels, rail & grid."),
|
|
329
|
+
dataTour: "theglobalfuel-shipments-page",
|
|
326
330
|
actions: /* @__PURE__ */ m(h, {
|
|
327
|
-
onClick: () =>
|
|
328
|
-
children: [/* @__PURE__ */ p(
|
|
331
|
+
onClick: () => k(!0),
|
|
332
|
+
children: [/* @__PURE__ */ p(u, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
|
|
329
333
|
}),
|
|
330
334
|
children: [
|
|
331
335
|
/* @__PURE__ */ m("div", {
|
|
@@ -333,25 +337,25 @@ function T() {
|
|
|
333
337
|
children: [
|
|
334
338
|
/* @__PURE__ */ p(t, {
|
|
335
339
|
featured: !0,
|
|
336
|
-
icon: /* @__PURE__ */ p(
|
|
337
|
-
value:
|
|
340
|
+
icon: /* @__PURE__ */ p(d, { className: "h-5 w-5" }),
|
|
341
|
+
value: J.length,
|
|
338
342
|
label: "Total shipments"
|
|
339
343
|
}),
|
|
340
344
|
/* @__PURE__ */ p(t, {
|
|
341
|
-
icon: /* @__PURE__ */ p(
|
|
342
|
-
value:
|
|
345
|
+
icon: /* @__PURE__ */ p(Ce, { className: "h-5 w-5" }),
|
|
346
|
+
value: Ye,
|
|
343
347
|
label: "Scheduled"
|
|
344
348
|
}),
|
|
345
349
|
/* @__PURE__ */ p(t, {
|
|
346
350
|
accent: "warning",
|
|
347
|
-
icon: /* @__PURE__ */ p(
|
|
348
|
-
value:
|
|
351
|
+
icon: /* @__PURE__ */ p(Te, { className: "h-5 w-5" }),
|
|
352
|
+
value: Xe,
|
|
349
353
|
label: "In transit"
|
|
350
354
|
}),
|
|
351
355
|
/* @__PURE__ */ p(t, {
|
|
352
356
|
accent: "success",
|
|
353
|
-
icon: /* @__PURE__ */ p(
|
|
354
|
-
value:
|
|
357
|
+
icon: /* @__PURE__ */ p(l, { className: "h-5 w-5" }),
|
|
358
|
+
value: Ze,
|
|
355
359
|
label: "Delivered"
|
|
356
360
|
})
|
|
357
361
|
]
|
|
@@ -365,15 +369,15 @@ function T() {
|
|
|
365
369
|
children: [/* @__PURE__ */ p("h3", {
|
|
366
370
|
className: "text-sm font-semibold text-text-secondary",
|
|
367
371
|
children: "Status distribution"
|
|
368
|
-
}), /* @__PURE__ */ p(
|
|
372
|
+
}), /* @__PURE__ */ p(d, {
|
|
369
373
|
className: "h-4 w-4 shrink-0 text-text-muted",
|
|
370
374
|
"aria-hidden": "true"
|
|
371
375
|
})]
|
|
372
|
-
}),
|
|
373
|
-
segments:
|
|
376
|
+
}), $e.length > 0 ? /* @__PURE__ */ p(ae, {
|
|
377
|
+
segments: $e,
|
|
374
378
|
height: 14,
|
|
375
379
|
label: "By status",
|
|
376
|
-
rightLabel: `${
|
|
380
|
+
rightLabel: `${J.length} shipment${J.length === 1 ? "" : "s"}`
|
|
377
381
|
}) : /* @__PURE__ */ p("p", {
|
|
378
382
|
className: "py-6 text-sm text-text-tertiary",
|
|
379
383
|
children: "No shipments yet — schedule one to see the status mix."
|
|
@@ -388,19 +392,19 @@ function T() {
|
|
|
388
392
|
}), /* @__PURE__ */ m("span", {
|
|
389
393
|
className: "inline-flex items-center gap-1.5 text-xs text-text-tertiary",
|
|
390
394
|
children: [
|
|
391
|
-
/* @__PURE__ */ p(
|
|
395
|
+
/* @__PURE__ */ p(we, {
|
|
392
396
|
className: "h-3.5 w-3.5",
|
|
393
397
|
"aria-hidden": "true"
|
|
394
398
|
}),
|
|
395
|
-
|
|
399
|
+
et,
|
|
396
400
|
" lane",
|
|
397
|
-
|
|
401
|
+
et === 1 ? "" : "s"
|
|
398
402
|
]
|
|
399
403
|
})]
|
|
400
|
-
}), Z ? /* @__PURE__ */ m(
|
|
404
|
+
}), Z ? /* @__PURE__ */ m(f, { children: [
|
|
401
405
|
/* @__PURE__ */ m(v, {
|
|
402
406
|
value: Z.id,
|
|
403
|
-
onValueChange:
|
|
407
|
+
onValueChange: We,
|
|
404
408
|
children: [/* @__PURE__ */ p(x, {
|
|
405
409
|
"aria-label": "Trace a shipment route",
|
|
406
410
|
children: /* @__PURE__ */ p(S, {})
|
|
@@ -415,11 +419,11 @@ function T() {
|
|
|
415
419
|
]
|
|
416
420
|
}, e.id)) })]
|
|
417
421
|
}),
|
|
418
|
-
/* @__PURE__ */ p(
|
|
422
|
+
/* @__PURE__ */ p(oe, { steps: ze(Z) }),
|
|
419
423
|
/* @__PURE__ */ m("div", {
|
|
420
424
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 text-xs text-text-tertiary",
|
|
421
425
|
children: [
|
|
422
|
-
/* @__PURE__ */ p(
|
|
426
|
+
/* @__PURE__ */ p(a, { status: Z.status }),
|
|
423
427
|
/* @__PURE__ */ p("span", { children: r(Z.mode) }),
|
|
424
428
|
/* @__PURE__ */ p("span", {
|
|
425
429
|
className: "tabular-nums text-text-secondary",
|
|
@@ -439,16 +443,16 @@ function T() {
|
|
|
439
443
|
}),
|
|
440
444
|
/* @__PURE__ */ m("div", {
|
|
441
445
|
className: "mb-5 flex flex-wrap items-center gap-3",
|
|
442
|
-
children: [/* @__PURE__ */ p(
|
|
443
|
-
options:
|
|
444
|
-
value:
|
|
446
|
+
children: [/* @__PURE__ */ p(ve, {
|
|
447
|
+
options: Qe,
|
|
448
|
+
value: E,
|
|
445
449
|
onChange: (e) => {
|
|
446
|
-
|
|
450
|
+
Be(e), O.reset();
|
|
447
451
|
}
|
|
448
452
|
}), /* @__PURE__ */ m(v, {
|
|
449
|
-
value:
|
|
453
|
+
value: D,
|
|
450
454
|
onValueChange: (e) => {
|
|
451
|
-
|
|
455
|
+
Ve(e), O.reset();
|
|
452
456
|
},
|
|
453
457
|
children: [/* @__PURE__ */ p(x, {
|
|
454
458
|
className: "w-56",
|
|
@@ -457,7 +461,7 @@ function T() {
|
|
|
457
461
|
}), /* @__PURE__ */ m(y, { children: [/* @__PURE__ */ p(b, {
|
|
458
462
|
value: "ALL",
|
|
459
463
|
children: "All contracts"
|
|
460
|
-
}),
|
|
464
|
+
}), U.map((e) => /* @__PURE__ */ m(b, {
|
|
461
465
|
value: e.id,
|
|
462
466
|
children: [
|
|
463
467
|
e.reference,
|
|
@@ -467,41 +471,41 @@ function T() {
|
|
|
467
471
|
}, e.id))] })]
|
|
468
472
|
})]
|
|
469
473
|
}),
|
|
470
|
-
|
|
474
|
+
Ge ? /* @__PURE__ */ p(re, { label: "Loading shipments…" }) : Ke ? /* @__PURE__ */ p(ne, {
|
|
471
475
|
message: "Couldn't load shipments.",
|
|
472
|
-
onRetry: () =>
|
|
473
|
-
}) :
|
|
476
|
+
onRetry: () => qe()
|
|
477
|
+
}) : q.length === 0 ? /* @__PURE__ */ p(ie, {
|
|
474
478
|
illustration: "empty-data",
|
|
475
|
-
icon: /* @__PURE__ */ p(
|
|
479
|
+
icon: /* @__PURE__ */ p(d, { className: "h-10 w-10" }),
|
|
476
480
|
title: $ ? "No matching shipments" : "No shipments yet",
|
|
477
481
|
description: $ ? "No shipments match these filters. Try a different status or contract." : "Schedule your first shipment to start tracking cargo against your offtake contracts.",
|
|
478
482
|
action: /* @__PURE__ */ m(h, {
|
|
479
|
-
onClick: () =>
|
|
480
|
-
children: [/* @__PURE__ */ p(
|
|
483
|
+
onClick: () => k(!0),
|
|
484
|
+
children: [/* @__PURE__ */ p(u, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
|
|
481
485
|
})
|
|
482
|
-
}) : /* @__PURE__ */ m(
|
|
483
|
-
columns:
|
|
484
|
-
rows:
|
|
486
|
+
}) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(te, {
|
|
487
|
+
columns: nt,
|
|
488
|
+
rows: q,
|
|
485
489
|
rowKey: (e) => e.id,
|
|
486
490
|
defaultSort: {
|
|
487
491
|
key: "scheduledAt",
|
|
488
492
|
dir: "desc"
|
|
489
493
|
}
|
|
490
|
-
}), /* @__PURE__ */ p(
|
|
491
|
-
page:
|
|
494
|
+
}), /* @__PURE__ */ p(ye, {
|
|
495
|
+
page: O.page,
|
|
492
496
|
pageSize: C,
|
|
493
|
-
itemCount:
|
|
494
|
-
hasMore:
|
|
495
|
-
onPageChange:
|
|
497
|
+
itemCount: q.length,
|
|
498
|
+
hasMore: B?.pageInfo?.hasMore ?? !1,
|
|
499
|
+
onPageChange: O.onPageChange
|
|
496
500
|
})] }),
|
|
497
|
-
/* @__PURE__ */ p(
|
|
498
|
-
open:
|
|
501
|
+
/* @__PURE__ */ p(Ee, {
|
|
502
|
+
open: He,
|
|
499
503
|
onOpenChange: (e) => {
|
|
500
|
-
|
|
504
|
+
k(e), e || Q();
|
|
501
505
|
},
|
|
502
|
-
children: /* @__PURE__ */ m(
|
|
506
|
+
children: /* @__PURE__ */ m(De, { children: [/* @__PURE__ */ m(Ae, { children: [/* @__PURE__ */ p(je, { children: "Schedule shipment" }), /* @__PURE__ */ p(Oe, { children: "Book a cargo movement against an offtake contract and track it to delivery." })] }), /* @__PURE__ */ m("form", {
|
|
503
507
|
onSubmit: (e) => {
|
|
504
|
-
e.preventDefault(),
|
|
508
|
+
e.preventDefault(), tt();
|
|
505
509
|
},
|
|
506
510
|
children: [/* @__PURE__ */ m("div", {
|
|
507
511
|
className: "grid gap-4 py-2",
|
|
@@ -512,10 +516,10 @@ function T() {
|
|
|
512
516
|
htmlFor: "shipContract",
|
|
513
517
|
children: "Contract *"
|
|
514
518
|
}), /* @__PURE__ */ m(v, {
|
|
515
|
-
value:
|
|
519
|
+
value: A.contractId,
|
|
516
520
|
onValueChange: (e) => {
|
|
517
|
-
let t =
|
|
518
|
-
|
|
521
|
+
let t = W.get(e);
|
|
522
|
+
j((n) => ({
|
|
519
523
|
...n,
|
|
520
524
|
contractId: e,
|
|
521
525
|
unit: t?.unit ?? n.unit
|
|
@@ -524,11 +528,11 @@ function T() {
|
|
|
524
528
|
children: [/* @__PURE__ */ p(x, {
|
|
525
529
|
id: "shipContract",
|
|
526
530
|
children: /* @__PURE__ */ p(S, { placeholder: "Select a contract" })
|
|
527
|
-
}), /* @__PURE__ */ p(y, { children:
|
|
531
|
+
}), /* @__PURE__ */ p(y, { children: U.length === 0 ? /* @__PURE__ */ p(b, {
|
|
528
532
|
value: "none",
|
|
529
533
|
disabled: !0,
|
|
530
534
|
children: "No contracts available"
|
|
531
|
-
}) :
|
|
535
|
+
}) : U.map((e) => /* @__PURE__ */ m(b, {
|
|
532
536
|
value: e.id,
|
|
533
537
|
children: [
|
|
534
538
|
e.reference,
|
|
@@ -547,9 +551,9 @@ function T() {
|
|
|
547
551
|
children: "Reference *"
|
|
548
552
|
}), /* @__PURE__ */ p(g, {
|
|
549
553
|
id: "shipRef",
|
|
550
|
-
value:
|
|
551
|
-
onChange: (e) =>
|
|
552
|
-
...
|
|
554
|
+
value: A.reference,
|
|
555
|
+
onChange: (e) => j({
|
|
556
|
+
...A,
|
|
553
557
|
reference: e.target.value
|
|
554
558
|
}),
|
|
555
559
|
placeholder: "SHP-2026-0142"
|
|
@@ -560,15 +564,15 @@ function T() {
|
|
|
560
564
|
htmlFor: "shipMode",
|
|
561
565
|
children: "Mode"
|
|
562
566
|
}), /* @__PURE__ */ m(v, {
|
|
563
|
-
value:
|
|
564
|
-
onValueChange: (e) =>
|
|
565
|
-
...
|
|
567
|
+
value: A.mode,
|
|
568
|
+
onValueChange: (e) => j({
|
|
569
|
+
...A,
|
|
566
570
|
mode: e
|
|
567
571
|
}),
|
|
568
572
|
children: [/* @__PURE__ */ p(x, {
|
|
569
573
|
id: "shipMode",
|
|
570
574
|
children: /* @__PURE__ */ p(S, {})
|
|
571
|
-
}), /* @__PURE__ */ p(y, { children:
|
|
575
|
+
}), /* @__PURE__ */ p(y, { children: Pe.map((e) => /* @__PURE__ */ p(b, {
|
|
572
576
|
value: e,
|
|
573
577
|
children: r(e)
|
|
574
578
|
}, e)) })]
|
|
@@ -584,9 +588,9 @@ function T() {
|
|
|
584
588
|
children: "Origin"
|
|
585
589
|
}), /* @__PURE__ */ p(g, {
|
|
586
590
|
id: "shipOrigin",
|
|
587
|
-
value:
|
|
588
|
-
onChange: (e) =>
|
|
589
|
-
...
|
|
591
|
+
value: A.origin,
|
|
592
|
+
onChange: (e) => j({
|
|
593
|
+
...A,
|
|
590
594
|
origin: e.target.value
|
|
591
595
|
}),
|
|
592
596
|
placeholder: "Ras Tanura Terminal"
|
|
@@ -598,9 +602,9 @@ function T() {
|
|
|
598
602
|
children: "Destination"
|
|
599
603
|
}), /* @__PURE__ */ p(g, {
|
|
600
604
|
id: "shipDest",
|
|
601
|
-
value:
|
|
602
|
-
onChange: (e) =>
|
|
603
|
-
...
|
|
605
|
+
value: A.destination,
|
|
606
|
+
onChange: (e) => j({
|
|
607
|
+
...A,
|
|
604
608
|
destination: e.target.value
|
|
605
609
|
}),
|
|
606
610
|
placeholder: "Rotterdam"
|
|
@@ -620,9 +624,9 @@ function T() {
|
|
|
620
624
|
type: "number",
|
|
621
625
|
min: "0",
|
|
622
626
|
step: "any",
|
|
623
|
-
value:
|
|
624
|
-
onChange: (e) =>
|
|
625
|
-
...
|
|
627
|
+
value: A.volume,
|
|
628
|
+
onChange: (e) => j({
|
|
629
|
+
...A,
|
|
626
630
|
volume: e.target.value
|
|
627
631
|
}),
|
|
628
632
|
placeholder: "500000"
|
|
@@ -634,15 +638,15 @@ function T() {
|
|
|
634
638
|
htmlFor: "shipUnit",
|
|
635
639
|
children: "Unit"
|
|
636
640
|
}), /* @__PURE__ */ m(v, {
|
|
637
|
-
value:
|
|
638
|
-
onValueChange: (e) =>
|
|
639
|
-
...
|
|
641
|
+
value: A.unit,
|
|
642
|
+
onValueChange: (e) => j({
|
|
643
|
+
...A,
|
|
640
644
|
unit: e
|
|
641
645
|
}),
|
|
642
646
|
children: [/* @__PURE__ */ p(x, {
|
|
643
647
|
id: "shipUnit",
|
|
644
648
|
children: /* @__PURE__ */ p(S, {})
|
|
645
|
-
}), /* @__PURE__ */ p(y, { children:
|
|
649
|
+
}), /* @__PURE__ */ p(y, { children: Fe.map((e) => /* @__PURE__ */ p(b, {
|
|
646
650
|
value: e,
|
|
647
651
|
children: r(e)
|
|
648
652
|
}, e)) })]
|
|
@@ -656,9 +660,9 @@ function T() {
|
|
|
656
660
|
}), /* @__PURE__ */ p(g, {
|
|
657
661
|
id: "shipScheduled",
|
|
658
662
|
type: "date",
|
|
659
|
-
value:
|
|
660
|
-
onChange: (e) =>
|
|
661
|
-
...
|
|
663
|
+
value: A.scheduledAt,
|
|
664
|
+
onChange: (e) => j({
|
|
665
|
+
...A,
|
|
662
666
|
scheduledAt: e.target.value
|
|
663
667
|
})
|
|
664
668
|
})]
|
|
@@ -672,19 +676,19 @@ function T() {
|
|
|
672
676
|
children: "Carrier"
|
|
673
677
|
}), /* @__PURE__ */ p(g, {
|
|
674
678
|
id: "shipCarrier",
|
|
675
|
-
value:
|
|
676
|
-
onChange: (e) =>
|
|
677
|
-
...
|
|
679
|
+
value: A.carrier,
|
|
680
|
+
onChange: (e) => j({
|
|
681
|
+
...A,
|
|
678
682
|
carrier: e.target.value
|
|
679
683
|
}),
|
|
680
684
|
placeholder: "Frontline Ltd."
|
|
681
685
|
})]
|
|
682
686
|
}),
|
|
683
|
-
/* @__PURE__ */ p(
|
|
687
|
+
/* @__PURE__ */ p(be, {
|
|
684
688
|
id: "shipDocument",
|
|
685
689
|
label: "Bill of lading (optional)",
|
|
686
|
-
value:
|
|
687
|
-
onChange:
|
|
690
|
+
value: M,
|
|
691
|
+
onChange: N,
|
|
688
692
|
hint: "Attach the bill of lading or shipping document (PDF or image)."
|
|
689
693
|
}),
|
|
690
694
|
/* @__PURE__ */ m("div", {
|
|
@@ -692,33 +696,33 @@ function T() {
|
|
|
692
696
|
children: [/* @__PURE__ */ p(_, {
|
|
693
697
|
htmlFor: "shipNotes",
|
|
694
698
|
children: "Notes"
|
|
695
|
-
}), /* @__PURE__ */ p(
|
|
699
|
+
}), /* @__PURE__ */ p(Me, {
|
|
696
700
|
id: "shipNotes",
|
|
697
|
-
value:
|
|
698
|
-
onChange: (e) =>
|
|
699
|
-
...
|
|
701
|
+
value: A.notes,
|
|
702
|
+
onChange: (e) => j({
|
|
703
|
+
...A,
|
|
700
704
|
notes: e.target.value
|
|
701
705
|
}),
|
|
702
706
|
placeholder: "Optional context — laycan window, inspector, terms.",
|
|
703
707
|
rows: 2
|
|
704
708
|
})]
|
|
705
709
|
}),
|
|
706
|
-
|
|
710
|
+
P && /* @__PURE__ */ p("p", {
|
|
707
711
|
className: "text-sm text-status-error-text",
|
|
708
|
-
children:
|
|
712
|
+
children: P
|
|
709
713
|
})
|
|
710
714
|
]
|
|
711
|
-
}), /* @__PURE__ */ m(
|
|
715
|
+
}), /* @__PURE__ */ m(ke, { children: [/* @__PURE__ */ p(h, {
|
|
712
716
|
type: "button",
|
|
713
717
|
variant: "outline",
|
|
714
718
|
onClick: () => {
|
|
715
|
-
|
|
719
|
+
k(!1), Q();
|
|
716
720
|
},
|
|
717
721
|
children: "Cancel"
|
|
718
722
|
}), /* @__PURE__ */ p(h, {
|
|
719
723
|
type: "submit",
|
|
720
|
-
disabled:
|
|
721
|
-
children:
|
|
724
|
+
disabled: G.isPending,
|
|
725
|
+
children: G.isPending ? "Scheduling…" : "Schedule shipment"
|
|
722
726
|
})] })]
|
|
723
727
|
})] })
|
|
724
728
|
})
|