@burdenoff/microfe-theglobalfuel 2026.705.2 → 2026.705.4

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