@burdenoff/microfe-theglobalfuel 2026.705.5 → 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/index.js +3 -1
- 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 +4 -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 +46 -0
- package/dist/theglobalfuel/hooks/useTheAnalytics.js.map +1 -0
- 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/index.js +2 -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 +395 -353
- 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 +152 -146
- 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 +237 -231
- 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 +255 -250
- 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 +225 -0
- package/dist/theglobalfuel/services/assistantApi.js.map +1 -0
- 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 +120 -0
- package/dist/theglobalfuel/services/createSandboxAssistantTransport.js.map +1 -0
- 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/pageContext.js +65 -0
- package/dist/theglobalfuel/utils/pageContext.js.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 +5 -1
- package/dist/node_modules/clsx/dist/clsx.js +0 -18
- package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -1716
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
|
@@ -6,36 +6,40 @@ import { StatusBadge as c } from "../../components/StatusBadge.js";
|
|
|
6
6
|
import { MiniBar as te } from "../../components/MiniBar.js";
|
|
7
7
|
import { DataTable as ne } from "../../components/DataTable.js";
|
|
8
8
|
import { ErrorView as re, LoadingView as ie, Section as ae } from "../../components/StateViews.js";
|
|
9
|
-
import { EmptyState as
|
|
9
|
+
import { EmptyState as oe } from "../../components/EmptyState.js";
|
|
10
10
|
import "../../context/index.js";
|
|
11
|
-
import { useTheContract as
|
|
12
|
-
import {
|
|
11
|
+
import { useTheContract as se, useTheDeliverShipment as ce, useTheScheduleShipment as le, useTheShipments as ue, useTheTransitionContract as de, useTheUpdateContract as fe } from "../../hooks/useTheGlobalFuelApi.js";
|
|
12
|
+
import { useCursorPager as pe } from "../../hooks/useCursorPager.js";
|
|
13
|
+
import { useNotify as me } from "../../hooks/useNotify.js";
|
|
14
|
+
import { useThePageView as he } from "../../hooks/useThePageView.js";
|
|
15
|
+
import { useTheNativeControls as ge } from "../../hooks/useTheNativeControls.js";
|
|
13
16
|
import "../../hooks/index.js";
|
|
14
|
-
import { CONTRACT_TRANSITIONS as
|
|
15
|
-
import { Tabs as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
17
|
+
import { CONTRACT_TRANSITIONS as _e, nextStatuses as ve } from "../../utils/transitions.js";
|
|
18
|
+
import { Tabs as ye } from "../../components/Tabs.js";
|
|
19
|
+
import { Pagination as be } from "../../components/Pagination.js";
|
|
20
|
+
import { EvidenceUpload as xe } from "../../components/EvidenceUpload.js";
|
|
21
|
+
import { FileLink as Se } from "../../components/FileLink.js";
|
|
22
|
+
import { TheDiscussion as Ce } from "../../components/TheDiscussion.js";
|
|
23
|
+
import { TheTags as we } from "../../components/TheTags.js";
|
|
24
|
+
import { useState as l } from "react";
|
|
25
|
+
import { ArrowLeft as Te, Building2 as Ee, Calendar as De, CheckCircle2 as Oe, Coins as ke, FileSignature as Ae, Gauge as je, MapPin as Me, MessageSquare as Ne, Package as Pe, Pencil as Fe, Plus as u, Ship as d, Tag as Ie } from "lucide-react";
|
|
26
|
+
import { useParams as Le } from "react-router-dom";
|
|
27
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
28
|
+
import { Button as h, GlassCard as g, Input as _, Label as v, ResponsiveDialog as y, ResponsiveDialogContent as b, ResponsiveDialogDescription as x, ResponsiveDialogFooter as S, ResponsiveDialogHeader as C, ResponsiveDialogTitle as w, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k, Textarea as A } from "@burdenoff/fe-libs/ui";
|
|
25
29
|
//#region src/theglobalfuel/pages/contracts/ContractDetailPage.tsx
|
|
26
|
-
var
|
|
30
|
+
var Re = [
|
|
27
31
|
"FIXED",
|
|
28
32
|
"INDEX_LINKED",
|
|
29
33
|
"FORMULA",
|
|
30
34
|
"SPOT"
|
|
31
|
-
],
|
|
35
|
+
], ze = [
|
|
32
36
|
"PIPELINE",
|
|
33
37
|
"TANKER",
|
|
34
38
|
"VESSEL_BULK",
|
|
35
39
|
"RAIL",
|
|
36
40
|
"TRUCK",
|
|
37
41
|
"GRID"
|
|
38
|
-
],
|
|
42
|
+
], Be = [
|
|
39
43
|
"BARRELS",
|
|
40
44
|
"CUBIC_METERS",
|
|
41
45
|
"TONNES",
|
|
@@ -43,11 +47,11 @@ var Me = [
|
|
|
43
47
|
"MWH",
|
|
44
48
|
"GJ",
|
|
45
49
|
"MCF"
|
|
46
|
-
],
|
|
50
|
+
], Ve = new Set([
|
|
47
51
|
"SCHEDULED",
|
|
48
52
|
"LOADING",
|
|
49
53
|
"IN_TRANSIT"
|
|
50
|
-
]),
|
|
54
|
+
]), j = 25, He = (e) => Math.max(0, Math.min(100, e)), Ue = (e) => e ? e.slice(0, 10) : "", M = (e) => ({
|
|
51
55
|
reference: "",
|
|
52
56
|
mode: "VESSEL_BULK",
|
|
53
57
|
carrier: "",
|
|
@@ -58,130 +62,137 @@ var Me = [
|
|
|
58
62
|
scheduledAt: "",
|
|
59
63
|
notes: ""
|
|
60
64
|
});
|
|
61
|
-
function
|
|
62
|
-
let { id:
|
|
63
|
-
|
|
65
|
+
function N() {
|
|
66
|
+
let { id: N } = Le(), { navigateTo: P } = e(), F = me();
|
|
67
|
+
he("contract-detail");
|
|
68
|
+
let { haptic: We } = ge(), { data: I, isLoading: Ge, isError: Ke, refetch: qe } = se(N), L = fe(), Je = de(), R = le(), Ye = ce(), z = pe(), B = ue(N, void 0, {
|
|
69
|
+
limit: j,
|
|
70
|
+
offset: z.page * j
|
|
71
|
+
}), [V, Xe] = l("shipments"), [Ze, H] = l(!1), [U, W] = l(null), [Qe, G] = l(!1), [K, q] = l(M("BARRELS")), [$e, J] = l(null), [Y, X] = l(null);
|
|
72
|
+
if (Ge) return /* @__PURE__ */ p(t, {
|
|
64
73
|
title: "Contract",
|
|
65
|
-
|
|
74
|
+
dataTour: "theglobalfuel-contract-detail-page",
|
|
75
|
+
children: /* @__PURE__ */ p(ie, {})
|
|
66
76
|
});
|
|
67
|
-
if (
|
|
77
|
+
if (Ke || !I) return /* @__PURE__ */ p(t, {
|
|
68
78
|
title: "Contract",
|
|
69
|
-
|
|
79
|
+
dataTour: "theglobalfuel-contract-detail-page",
|
|
80
|
+
actions: /* @__PURE__ */ m(h, {
|
|
70
81
|
variant: "ghost",
|
|
71
|
-
onClick: () =>
|
|
72
|
-
children: [/* @__PURE__ */
|
|
82
|
+
onClick: () => P("contracts"),
|
|
83
|
+
children: [/* @__PURE__ */ p(Te, { className: "mr-1.5 h-4 w-4" }), " Back"]
|
|
73
84
|
}),
|
|
74
|
-
children:
|
|
85
|
+
children: Ke ? /* @__PURE__ */ p(re, {
|
|
75
86
|
message: "This contract could not be loaded.",
|
|
76
|
-
onRetry: () =>
|
|
77
|
-
}) : /* @__PURE__ */
|
|
87
|
+
onRetry: () => qe()
|
|
88
|
+
}) : /* @__PURE__ */ p(oe, {
|
|
78
89
|
illustration: "empty-search",
|
|
79
|
-
icon: /* @__PURE__ */
|
|
90
|
+
icon: /* @__PURE__ */ p(Ae, { className: "h-10 w-10" }),
|
|
80
91
|
title: "Contract not found",
|
|
81
92
|
description: "This contract may have been removed or you may not have access to it.",
|
|
82
|
-
action: /* @__PURE__ */ h
|
|
83
|
-
onClick: () =>
|
|
93
|
+
action: /* @__PURE__ */ p(h, {
|
|
94
|
+
onClick: () => P("contracts"),
|
|
84
95
|
children: "Back to contracts"
|
|
85
96
|
})
|
|
86
97
|
})
|
|
87
98
|
});
|
|
88
|
-
let
|
|
89
|
-
|
|
90
|
-
counterparty:
|
|
91
|
-
pricingBasis:
|
|
92
|
-
pricePerUnit:
|
|
93
|
-
priceIndex:
|
|
94
|
-
currency:
|
|
95
|
-
contractedVolume:
|
|
96
|
-
unit:
|
|
97
|
-
deliveryLocation:
|
|
98
|
-
startDate:
|
|
99
|
-
endDate:
|
|
100
|
-
notes:
|
|
101
|
-
}),
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
e !==
|
|
106
|
-
id:
|
|
99
|
+
let Z = B.data?.items ?? [], et = I.contractedVolume > 0 ? He(I.deliveredVolume / I.contractedVolume * 100) : 0, Q = ve(_e, I.status), tt = () => {
|
|
100
|
+
W({
|
|
101
|
+
counterparty: I.counterparty,
|
|
102
|
+
pricingBasis: I.pricingBasis,
|
|
103
|
+
pricePerUnit: I.pricePerUnit ? String(I.pricePerUnit) : "",
|
|
104
|
+
priceIndex: I.priceIndex ?? "",
|
|
105
|
+
currency: I.currency,
|
|
106
|
+
contractedVolume: I.contractedVolume ? String(I.contractedVolume) : "",
|
|
107
|
+
unit: I.unit,
|
|
108
|
+
deliveryLocation: I.deliveryLocation ?? "",
|
|
109
|
+
startDate: Ue(I.startDate),
|
|
110
|
+
endDate: Ue(I.endDate),
|
|
111
|
+
notes: I.notes ?? ""
|
|
112
|
+
}), X(null), H(!0);
|
|
113
|
+
}, $ = () => {
|
|
114
|
+
We("light"), q(M(I.unit)), J(null), X(null), G(!0);
|
|
115
|
+
}, nt = (e) => {
|
|
116
|
+
e !== I.status && (X(null), Je.mutate({
|
|
117
|
+
id: I.id,
|
|
107
118
|
status: e
|
|
108
119
|
}, {
|
|
109
|
-
onSuccess: () =>
|
|
120
|
+
onSuccess: () => F.success("Contract status updated"),
|
|
110
121
|
onError: (e) => {
|
|
111
|
-
|
|
122
|
+
X(e instanceof Error ? e.message : "Failed to update contract status."), F.fromError(e);
|
|
112
123
|
}
|
|
113
124
|
}));
|
|
114
|
-
},
|
|
115
|
-
if (
|
|
116
|
-
if (!
|
|
117
|
-
|
|
125
|
+
}, rt = async () => {
|
|
126
|
+
if (U) {
|
|
127
|
+
if (!U.counterparty.trim()) {
|
|
128
|
+
X("Counterparty is required.");
|
|
118
129
|
return;
|
|
119
130
|
}
|
|
120
|
-
|
|
131
|
+
X(null);
|
|
121
132
|
try {
|
|
122
|
-
await
|
|
123
|
-
id:
|
|
133
|
+
await L.mutateAsync({
|
|
134
|
+
id: I.id,
|
|
124
135
|
input: {
|
|
125
|
-
counterparty:
|
|
126
|
-
pricingBasis:
|
|
127
|
-
pricePerUnit:
|
|
128
|
-
priceIndex:
|
|
129
|
-
currency:
|
|
130
|
-
contractedVolume:
|
|
131
|
-
unit:
|
|
132
|
-
deliveryLocation:
|
|
133
|
-
startDate: s(
|
|
134
|
-
endDate: s(
|
|
135
|
-
notes:
|
|
136
|
+
counterparty: U.counterparty.trim(),
|
|
137
|
+
pricingBasis: U.pricingBasis,
|
|
138
|
+
pricePerUnit: U.pricePerUnit ? Number(U.pricePerUnit) : null,
|
|
139
|
+
priceIndex: U.priceIndex.trim() || null,
|
|
140
|
+
currency: U.currency.trim().toUpperCase() || "USD",
|
|
141
|
+
contractedVolume: U.contractedVolume ? Number(U.contractedVolume) : null,
|
|
142
|
+
unit: U.unit,
|
|
143
|
+
deliveryLocation: U.deliveryLocation.trim() || null,
|
|
144
|
+
startDate: s(U.startDate) ?? null,
|
|
145
|
+
endDate: s(U.endDate) ?? null,
|
|
146
|
+
notes: U.notes.trim() || null
|
|
136
147
|
}
|
|
137
|
-
}),
|
|
148
|
+
}), F.success("Contract updated"), H(!1);
|
|
138
149
|
} catch (e) {
|
|
139
|
-
|
|
150
|
+
X(e instanceof Error ? e.message : "Failed to update contract."), F.fromError(e);
|
|
140
151
|
}
|
|
141
152
|
}
|
|
142
|
-
},
|
|
143
|
-
if (!
|
|
144
|
-
|
|
153
|
+
}, it = async () => {
|
|
154
|
+
if (!K.reference.trim()) {
|
|
155
|
+
X("Shipment reference is required.");
|
|
145
156
|
return;
|
|
146
157
|
}
|
|
147
|
-
let e = Number(
|
|
148
|
-
if (!
|
|
149
|
-
|
|
158
|
+
let e = Number(K.volume);
|
|
159
|
+
if (!K.volume || Number.isNaN(e) || e <= 0) {
|
|
160
|
+
X("Enter a volume greater than zero."), F.error("Enter a volume greater than zero.");
|
|
150
161
|
return;
|
|
151
162
|
}
|
|
152
|
-
|
|
163
|
+
X(null);
|
|
153
164
|
try {
|
|
154
|
-
await
|
|
155
|
-
contractId:
|
|
156
|
-
reference:
|
|
157
|
-
mode:
|
|
158
|
-
carrier:
|
|
159
|
-
origin:
|
|
160
|
-
destination:
|
|
165
|
+
await R.mutateAsync({
|
|
166
|
+
contractId: I.id,
|
|
167
|
+
reference: K.reference.trim(),
|
|
168
|
+
mode: K.mode,
|
|
169
|
+
carrier: K.carrier.trim() || null,
|
|
170
|
+
origin: K.origin.trim() || null,
|
|
171
|
+
destination: K.destination.trim() || null,
|
|
161
172
|
volume: e,
|
|
162
|
-
unit:
|
|
163
|
-
scheduledAt: s(
|
|
164
|
-
documentFileId:
|
|
165
|
-
notes:
|
|
166
|
-
}),
|
|
173
|
+
unit: K.unit,
|
|
174
|
+
scheduledAt: s(K.scheduledAt) ?? null,
|
|
175
|
+
documentFileId: $e?.fileId ?? null,
|
|
176
|
+
notes: K.notes.trim() || null
|
|
177
|
+
}), F.success("Shipment scheduled"), G(!1);
|
|
167
178
|
} catch (e) {
|
|
168
|
-
|
|
179
|
+
X(e instanceof Error ? e.message : "Failed to schedule shipment."), F.fromError(e);
|
|
169
180
|
}
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
onSuccess: () =>
|
|
181
|
+
}, at = (e) => {
|
|
182
|
+
X(null), Ye.mutate(e, {
|
|
183
|
+
onSuccess: () => F.success("Shipment delivered"),
|
|
173
184
|
onError: (e) => {
|
|
174
|
-
|
|
185
|
+
X(e instanceof Error ? e.message : "Failed to mark shipment delivered."), F.fromError(e);
|
|
175
186
|
}
|
|
176
187
|
});
|
|
177
|
-
},
|
|
188
|
+
}, ot = [
|
|
178
189
|
{
|
|
179
190
|
key: "reference",
|
|
180
191
|
header: "Shipment",
|
|
181
|
-
render: (e) => /* @__PURE__ */
|
|
192
|
+
render: (e) => /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
182
193
|
className: "font-medium text-text-primary",
|
|
183
194
|
children: e.reference
|
|
184
|
-
}), /* @__PURE__ */
|
|
195
|
+
}), /* @__PURE__ */ p("p", {
|
|
185
196
|
className: "text-xs text-text-tertiary",
|
|
186
197
|
children: i(e.mode)
|
|
187
198
|
})] })
|
|
@@ -189,13 +200,13 @@ function F() {
|
|
|
189
200
|
{
|
|
190
201
|
key: "status",
|
|
191
202
|
header: "Status",
|
|
192
|
-
render: (e) => /* @__PURE__ */
|
|
203
|
+
render: (e) => /* @__PURE__ */ p(c, { status: e.status })
|
|
193
204
|
},
|
|
194
205
|
{
|
|
195
206
|
key: "carrier",
|
|
196
207
|
header: "Carrier",
|
|
197
208
|
hideOnMobile: !0,
|
|
198
|
-
render: (e) => /* @__PURE__ */
|
|
209
|
+
render: (e) => /* @__PURE__ */ p("span", {
|
|
199
210
|
className: "text-text-secondary",
|
|
200
211
|
children: e.carrier ?? "—"
|
|
201
212
|
})
|
|
@@ -204,19 +215,19 @@ function F() {
|
|
|
204
215
|
key: "route",
|
|
205
216
|
header: "Route",
|
|
206
217
|
hideOnMobile: !0,
|
|
207
|
-
render: (e) => e.origin || e.destination ? /* @__PURE__ */
|
|
218
|
+
render: (e) => e.origin || e.destination ? /* @__PURE__ */ m("span", {
|
|
208
219
|
className: "text-text-secondary",
|
|
209
220
|
children: [
|
|
210
221
|
e.origin ?? "—",
|
|
211
222
|
" ",
|
|
212
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ p("span", {
|
|
213
224
|
className: "text-text-tertiary",
|
|
214
225
|
children: "→"
|
|
215
226
|
}),
|
|
216
227
|
" ",
|
|
217
228
|
e.destination ?? "—"
|
|
218
229
|
]
|
|
219
|
-
}) : /* @__PURE__ */
|
|
230
|
+
}) : /* @__PURE__ */ p("span", {
|
|
220
231
|
className: "text-text-tertiary",
|
|
221
232
|
children: "—"
|
|
222
233
|
})
|
|
@@ -226,7 +237,7 @@ function F() {
|
|
|
226
237
|
header: "Volume",
|
|
227
238
|
align: "right",
|
|
228
239
|
sortValue: (e) => e.volume,
|
|
229
|
-
render: (e) => /* @__PURE__ */
|
|
240
|
+
render: (e) => /* @__PURE__ */ p("span", {
|
|
230
241
|
className: "tabular-nums text-text-secondary",
|
|
231
242
|
children: o(e.volume, e.unit)
|
|
232
243
|
})
|
|
@@ -235,7 +246,7 @@ function F() {
|
|
|
235
246
|
key: "schedule",
|
|
236
247
|
header: "Scheduled",
|
|
237
248
|
hideOnMobile: !0,
|
|
238
|
-
render: (e) => /* @__PURE__ */
|
|
249
|
+
render: (e) => /* @__PURE__ */ p("span", {
|
|
239
250
|
className: "text-text-tertiary",
|
|
240
251
|
children: r(e.scheduledAt)
|
|
241
252
|
})
|
|
@@ -244,7 +255,7 @@ function F() {
|
|
|
244
255
|
key: "document",
|
|
245
256
|
header: "Document",
|
|
246
257
|
hideOnMobile: !0,
|
|
247
|
-
render: (e) => e.document?.id ? /* @__PURE__ */
|
|
258
|
+
render: (e) => e.document?.id ? /* @__PURE__ */ p(Se, { fileId: e.document.id }) : /* @__PURE__ */ p("span", {
|
|
248
259
|
className: "text-text-tertiary",
|
|
249
260
|
children: "—"
|
|
250
261
|
})
|
|
@@ -253,543 +264,553 @@ function F() {
|
|
|
253
264
|
key: "action",
|
|
254
265
|
header: "",
|
|
255
266
|
align: "right",
|
|
256
|
-
render: (e) =>
|
|
267
|
+
render: (e) => Ve.has(e.status) ? /* @__PURE__ */ m(h, {
|
|
257
268
|
size: "sm",
|
|
258
269
|
variant: "outline",
|
|
259
|
-
onClick: () =>
|
|
260
|
-
disabled:
|
|
261
|
-
children: [/* @__PURE__ */
|
|
270
|
+
onClick: () => at(e.id),
|
|
271
|
+
disabled: Ye.isPending,
|
|
272
|
+
children: [/* @__PURE__ */ p(Oe, { className: "mr-1.5 h-4 w-4" }), " Mark delivered"]
|
|
262
273
|
}) : null
|
|
263
274
|
}
|
|
264
|
-
],
|
|
275
|
+
], st = [
|
|
265
276
|
{
|
|
266
277
|
value: "shipments",
|
|
267
278
|
label: "Shipments",
|
|
268
|
-
icon: /* @__PURE__ */
|
|
269
|
-
count:
|
|
279
|
+
icon: /* @__PURE__ */ p(d, { className: "h-4 w-4" }),
|
|
280
|
+
count: Z.length
|
|
270
281
|
},
|
|
271
282
|
{
|
|
272
283
|
value: "tags",
|
|
273
284
|
label: "Tags",
|
|
274
|
-
icon: /* @__PURE__ */
|
|
285
|
+
icon: /* @__PURE__ */ p(Ie, { className: "h-4 w-4" })
|
|
275
286
|
},
|
|
276
287
|
{
|
|
277
288
|
value: "discussion",
|
|
278
289
|
label: "Discussion",
|
|
279
|
-
icon: /* @__PURE__ */
|
|
290
|
+
icon: /* @__PURE__ */ p(Ne, { className: "h-4 w-4" })
|
|
280
291
|
}
|
|
281
|
-
],
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
-
title:
|
|
284
|
-
description: `${
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
+
], ct = I.startDate || I.endDate ? `${r(I.startDate)} – ${r(I.endDate)}` : "—";
|
|
293
|
+
return /* @__PURE__ */ m(t, {
|
|
294
|
+
title: I.reference,
|
|
295
|
+
description: `${I.counterparty} · ${i(I.commodity)}`,
|
|
296
|
+
dataTour: "theglobalfuel-contract-detail-page",
|
|
297
|
+
actions: /* @__PURE__ */ m(f, { children: [
|
|
298
|
+
/* @__PURE__ */ p(c, { status: I.status }),
|
|
299
|
+
/* @__PURE__ */ m(T, {
|
|
300
|
+
value: I.status,
|
|
301
|
+
onValueChange: (e) => nt(e),
|
|
302
|
+
disabled: Q.length === 0,
|
|
303
|
+
children: [/* @__PURE__ */ p(O, {
|
|
292
304
|
className: "h-9 w-40",
|
|
293
305
|
"aria-label": "Change contract status",
|
|
294
|
-
children: /* @__PURE__ */
|
|
295
|
-
}), /* @__PURE__ */
|
|
296
|
-
value:
|
|
306
|
+
children: /* @__PURE__ */ p(k, {})
|
|
307
|
+
}), /* @__PURE__ */ m(E, { children: [/* @__PURE__ */ p(D, {
|
|
308
|
+
value: I.status,
|
|
297
309
|
disabled: !0,
|
|
298
|
-
children: i(
|
|
299
|
-
}),
|
|
310
|
+
children: i(I.status)
|
|
311
|
+
}), Q.map((e) => /* @__PURE__ */ p(D, {
|
|
300
312
|
value: e,
|
|
301
313
|
children: i(e)
|
|
302
314
|
}, e))] })]
|
|
303
315
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ m(h, {
|
|
305
317
|
variant: "outline",
|
|
306
|
-
onClick:
|
|
307
|
-
children: [/* @__PURE__ */
|
|
318
|
+
onClick: tt,
|
|
319
|
+
children: [/* @__PURE__ */ p(Fe, { className: "mr-1.5 h-4 w-4" }), " Edit"]
|
|
308
320
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ m(h, {
|
|
310
322
|
variant: "ghost",
|
|
311
|
-
onClick: () =>
|
|
312
|
-
children: [/* @__PURE__ */
|
|
323
|
+
onClick: () => P("contracts"),
|
|
324
|
+
children: [/* @__PURE__ */ p(Te, { className: "mr-1.5 h-4 w-4" }), " Back"]
|
|
313
325
|
})
|
|
314
326
|
] }),
|
|
315
327
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ m("div", {
|
|
317
329
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
318
330
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
icon: /* @__PURE__ */
|
|
321
|
-
value:
|
|
331
|
+
/* @__PURE__ */ p(n, {
|
|
332
|
+
icon: /* @__PURE__ */ p(Ee, { className: "h-5 w-5" }),
|
|
333
|
+
value: I.counterparty,
|
|
322
334
|
label: "Counterparty",
|
|
323
335
|
featured: !0
|
|
324
336
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
326
|
-
icon: /* @__PURE__ */
|
|
327
|
-
value: i(
|
|
337
|
+
/* @__PURE__ */ p(n, {
|
|
338
|
+
icon: /* @__PURE__ */ p(Pe, { className: "h-5 w-5" }),
|
|
339
|
+
value: i(I.commodity),
|
|
328
340
|
label: "Commodity & side",
|
|
329
|
-
footer: /* @__PURE__ */
|
|
341
|
+
footer: /* @__PURE__ */ p(c, { status: I.side })
|
|
330
342
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
icon: /* @__PURE__ */
|
|
333
|
-
value: ee(
|
|
334
|
-
label: `Price per ${a(
|
|
335
|
-
footer: /* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ p(n, {
|
|
344
|
+
icon: /* @__PURE__ */ p(ke, { className: "h-5 w-5" }),
|
|
345
|
+
value: ee(I.pricePerUnit, I.currency),
|
|
346
|
+
label: `Price per ${a(I.unit)}`,
|
|
347
|
+
footer: /* @__PURE__ */ p(c, { status: I.pricingBasis })
|
|
336
348
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
icon: /* @__PURE__ */
|
|
339
|
-
value: o(
|
|
340
|
-
label: `of ${o(
|
|
341
|
-
footer: /* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ p(n, {
|
|
350
|
+
icon: /* @__PURE__ */ p(je, { className: "h-5 w-5" }),
|
|
351
|
+
value: o(I.deliveredVolume, I.unit),
|
|
352
|
+
label: `of ${o(I.contractedVolume, I.unit)} delivered`,
|
|
353
|
+
footer: /* @__PURE__ */ m("div", {
|
|
342
354
|
className: "space-y-2",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
344
|
-
value:
|
|
355
|
+
children: [/* @__PURE__ */ p(te, {
|
|
356
|
+
value: et,
|
|
345
357
|
barClassName: "bg-[var(--color-status-success-text)]"
|
|
346
|
-
}), /* @__PURE__ */
|
|
358
|
+
}), /* @__PURE__ */ m("p", {
|
|
347
359
|
className: "text-xs tabular-nums text-text-tertiary",
|
|
348
|
-
children: [Math.round(
|
|
360
|
+
children: [Math.round(et), "% fulfilled"]
|
|
349
361
|
})]
|
|
350
362
|
})
|
|
351
363
|
})
|
|
352
364
|
]
|
|
353
365
|
}),
|
|
354
|
-
/* @__PURE__ */ g
|
|
366
|
+
/* @__PURE__ */ m(g, {
|
|
355
367
|
treatment: "glass",
|
|
356
368
|
className: "mt-4 p-6",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
369
|
+
children: [/* @__PURE__ */ m("dl", {
|
|
358
370
|
className: "grid grid-cols-2 gap-x-6 gap-y-4 sm:grid-cols-3 lg:grid-cols-4",
|
|
359
371
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
|
|
361
373
|
className: "text-xs text-text-tertiary",
|
|
362
374
|
children: "Pricing basis"
|
|
363
|
-
}), /* @__PURE__ */
|
|
375
|
+
}), /* @__PURE__ */ p("dd", {
|
|
364
376
|
className: "mt-1",
|
|
365
|
-
children: /* @__PURE__ */
|
|
377
|
+
children: /* @__PURE__ */ p(c, { status: I.pricingBasis })
|
|
366
378
|
})] }),
|
|
367
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
|
|
368
380
|
className: "text-xs text-text-tertiary",
|
|
369
381
|
children: "Price index"
|
|
370
|
-
}), /* @__PURE__ */
|
|
382
|
+
}), /* @__PURE__ */ p("dd", {
|
|
371
383
|
className: "mt-0.5 text-sm text-text-primary",
|
|
372
|
-
children:
|
|
384
|
+
children: I.priceIndex ?? "—"
|
|
373
385
|
})] }),
|
|
374
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
|
|
375
387
|
className: "text-xs text-text-tertiary",
|
|
376
388
|
children: "Currency"
|
|
377
|
-
}), /* @__PURE__ */
|
|
389
|
+
}), /* @__PURE__ */ p("dd", {
|
|
378
390
|
className: "mt-0.5 text-sm text-text-primary",
|
|
379
|
-
children:
|
|
391
|
+
children: I.currency
|
|
380
392
|
})] }),
|
|
381
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
|
|
382
394
|
className: "text-xs text-text-tertiary",
|
|
383
395
|
children: "Delivery location"
|
|
384
|
-
}), /* @__PURE__ */
|
|
396
|
+
}), /* @__PURE__ */ p("dd", {
|
|
385
397
|
className: "mt-0.5 flex items-center gap-1.5 text-sm text-text-primary",
|
|
386
|
-
children:
|
|
398
|
+
children: I.deliveryLocation ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Me, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }), I.deliveryLocation] }) : "—"
|
|
387
399
|
})] }),
|
|
388
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ m("div", {
|
|
389
401
|
className: "col-span-2",
|
|
390
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
391
403
|
className: "text-xs text-text-tertiary",
|
|
392
404
|
children: "Term"
|
|
393
|
-
}), /* @__PURE__ */
|
|
405
|
+
}), /* @__PURE__ */ m("dd", {
|
|
394
406
|
className: "mt-0.5 flex items-center gap-1.5 text-sm text-text-primary tabular-nums",
|
|
395
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ p(De, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }), ct]
|
|
396
408
|
})]
|
|
397
409
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
|
|
399
411
|
className: "text-xs text-text-tertiary",
|
|
400
412
|
children: "Signed"
|
|
401
|
-
}), /* @__PURE__ */
|
|
413
|
+
}), /* @__PURE__ */ p("dd", {
|
|
402
414
|
className: "mt-0.5 text-sm text-text-primary",
|
|
403
|
-
children: r(
|
|
415
|
+
children: r(I.signedAt)
|
|
404
416
|
})] }),
|
|
405
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
|
|
406
418
|
className: "text-xs text-text-tertiary",
|
|
407
419
|
children: "Created"
|
|
408
|
-
}), /* @__PURE__ */
|
|
420
|
+
}), /* @__PURE__ */ p("dd", {
|
|
409
421
|
className: "mt-0.5 text-sm text-text-primary",
|
|
410
|
-
children: r(
|
|
422
|
+
children: r(I.createdAt)
|
|
411
423
|
})] })
|
|
412
424
|
]
|
|
413
|
-
}),
|
|
425
|
+
}), I.notes && /* @__PURE__ */ p("p", {
|
|
414
426
|
className: "mt-5 rounded-lg bg-bg-sunken/60 p-3 text-sm text-text-secondary",
|
|
415
|
-
children:
|
|
427
|
+
children: I.notes
|
|
416
428
|
})]
|
|
417
429
|
}),
|
|
418
|
-
|
|
430
|
+
Y && /* @__PURE__ */ p("p", {
|
|
419
431
|
className: "mt-4 text-sm text-status-error-text",
|
|
420
|
-
children:
|
|
432
|
+
children: Y
|
|
421
433
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ p("div", {
|
|
423
435
|
className: "mt-6",
|
|
424
|
-
children: /* @__PURE__ */
|
|
425
|
-
items:
|
|
426
|
-
value:
|
|
427
|
-
onChange:
|
|
436
|
+
children: /* @__PURE__ */ p(ye, {
|
|
437
|
+
items: st,
|
|
438
|
+
value: V,
|
|
439
|
+
onChange: Xe
|
|
428
440
|
})
|
|
429
441
|
}),
|
|
430
|
-
|
|
442
|
+
V === "shipments" && /* @__PURE__ */ p("div", {
|
|
431
443
|
className: "mt-6",
|
|
432
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ p(ae, {
|
|
433
445
|
title: "Shipments",
|
|
434
446
|
description: "Physical movements delivering against this contract's volume.",
|
|
435
|
-
action: /* @__PURE__ */
|
|
447
|
+
action: /* @__PURE__ */ m(h, {
|
|
436
448
|
size: "sm",
|
|
437
|
-
onClick:
|
|
438
|
-
children: [/* @__PURE__ */
|
|
449
|
+
onClick: $,
|
|
450
|
+
children: [/* @__PURE__ */ p(u, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
|
|
439
451
|
}),
|
|
440
|
-
children:
|
|
452
|
+
children: B.isLoading ? /* @__PURE__ */ p(ie, { label: "Loading shipments…" }) : B.isError ? /* @__PURE__ */ p(re, {
|
|
453
|
+
message: "Couldn't load shipments.",
|
|
454
|
+
onRetry: () => B.refetch()
|
|
455
|
+
}) : Z.length === 0 ? /* @__PURE__ */ p(oe, {
|
|
441
456
|
illustration: "empty-data",
|
|
442
|
-
icon: /* @__PURE__ */
|
|
457
|
+
icon: /* @__PURE__ */ p(d, { className: "h-10 w-10" }),
|
|
443
458
|
title: "No shipments scheduled",
|
|
444
459
|
description: "Schedule a shipment to start delivering against this contract.",
|
|
445
|
-
action: /* @__PURE__ */
|
|
446
|
-
onClick:
|
|
447
|
-
children: [/* @__PURE__ */
|
|
460
|
+
action: /* @__PURE__ */ m(h, {
|
|
461
|
+
onClick: $,
|
|
462
|
+
children: [/* @__PURE__ */ p(u, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
|
|
448
463
|
})
|
|
449
|
-
}) : /* @__PURE__ */
|
|
450
|
-
columns:
|
|
451
|
-
rows:
|
|
464
|
+
}) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ne, {
|
|
465
|
+
columns: ot,
|
|
466
|
+
rows: Z,
|
|
452
467
|
rowKey: (e) => e.id
|
|
453
|
-
})
|
|
468
|
+
}), /* @__PURE__ */ p(be, {
|
|
469
|
+
page: z.page,
|
|
470
|
+
pageSize: j,
|
|
471
|
+
itemCount: Z.length,
|
|
472
|
+
hasMore: B.data?.pageInfo?.hasMore ?? !1,
|
|
473
|
+
onPageChange: z.onPageChange
|
|
474
|
+
})] })
|
|
454
475
|
})
|
|
455
476
|
}),
|
|
456
|
-
|
|
477
|
+
V === "tags" && /* @__PURE__ */ p("div", {
|
|
457
478
|
className: "mt-6",
|
|
458
|
-
children: /* @__PURE__ */
|
|
479
|
+
children: /* @__PURE__ */ p(g, {
|
|
459
480
|
treatment: "glass",
|
|
460
481
|
className: "p-6",
|
|
461
|
-
children: /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ p(we, {
|
|
462
483
|
entityType: "theglobalfuel-contract",
|
|
463
|
-
entityId:
|
|
484
|
+
entityId: I.id
|
|
464
485
|
})
|
|
465
486
|
})
|
|
466
487
|
}),
|
|
467
|
-
|
|
488
|
+
V === "discussion" && /* @__PURE__ */ p("div", {
|
|
468
489
|
className: "mt-6",
|
|
469
|
-
children: /* @__PURE__ */
|
|
490
|
+
children: /* @__PURE__ */ p(Ce, {
|
|
470
491
|
entityType: "theglobalfuel-contract",
|
|
471
|
-
entityId:
|
|
492
|
+
entityId: I.id,
|
|
472
493
|
description: "Coordinate negotiation, delivery and settlement with your team."
|
|
473
494
|
})
|
|
474
495
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
open:
|
|
496
|
+
/* @__PURE__ */ p(y, {
|
|
497
|
+
open: Qe,
|
|
477
498
|
onOpenChange: (e) => {
|
|
478
|
-
|
|
499
|
+
G(e), e || (q(M(I.unit)), J(null), X(null));
|
|
479
500
|
},
|
|
480
|
-
children: /* @__PURE__ */
|
|
501
|
+
children: /* @__PURE__ */ m(b, { children: [/* @__PURE__ */ m(C, { children: [/* @__PURE__ */ p(w, { children: "Schedule shipment" }), /* @__PURE__ */ m(x, { children: [
|
|
481
502
|
"Log a physical movement delivering against ",
|
|
482
|
-
|
|
503
|
+
I.reference,
|
|
483
504
|
"."
|
|
484
|
-
] })] }), /* @__PURE__ */
|
|
505
|
+
] })] }), /* @__PURE__ */ m("form", {
|
|
485
506
|
onSubmit: (e) => {
|
|
486
|
-
e.preventDefault(),
|
|
507
|
+
e.preventDefault(), it();
|
|
487
508
|
},
|
|
488
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ m("div", {
|
|
489
510
|
className: "grid gap-4 py-2",
|
|
490
511
|
children: [
|
|
491
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ m("div", {
|
|
492
513
|
className: "grid gap-2 sm:grid-cols-2",
|
|
493
|
-
children: [/* @__PURE__ */
|
|
514
|
+
children: [/* @__PURE__ */ m("div", {
|
|
494
515
|
className: "grid gap-1.5",
|
|
495
|
-
children: [/* @__PURE__ */
|
|
516
|
+
children: [/* @__PURE__ */ p(v, {
|
|
496
517
|
htmlFor: "shipReference",
|
|
497
518
|
children: "Reference *"
|
|
498
|
-
}), /* @__PURE__ */
|
|
519
|
+
}), /* @__PURE__ */ p(_, {
|
|
499
520
|
id: "shipReference",
|
|
500
|
-
value:
|
|
501
|
-
onChange: (e) =>
|
|
502
|
-
...
|
|
521
|
+
value: K.reference,
|
|
522
|
+
onChange: (e) => q({
|
|
523
|
+
...K,
|
|
503
524
|
reference: e.target.value
|
|
504
525
|
}),
|
|
505
526
|
placeholder: "SHP-2026-0031"
|
|
506
527
|
})]
|
|
507
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ m("div", {
|
|
508
529
|
className: "grid gap-1.5",
|
|
509
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ p(v, {
|
|
510
531
|
htmlFor: "shipMode",
|
|
511
532
|
children: "Mode"
|
|
512
|
-
}), /* @__PURE__ */
|
|
513
|
-
value:
|
|
514
|
-
onValueChange: (e) =>
|
|
515
|
-
...
|
|
533
|
+
}), /* @__PURE__ */ m(T, {
|
|
534
|
+
value: K.mode,
|
|
535
|
+
onValueChange: (e) => q({
|
|
536
|
+
...K,
|
|
516
537
|
mode: e
|
|
517
538
|
}),
|
|
518
|
-
children: [/* @__PURE__ */
|
|
539
|
+
children: [/* @__PURE__ */ p(O, {
|
|
519
540
|
id: "shipMode",
|
|
520
|
-
children: /* @__PURE__ */
|
|
521
|
-
}), /* @__PURE__ */
|
|
541
|
+
children: /* @__PURE__ */ p(k, {})
|
|
542
|
+
}), /* @__PURE__ */ p(E, { children: ze.map((e) => /* @__PURE__ */ p(D, {
|
|
522
543
|
value: e,
|
|
523
544
|
children: i(e)
|
|
524
545
|
}, e)) })]
|
|
525
546
|
})]
|
|
526
547
|
})]
|
|
527
548
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ m("div", {
|
|
529
550
|
className: "grid gap-1.5",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ p(v, {
|
|
531
552
|
htmlFor: "shipCarrier",
|
|
532
553
|
children: "Carrier"
|
|
533
|
-
}), /* @__PURE__ */
|
|
554
|
+
}), /* @__PURE__ */ p(_, {
|
|
534
555
|
id: "shipCarrier",
|
|
535
|
-
value:
|
|
536
|
-
onChange: (e) =>
|
|
537
|
-
...
|
|
556
|
+
value: K.carrier,
|
|
557
|
+
onChange: (e) => q({
|
|
558
|
+
...K,
|
|
538
559
|
carrier: e.target.value
|
|
539
560
|
}),
|
|
540
561
|
placeholder: "Maersk Tankers"
|
|
541
562
|
})]
|
|
542
563
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ m("div", {
|
|
544
565
|
className: "grid gap-2 sm:grid-cols-2",
|
|
545
|
-
children: [/* @__PURE__ */
|
|
566
|
+
children: [/* @__PURE__ */ m("div", {
|
|
546
567
|
className: "grid gap-1.5",
|
|
547
|
-
children: [/* @__PURE__ */
|
|
568
|
+
children: [/* @__PURE__ */ p(v, {
|
|
548
569
|
htmlFor: "shipOrigin",
|
|
549
570
|
children: "Origin"
|
|
550
|
-
}), /* @__PURE__ */
|
|
571
|
+
}), /* @__PURE__ */ p(_, {
|
|
551
572
|
id: "shipOrigin",
|
|
552
|
-
value:
|
|
553
|
-
onChange: (e) =>
|
|
554
|
-
...
|
|
573
|
+
value: K.origin,
|
|
574
|
+
onChange: (e) => q({
|
|
575
|
+
...K,
|
|
555
576
|
origin: e.target.value
|
|
556
577
|
}),
|
|
557
578
|
placeholder: "Ras Tanura"
|
|
558
579
|
})]
|
|
559
|
-
}), /* @__PURE__ */
|
|
580
|
+
}), /* @__PURE__ */ m("div", {
|
|
560
581
|
className: "grid gap-1.5",
|
|
561
|
-
children: [/* @__PURE__ */
|
|
582
|
+
children: [/* @__PURE__ */ p(v, {
|
|
562
583
|
htmlFor: "shipDestination",
|
|
563
584
|
children: "Destination"
|
|
564
|
-
}), /* @__PURE__ */
|
|
585
|
+
}), /* @__PURE__ */ p(_, {
|
|
565
586
|
id: "shipDestination",
|
|
566
|
-
value:
|
|
567
|
-
onChange: (e) =>
|
|
568
|
-
...
|
|
587
|
+
value: K.destination,
|
|
588
|
+
onChange: (e) => q({
|
|
589
|
+
...K,
|
|
569
590
|
destination: e.target.value
|
|
570
591
|
}),
|
|
571
592
|
placeholder: "Rotterdam"
|
|
572
593
|
})]
|
|
573
594
|
})]
|
|
574
595
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ m("div", {
|
|
576
597
|
className: "grid gap-2 sm:grid-cols-3",
|
|
577
598
|
children: [
|
|
578
|
-
/* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ m("div", {
|
|
579
600
|
className: "grid gap-1.5",
|
|
580
|
-
children: [/* @__PURE__ */
|
|
601
|
+
children: [/* @__PURE__ */ p(v, {
|
|
581
602
|
htmlFor: "shipVolume",
|
|
582
603
|
children: "Volume *"
|
|
583
|
-
}), /* @__PURE__ */
|
|
604
|
+
}), /* @__PURE__ */ p(_, {
|
|
584
605
|
id: "shipVolume",
|
|
585
606
|
type: "number",
|
|
586
607
|
min: "0",
|
|
587
608
|
step: "any",
|
|
588
|
-
value:
|
|
589
|
-
onChange: (e) =>
|
|
590
|
-
...
|
|
609
|
+
value: K.volume,
|
|
610
|
+
onChange: (e) => q({
|
|
611
|
+
...K,
|
|
591
612
|
volume: e.target.value
|
|
592
613
|
}),
|
|
593
614
|
placeholder: "50000"
|
|
594
615
|
})]
|
|
595
616
|
}),
|
|
596
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ m("div", {
|
|
597
618
|
className: "grid gap-1.5",
|
|
598
|
-
children: [/* @__PURE__ */
|
|
619
|
+
children: [/* @__PURE__ */ p(v, {
|
|
599
620
|
htmlFor: "shipUnit",
|
|
600
621
|
children: "Unit"
|
|
601
|
-
}), /* @__PURE__ */
|
|
602
|
-
value:
|
|
603
|
-
onValueChange: (e) =>
|
|
604
|
-
...
|
|
622
|
+
}), /* @__PURE__ */ m(T, {
|
|
623
|
+
value: K.unit,
|
|
624
|
+
onValueChange: (e) => q({
|
|
625
|
+
...K,
|
|
605
626
|
unit: e
|
|
606
627
|
}),
|
|
607
|
-
children: [/* @__PURE__ */
|
|
628
|
+
children: [/* @__PURE__ */ p(O, {
|
|
608
629
|
id: "shipUnit",
|
|
609
|
-
children: /* @__PURE__ */
|
|
610
|
-
}), /* @__PURE__ */
|
|
630
|
+
children: /* @__PURE__ */ p(k, {})
|
|
631
|
+
}), /* @__PURE__ */ p(E, { children: Be.map((e) => /* @__PURE__ */ p(D, {
|
|
611
632
|
value: e,
|
|
612
633
|
children: a(e)
|
|
613
634
|
}, e)) })]
|
|
614
635
|
})]
|
|
615
636
|
}),
|
|
616
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ m("div", {
|
|
617
638
|
className: "grid gap-1.5",
|
|
618
|
-
children: [/* @__PURE__ */
|
|
639
|
+
children: [/* @__PURE__ */ p(v, {
|
|
619
640
|
htmlFor: "shipScheduled",
|
|
620
641
|
children: "Scheduled at"
|
|
621
|
-
}), /* @__PURE__ */
|
|
642
|
+
}), /* @__PURE__ */ p(_, {
|
|
622
643
|
id: "shipScheduled",
|
|
623
644
|
type: "date",
|
|
624
|
-
value:
|
|
625
|
-
onChange: (e) =>
|
|
626
|
-
...
|
|
645
|
+
value: K.scheduledAt,
|
|
646
|
+
onChange: (e) => q({
|
|
647
|
+
...K,
|
|
627
648
|
scheduledAt: e.target.value
|
|
628
649
|
})
|
|
629
650
|
})]
|
|
630
651
|
})
|
|
631
652
|
]
|
|
632
653
|
}),
|
|
633
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ p(xe, {
|
|
634
655
|
id: "ship-doc",
|
|
635
656
|
label: "Bill of lading / document",
|
|
636
|
-
value:
|
|
637
|
-
onChange:
|
|
657
|
+
value: $e,
|
|
658
|
+
onChange: J,
|
|
638
659
|
accept: "image/*,application/pdf",
|
|
639
660
|
hint: "Attach the bill of lading or shipping document (PDF or image)."
|
|
640
661
|
}),
|
|
641
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ m("div", {
|
|
642
663
|
className: "grid gap-1.5",
|
|
643
|
-
children: [/* @__PURE__ */
|
|
664
|
+
children: [/* @__PURE__ */ p(v, {
|
|
644
665
|
htmlFor: "shipNotes",
|
|
645
666
|
children: "Notes"
|
|
646
|
-
}), /* @__PURE__ */
|
|
667
|
+
}), /* @__PURE__ */ p(A, {
|
|
647
668
|
id: "shipNotes",
|
|
648
669
|
rows: 2,
|
|
649
|
-
value:
|
|
650
|
-
onChange: (e) =>
|
|
651
|
-
...
|
|
670
|
+
value: K.notes,
|
|
671
|
+
onChange: (e) => q({
|
|
672
|
+
...K,
|
|
652
673
|
notes: e.target.value
|
|
653
674
|
}),
|
|
654
675
|
placeholder: "Optional context about this shipment."
|
|
655
676
|
})]
|
|
656
677
|
}),
|
|
657
|
-
|
|
678
|
+
Y && /* @__PURE__ */ p("p", {
|
|
658
679
|
className: "text-sm text-status-error-text",
|
|
659
|
-
children:
|
|
680
|
+
children: Y
|
|
660
681
|
})
|
|
661
682
|
]
|
|
662
|
-
}), /* @__PURE__ */
|
|
683
|
+
}), /* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(h, {
|
|
663
684
|
type: "button",
|
|
664
685
|
variant: "outline",
|
|
665
686
|
onClick: () => {
|
|
666
|
-
|
|
687
|
+
G(!1), q(M(I.unit)), J(null), X(null);
|
|
667
688
|
},
|
|
668
689
|
children: "Cancel"
|
|
669
|
-
}), /* @__PURE__ */ h
|
|
690
|
+
}), /* @__PURE__ */ p(h, {
|
|
670
691
|
type: "submit",
|
|
671
|
-
disabled:
|
|
672
|
-
children:
|
|
692
|
+
disabled: R.isPending,
|
|
693
|
+
children: R.isPending ? "Scheduling…" : "Schedule shipment"
|
|
673
694
|
})] })]
|
|
674
695
|
})] })
|
|
675
696
|
}),
|
|
676
|
-
/* @__PURE__ */
|
|
677
|
-
open:
|
|
678
|
-
onOpenChange:
|
|
679
|
-
children: /* @__PURE__ */
|
|
697
|
+
/* @__PURE__ */ p(y, {
|
|
698
|
+
open: Ze,
|
|
699
|
+
onOpenChange: H,
|
|
700
|
+
children: /* @__PURE__ */ m(b, { children: [/* @__PURE__ */ m(C, { children: [/* @__PURE__ */ p(w, { children: "Edit contract" }), /* @__PURE__ */ m(x, { children: [
|
|
680
701
|
"Update the commercial terms of ",
|
|
681
|
-
|
|
702
|
+
I.reference,
|
|
682
703
|
"."
|
|
683
|
-
] })] }), /* @__PURE__ */
|
|
704
|
+
] })] }), /* @__PURE__ */ m("form", {
|
|
684
705
|
onSubmit: (e) => {
|
|
685
|
-
e.preventDefault(),
|
|
706
|
+
e.preventDefault(), rt();
|
|
686
707
|
},
|
|
687
|
-
children: [
|
|
708
|
+
children: [U && /* @__PURE__ */ m("div", {
|
|
688
709
|
className: "grid gap-4 py-2",
|
|
689
710
|
children: [
|
|
690
|
-
/* @__PURE__ */
|
|
711
|
+
/* @__PURE__ */ m("div", {
|
|
691
712
|
className: "grid gap-1.5",
|
|
692
|
-
children: [/* @__PURE__ */
|
|
713
|
+
children: [/* @__PURE__ */ p(v, {
|
|
693
714
|
htmlFor: "editCounterparty",
|
|
694
715
|
children: "Counterparty *"
|
|
695
|
-
}), /* @__PURE__ */
|
|
716
|
+
}), /* @__PURE__ */ p(_, {
|
|
696
717
|
id: "editCounterparty",
|
|
697
|
-
value:
|
|
698
|
-
onChange: (e) =>
|
|
699
|
-
...
|
|
718
|
+
value: U.counterparty,
|
|
719
|
+
onChange: (e) => W({
|
|
720
|
+
...U,
|
|
700
721
|
counterparty: e.target.value
|
|
701
722
|
}),
|
|
702
723
|
placeholder: "Vitol S.A."
|
|
703
724
|
})]
|
|
704
725
|
}),
|
|
705
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ m("div", {
|
|
706
727
|
className: "grid gap-2 sm:grid-cols-2",
|
|
707
|
-
children: [/* @__PURE__ */
|
|
728
|
+
children: [/* @__PURE__ */ m("div", {
|
|
708
729
|
className: "grid gap-1.5",
|
|
709
|
-
children: [/* @__PURE__ */
|
|
730
|
+
children: [/* @__PURE__ */ p(v, {
|
|
710
731
|
htmlFor: "editPricingBasis",
|
|
711
732
|
children: "Pricing basis"
|
|
712
|
-
}), /* @__PURE__ */
|
|
713
|
-
value:
|
|
714
|
-
onValueChange: (e) =>
|
|
715
|
-
...
|
|
733
|
+
}), /* @__PURE__ */ m(T, {
|
|
734
|
+
value: U.pricingBasis,
|
|
735
|
+
onValueChange: (e) => W({
|
|
736
|
+
...U,
|
|
716
737
|
pricingBasis: e
|
|
717
738
|
}),
|
|
718
|
-
children: [/* @__PURE__ */
|
|
739
|
+
children: [/* @__PURE__ */ p(O, {
|
|
719
740
|
id: "editPricingBasis",
|
|
720
|
-
children: /* @__PURE__ */
|
|
721
|
-
}), /* @__PURE__ */
|
|
741
|
+
children: /* @__PURE__ */ p(k, {})
|
|
742
|
+
}), /* @__PURE__ */ p(E, { children: Re.map((e) => /* @__PURE__ */ p(D, {
|
|
722
743
|
value: e,
|
|
723
744
|
children: i(e)
|
|
724
745
|
}, e)) })]
|
|
725
746
|
})]
|
|
726
|
-
}), /* @__PURE__ */
|
|
747
|
+
}), /* @__PURE__ */ m("div", {
|
|
727
748
|
className: "grid gap-1.5",
|
|
728
|
-
children: [/* @__PURE__ */
|
|
749
|
+
children: [/* @__PURE__ */ p(v, {
|
|
729
750
|
htmlFor: "editPriceIndex",
|
|
730
751
|
children: "Price index"
|
|
731
|
-
}), /* @__PURE__ */
|
|
752
|
+
}), /* @__PURE__ */ p(_, {
|
|
732
753
|
id: "editPriceIndex",
|
|
733
|
-
value:
|
|
734
|
-
onChange: (e) =>
|
|
735
|
-
...
|
|
754
|
+
value: U.priceIndex,
|
|
755
|
+
onChange: (e) => W({
|
|
756
|
+
...U,
|
|
736
757
|
priceIndex: e.target.value
|
|
737
758
|
}),
|
|
738
759
|
placeholder: "Brent, TTF, Henry Hub"
|
|
739
760
|
})]
|
|
740
761
|
})]
|
|
741
762
|
}),
|
|
742
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ m("div", {
|
|
743
764
|
className: "grid gap-2 sm:grid-cols-3",
|
|
744
765
|
children: [
|
|
745
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ m("div", {
|
|
746
767
|
className: "grid gap-1.5",
|
|
747
|
-
children: [/* @__PURE__ */
|
|
768
|
+
children: [/* @__PURE__ */ p(v, {
|
|
748
769
|
htmlFor: "editPrice",
|
|
749
770
|
children: "Price / unit"
|
|
750
|
-
}), /* @__PURE__ */
|
|
771
|
+
}), /* @__PURE__ */ p(_, {
|
|
751
772
|
id: "editPrice",
|
|
752
773
|
type: "number",
|
|
753
774
|
min: "0",
|
|
754
775
|
step: "any",
|
|
755
|
-
value:
|
|
756
|
-
onChange: (e) =>
|
|
757
|
-
...
|
|
776
|
+
value: U.pricePerUnit,
|
|
777
|
+
onChange: (e) => W({
|
|
778
|
+
...U,
|
|
758
779
|
pricePerUnit: e.target.value
|
|
759
780
|
}),
|
|
760
781
|
placeholder: "82.50"
|
|
761
782
|
})]
|
|
762
783
|
}),
|
|
763
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ m("div", {
|
|
764
785
|
className: "grid gap-1.5",
|
|
765
|
-
children: [/* @__PURE__ */
|
|
786
|
+
children: [/* @__PURE__ */ p(v, {
|
|
766
787
|
htmlFor: "editCurrency",
|
|
767
788
|
children: "Currency"
|
|
768
|
-
}), /* @__PURE__ */
|
|
789
|
+
}), /* @__PURE__ */ p(_, {
|
|
769
790
|
id: "editCurrency",
|
|
770
|
-
value:
|
|
771
|
-
onChange: (e) =>
|
|
772
|
-
...
|
|
791
|
+
value: U.currency,
|
|
792
|
+
onChange: (e) => W({
|
|
793
|
+
...U,
|
|
773
794
|
currency: e.target.value
|
|
774
795
|
}),
|
|
775
796
|
placeholder: "USD"
|
|
776
797
|
})]
|
|
777
798
|
}),
|
|
778
|
-
/* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ m("div", {
|
|
779
800
|
className: "grid gap-1.5",
|
|
780
|
-
children: [/* @__PURE__ */
|
|
801
|
+
children: [/* @__PURE__ */ p(v, {
|
|
781
802
|
htmlFor: "editUnit",
|
|
782
803
|
children: "Unit"
|
|
783
|
-
}), /* @__PURE__ */
|
|
784
|
-
value:
|
|
785
|
-
onValueChange: (e) =>
|
|
786
|
-
...
|
|
804
|
+
}), /* @__PURE__ */ m(T, {
|
|
805
|
+
value: U.unit,
|
|
806
|
+
onValueChange: (e) => W({
|
|
807
|
+
...U,
|
|
787
808
|
unit: e
|
|
788
809
|
}),
|
|
789
|
-
children: [/* @__PURE__ */
|
|
810
|
+
children: [/* @__PURE__ */ p(O, {
|
|
790
811
|
id: "editUnit",
|
|
791
|
-
children: /* @__PURE__ */
|
|
792
|
-
}), /* @__PURE__ */
|
|
812
|
+
children: /* @__PURE__ */ p(k, {})
|
|
813
|
+
}), /* @__PURE__ */ p(E, { children: Be.map((e) => /* @__PURE__ */ p(D, {
|
|
793
814
|
value: e,
|
|
794
815
|
children: a(e)
|
|
795
816
|
}, e)) })]
|
|
@@ -797,103 +818,103 @@ function F() {
|
|
|
797
818
|
})
|
|
798
819
|
]
|
|
799
820
|
}),
|
|
800
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ m("div", {
|
|
801
822
|
className: "grid gap-2 sm:grid-cols-2",
|
|
802
|
-
children: [/* @__PURE__ */
|
|
823
|
+
children: [/* @__PURE__ */ m("div", {
|
|
803
824
|
className: "grid gap-1.5",
|
|
804
|
-
children: [/* @__PURE__ */
|
|
825
|
+
children: [/* @__PURE__ */ p(v, {
|
|
805
826
|
htmlFor: "editVolume",
|
|
806
827
|
children: "Contracted volume"
|
|
807
|
-
}), /* @__PURE__ */
|
|
828
|
+
}), /* @__PURE__ */ p(_, {
|
|
808
829
|
id: "editVolume",
|
|
809
830
|
type: "number",
|
|
810
831
|
min: "0",
|
|
811
832
|
step: "any",
|
|
812
|
-
value:
|
|
813
|
-
onChange: (e) =>
|
|
814
|
-
...
|
|
833
|
+
value: U.contractedVolume,
|
|
834
|
+
onChange: (e) => W({
|
|
835
|
+
...U,
|
|
815
836
|
contractedVolume: e.target.value
|
|
816
837
|
}),
|
|
817
838
|
placeholder: "500000"
|
|
818
839
|
})]
|
|
819
|
-
}), /* @__PURE__ */
|
|
840
|
+
}), /* @__PURE__ */ m("div", {
|
|
820
841
|
className: "grid gap-1.5",
|
|
821
|
-
children: [/* @__PURE__ */
|
|
842
|
+
children: [/* @__PURE__ */ p(v, {
|
|
822
843
|
htmlFor: "editLocation",
|
|
823
844
|
children: "Delivery location"
|
|
824
|
-
}), /* @__PURE__ */
|
|
845
|
+
}), /* @__PURE__ */ p(_, {
|
|
825
846
|
id: "editLocation",
|
|
826
|
-
value:
|
|
827
|
-
onChange: (e) =>
|
|
828
|
-
...
|
|
847
|
+
value: U.deliveryLocation,
|
|
848
|
+
onChange: (e) => W({
|
|
849
|
+
...U,
|
|
829
850
|
deliveryLocation: e.target.value
|
|
830
851
|
}),
|
|
831
852
|
placeholder: "Rotterdam"
|
|
832
853
|
})]
|
|
833
854
|
})]
|
|
834
855
|
}),
|
|
835
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ m("div", {
|
|
836
857
|
className: "grid gap-2 sm:grid-cols-2",
|
|
837
|
-
children: [/* @__PURE__ */
|
|
858
|
+
children: [/* @__PURE__ */ m("div", {
|
|
838
859
|
className: "grid gap-1.5",
|
|
839
|
-
children: [/* @__PURE__ */
|
|
860
|
+
children: [/* @__PURE__ */ p(v, {
|
|
840
861
|
htmlFor: "editStart",
|
|
841
862
|
children: "Start date"
|
|
842
|
-
}), /* @__PURE__ */
|
|
863
|
+
}), /* @__PURE__ */ p(_, {
|
|
843
864
|
id: "editStart",
|
|
844
865
|
type: "date",
|
|
845
|
-
value:
|
|
846
|
-
onChange: (e) =>
|
|
847
|
-
...
|
|
866
|
+
value: U.startDate,
|
|
867
|
+
onChange: (e) => W({
|
|
868
|
+
...U,
|
|
848
869
|
startDate: e.target.value
|
|
849
870
|
})
|
|
850
871
|
})]
|
|
851
|
-
}), /* @__PURE__ */
|
|
872
|
+
}), /* @__PURE__ */ m("div", {
|
|
852
873
|
className: "grid gap-1.5",
|
|
853
|
-
children: [/* @__PURE__ */
|
|
874
|
+
children: [/* @__PURE__ */ p(v, {
|
|
854
875
|
htmlFor: "editEnd",
|
|
855
876
|
children: "End date"
|
|
856
|
-
}), /* @__PURE__ */
|
|
877
|
+
}), /* @__PURE__ */ p(_, {
|
|
857
878
|
id: "editEnd",
|
|
858
879
|
type: "date",
|
|
859
|
-
value:
|
|
860
|
-
onChange: (e) =>
|
|
861
|
-
...
|
|
880
|
+
value: U.endDate,
|
|
881
|
+
onChange: (e) => W({
|
|
882
|
+
...U,
|
|
862
883
|
endDate: e.target.value
|
|
863
884
|
})
|
|
864
885
|
})]
|
|
865
886
|
})]
|
|
866
887
|
}),
|
|
867
|
-
/* @__PURE__ */
|
|
888
|
+
/* @__PURE__ */ m("div", {
|
|
868
889
|
className: "grid gap-1.5",
|
|
869
|
-
children: [/* @__PURE__ */
|
|
890
|
+
children: [/* @__PURE__ */ p(v, {
|
|
870
891
|
htmlFor: "editNotes",
|
|
871
892
|
children: "Notes"
|
|
872
|
-
}), /* @__PURE__ */
|
|
893
|
+
}), /* @__PURE__ */ p(A, {
|
|
873
894
|
id: "editNotes",
|
|
874
895
|
rows: 2,
|
|
875
|
-
value:
|
|
876
|
-
onChange: (e) =>
|
|
877
|
-
...
|
|
896
|
+
value: U.notes,
|
|
897
|
+
onChange: (e) => W({
|
|
898
|
+
...U,
|
|
878
899
|
notes: e.target.value
|
|
879
900
|
}),
|
|
880
901
|
placeholder: "Optional context about this contract."
|
|
881
902
|
})]
|
|
882
903
|
}),
|
|
883
|
-
|
|
904
|
+
Y && /* @__PURE__ */ p("p", {
|
|
884
905
|
className: "text-sm text-status-error-text",
|
|
885
|
-
children:
|
|
906
|
+
children: Y
|
|
886
907
|
})
|
|
887
908
|
]
|
|
888
|
-
}), /* @__PURE__ */
|
|
909
|
+
}), /* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(h, {
|
|
889
910
|
type: "button",
|
|
890
911
|
variant: "outline",
|
|
891
|
-
onClick: () =>
|
|
912
|
+
onClick: () => H(!1),
|
|
892
913
|
children: "Cancel"
|
|
893
|
-
}), /* @__PURE__ */ h
|
|
914
|
+
}), /* @__PURE__ */ p(h, {
|
|
894
915
|
type: "submit",
|
|
895
|
-
disabled:
|
|
896
|
-
children:
|
|
916
|
+
disabled: L.isPending,
|
|
917
|
+
children: L.isPending ? "Saving…" : "Save changes"
|
|
897
918
|
})] })]
|
|
898
919
|
})] })
|
|
899
920
|
})
|
|
@@ -901,6 +922,6 @@ function F() {
|
|
|
901
922
|
});
|
|
902
923
|
}
|
|
903
924
|
//#endregion
|
|
904
|
-
export {
|
|
925
|
+
export { N as ContractDetailPage };
|
|
905
926
|
|
|
906
927
|
//# sourceMappingURL=ContractDetailPage.js.map
|