@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,21 +1,25 @@
|
|
|
1
1
|
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
2
|
import { MetricsCard as t } from "../../components/MetricsCard.js";
|
|
3
|
-
import { formatDate as n, formatEnumLabel as r, formatVolume as ee } from "../../utils/formatters.js";
|
|
3
|
+
import { formatDate as n, formatEnumLabel as r, formatVolume as i, toBackendDate as ee } from "../../utils/formatters.js";
|
|
4
4
|
import { StatusBadge as te } from "../../components/StatusBadge.js";
|
|
5
5
|
import { DataTable as ne } from "../../components/DataTable.js";
|
|
6
|
-
import { ErrorView as
|
|
7
|
-
import { EmptyState as
|
|
8
|
-
import { useTheContracts as
|
|
6
|
+
import { ErrorView as re, LoadingView as ie } from "../../components/StateViews.js";
|
|
7
|
+
import { EmptyState as ae } from "../../components/EmptyState.js";
|
|
8
|
+
import { useTheContracts as oe, useTheDeliverShipment as se, useTheScheduleShipment as ce, useTheShipments as a, useTheTransitionShipment as le } from "../../hooks/useTheGlobalFuelApi.js";
|
|
9
|
+
import { useCursorPager as o } from "../../hooks/useCursorPager.js";
|
|
10
|
+
import { useNotify as ue } from "../../hooks/useNotify.js";
|
|
9
11
|
import "../../hooks/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { SHIPMENT_DELIVERABLE_FROM as de, SHIPMENT_TRANSITIONS as fe, nextStatuses as pe } from "../../utils/transitions.js";
|
|
13
|
+
import { FilterTabs as me } from "../../components/FilterTabs.js";
|
|
14
|
+
import { Pagination as s } from "../../components/Pagination.js";
|
|
15
|
+
import { EvidenceUpload as he } from "../../components/EvidenceUpload.js";
|
|
16
|
+
import { FileLink as ge } from "../../components/FileLink.js";
|
|
17
|
+
import { useMemo as c, useState as l } from "react";
|
|
18
|
+
import { ArrowRight as _e, CalendarClock as ve, PackageCheck as u, Plus as d, Ship as f, Truck as ye } from "lucide-react";
|
|
19
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
20
|
+
import { Button as g, Input as _, Label as v, ResponsiveDialog as be, ResponsiveDialogContent as xe, ResponsiveDialogDescription as Se, ResponsiveDialogFooter as Ce, ResponsiveDialogHeader as we, ResponsiveDialogTitle as Te, Select as y, SelectContent as b, SelectItem as x, SelectTrigger as S, SelectValue as C, Textarea as w } from "@burdenoff/fe-libs/ui";
|
|
17
21
|
//#region src/theglobalfuel/pages/shipments/ShipmentsPage.tsx
|
|
18
|
-
var
|
|
22
|
+
var T = [
|
|
19
23
|
{
|
|
20
24
|
value: "ALL",
|
|
21
25
|
label: "All"
|
|
@@ -40,14 +44,14 @@ var me = [
|
|
|
40
44
|
value: "CANCELLED",
|
|
41
45
|
label: "Cancelled"
|
|
42
46
|
}
|
|
43
|
-
],
|
|
47
|
+
], E = [
|
|
44
48
|
"PIPELINE",
|
|
45
49
|
"TANKER",
|
|
46
50
|
"VESSEL_BULK",
|
|
47
51
|
"RAIL",
|
|
48
52
|
"TRUCK",
|
|
49
53
|
"GRID"
|
|
50
|
-
],
|
|
54
|
+
], D = [
|
|
51
55
|
"BARRELS",
|
|
52
56
|
"CUBIC_METERS",
|
|
53
57
|
"TONNES",
|
|
@@ -55,7 +59,7 @@ var me = [
|
|
|
55
59
|
"MWH",
|
|
56
60
|
"GJ",
|
|
57
61
|
"MCF"
|
|
58
|
-
], k = {
|
|
62
|
+
], O = 25, k = {
|
|
59
63
|
contractId: "",
|
|
60
64
|
reference: "",
|
|
61
65
|
mode: "TANKER",
|
|
@@ -68,62 +72,65 @@ var me = [
|
|
|
68
72
|
notes: ""
|
|
69
73
|
};
|
|
70
74
|
function A() {
|
|
71
|
-
let [A,
|
|
75
|
+
let [A, Ee] = l("ALL"), [j, De] = l("ALL"), M = o(), [Oe, N] = l(!1), [P, F] = l(k), [I, L] = l(null), [R, z] = l(null), [ke, B] = l(null), V = ue(), H = j === "ALL" ? void 0 : j, { data: U, isLoading: Ae, isError: je, refetch: Me } = a(H, A === "ALL" ? void 0 : A, {
|
|
76
|
+
limit: O,
|
|
77
|
+
cursor: M.cursor
|
|
78
|
+
}), W = a(H, void 0, { limit: 200 }), G = oe({ pagination: { limit: 100 } }), K = c(() => G.data?.items ?? [], [G.data]), q = c(() => {
|
|
72
79
|
let e = /* @__PURE__ */ new Map();
|
|
73
80
|
for (let t of K) e.set(t.id, t);
|
|
74
81
|
return e;
|
|
75
|
-
}, [K]), J =
|
|
82
|
+
}, [K]), J = ce(), Y = se(), Ne = le(), X = c(() => U?.items ?? [], [U]), Z = c(() => W.data?.items ?? [], [W.data]), Pe = Z.filter((e) => e.status === "SCHEDULED").length, Fe = Z.filter((e) => e.status === "IN_TRANSIT").length, Ie = Z.filter((e) => e.status === "DELIVERED").length, Le = c(() => {
|
|
76
83
|
let e = {};
|
|
77
84
|
for (let t of Z) e[t.status] = (e[t.status] ?? 0) + 1;
|
|
78
85
|
return e;
|
|
79
|
-
}, [Z]),
|
|
86
|
+
}, [Z]), Re = T.map((e) => ({
|
|
80
87
|
value: e.value,
|
|
81
88
|
label: e.label,
|
|
82
|
-
count: e.value === "ALL" ? Z.length :
|
|
89
|
+
count: e.value === "ALL" ? Z.length : Le[e.value] ?? 0
|
|
83
90
|
})), Q = () => {
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
if (!
|
|
87
|
-
|
|
91
|
+
F(k), L(null), z(null);
|
|
92
|
+
}, ze = async () => {
|
|
93
|
+
if (!P.contractId) {
|
|
94
|
+
z("Select the contract this shipment fulfils.");
|
|
88
95
|
return;
|
|
89
96
|
}
|
|
90
|
-
if (!
|
|
91
|
-
|
|
97
|
+
if (!P.reference.trim()) {
|
|
98
|
+
z("A shipment reference is required.");
|
|
92
99
|
return;
|
|
93
100
|
}
|
|
94
|
-
let e = Number(
|
|
95
|
-
if (!
|
|
96
|
-
V("Enter a volume greater than zero.");
|
|
101
|
+
let e = Number(P.volume);
|
|
102
|
+
if (!P.volume || Number.isNaN(e) || e <= 0) {
|
|
103
|
+
z("Enter a volume greater than zero."), V.error("Enter a volume greater than zero.");
|
|
97
104
|
return;
|
|
98
105
|
}
|
|
99
|
-
|
|
106
|
+
z(null);
|
|
100
107
|
try {
|
|
101
108
|
await J.mutateAsync({
|
|
102
|
-
contractId:
|
|
103
|
-
reference:
|
|
104
|
-
mode:
|
|
105
|
-
carrier:
|
|
106
|
-
origin:
|
|
107
|
-
destination:
|
|
109
|
+
contractId: P.contractId,
|
|
110
|
+
reference: P.reference.trim(),
|
|
111
|
+
mode: P.mode,
|
|
112
|
+
carrier: P.carrier.trim() || null,
|
|
113
|
+
origin: P.origin.trim() || null,
|
|
114
|
+
destination: P.destination.trim() || null,
|
|
108
115
|
volume: e,
|
|
109
|
-
unit:
|
|
110
|
-
scheduledAt:
|
|
111
|
-
documentFileId:
|
|
112
|
-
notes:
|
|
113
|
-
}),
|
|
116
|
+
unit: P.unit,
|
|
117
|
+
scheduledAt: ee(P.scheduledAt) ?? null,
|
|
118
|
+
documentFileId: I?.fileId ?? null,
|
|
119
|
+
notes: P.notes.trim() || null
|
|
120
|
+
}), V.success("Shipment scheduled"), N(!1), Q();
|
|
114
121
|
} catch (e) {
|
|
115
|
-
|
|
122
|
+
z(e instanceof Error ? e.message : "Failed to schedule shipment."), V.fromError(e);
|
|
116
123
|
}
|
|
117
|
-
},
|
|
124
|
+
}, Be = [
|
|
118
125
|
{
|
|
119
126
|
key: "reference",
|
|
120
127
|
header: "Shipment",
|
|
121
|
-
render: (e) => /* @__PURE__ */
|
|
128
|
+
render: (e) => /* @__PURE__ */ h("div", {
|
|
122
129
|
className: "min-w-0",
|
|
123
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ m("p", {
|
|
124
131
|
className: "truncate font-semibold text-text-primary",
|
|
125
132
|
children: e.reference
|
|
126
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ m("p", {
|
|
127
134
|
className: "truncate text-xs text-text-tertiary md:hidden",
|
|
128
135
|
children: r(e.mode)
|
|
129
136
|
})]
|
|
@@ -135,16 +142,16 @@ function A() {
|
|
|
135
142
|
hideOnMobile: !0,
|
|
136
143
|
render: (e) => {
|
|
137
144
|
let t = q.get(e.contractId);
|
|
138
|
-
return t ? /* @__PURE__ */
|
|
145
|
+
return t ? /* @__PURE__ */ h("div", {
|
|
139
146
|
className: "min-w-0",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ m("p", {
|
|
141
148
|
className: "truncate font-medium text-text-primary",
|
|
142
149
|
children: t.reference
|
|
143
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ m("p", {
|
|
144
151
|
className: "truncate text-xs text-text-tertiary",
|
|
145
152
|
children: t.counterparty
|
|
146
153
|
})]
|
|
147
|
-
}) : /* @__PURE__ */
|
|
154
|
+
}) : /* @__PURE__ */ m("span", {
|
|
148
155
|
className: "font-mono text-xs text-text-tertiary",
|
|
149
156
|
children: e.contractId.slice(0, 8)
|
|
150
157
|
});
|
|
@@ -154,7 +161,7 @@ function A() {
|
|
|
154
161
|
key: "mode",
|
|
155
162
|
header: "Mode",
|
|
156
163
|
hideOnMobile: !0,
|
|
157
|
-
render: (e) => /* @__PURE__ */
|
|
164
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
158
165
|
className: "text-text-secondary",
|
|
159
166
|
children: r(e.mode)
|
|
160
167
|
})
|
|
@@ -162,7 +169,7 @@ function A() {
|
|
|
162
169
|
{
|
|
163
170
|
key: "status",
|
|
164
171
|
header: "Status",
|
|
165
|
-
render: (e) => /* @__PURE__ */
|
|
172
|
+
render: (e) => /* @__PURE__ */ m(te, { status: e.status })
|
|
166
173
|
},
|
|
167
174
|
{
|
|
168
175
|
key: "route",
|
|
@@ -170,18 +177,18 @@ function A() {
|
|
|
170
177
|
hideOnMobile: !0,
|
|
171
178
|
render: (e) => {
|
|
172
179
|
let t = e.origin?.trim(), n = e.destination?.trim();
|
|
173
|
-
return !t && !n ? /* @__PURE__ */
|
|
180
|
+
return !t && !n ? /* @__PURE__ */ m("span", {
|
|
174
181
|
className: "text-text-tertiary",
|
|
175
182
|
children: "—"
|
|
176
|
-
}) : /* @__PURE__ */
|
|
183
|
+
}) : /* @__PURE__ */ h("span", {
|
|
177
184
|
className: "inline-flex items-center gap-1.5 text-text-secondary",
|
|
178
185
|
children: [
|
|
179
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ m("span", {
|
|
180
187
|
className: "truncate",
|
|
181
188
|
children: t ?? "—"
|
|
182
189
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ m(_e, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }),
|
|
191
|
+
/* @__PURE__ */ m("span", {
|
|
185
192
|
className: "truncate",
|
|
186
193
|
children: n ?? "—"
|
|
187
194
|
})
|
|
@@ -194,9 +201,9 @@ function A() {
|
|
|
194
201
|
header: "Volume",
|
|
195
202
|
align: "right",
|
|
196
203
|
sortValue: (e) => e.volume,
|
|
197
|
-
render: (e) => /* @__PURE__ */
|
|
204
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
198
205
|
className: "tabular-nums text-text-primary",
|
|
199
|
-
children:
|
|
206
|
+
children: i(e.volume, e.unit)
|
|
200
207
|
})
|
|
201
208
|
},
|
|
202
209
|
{
|
|
@@ -205,7 +212,7 @@ function A() {
|
|
|
205
212
|
align: "right",
|
|
206
213
|
hideOnMobile: !0,
|
|
207
214
|
sortValue: (e) => e.scheduledAt ?? "",
|
|
208
|
-
render: (e) => /* @__PURE__ */
|
|
215
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
209
216
|
className: "text-text-tertiary",
|
|
210
217
|
children: n(e.scheduledAt)
|
|
211
218
|
})
|
|
@@ -214,7 +221,7 @@ function A() {
|
|
|
214
221
|
key: "document",
|
|
215
222
|
header: "Document",
|
|
216
223
|
hideOnMobile: !0,
|
|
217
|
-
render: (e) => e.document?.id ? /* @__PURE__ */
|
|
224
|
+
render: (e) => e.document?.id ? /* @__PURE__ */ m(ge, { fileId: e.document.id }) : /* @__PURE__ */ m("span", {
|
|
218
225
|
className: "text-text-tertiary",
|
|
219
226
|
children: "—"
|
|
220
227
|
})
|
|
@@ -223,70 +230,105 @@ function A() {
|
|
|
223
230
|
key: "action",
|
|
224
231
|
header: "",
|
|
225
232
|
align: "right",
|
|
226
|
-
render: (e) =>
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
render: (e) => {
|
|
234
|
+
let t = pe(fe, e.status), n = de.includes(e.status), i = ke === e.id;
|
|
235
|
+
return t.length === 0 && !n ? /* @__PURE__ */ m("span", {
|
|
236
|
+
className: "text-text-tertiary",
|
|
237
|
+
children: "—"
|
|
238
|
+
}) : /* @__PURE__ */ h("div", {
|
|
239
|
+
className: "flex items-center justify-end gap-2",
|
|
240
|
+
children: [t.length > 0 && /* @__PURE__ */ h(y, {
|
|
241
|
+
value: e.status,
|
|
242
|
+
disabled: i,
|
|
243
|
+
onValueChange: (t) => {
|
|
244
|
+
t !== e.status && (B(e.id), Ne.mutate({
|
|
245
|
+
id: e.id,
|
|
246
|
+
status: t
|
|
247
|
+
}, {
|
|
248
|
+
onSuccess: () => V.success("Shipment updated"),
|
|
249
|
+
onError: (e) => V.fromError(e),
|
|
250
|
+
onSettled: () => B(null)
|
|
251
|
+
}));
|
|
252
|
+
},
|
|
253
|
+
children: [/* @__PURE__ */ m(S, {
|
|
254
|
+
className: "h-8 w-36",
|
|
255
|
+
"aria-label": `Change status for shipment ${e.reference}`,
|
|
256
|
+
children: /* @__PURE__ */ m(C, { placeholder: r(e.status) })
|
|
257
|
+
}), /* @__PURE__ */ m(b, { children: t.map((e) => /* @__PURE__ */ m(x, {
|
|
258
|
+
value: e,
|
|
259
|
+
children: r(e)
|
|
260
|
+
}, e)) })]
|
|
261
|
+
}), n && /* @__PURE__ */ h(g, {
|
|
262
|
+
size: "sm",
|
|
263
|
+
variant: "outline",
|
|
264
|
+
disabled: Y.isPending || i,
|
|
265
|
+
onClick: () => Y.mutate(e.id, {
|
|
266
|
+
onSuccess: () => V.success("Shipment delivered"),
|
|
267
|
+
onError: (e) => V.fromError(e)
|
|
268
|
+
}),
|
|
269
|
+
children: [/* @__PURE__ */ m(u, { className: "mr-1.5 h-4 w-4" }), " Mark delivered"]
|
|
270
|
+
})]
|
|
271
|
+
});
|
|
272
|
+
}
|
|
236
273
|
}
|
|
237
|
-
], $ = A !== "ALL" ||
|
|
238
|
-
return /* @__PURE__ */
|
|
274
|
+
], $ = A !== "ALL" || j !== "ALL";
|
|
275
|
+
return /* @__PURE__ */ h(e, {
|
|
239
276
|
title: "Shipments",
|
|
240
277
|
description: "Cargo movements delivering offtake contracts — pipelines, tankers, vessels, rail & grid.",
|
|
241
|
-
actions: /* @__PURE__ */
|
|
242
|
-
onClick: () =>
|
|
243
|
-
children: [/* @__PURE__ */
|
|
278
|
+
actions: /* @__PURE__ */ h(g, {
|
|
279
|
+
onClick: () => N(!0),
|
|
280
|
+
children: [/* @__PURE__ */ m(d, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
|
|
244
281
|
}),
|
|
245
282
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ h("div", {
|
|
247
284
|
className: "mb-6 grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
248
285
|
children: [
|
|
249
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ m(t, {
|
|
250
287
|
featured: !0,
|
|
251
|
-
icon: /* @__PURE__ */
|
|
288
|
+
icon: /* @__PURE__ */ m(f, { className: "h-5 w-5" }),
|
|
252
289
|
value: Z.length,
|
|
253
290
|
label: "Total shipments"
|
|
254
291
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
icon: /* @__PURE__ */
|
|
257
|
-
value:
|
|
292
|
+
/* @__PURE__ */ m(t, {
|
|
293
|
+
icon: /* @__PURE__ */ m(ve, { className: "h-5 w-5" }),
|
|
294
|
+
value: Pe,
|
|
258
295
|
label: "Scheduled"
|
|
259
296
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ m(t, {
|
|
261
298
|
accent: "warning",
|
|
262
|
-
icon: /* @__PURE__ */
|
|
263
|
-
value:
|
|
299
|
+
icon: /* @__PURE__ */ m(ye, { className: "h-5 w-5" }),
|
|
300
|
+
value: Fe,
|
|
264
301
|
label: "In transit"
|
|
265
302
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ m(t, {
|
|
267
304
|
accent: "success",
|
|
268
|
-
icon: /* @__PURE__ */
|
|
269
|
-
value:
|
|
305
|
+
icon: /* @__PURE__ */ m(u, { className: "h-5 w-5" }),
|
|
306
|
+
value: Ie,
|
|
270
307
|
label: "Delivered"
|
|
271
308
|
})
|
|
272
309
|
]
|
|
273
310
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ h("div", {
|
|
275
312
|
className: "mb-5 flex flex-wrap items-center gap-3",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
277
|
-
options:
|
|
313
|
+
children: [/* @__PURE__ */ m(me, {
|
|
314
|
+
options: Re,
|
|
278
315
|
value: A,
|
|
279
|
-
onChange:
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
316
|
+
onChange: (e) => {
|
|
317
|
+
Ee(e), M.reset();
|
|
318
|
+
}
|
|
319
|
+
}), /* @__PURE__ */ h(y, {
|
|
320
|
+
value: j,
|
|
321
|
+
onValueChange: (e) => {
|
|
322
|
+
De(e), M.reset();
|
|
323
|
+
},
|
|
324
|
+
children: [/* @__PURE__ */ m(S, {
|
|
284
325
|
className: "w-56",
|
|
285
|
-
|
|
286
|
-
|
|
326
|
+
"aria-label": "Filter by contract",
|
|
327
|
+
children: /* @__PURE__ */ m(C, { placeholder: "All contracts" })
|
|
328
|
+
}), /* @__PURE__ */ h(b, { children: [/* @__PURE__ */ m(x, {
|
|
287
329
|
value: "ALL",
|
|
288
330
|
children: "All contracts"
|
|
289
|
-
}), K.map((e) => /* @__PURE__ */
|
|
331
|
+
}), K.map((e) => /* @__PURE__ */ h(x, {
|
|
290
332
|
value: e.id,
|
|
291
333
|
children: [
|
|
292
334
|
e.reference,
|
|
@@ -296,60 +338,68 @@ function A() {
|
|
|
296
338
|
}, e.id))] })]
|
|
297
339
|
})]
|
|
298
340
|
}),
|
|
299
|
-
|
|
341
|
+
Ae ? /* @__PURE__ */ m(ie, { label: "Loading shipments…" }) : je ? /* @__PURE__ */ m(re, {
|
|
300
342
|
message: "Couldn't load shipments.",
|
|
301
|
-
onRetry: () =>
|
|
302
|
-
}) : X.length === 0 ? /* @__PURE__ */
|
|
343
|
+
onRetry: () => Me()
|
|
344
|
+
}) : X.length === 0 ? /* @__PURE__ */ m(ae, {
|
|
303
345
|
illustration: "empty-data",
|
|
304
|
-
icon: /* @__PURE__ */
|
|
346
|
+
icon: /* @__PURE__ */ m(f, { className: "h-10 w-10" }),
|
|
305
347
|
title: $ ? "No matching shipments" : "No shipments yet",
|
|
306
348
|
description: $ ? "No shipments match these filters. Try a different status or contract." : "Schedule your first shipment to start tracking cargo against your offtake contracts.",
|
|
307
|
-
action: /* @__PURE__ */
|
|
308
|
-
onClick: () =>
|
|
309
|
-
children: [/* @__PURE__ */
|
|
349
|
+
action: /* @__PURE__ */ h(g, {
|
|
350
|
+
onClick: () => N(!0),
|
|
351
|
+
children: [/* @__PURE__ */ m(d, { className: "mr-1.5 h-4 w-4" }), " Schedule shipment"]
|
|
310
352
|
})
|
|
311
|
-
}) : /* @__PURE__ */
|
|
312
|
-
columns:
|
|
353
|
+
}) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(ne, {
|
|
354
|
+
columns: Be,
|
|
313
355
|
rows: X,
|
|
314
356
|
rowKey: (e) => e.id,
|
|
315
357
|
defaultSort: {
|
|
316
358
|
key: "scheduledAt",
|
|
317
359
|
dir: "desc"
|
|
318
360
|
}
|
|
319
|
-
}),
|
|
320
|
-
|
|
321
|
-
|
|
361
|
+
}), /* @__PURE__ */ m(s, {
|
|
362
|
+
page: M.page,
|
|
363
|
+
pageSize: O,
|
|
364
|
+
itemCount: X.length,
|
|
365
|
+
hasMore: U?.pageInfo?.hasMore ?? !1,
|
|
366
|
+
onPageChange: (e) => M.onPageChange(e, U?.pageInfo?.cursor)
|
|
367
|
+
})] }),
|
|
368
|
+
/* @__PURE__ */ m(be, {
|
|
369
|
+
open: Oe,
|
|
322
370
|
onOpenChange: (e) => {
|
|
323
|
-
|
|
371
|
+
N(e), e || Q();
|
|
324
372
|
},
|
|
325
|
-
children: /* @__PURE__ */
|
|
326
|
-
|
|
327
|
-
|
|
373
|
+
children: /* @__PURE__ */ h(xe, { children: [/* @__PURE__ */ h(we, { children: [/* @__PURE__ */ m(Te, { children: "Schedule shipment" }), /* @__PURE__ */ m(Se, { children: "Book a cargo movement against an offtake contract and track it to delivery." })] }), /* @__PURE__ */ h("form", {
|
|
374
|
+
onSubmit: (e) => {
|
|
375
|
+
e.preventDefault(), ze();
|
|
376
|
+
},
|
|
377
|
+
children: [/* @__PURE__ */ h("div", {
|
|
328
378
|
className: "grid gap-4 py-2",
|
|
329
379
|
children: [
|
|
330
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ h("div", {
|
|
331
381
|
className: "grid gap-1.5",
|
|
332
|
-
children: [/* @__PURE__ */ v
|
|
382
|
+
children: [/* @__PURE__ */ m(v, {
|
|
333
383
|
htmlFor: "shipContract",
|
|
334
384
|
children: "Contract *"
|
|
335
|
-
}), /* @__PURE__ */ y
|
|
336
|
-
value:
|
|
385
|
+
}), /* @__PURE__ */ h(y, {
|
|
386
|
+
value: P.contractId,
|
|
337
387
|
onValueChange: (e) => {
|
|
338
388
|
let t = q.get(e);
|
|
339
|
-
|
|
389
|
+
F((n) => ({
|
|
340
390
|
...n,
|
|
341
391
|
contractId: e,
|
|
342
392
|
unit: t?.unit ?? n.unit
|
|
343
393
|
}));
|
|
344
394
|
},
|
|
345
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ m(S, {
|
|
346
396
|
id: "shipContract",
|
|
347
|
-
children: /* @__PURE__ */
|
|
348
|
-
}), /* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */ m(C, { placeholder: "Select a contract" })
|
|
398
|
+
}), /* @__PURE__ */ m(b, { children: K.length === 0 ? /* @__PURE__ */ m(x, {
|
|
349
399
|
value: "none",
|
|
350
400
|
disabled: !0,
|
|
351
401
|
children: "No contracts available"
|
|
352
|
-
}) : K.map((e) => /* @__PURE__ */
|
|
402
|
+
}) : K.map((e) => /* @__PURE__ */ h(x, {
|
|
353
403
|
value: e.id,
|
|
354
404
|
children: [
|
|
355
405
|
e.reference,
|
|
@@ -359,187 +409,189 @@ function A() {
|
|
|
359
409
|
}, e.id)) })]
|
|
360
410
|
})]
|
|
361
411
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ h("div", {
|
|
363
413
|
className: "grid gap-2 sm:grid-cols-2",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ h("div", {
|
|
365
415
|
className: "grid gap-1.5",
|
|
366
|
-
children: [/* @__PURE__ */ v
|
|
416
|
+
children: [/* @__PURE__ */ m(v, {
|
|
367
417
|
htmlFor: "shipRef",
|
|
368
418
|
children: "Reference *"
|
|
369
|
-
}), /* @__PURE__ */
|
|
419
|
+
}), /* @__PURE__ */ m(_, {
|
|
370
420
|
id: "shipRef",
|
|
371
|
-
value:
|
|
372
|
-
onChange: (e) =>
|
|
373
|
-
...
|
|
421
|
+
value: P.reference,
|
|
422
|
+
onChange: (e) => F({
|
|
423
|
+
...P,
|
|
374
424
|
reference: e.target.value
|
|
375
425
|
}),
|
|
376
426
|
placeholder: "SHP-2026-0142"
|
|
377
427
|
})]
|
|
378
|
-
}), /* @__PURE__ */
|
|
428
|
+
}), /* @__PURE__ */ h("div", {
|
|
379
429
|
className: "grid gap-1.5",
|
|
380
|
-
children: [/* @__PURE__ */ v
|
|
430
|
+
children: [/* @__PURE__ */ m(v, {
|
|
381
431
|
htmlFor: "shipMode",
|
|
382
432
|
children: "Mode"
|
|
383
|
-
}), /* @__PURE__ */ y
|
|
384
|
-
value:
|
|
385
|
-
onValueChange: (e) =>
|
|
386
|
-
...
|
|
433
|
+
}), /* @__PURE__ */ h(y, {
|
|
434
|
+
value: P.mode,
|
|
435
|
+
onValueChange: (e) => F({
|
|
436
|
+
...P,
|
|
387
437
|
mode: e
|
|
388
438
|
}),
|
|
389
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ m(S, {
|
|
390
440
|
id: "shipMode",
|
|
391
|
-
children: /* @__PURE__ */
|
|
392
|
-
}), /* @__PURE__ */
|
|
441
|
+
children: /* @__PURE__ */ m(C, {})
|
|
442
|
+
}), /* @__PURE__ */ m(b, { children: E.map((e) => /* @__PURE__ */ m(x, {
|
|
393
443
|
value: e,
|
|
394
444
|
children: r(e)
|
|
395
445
|
}, e)) })]
|
|
396
446
|
})]
|
|
397
447
|
})]
|
|
398
448
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ h("div", {
|
|
400
450
|
className: "grid gap-2 sm:grid-cols-2",
|
|
401
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ h("div", {
|
|
402
452
|
className: "grid gap-1.5",
|
|
403
|
-
children: [/* @__PURE__ */ v
|
|
453
|
+
children: [/* @__PURE__ */ m(v, {
|
|
404
454
|
htmlFor: "shipOrigin",
|
|
405
455
|
children: "Origin"
|
|
406
|
-
}), /* @__PURE__ */
|
|
456
|
+
}), /* @__PURE__ */ m(_, {
|
|
407
457
|
id: "shipOrigin",
|
|
408
|
-
value:
|
|
409
|
-
onChange: (e) =>
|
|
410
|
-
...
|
|
458
|
+
value: P.origin,
|
|
459
|
+
onChange: (e) => F({
|
|
460
|
+
...P,
|
|
411
461
|
origin: e.target.value
|
|
412
462
|
}),
|
|
413
463
|
placeholder: "Ras Tanura Terminal"
|
|
414
464
|
})]
|
|
415
|
-
}), /* @__PURE__ */
|
|
465
|
+
}), /* @__PURE__ */ h("div", {
|
|
416
466
|
className: "grid gap-1.5",
|
|
417
|
-
children: [/* @__PURE__ */ v
|
|
467
|
+
children: [/* @__PURE__ */ m(v, {
|
|
418
468
|
htmlFor: "shipDest",
|
|
419
469
|
children: "Destination"
|
|
420
|
-
}), /* @__PURE__ */
|
|
470
|
+
}), /* @__PURE__ */ m(_, {
|
|
421
471
|
id: "shipDest",
|
|
422
|
-
value:
|
|
423
|
-
onChange: (e) =>
|
|
424
|
-
...
|
|
472
|
+
value: P.destination,
|
|
473
|
+
onChange: (e) => F({
|
|
474
|
+
...P,
|
|
425
475
|
destination: e.target.value
|
|
426
476
|
}),
|
|
427
477
|
placeholder: "Rotterdam"
|
|
428
478
|
})]
|
|
429
479
|
})]
|
|
430
480
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ h("div", {
|
|
432
482
|
className: "grid gap-2 sm:grid-cols-3",
|
|
433
483
|
children: [
|
|
434
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ h("div", {
|
|
435
485
|
className: "grid gap-1.5",
|
|
436
|
-
children: [/* @__PURE__ */ v
|
|
486
|
+
children: [/* @__PURE__ */ m(v, {
|
|
437
487
|
htmlFor: "shipVolume",
|
|
438
488
|
children: "Volume *"
|
|
439
|
-
}), /* @__PURE__ */
|
|
489
|
+
}), /* @__PURE__ */ m(_, {
|
|
440
490
|
id: "shipVolume",
|
|
441
491
|
type: "number",
|
|
442
492
|
min: "0",
|
|
443
493
|
step: "any",
|
|
444
|
-
value:
|
|
445
|
-
onChange: (e) =>
|
|
446
|
-
...
|
|
494
|
+
value: P.volume,
|
|
495
|
+
onChange: (e) => F({
|
|
496
|
+
...P,
|
|
447
497
|
volume: e.target.value
|
|
448
498
|
}),
|
|
449
499
|
placeholder: "500000"
|
|
450
500
|
})]
|
|
451
501
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ h("div", {
|
|
453
503
|
className: "grid gap-1.5",
|
|
454
|
-
children: [/* @__PURE__ */ v
|
|
504
|
+
children: [/* @__PURE__ */ m(v, {
|
|
455
505
|
htmlFor: "shipUnit",
|
|
456
506
|
children: "Unit"
|
|
457
|
-
}), /* @__PURE__ */ y
|
|
458
|
-
value:
|
|
459
|
-
onValueChange: (e) =>
|
|
460
|
-
...
|
|
507
|
+
}), /* @__PURE__ */ h(y, {
|
|
508
|
+
value: P.unit,
|
|
509
|
+
onValueChange: (e) => F({
|
|
510
|
+
...P,
|
|
461
511
|
unit: e
|
|
462
512
|
}),
|
|
463
|
-
children: [/* @__PURE__ */
|
|
513
|
+
children: [/* @__PURE__ */ m(S, {
|
|
464
514
|
id: "shipUnit",
|
|
465
|
-
children: /* @__PURE__ */
|
|
466
|
-
}), /* @__PURE__ */
|
|
515
|
+
children: /* @__PURE__ */ m(C, {})
|
|
516
|
+
}), /* @__PURE__ */ m(b, { children: D.map((e) => /* @__PURE__ */ m(x, {
|
|
467
517
|
value: e,
|
|
468
518
|
children: r(e)
|
|
469
519
|
}, e)) })]
|
|
470
520
|
})]
|
|
471
521
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ h("div", {
|
|
473
523
|
className: "grid gap-1.5",
|
|
474
|
-
children: [/* @__PURE__ */ v
|
|
524
|
+
children: [/* @__PURE__ */ m(v, {
|
|
475
525
|
htmlFor: "shipScheduled",
|
|
476
526
|
children: "Scheduled date"
|
|
477
|
-
}), /* @__PURE__ */
|
|
527
|
+
}), /* @__PURE__ */ m(_, {
|
|
478
528
|
id: "shipScheduled",
|
|
479
529
|
type: "date",
|
|
480
|
-
value:
|
|
481
|
-
onChange: (e) =>
|
|
482
|
-
...
|
|
530
|
+
value: P.scheduledAt,
|
|
531
|
+
onChange: (e) => F({
|
|
532
|
+
...P,
|
|
483
533
|
scheduledAt: e.target.value
|
|
484
534
|
})
|
|
485
535
|
})]
|
|
486
536
|
})
|
|
487
537
|
]
|
|
488
538
|
}),
|
|
489
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ h("div", {
|
|
490
540
|
className: "grid gap-1.5",
|
|
491
|
-
children: [/* @__PURE__ */ v
|
|
541
|
+
children: [/* @__PURE__ */ m(v, {
|
|
492
542
|
htmlFor: "shipCarrier",
|
|
493
543
|
children: "Carrier"
|
|
494
|
-
}), /* @__PURE__ */
|
|
544
|
+
}), /* @__PURE__ */ m(_, {
|
|
495
545
|
id: "shipCarrier",
|
|
496
|
-
value:
|
|
497
|
-
onChange: (e) =>
|
|
498
|
-
...
|
|
546
|
+
value: P.carrier,
|
|
547
|
+
onChange: (e) => F({
|
|
548
|
+
...P,
|
|
499
549
|
carrier: e.target.value
|
|
500
550
|
}),
|
|
501
551
|
placeholder: "Frontline Ltd."
|
|
502
552
|
})]
|
|
503
553
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ m(he, {
|
|
505
555
|
id: "shipDocument",
|
|
506
556
|
label: "Bill of lading (optional)",
|
|
507
|
-
value:
|
|
508
|
-
onChange:
|
|
557
|
+
value: I,
|
|
558
|
+
onChange: L,
|
|
509
559
|
hint: "Attach the bill of lading or shipping document (PDF or image)."
|
|
510
560
|
}),
|
|
511
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ h("div", {
|
|
512
562
|
className: "grid gap-1.5",
|
|
513
|
-
children: [/* @__PURE__ */ v
|
|
563
|
+
children: [/* @__PURE__ */ m(v, {
|
|
514
564
|
htmlFor: "shipNotes",
|
|
515
565
|
children: "Notes"
|
|
516
|
-
}), /* @__PURE__ */
|
|
566
|
+
}), /* @__PURE__ */ m(w, {
|
|
517
567
|
id: "shipNotes",
|
|
518
|
-
value:
|
|
519
|
-
onChange: (e) =>
|
|
520
|
-
...
|
|
568
|
+
value: P.notes,
|
|
569
|
+
onChange: (e) => F({
|
|
570
|
+
...P,
|
|
521
571
|
notes: e.target.value
|
|
522
572
|
}),
|
|
523
573
|
placeholder: "Optional context — laycan window, inspector, terms.",
|
|
524
574
|
rows: 2
|
|
525
575
|
})]
|
|
526
576
|
}),
|
|
527
|
-
|
|
577
|
+
R && /* @__PURE__ */ m("p", {
|
|
528
578
|
className: "text-sm text-status-error-text",
|
|
529
|
-
children:
|
|
579
|
+
children: R
|
|
530
580
|
})
|
|
531
581
|
]
|
|
532
|
-
}),
|
|
533
|
-
|
|
582
|
+
}), /* @__PURE__ */ h(Ce, { children: [/* @__PURE__ */ m(g, {
|
|
583
|
+
type: "button",
|
|
534
584
|
variant: "outline",
|
|
535
|
-
onClick: () =>
|
|
585
|
+
onClick: () => {
|
|
586
|
+
N(!1), Q();
|
|
587
|
+
},
|
|
536
588
|
children: "Cancel"
|
|
537
|
-
}), /* @__PURE__ */
|
|
538
|
-
|
|
589
|
+
}), /* @__PURE__ */ m(g, {
|
|
590
|
+
type: "submit",
|
|
539
591
|
disabled: J.isPending,
|
|
540
592
|
children: J.isPending ? "Scheduling…" : "Schedule shipment"
|
|
541
|
-
})] })
|
|
542
|
-
] })
|
|
593
|
+
})] })]
|
|
594
|
+
})] })
|
|
543
595
|
})
|
|
544
596
|
]
|
|
545
597
|
});
|