@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
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import { useTheGlobalFuel as e } from "../../context/TheGlobalFuelContext.js";
|
|
2
|
-
import { PageLayout as
|
|
3
|
-
import { formatEnumLabel as
|
|
2
|
+
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
|
+
import { formatEnumLabel as n, formatMoney as ee, formatUnit as r, formatVolume as i, toBackendDate as a } from "../../utils/formatters.js";
|
|
4
4
|
import { StatusBadge as o } from "../../components/StatusBadge.js";
|
|
5
5
|
import { MiniBar as s } from "../../components/MiniBar.js";
|
|
6
6
|
import { DataTable as c } from "../../components/DataTable.js";
|
|
7
|
-
import { ErrorView as
|
|
8
|
-
import { EmptyState as
|
|
7
|
+
import { ErrorView as te, LoadingView as ne } from "../../components/StateViews.js";
|
|
8
|
+
import { EmptyState as re } from "../../components/EmptyState.js";
|
|
9
9
|
import "../../context/index.js";
|
|
10
|
-
import { useTheContracts as
|
|
11
|
-
import { useCursorPager as
|
|
12
|
-
import { useNotify as
|
|
10
|
+
import { useTheContracts as l, useTheCreateContract as u } from "../../hooks/useTheGlobalFuelApi.js";
|
|
11
|
+
import { useCursorPager as d } from "../../hooks/useCursorPager.js";
|
|
12
|
+
import { useNotify as f } from "../../hooks/useNotify.js";
|
|
13
|
+
import { useTheAnalytics as p } from "../../hooks/useTheAnalytics.js";
|
|
14
|
+
import { useThePageView as ie } from "../../hooks/useThePageView.js";
|
|
15
|
+
import { useTheNativeControls as ae } from "../../hooks/useTheNativeControls.js";
|
|
16
|
+
import { useTheTranslation as oe } from "../../hooks/useTheTranslation.js";
|
|
13
17
|
import "../../hooks/index.js";
|
|
14
|
-
import { FilterTabs as
|
|
15
|
-
import { Pagination as
|
|
16
|
-
import { useMemo as
|
|
18
|
+
import { FilterTabs as se } from "../../components/FilterTabs.js";
|
|
19
|
+
import { Pagination as ce } from "../../components/Pagination.js";
|
|
20
|
+
import { useMemo as le, useState as m } from "react";
|
|
17
21
|
import { FileSignature as h, Plus as g } from "lucide-react";
|
|
18
|
-
import { Fragment as
|
|
19
|
-
import { Button as
|
|
22
|
+
import { Fragment as ue, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
23
|
+
import { Button as y, Input as b, Label as x, ResponsiveDialog as S, ResponsiveDialogContent as de, ResponsiveDialogDescription as fe, ResponsiveDialogFooter as pe, ResponsiveDialogHeader as me, ResponsiveDialogTitle as he, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as O } from "@burdenoff/fe-libs/ui";
|
|
20
24
|
//#region src/theglobalfuel/pages/contracts/ContractsPage.tsx
|
|
21
|
-
var
|
|
25
|
+
var k = [
|
|
22
26
|
{
|
|
23
27
|
value: "ALL",
|
|
24
28
|
label: "All"
|
|
@@ -51,12 +55,12 @@ var O = [
|
|
|
51
55
|
value: "TERMINATED",
|
|
52
56
|
label: "Terminated"
|
|
53
57
|
}
|
|
54
|
-
],
|
|
58
|
+
], A = ["BUY", "SELL"], j = [
|
|
55
59
|
"FIXED",
|
|
56
60
|
"INDEX_LINKED",
|
|
57
61
|
"FORMULA",
|
|
58
62
|
"SPOT"
|
|
59
|
-
],
|
|
63
|
+
], M = [
|
|
60
64
|
"CRUDE_OIL",
|
|
61
65
|
"NATURAL_GAS",
|
|
62
66
|
"LNG",
|
|
@@ -70,7 +74,7 @@ var O = [
|
|
|
70
74
|
"GOLD",
|
|
71
75
|
"LITHIUM",
|
|
72
76
|
"RARE_EARTH"
|
|
73
|
-
],
|
|
77
|
+
], N = [
|
|
74
78
|
"BARRELS",
|
|
75
79
|
"CUBIC_METERS",
|
|
76
80
|
"TONNES",
|
|
@@ -78,7 +82,7 @@ var O = [
|
|
|
78
82
|
"MWH",
|
|
79
83
|
"GJ",
|
|
80
84
|
"MCF"
|
|
81
|
-
],
|
|
85
|
+
], P = 25, F = (e) => Math.max(0, Math.min(100, e)), I = (e) => e.contractedVolume > 0 ? F(e.deliveredVolume / e.contractedVolume * 100) : 0, L = {
|
|
82
86
|
reference: "",
|
|
83
87
|
counterparty: "",
|
|
84
88
|
commodity: "CRUDE_OIL",
|
|
@@ -94,30 +98,31 @@ var O = [
|
|
|
94
98
|
endDate: "",
|
|
95
99
|
notes: ""
|
|
96
100
|
};
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
function R() {
|
|
102
|
+
ie("contracts");
|
|
103
|
+
let F = oe(), { navigateTo: R } = e(), z = f(), { haptic: ge } = ae(), { trackContractCreateClicked: _e, trackContractCreated: ve } = p(), [B, V] = m("ALL"), [H, ye] = m("ALL"), [U, be] = m("ALL"), W = d(), [xe, G] = m(!1), [K, q] = m(L), [J, Y] = m(null), { data: X, isLoading: Se, isError: Ce, refetch: we } = l({
|
|
104
|
+
status: B === "ALL" ? void 0 : B,
|
|
105
|
+
side: H === "ALL" ? void 0 : H,
|
|
106
|
+
commodity: U === "ALL" ? void 0 : U,
|
|
102
107
|
pagination: {
|
|
103
|
-
limit:
|
|
104
|
-
offset:
|
|
108
|
+
limit: P,
|
|
109
|
+
offset: W.page * P
|
|
105
110
|
}
|
|
106
|
-
}),
|
|
111
|
+
}), Z = u(), Q = le(() => X?.items ?? [], [X]), Te = [
|
|
107
112
|
{
|
|
108
113
|
key: "reference",
|
|
109
114
|
header: "Contract",
|
|
110
|
-
render: (e) => /* @__PURE__ */
|
|
115
|
+
render: (e) => /* @__PURE__ */ v("div", {
|
|
111
116
|
className: "flex items-center gap-3",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ _("div", {
|
|
113
118
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent",
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
}), /* @__PURE__ */
|
|
119
|
+
children: /* @__PURE__ */ _(h, { className: "h-4 w-4" })
|
|
120
|
+
}), /* @__PURE__ */ v("div", {
|
|
116
121
|
className: "min-w-0",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ _("p", {
|
|
118
123
|
className: "truncate font-semibold text-text-primary",
|
|
119
124
|
children: e.reference
|
|
120
|
-
}), /* @__PURE__ */
|
|
125
|
+
}), /* @__PURE__ */ _("p", {
|
|
121
126
|
className: "truncate text-xs text-text-tertiary",
|
|
122
127
|
children: e.counterparty
|
|
123
128
|
})]
|
|
@@ -127,21 +132,21 @@ function L() {
|
|
|
127
132
|
{
|
|
128
133
|
key: "side",
|
|
129
134
|
header: "Side",
|
|
130
|
-
render: (e) => /* @__PURE__ */
|
|
135
|
+
render: (e) => /* @__PURE__ */ _(o, { status: e.side })
|
|
131
136
|
},
|
|
132
137
|
{
|
|
133
138
|
key: "commodity",
|
|
134
139
|
header: "Commodity",
|
|
135
140
|
hideOnMobile: !0,
|
|
136
|
-
render: (e) => /* @__PURE__ */
|
|
141
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
137
142
|
className: "text-text-secondary",
|
|
138
|
-
children:
|
|
143
|
+
children: n(e.commodity)
|
|
139
144
|
})
|
|
140
145
|
},
|
|
141
146
|
{
|
|
142
147
|
key: "status",
|
|
143
148
|
header: "Status",
|
|
144
|
-
render: (e) => /* @__PURE__ */
|
|
149
|
+
render: (e) => /* @__PURE__ */ _(o, { status: e.status })
|
|
145
150
|
},
|
|
146
151
|
{
|
|
147
152
|
key: "price",
|
|
@@ -149,9 +154,9 @@ function L() {
|
|
|
149
154
|
align: "right",
|
|
150
155
|
hideOnMobile: !0,
|
|
151
156
|
sortValue: (e) => e.pricePerUnit,
|
|
152
|
-
render: (e) => /* @__PURE__ */
|
|
157
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
153
158
|
className: "tabular-nums text-text-secondary",
|
|
154
|
-
children: [
|
|
159
|
+
children: [ee(e.pricePerUnit, e.currency), /* @__PURE__ */ v("span", {
|
|
155
160
|
className: "text-text-tertiary",
|
|
156
161
|
children: ["/", r(e.unit)]
|
|
157
162
|
})]
|
|
@@ -160,14 +165,14 @@ function L() {
|
|
|
160
165
|
{
|
|
161
166
|
key: "delivery",
|
|
162
167
|
header: "Delivered",
|
|
163
|
-
sortValue: (e) =>
|
|
164
|
-
render: (e) => /* @__PURE__ */
|
|
168
|
+
sortValue: (e) => I(e),
|
|
169
|
+
render: (e) => /* @__PURE__ */ v("div", {
|
|
165
170
|
className: "min-w-[9rem]",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
167
|
-
value:
|
|
171
|
+
children: [/* @__PURE__ */ _(s, {
|
|
172
|
+
value: I(e),
|
|
168
173
|
barClassName: "bg-[var(--color-status-success-text)]",
|
|
169
174
|
className: "mb-1"
|
|
170
|
-
}), /* @__PURE__ */
|
|
175
|
+
}), /* @__PURE__ */ v("p", {
|
|
171
176
|
className: "text-xs tabular-nums text-text-tertiary",
|
|
172
177
|
children: [
|
|
173
178
|
i(e.deliveredVolume, e.unit),
|
|
@@ -182,7 +187,7 @@ function L() {
|
|
|
182
187
|
header: "Updated",
|
|
183
188
|
align: "right",
|
|
184
189
|
hideOnMobile: !0,
|
|
185
|
-
render: (e) => /* @__PURE__ */
|
|
190
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
186
191
|
className: "text-text-tertiary",
|
|
187
192
|
children: new Date(e.updatedAt).toLocaleDateString(void 0, {
|
|
188
193
|
day: "numeric",
|
|
@@ -192,292 +197,293 @@ function L() {
|
|
|
192
197
|
})
|
|
193
198
|
}
|
|
194
199
|
], $ = () => {
|
|
195
|
-
|
|
196
|
-
},
|
|
197
|
-
if (!
|
|
198
|
-
|
|
200
|
+
q(L), Y(null);
|
|
201
|
+
}, Ee = async () => {
|
|
202
|
+
if (!K.reference.trim()) {
|
|
203
|
+
Y("Contract reference is required.");
|
|
199
204
|
return;
|
|
200
205
|
}
|
|
201
|
-
if (!
|
|
202
|
-
|
|
206
|
+
if (!K.counterparty.trim()) {
|
|
207
|
+
Y("Counterparty is required.");
|
|
203
208
|
return;
|
|
204
209
|
}
|
|
205
|
-
|
|
210
|
+
Y(null), ge("light"), _e();
|
|
206
211
|
try {
|
|
207
|
-
let e = await
|
|
208
|
-
reference:
|
|
209
|
-
counterparty:
|
|
210
|
-
commodity:
|
|
211
|
-
side:
|
|
212
|
-
pricingBasis:
|
|
213
|
-
pricePerUnit:
|
|
214
|
-
priceIndex:
|
|
215
|
-
currency:
|
|
216
|
-
contractedVolume:
|
|
217
|
-
unit:
|
|
218
|
-
deliveryLocation:
|
|
219
|
-
startDate: a(
|
|
220
|
-
endDate: a(
|
|
221
|
-
notes:
|
|
212
|
+
let e = await Z.mutateAsync({
|
|
213
|
+
reference: K.reference.trim(),
|
|
214
|
+
counterparty: K.counterparty.trim(),
|
|
215
|
+
commodity: K.commodity,
|
|
216
|
+
side: K.side,
|
|
217
|
+
pricingBasis: K.pricingBasis,
|
|
218
|
+
pricePerUnit: K.pricePerUnit ? Number(K.pricePerUnit) : null,
|
|
219
|
+
priceIndex: K.priceIndex.trim() || null,
|
|
220
|
+
currency: K.currency.trim().toUpperCase() || "USD",
|
|
221
|
+
contractedVolume: K.contractedVolume ? Number(K.contractedVolume) : null,
|
|
222
|
+
unit: K.unit,
|
|
223
|
+
deliveryLocation: K.deliveryLocation.trim() || null,
|
|
224
|
+
startDate: a(K.startDate) ?? null,
|
|
225
|
+
endDate: a(K.endDate) ?? null,
|
|
226
|
+
notes: K.notes.trim() || null
|
|
222
227
|
});
|
|
223
|
-
|
|
228
|
+
ve(e.id), z.success("Contract created"), G(!1), $(), R(`contracts/${e.id}`);
|
|
224
229
|
} catch (e) {
|
|
225
|
-
|
|
230
|
+
Y(e instanceof Error ? e.message : "Failed to create contract."), z.fromError(e);
|
|
226
231
|
}
|
|
227
232
|
};
|
|
228
|
-
return /* @__PURE__ */
|
|
229
|
-
title: "Offtake Contracts",
|
|
230
|
-
description: "Commodity purchase & sale agreements — pricing, contracted volume and delivery progress.",
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
233
|
+
return /* @__PURE__ */ v(t, {
|
|
234
|
+
title: F("theglobalfuel.pages.contracts.title", "Offtake Contracts"),
|
|
235
|
+
description: F("theglobalfuel.pages.contracts.description", "Commodity purchase & sale agreements — pricing, contracted volume and delivery progress."),
|
|
236
|
+
dataTour: "theglobalfuel-contracts-page",
|
|
237
|
+
actions: /* @__PURE__ */ v(y, {
|
|
238
|
+
onClick: () => G(!0),
|
|
239
|
+
children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " New contract"]
|
|
234
240
|
}),
|
|
235
241
|
children: [
|
|
236
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ v("div", {
|
|
237
243
|
className: "mb-5 flex flex-wrap items-center gap-3",
|
|
238
244
|
children: [
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
options:
|
|
241
|
-
value:
|
|
245
|
+
/* @__PURE__ */ _(se, {
|
|
246
|
+
options: k,
|
|
247
|
+
value: B,
|
|
242
248
|
onChange: (e) => {
|
|
243
|
-
|
|
249
|
+
V(e), W.reset();
|
|
244
250
|
}
|
|
245
251
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
value:
|
|
252
|
+
/* @__PURE__ */ v(C, {
|
|
253
|
+
value: H,
|
|
248
254
|
onValueChange: (e) => {
|
|
249
|
-
|
|
255
|
+
ye(e), W.reset();
|
|
250
256
|
},
|
|
251
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ _(E, {
|
|
252
258
|
className: "w-40",
|
|
253
259
|
"aria-label": "Filter by side",
|
|
254
|
-
children: /* @__PURE__ */
|
|
255
|
-
}), /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ _(D, { placeholder: "All sides" })
|
|
261
|
+
}), /* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(T, {
|
|
256
262
|
value: "ALL",
|
|
257
263
|
children: "All sides"
|
|
258
|
-
}),
|
|
264
|
+
}), A.map((e) => /* @__PURE__ */ _(T, {
|
|
259
265
|
value: e,
|
|
260
|
-
children:
|
|
266
|
+
children: n(e)
|
|
261
267
|
}, e))] })]
|
|
262
268
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
value:
|
|
269
|
+
/* @__PURE__ */ v(C, {
|
|
270
|
+
value: U,
|
|
265
271
|
onValueChange: (e) => {
|
|
266
|
-
|
|
272
|
+
be(e), W.reset();
|
|
267
273
|
},
|
|
268
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ _(E, {
|
|
269
275
|
className: "w-48",
|
|
270
276
|
"aria-label": "Filter by commodity",
|
|
271
|
-
children: /* @__PURE__ */
|
|
272
|
-
}), /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ _(D, { placeholder: "All commodities" })
|
|
278
|
+
}), /* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(T, {
|
|
273
279
|
value: "ALL",
|
|
274
280
|
children: "All commodities"
|
|
275
|
-
}),
|
|
281
|
+
}), M.map((e) => /* @__PURE__ */ _(T, {
|
|
276
282
|
value: e,
|
|
277
|
-
children:
|
|
283
|
+
children: n(e)
|
|
278
284
|
}, e))] })]
|
|
279
285
|
})
|
|
280
286
|
]
|
|
281
287
|
}),
|
|
282
|
-
|
|
288
|
+
Se ? /* @__PURE__ */ _(ne, { label: "Loading contracts…" }) : Ce ? /* @__PURE__ */ _(te, {
|
|
283
289
|
message: "Couldn't load contracts.",
|
|
284
|
-
onRetry: () =>
|
|
285
|
-
}) :
|
|
290
|
+
onRetry: () => we()
|
|
291
|
+
}) : Q.length === 0 ? /* @__PURE__ */ _(re, {
|
|
286
292
|
illustration: "empty-data",
|
|
287
|
-
icon: /* @__PURE__ */
|
|
293
|
+
icon: /* @__PURE__ */ _(h, { className: "h-10 w-10" }),
|
|
288
294
|
title: "No contracts yet",
|
|
289
|
-
description:
|
|
290
|
-
action: /* @__PURE__ */ y
|
|
291
|
-
onClick: () =>
|
|
292
|
-
children: [/* @__PURE__ */
|
|
295
|
+
description: B === "ALL" && H === "ALL" && U === "ALL" ? "Create your first offtake contract to track pricing, volume and delivery." : "No contracts match these filters.",
|
|
296
|
+
action: /* @__PURE__ */ v(y, {
|
|
297
|
+
onClick: () => G(!0),
|
|
298
|
+
children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " New contract"]
|
|
293
299
|
})
|
|
294
|
-
}) : /* @__PURE__ */
|
|
295
|
-
columns:
|
|
296
|
-
rows:
|
|
300
|
+
}) : /* @__PURE__ */ v(ue, { children: [/* @__PURE__ */ _(c, {
|
|
301
|
+
columns: Te,
|
|
302
|
+
rows: Q,
|
|
297
303
|
rowKey: (e) => e.id,
|
|
298
|
-
onRowClick: (e) =>
|
|
304
|
+
onRowClick: (e) => R(`contracts/${e.id}`),
|
|
299
305
|
rowLabel: (e) => `Open ${e.reference}`
|
|
300
|
-
}), /* @__PURE__ */
|
|
301
|
-
page:
|
|
302
|
-
pageSize:
|
|
303
|
-
itemCount:
|
|
304
|
-
hasMore:
|
|
305
|
-
onPageChange:
|
|
306
|
+
}), /* @__PURE__ */ _(ce, {
|
|
307
|
+
page: W.page,
|
|
308
|
+
pageSize: P,
|
|
309
|
+
itemCount: Q.length,
|
|
310
|
+
hasMore: X?.pageInfo?.hasMore ?? !1,
|
|
311
|
+
onPageChange: W.onPageChange
|
|
306
312
|
})] }),
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
open:
|
|
313
|
+
/* @__PURE__ */ _(S, {
|
|
314
|
+
open: xe,
|
|
309
315
|
onOpenChange: (e) => {
|
|
310
|
-
|
|
316
|
+
G(e), e || $();
|
|
311
317
|
},
|
|
312
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ v(de, { children: [/* @__PURE__ */ v(me, { children: [/* @__PURE__ */ _(he, { children: "New offtake contract" }), /* @__PURE__ */ _(fe, { children: "Register a commodity purchase or sale agreement with a counterparty." })] }), /* @__PURE__ */ v("form", {
|
|
313
319
|
onSubmit: (e) => {
|
|
314
|
-
e.preventDefault(),
|
|
320
|
+
e.preventDefault(), Ee();
|
|
315
321
|
},
|
|
316
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ v("div", {
|
|
317
323
|
className: "grid gap-4 py-2",
|
|
318
324
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ v("div", {
|
|
320
326
|
className: "grid gap-2 sm:grid-cols-2",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ v("div", {
|
|
322
328
|
className: "grid gap-1.5",
|
|
323
|
-
children: [/* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ _(x, {
|
|
324
330
|
htmlFor: "reference",
|
|
325
331
|
children: "Reference *"
|
|
326
|
-
}), /* @__PURE__ */
|
|
332
|
+
}), /* @__PURE__ */ _(b, {
|
|
327
333
|
id: "reference",
|
|
328
|
-
value:
|
|
329
|
-
onChange: (e) =>
|
|
330
|
-
...
|
|
334
|
+
value: K.reference,
|
|
335
|
+
onChange: (e) => q({
|
|
336
|
+
...K,
|
|
331
337
|
reference: e.target.value
|
|
332
338
|
}),
|
|
333
339
|
placeholder: "OFT-2026-0142"
|
|
334
340
|
})]
|
|
335
|
-
}), /* @__PURE__ */
|
|
341
|
+
}), /* @__PURE__ */ v("div", {
|
|
336
342
|
className: "grid gap-1.5",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ _(x, {
|
|
338
344
|
htmlFor: "counterparty",
|
|
339
345
|
children: "Counterparty *"
|
|
340
|
-
}), /* @__PURE__ */
|
|
346
|
+
}), /* @__PURE__ */ _(b, {
|
|
341
347
|
id: "counterparty",
|
|
342
|
-
value:
|
|
343
|
-
onChange: (e) =>
|
|
344
|
-
...
|
|
348
|
+
value: K.counterparty,
|
|
349
|
+
onChange: (e) => q({
|
|
350
|
+
...K,
|
|
345
351
|
counterparty: e.target.value
|
|
346
352
|
}),
|
|
347
353
|
placeholder: "Vitol S.A."
|
|
348
354
|
})]
|
|
349
355
|
})]
|
|
350
356
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ v("div", {
|
|
352
358
|
className: "grid gap-2 sm:grid-cols-2",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ v("div", {
|
|
354
360
|
className: "grid gap-1.5",
|
|
355
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ _(x, {
|
|
356
362
|
htmlFor: "commodity",
|
|
357
363
|
children: "Commodity *"
|
|
358
|
-
}), /* @__PURE__ */
|
|
359
|
-
value:
|
|
360
|
-
onValueChange: (e) =>
|
|
361
|
-
...
|
|
364
|
+
}), /* @__PURE__ */ v(C, {
|
|
365
|
+
value: K.commodity,
|
|
366
|
+
onValueChange: (e) => q({
|
|
367
|
+
...K,
|
|
362
368
|
commodity: e
|
|
363
369
|
}),
|
|
364
|
-
children: [/* @__PURE__ */
|
|
370
|
+
children: [/* @__PURE__ */ _(E, {
|
|
365
371
|
id: "commodity",
|
|
366
|
-
children: /* @__PURE__ */
|
|
367
|
-
}), /* @__PURE__ */
|
|
372
|
+
children: /* @__PURE__ */ _(D, {})
|
|
373
|
+
}), /* @__PURE__ */ _(w, { children: M.map((e) => /* @__PURE__ */ _(T, {
|
|
368
374
|
value: e,
|
|
369
|
-
children:
|
|
375
|
+
children: n(e)
|
|
370
376
|
}, e)) })]
|
|
371
377
|
})]
|
|
372
|
-
}), /* @__PURE__ */
|
|
378
|
+
}), /* @__PURE__ */ v("div", {
|
|
373
379
|
className: "grid gap-1.5",
|
|
374
|
-
children: [/* @__PURE__ */
|
|
380
|
+
children: [/* @__PURE__ */ _(x, {
|
|
375
381
|
htmlFor: "side",
|
|
376
382
|
children: "Side"
|
|
377
|
-
}), /* @__PURE__ */
|
|
378
|
-
value:
|
|
379
|
-
onValueChange: (e) =>
|
|
380
|
-
...
|
|
383
|
+
}), /* @__PURE__ */ v(C, {
|
|
384
|
+
value: K.side,
|
|
385
|
+
onValueChange: (e) => q({
|
|
386
|
+
...K,
|
|
381
387
|
side: e
|
|
382
388
|
}),
|
|
383
|
-
children: [/* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ _(E, {
|
|
384
390
|
id: "side",
|
|
385
|
-
children: /* @__PURE__ */
|
|
386
|
-
}), /* @__PURE__ */
|
|
391
|
+
children: /* @__PURE__ */ _(D, {})
|
|
392
|
+
}), /* @__PURE__ */ _(w, { children: A.map((e) => /* @__PURE__ */ _(T, {
|
|
387
393
|
value: e,
|
|
388
|
-
children:
|
|
394
|
+
children: n(e)
|
|
389
395
|
}, e)) })]
|
|
390
396
|
})]
|
|
391
397
|
})]
|
|
392
398
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ v("div", {
|
|
394
400
|
className: "grid gap-2 sm:grid-cols-2",
|
|
395
|
-
children: [/* @__PURE__ */
|
|
401
|
+
children: [/* @__PURE__ */ v("div", {
|
|
396
402
|
className: "grid gap-1.5",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ _(x, {
|
|
398
404
|
htmlFor: "pricingBasis",
|
|
399
405
|
children: "Pricing basis"
|
|
400
|
-
}), /* @__PURE__ */
|
|
401
|
-
value:
|
|
402
|
-
onValueChange: (e) =>
|
|
403
|
-
...
|
|
406
|
+
}), /* @__PURE__ */ v(C, {
|
|
407
|
+
value: K.pricingBasis,
|
|
408
|
+
onValueChange: (e) => q({
|
|
409
|
+
...K,
|
|
404
410
|
pricingBasis: e
|
|
405
411
|
}),
|
|
406
|
-
children: [/* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ _(E, {
|
|
407
413
|
id: "pricingBasis",
|
|
408
|
-
children: /* @__PURE__ */
|
|
409
|
-
}), /* @__PURE__ */
|
|
414
|
+
children: /* @__PURE__ */ _(D, {})
|
|
415
|
+
}), /* @__PURE__ */ _(w, { children: j.map((e) => /* @__PURE__ */ _(T, {
|
|
410
416
|
value: e,
|
|
411
|
-
children:
|
|
417
|
+
children: n(e)
|
|
412
418
|
}, e)) })]
|
|
413
419
|
})]
|
|
414
|
-
}), /* @__PURE__ */
|
|
420
|
+
}), /* @__PURE__ */ v("div", {
|
|
415
421
|
className: "grid gap-1.5",
|
|
416
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ _(x, {
|
|
417
423
|
htmlFor: "priceIndex",
|
|
418
424
|
children: "Price index"
|
|
419
|
-
}), /* @__PURE__ */
|
|
425
|
+
}), /* @__PURE__ */ _(b, {
|
|
420
426
|
id: "priceIndex",
|
|
421
|
-
value:
|
|
422
|
-
onChange: (e) =>
|
|
423
|
-
...
|
|
427
|
+
value: K.priceIndex,
|
|
428
|
+
onChange: (e) => q({
|
|
429
|
+
...K,
|
|
424
430
|
priceIndex: e.target.value
|
|
425
431
|
}),
|
|
426
432
|
placeholder: "Brent, TTF, Henry Hub"
|
|
427
433
|
})]
|
|
428
434
|
})]
|
|
429
435
|
}),
|
|
430
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ v("div", {
|
|
431
437
|
className: "grid gap-2 sm:grid-cols-3",
|
|
432
438
|
children: [
|
|
433
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ v("div", {
|
|
434
440
|
className: "grid gap-1.5",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ _(x, {
|
|
436
442
|
htmlFor: "pricePerUnit",
|
|
437
443
|
children: "Price / unit"
|
|
438
|
-
}), /* @__PURE__ */
|
|
444
|
+
}), /* @__PURE__ */ _(b, {
|
|
439
445
|
id: "pricePerUnit",
|
|
440
446
|
type: "number",
|
|
441
447
|
min: "0",
|
|
442
448
|
step: "any",
|
|
443
|
-
value:
|
|
444
|
-
onChange: (e) =>
|
|
445
|
-
...
|
|
449
|
+
value: K.pricePerUnit,
|
|
450
|
+
onChange: (e) => q({
|
|
451
|
+
...K,
|
|
446
452
|
pricePerUnit: e.target.value
|
|
447
453
|
}),
|
|
448
454
|
placeholder: "82.50"
|
|
449
455
|
})]
|
|
450
456
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ v("div", {
|
|
452
458
|
className: "grid gap-1.5",
|
|
453
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ _(x, {
|
|
454
460
|
htmlFor: "currency",
|
|
455
461
|
children: "Currency"
|
|
456
|
-
}), /* @__PURE__ */
|
|
462
|
+
}), /* @__PURE__ */ _(b, {
|
|
457
463
|
id: "currency",
|
|
458
|
-
value:
|
|
459
|
-
onChange: (e) =>
|
|
460
|
-
...
|
|
464
|
+
value: K.currency,
|
|
465
|
+
onChange: (e) => q({
|
|
466
|
+
...K,
|
|
461
467
|
currency: e.target.value
|
|
462
468
|
}),
|
|
463
469
|
placeholder: "USD"
|
|
464
470
|
})]
|
|
465
471
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
472
|
+
/* @__PURE__ */ v("div", {
|
|
467
473
|
className: "grid gap-1.5",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
474
|
+
children: [/* @__PURE__ */ _(x, {
|
|
469
475
|
htmlFor: "unit",
|
|
470
476
|
children: "Unit"
|
|
471
|
-
}), /* @__PURE__ */
|
|
472
|
-
value:
|
|
473
|
-
onValueChange: (e) =>
|
|
474
|
-
...
|
|
477
|
+
}), /* @__PURE__ */ v(C, {
|
|
478
|
+
value: K.unit,
|
|
479
|
+
onValueChange: (e) => q({
|
|
480
|
+
...K,
|
|
475
481
|
unit: e
|
|
476
482
|
}),
|
|
477
|
-
children: [/* @__PURE__ */
|
|
483
|
+
children: [/* @__PURE__ */ _(E, {
|
|
478
484
|
id: "unit",
|
|
479
|
-
children: /* @__PURE__ */
|
|
480
|
-
}), /* @__PURE__ */
|
|
485
|
+
children: /* @__PURE__ */ _(D, {})
|
|
486
|
+
}), /* @__PURE__ */ _(w, { children: N.map((e) => /* @__PURE__ */ _(T, {
|
|
481
487
|
value: e,
|
|
482
488
|
children: r(e)
|
|
483
489
|
}, e)) })]
|
|
@@ -485,105 +491,105 @@ function L() {
|
|
|
485
491
|
})
|
|
486
492
|
]
|
|
487
493
|
}),
|
|
488
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ v("div", {
|
|
489
495
|
className: "grid gap-2 sm:grid-cols-2",
|
|
490
|
-
children: [/* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ v("div", {
|
|
491
497
|
className: "grid gap-1.5",
|
|
492
|
-
children: [/* @__PURE__ */
|
|
498
|
+
children: [/* @__PURE__ */ _(x, {
|
|
493
499
|
htmlFor: "contractedVolume",
|
|
494
500
|
children: "Contracted volume"
|
|
495
|
-
}), /* @__PURE__ */
|
|
501
|
+
}), /* @__PURE__ */ _(b, {
|
|
496
502
|
id: "contractedVolume",
|
|
497
503
|
type: "number",
|
|
498
504
|
min: "0",
|
|
499
505
|
step: "any",
|
|
500
|
-
value:
|
|
501
|
-
onChange: (e) =>
|
|
502
|
-
...
|
|
506
|
+
value: K.contractedVolume,
|
|
507
|
+
onChange: (e) => q({
|
|
508
|
+
...K,
|
|
503
509
|
contractedVolume: e.target.value
|
|
504
510
|
}),
|
|
505
511
|
placeholder: "500000"
|
|
506
512
|
})]
|
|
507
|
-
}), /* @__PURE__ */
|
|
513
|
+
}), /* @__PURE__ */ v("div", {
|
|
508
514
|
className: "grid gap-1.5",
|
|
509
|
-
children: [/* @__PURE__ */
|
|
515
|
+
children: [/* @__PURE__ */ _(x, {
|
|
510
516
|
htmlFor: "deliveryLocation",
|
|
511
517
|
children: "Delivery location"
|
|
512
|
-
}), /* @__PURE__ */
|
|
518
|
+
}), /* @__PURE__ */ _(b, {
|
|
513
519
|
id: "deliveryLocation",
|
|
514
|
-
value:
|
|
515
|
-
onChange: (e) =>
|
|
516
|
-
...
|
|
520
|
+
value: K.deliveryLocation,
|
|
521
|
+
onChange: (e) => q({
|
|
522
|
+
...K,
|
|
517
523
|
deliveryLocation: e.target.value
|
|
518
524
|
}),
|
|
519
525
|
placeholder: "Rotterdam"
|
|
520
526
|
})]
|
|
521
527
|
})]
|
|
522
528
|
}),
|
|
523
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ v("div", {
|
|
524
530
|
className: "grid gap-2 sm:grid-cols-2",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ v("div", {
|
|
526
532
|
className: "grid gap-1.5",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ _(x, {
|
|
528
534
|
htmlFor: "startDate",
|
|
529
535
|
children: "Start date"
|
|
530
|
-
}), /* @__PURE__ */
|
|
536
|
+
}), /* @__PURE__ */ _(b, {
|
|
531
537
|
id: "startDate",
|
|
532
538
|
type: "date",
|
|
533
|
-
value:
|
|
534
|
-
onChange: (e) =>
|
|
535
|
-
...
|
|
539
|
+
value: K.startDate,
|
|
540
|
+
onChange: (e) => q({
|
|
541
|
+
...K,
|
|
536
542
|
startDate: e.target.value
|
|
537
543
|
})
|
|
538
544
|
})]
|
|
539
|
-
}), /* @__PURE__ */
|
|
545
|
+
}), /* @__PURE__ */ v("div", {
|
|
540
546
|
className: "grid gap-1.5",
|
|
541
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ _(x, {
|
|
542
548
|
htmlFor: "endDate",
|
|
543
549
|
children: "End date"
|
|
544
|
-
}), /* @__PURE__ */
|
|
550
|
+
}), /* @__PURE__ */ _(b, {
|
|
545
551
|
id: "endDate",
|
|
546
552
|
type: "date",
|
|
547
|
-
value:
|
|
548
|
-
onChange: (e) =>
|
|
549
|
-
...
|
|
553
|
+
value: K.endDate,
|
|
554
|
+
onChange: (e) => q({
|
|
555
|
+
...K,
|
|
550
556
|
endDate: e.target.value
|
|
551
557
|
})
|
|
552
558
|
})]
|
|
553
559
|
})]
|
|
554
560
|
}),
|
|
555
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ v("div", {
|
|
556
562
|
className: "grid gap-1.5",
|
|
557
|
-
children: [/* @__PURE__ */
|
|
563
|
+
children: [/* @__PURE__ */ _(x, {
|
|
558
564
|
htmlFor: "notes",
|
|
559
565
|
children: "Notes"
|
|
560
|
-
}), /* @__PURE__ */
|
|
566
|
+
}), /* @__PURE__ */ _(O, {
|
|
561
567
|
id: "notes",
|
|
562
568
|
rows: 2,
|
|
563
|
-
value:
|
|
564
|
-
onChange: (e) =>
|
|
565
|
-
...
|
|
569
|
+
value: K.notes,
|
|
570
|
+
onChange: (e) => q({
|
|
571
|
+
...K,
|
|
566
572
|
notes: e.target.value
|
|
567
573
|
}),
|
|
568
574
|
placeholder: "Optional context about this contract."
|
|
569
575
|
})]
|
|
570
576
|
}),
|
|
571
|
-
|
|
577
|
+
J && /* @__PURE__ */ _("p", {
|
|
572
578
|
className: "text-sm text-status-error-text",
|
|
573
|
-
children:
|
|
579
|
+
children: J
|
|
574
580
|
})
|
|
575
581
|
]
|
|
576
|
-
}), /* @__PURE__ */
|
|
582
|
+
}), /* @__PURE__ */ v(pe, { children: [/* @__PURE__ */ _(y, {
|
|
577
583
|
type: "button",
|
|
578
584
|
variant: "outline",
|
|
579
585
|
onClick: () => {
|
|
580
|
-
|
|
586
|
+
G(!1), $();
|
|
581
587
|
},
|
|
582
588
|
children: "Cancel"
|
|
583
|
-
}), /* @__PURE__ */
|
|
589
|
+
}), /* @__PURE__ */ _(y, {
|
|
584
590
|
type: "submit",
|
|
585
|
-
disabled:
|
|
586
|
-
children:
|
|
591
|
+
disabled: Z.isPending,
|
|
592
|
+
children: Z.isPending ? "Creating…" : "Create contract"
|
|
587
593
|
})] })]
|
|
588
594
|
})] })
|
|
589
595
|
})
|
|
@@ -591,6 +597,6 @@ function L() {
|
|
|
591
597
|
});
|
|
592
598
|
}
|
|
593
599
|
//#endregion
|
|
594
|
-
export {
|
|
600
|
+
export { R as ContractsPage };
|
|
595
601
|
|
|
596
602
|
//# sourceMappingURL=ContractsPage.js.map
|