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