@burdenoff/microfe-theglobalfuel 2026.705.2 → 2026.705.3

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.
@@ -1,30 +1,30 @@
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, isExpired as a, toBackendDate as ee } from "../../utils/formatters.js";
5
- import { StatusBadge as o } from "../../components/StatusBadge.js";
6
- import { DataTable as te } from "../../components/DataTable.js";
7
- import { ErrorView as ne, LoadingView as re } from "../../components/StateViews.js";
8
- import { EmptyState as ie } from "../../components/EmptyState.js";
4
+ import { formatDate as r, formatEnumLabel as i, isExpired as ee, toBackendDate as te } from "../../utils/formatters.js";
5
+ import { StatusBadge as a } from "../../components/StatusBadge.js";
6
+ import { DataTable as ne } from "../../components/DataTable.js";
7
+ import { ErrorView as re, LoadingView as ie } from "../../components/StateViews.js";
8
+ import { EmptyState as ae } from "../../components/EmptyState.js";
9
9
  import "../../context/index.js";
10
- import { useTheAssets as ae, useTheComplianceCerts as s, useTheCreateComplianceCert as oe, useTheTransitionComplianceCert as se } from "../../hooks/useTheGlobalFuelApi.js";
11
- import { useCursorPager as ce } from "../../hooks/useCursorPager.js";
12
- import { useNotify as le } from "../../hooks/useNotify.js";
10
+ import { useTheAssets as oe, useTheComplianceCerts as o, useTheCreateComplianceCert as se, useTheTransitionComplianceCert as ce } from "../../hooks/useTheGlobalFuelApi.js";
11
+ import { useCursorPager as le } from "../../hooks/useCursorPager.js";
12
+ import { useNotify as ue } from "../../hooks/useNotify.js";
13
13
  import "../../hooks/index.js";
14
- import { COMPLIANCE_TRANSITIONS as ue, nextStatuses as de } from "../../utils/transitions.js";
15
- import { FilterTabs as fe } from "../../components/FilterTabs.js";
16
- import { Pagination as pe } from "../../components/Pagination.js";
17
- import { EvidenceUpload as me } from "../../components/EvidenceUpload.js";
18
- import { FileLink as c } from "../../components/FileLink.js";
19
- import { TheDiscussion as he } from "../../components/TheDiscussion.js";
20
- import { TheTags as ge } from "../../components/TheTags.js";
14
+ import { COMPLIANCE_TRANSITIONS as de, nextStatuses as fe } from "../../utils/transitions.js";
15
+ import { FilterTabs as pe } from "../../components/FilterTabs.js";
16
+ import { Pagination as me } from "../../components/Pagination.js";
17
+ import { EvidenceUpload as he } from "../../components/EvidenceUpload.js";
18
+ import { FileLink as s } from "../../components/FileLink.js";
19
+ import { TheDiscussion as ge } from "../../components/TheDiscussion.js";
20
+ import { TheTags as _e } from "../../components/TheTags.js";
21
21
  import "../../components/index.js";
22
- import { useMemo as l, useState as u } from "react";
23
- import { AlertTriangle as _e, BadgeCheck as ve, Clock as ye, Info as be, Plus as xe, ScrollText as Se } from "lucide-react";
24
- import { Fragment as Ce, jsx as d, jsxs as f } from "react/jsx-runtime";
25
- import { Button as p, Input as m, Label as h, ResponsiveDialog as g, ResponsiveDialogContent as _, ResponsiveDialogDescription as v, ResponsiveDialogFooter as y, ResponsiveDialogHeader as b, ResponsiveDialogTitle as x, Select as S, SelectContent as C, SelectItem as w, SelectTrigger as T, SelectValue as E, Textarea as we } from "@burdenoff/fe-libs/ui";
22
+ import { useMemo as c, useState as l } from "react";
23
+ import { AlertTriangle as ve, BadgeCheck as ye, Clock as u, Info as be, Plus as d, ScrollText as xe } from "lucide-react";
24
+ import { Fragment as Se, jsx as f, jsxs as p } from "react/jsx-runtime";
25
+ import { Button as m, Input as h, Label as g, ResponsiveDialog as _, ResponsiveDialogContent as v, ResponsiveDialogDescription as y, ResponsiveDialogFooter as b, ResponsiveDialogHeader as x, ResponsiveDialogTitle as S, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as Ce } from "@burdenoff/fe-libs/ui";
26
26
  //#region src/theglobalfuel/pages/compliance/CompliancePage.tsx
27
- var Te = [
27
+ var we = [
28
28
  {
29
29
  value: "ALL",
30
30
  label: "All"
@@ -53,7 +53,7 @@ var Te = [
53
53
  value: "REVOKED",
54
54
  label: "Revoked"
55
55
  }
56
- ], D = [
56
+ ], O = [
57
57
  "EXTRACTION_LICENSE",
58
58
  "ENVIRONMENTAL_PERMIT",
59
59
  "EXPORT_LICENSE",
@@ -61,15 +61,15 @@ var Te = [
61
61
  "EMISSIONS_REPORT",
62
62
  "CARBON_CREDIT",
63
63
  "CHAIN_OF_CUSTODY"
64
- ], O = 720 * 60 * 60 * 1e3, k = 25;
65
- function A(e) {
64
+ ], k = 720 * 60 * 60 * 1e3, A = 25;
65
+ function j(e) {
66
66
  if (!e) return !1;
67
67
  let t = new Date(e);
68
68
  if (Number.isNaN(t.getTime())) return !1;
69
69
  let n = t.getTime() - Date.now();
70
- return n >= 0 && n <= O;
70
+ return n >= 0 && n <= k;
71
71
  }
72
- var j = {
72
+ var M = {
73
73
  title: "",
74
74
  category: "EXTRACTION_LICENSE",
75
75
  assetId: "",
@@ -79,151 +79,151 @@ var j = {
79
79
  expiresAt: "",
80
80
  notes: ""
81
81
  };
82
- function M() {
83
- let { currentUser: O } = e(), M = le(), [N, Ee] = u("ALL"), [P, De] = u("ALL"), [F, Oe] = u("ALL"), I = ce(), [ke, L] = u(!1), [R, z] = u(j), [B, V] = u(null), [H, U] = u(null), [Ae, W] = u(null), [G, K] = u(null), [je, q] = u(!1), J = ae({ pagination: { limit: 100 } }).data?.items ?? [], Me = s(void 0, void 0, void 0, { limit: 200 }), { data: Y, isLoading: Ne, isError: Pe, refetch: Fe } = s(F === "ALL" ? void 0 : F, P === "ALL" ? void 0 : P, N === "ALL" ? void 0 : N, {
84
- limit: k,
85
- cursor: I.cursor
86
- }), X = oe(), Ie = se(), Z = l(() => Y?.items ?? [], [Y]), Le = N !== "ALL" || P !== "ALL" || F !== "ALL", Q = l(() => Me.data?.items ?? [], [Me.data]), $ = Q.length, Re = Q.filter((e) => e.status === "APPROVED").length, ze = Q.filter((e) => e.status === "PENDING").length, Be = Q.filter((e) => e.status === "EXPIRED" || a(e.expiresAt) || A(e.expiresAt)).length, Ve = l(() => {
82
+ function N() {
83
+ let { currentUser: k } = e(), N = ue(), [P, Te] = l("ALL"), [F, Ee] = l("ALL"), [I, De] = l("ALL"), L = le(), [Oe, R] = l(!1), [z, B] = l(M), [V, H] = l(null), [U, W] = l(null), [ke, G] = l(null), [K, q] = l(null), [Ae, J] = l(!1), Y = oe({ pagination: { limit: 100 } }).data?.items ?? [], je = o(void 0, void 0, void 0, { limit: 200 }), { data: X, isLoading: Me, isError: Ne, refetch: Pe } = o(I === "ALL" ? void 0 : I, F === "ALL" ? void 0 : F, P === "ALL" ? void 0 : P, {
84
+ limit: A,
85
+ offset: L.page * A
86
+ }), Z = se(), Fe = ce(), Q = c(() => X?.items ?? [], [X]), Ie = P !== "ALL" || F !== "ALL" || I !== "ALL", $ = c(() => je.data?.items ?? [], [je.data]), Le = $.length, Re = $.filter((e) => e.status === "APPROVED").length, ze = $.filter((e) => e.status === "PENDING").length, Be = $.filter((e) => e.status === "EXPIRED" || ee(e.expiresAt) || j(e.expiresAt)).length, Ve = c(() => {
87
87
  let e = {};
88
- for (let t of Q) e[t.status] = (e[t.status] ?? 0) + 1;
88
+ for (let t of $) e[t.status] = (e[t.status] ?? 0) + 1;
89
89
  return e;
90
- }, [Q]), He = Te.map((e) => ({
90
+ }, [$]), He = we.map((e) => ({
91
91
  ...e,
92
- count: e.value === "ALL" ? $ : Ve[e.value] ?? 0
92
+ count: e.value === "ALL" ? Le : Ve[e.value] ?? 0
93
93
  })), Ue = () => {
94
- z(j), V(null), U(null);
94
+ B(M), H(null), W(null);
95
95
  }, We = async () => {
96
- if (!R.title.trim()) {
97
- U("A certification title is required.");
96
+ if (!z.title.trim()) {
97
+ W("A certification title is required.");
98
98
  return;
99
99
  }
100
- U(null);
100
+ W(null);
101
101
  try {
102
- await X.mutateAsync({
103
- title: R.title.trim(),
104
- category: R.category,
105
- assetId: R.assetId || null,
106
- authority: R.authority.trim() || null,
107
- certNumber: R.certNumber.trim() || null,
108
- ownerId: O?.id || null,
109
- issuedAt: ee(R.issuedAt) ?? null,
110
- expiresAt: ee(R.expiresAt) ?? null,
111
- evidenceFileId: B?.fileId ?? null,
112
- notes: R.notes.trim() || null
113
- }), M.success("Certification created"), L(!1), Ue();
102
+ await Z.mutateAsync({
103
+ title: z.title.trim(),
104
+ category: z.category,
105
+ assetId: z.assetId || null,
106
+ authority: z.authority.trim() || null,
107
+ certNumber: z.certNumber.trim() || null,
108
+ ownerId: k?.id || null,
109
+ issuedAt: te(z.issuedAt) ?? null,
110
+ expiresAt: te(z.expiresAt) ?? null,
111
+ evidenceFileId: V?.fileId ?? null,
112
+ notes: z.notes.trim() || null
113
+ }), N.success("Certification created"), R(!1), Ue();
114
114
  } catch (e) {
115
- M.fromError(e), U(e instanceof Error ? e.message : "Failed to create certification.");
115
+ N.fromError(e), W(e instanceof Error ? e.message : "Failed to create certification.");
116
116
  }
117
117
  };
118
- return /* @__PURE__ */ f(t, {
118
+ return /* @__PURE__ */ p(t, {
119
119
  title: "Compliance",
120
120
  description: "Licenses, permits & certifications — issuance, expiry & audit evidence across the resource portfolio.",
121
- actions: /* @__PURE__ */ f(p, {
122
- onClick: () => L(!0),
123
- children: [/* @__PURE__ */ d(xe, { className: "mr-1.5 h-4 w-4" }), " New certification"]
121
+ actions: /* @__PURE__ */ p(m, {
122
+ onClick: () => R(!0),
123
+ children: [/* @__PURE__ */ f(d, { className: "mr-1.5 h-4 w-4" }), " New certification"]
124
124
  }),
125
125
  children: [
126
- /* @__PURE__ */ f("div", {
126
+ /* @__PURE__ */ p("div", {
127
127
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
128
128
  children: [
129
- /* @__PURE__ */ d(n, {
130
- icon: /* @__PURE__ */ d(Se, { className: "h-5 w-5" }),
131
- value: $,
129
+ /* @__PURE__ */ f(n, {
130
+ icon: /* @__PURE__ */ f(xe, { className: "h-5 w-5" }),
131
+ value: Le,
132
132
  label: "Total certifications",
133
133
  featured: !0
134
134
  }),
135
- /* @__PURE__ */ d(n, {
136
- icon: /* @__PURE__ */ d(ve, { className: "h-5 w-5" }),
135
+ /* @__PURE__ */ f(n, {
136
+ icon: /* @__PURE__ */ f(ye, { className: "h-5 w-5" }),
137
137
  value: Re,
138
138
  label: "Approved",
139
139
  accent: "success"
140
140
  }),
141
- /* @__PURE__ */ d(n, {
142
- icon: /* @__PURE__ */ d(ye, { className: "h-5 w-5" }),
141
+ /* @__PURE__ */ f(n, {
142
+ icon: /* @__PURE__ */ f(u, { className: "h-5 w-5" }),
143
143
  value: ze,
144
144
  label: "Pending"
145
145
  }),
146
- /* @__PURE__ */ d(n, {
147
- icon: /* @__PURE__ */ d(_e, { className: "h-5 w-5" }),
146
+ /* @__PURE__ */ f(n, {
147
+ icon: /* @__PURE__ */ f(ve, { className: "h-5 w-5" }),
148
148
  value: Be,
149
149
  label: "Expired / expiring",
150
150
  accent: "warning",
151
- pill: Be > 0 ? /* @__PURE__ */ d("span", {
151
+ pill: Be > 0 ? /* @__PURE__ */ f("span", {
152
152
  className: "rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text",
153
153
  children: "Action needed"
154
154
  }) : void 0
155
155
  })
156
156
  ]
157
157
  }),
158
- /* @__PURE__ */ f("div", {
158
+ /* @__PURE__ */ p("div", {
159
159
  className: "mb-5 mt-6 flex flex-wrap items-center gap-3",
160
160
  children: [
161
- /* @__PURE__ */ d(fe, {
161
+ /* @__PURE__ */ f(pe, {
162
162
  options: He,
163
- value: N,
163
+ value: P,
164
164
  onChange: (e) => {
165
- Ee(e), I.reset();
165
+ Te(e), L.reset();
166
166
  }
167
167
  }),
168
- /* @__PURE__ */ f(S, {
169
- value: P,
168
+ /* @__PURE__ */ p(C, {
169
+ value: F,
170
170
  onValueChange: (e) => {
171
- De(e), I.reset();
171
+ Ee(e), L.reset();
172
172
  },
173
- children: [/* @__PURE__ */ d(T, {
173
+ children: [/* @__PURE__ */ f(E, {
174
174
  className: "w-52",
175
175
  "aria-label": "Filter by category",
176
- children: /* @__PURE__ */ d(E, { placeholder: "All categories" })
177
- }), /* @__PURE__ */ f(C, { children: [/* @__PURE__ */ d(w, {
176
+ children: /* @__PURE__ */ f(D, { placeholder: "All categories" })
177
+ }), /* @__PURE__ */ p(w, { children: [/* @__PURE__ */ f(T, {
178
178
  value: "ALL",
179
179
  children: "All categories"
180
- }), D.map((e) => /* @__PURE__ */ d(w, {
180
+ }), O.map((e) => /* @__PURE__ */ f(T, {
181
181
  value: e,
182
182
  children: i(e)
183
183
  }, e))] })]
184
184
  }),
185
- /* @__PURE__ */ f(S, {
186
- value: F,
185
+ /* @__PURE__ */ p(C, {
186
+ value: I,
187
187
  onValueChange: (e) => {
188
- Oe(e), I.reset();
188
+ De(e), L.reset();
189
189
  },
190
- children: [/* @__PURE__ */ d(T, {
190
+ children: [/* @__PURE__ */ f(E, {
191
191
  className: "w-52",
192
192
  "aria-label": "Filter by asset",
193
- children: /* @__PURE__ */ d(E, { placeholder: "All assets" })
194
- }), /* @__PURE__ */ f(C, { children: [/* @__PURE__ */ d(w, {
193
+ children: /* @__PURE__ */ f(D, { placeholder: "All assets" })
194
+ }), /* @__PURE__ */ p(w, { children: [/* @__PURE__ */ f(T, {
195
195
  value: "ALL",
196
196
  children: "All assets"
197
- }), J.map((e) => /* @__PURE__ */ d(w, {
197
+ }), Y.map((e) => /* @__PURE__ */ f(T, {
198
198
  value: e.id,
199
199
  children: e.name
200
200
  }, e.id))] })]
201
201
  })
202
202
  ]
203
203
  }),
204
- Ne ? /* @__PURE__ */ d(re, { label: "Loading certifications…" }) : Pe ? /* @__PURE__ */ d(ne, {
204
+ Me ? /* @__PURE__ */ f(ie, { label: "Loading certifications…" }) : Ne ? /* @__PURE__ */ f(re, {
205
205
  message: "Couldn't load certifications.",
206
- onRetry: () => Fe()
207
- }) : Z.length === 0 ? /* @__PURE__ */ d(ie, {
206
+ onRetry: () => Pe()
207
+ }) : Q.length === 0 ? /* @__PURE__ */ f(ae, {
208
208
  illustration: "empty-data",
209
- icon: /* @__PURE__ */ d(Se, { className: "h-10 w-10" }),
209
+ icon: /* @__PURE__ */ f(xe, { className: "h-10 w-10" }),
210
210
  title: "No certifications yet",
211
- description: Le ? "No certifications match these filters." : "Register your first license, permit or certification to track issuance, expiry and audit evidence.",
212
- action: Le ? void 0 : /* @__PURE__ */ f(p, {
213
- onClick: () => L(!0),
214
- children: [/* @__PURE__ */ d(xe, { className: "mr-1.5 h-4 w-4" }), " New certification"]
211
+ description: Ie ? "No certifications match these filters." : "Register your first license, permit or certification to track issuance, expiry and audit evidence.",
212
+ action: Ie ? void 0 : /* @__PURE__ */ p(m, {
213
+ onClick: () => R(!0),
214
+ children: [/* @__PURE__ */ f(d, { className: "mr-1.5 h-4 w-4" }), " New certification"]
215
215
  })
216
- }) : /* @__PURE__ */ f(Ce, { children: [/* @__PURE__ */ d(te, {
216
+ }) : /* @__PURE__ */ p(Se, { children: [/* @__PURE__ */ f(ne, {
217
217
  columns: [
218
218
  {
219
219
  key: "title",
220
220
  header: "Certification",
221
- render: (e) => /* @__PURE__ */ f("div", {
221
+ render: (e) => /* @__PURE__ */ p("div", {
222
222
  className: "min-w-0",
223
- children: [/* @__PURE__ */ d("p", {
223
+ children: [/* @__PURE__ */ f("p", {
224
224
  className: "truncate font-semibold text-text-primary",
225
225
  children: e.title
226
- }), /* @__PURE__ */ d("p", {
226
+ }), /* @__PURE__ */ f("p", {
227
227
  className: "truncate text-xs text-text-tertiary",
228
228
  children: i(e.category)
229
229
  })]
@@ -233,7 +233,7 @@ function M() {
233
233
  key: "category",
234
234
  header: "Category",
235
235
  hideOnMobile: !0,
236
- render: (e) => /* @__PURE__ */ d("span", {
236
+ render: (e) => /* @__PURE__ */ f("span", {
237
237
  className: "text-text-secondary",
238
238
  children: i(e.category)
239
239
  })
@@ -241,16 +241,16 @@ function M() {
241
241
  {
242
242
  key: "status",
243
243
  header: "Status",
244
- render: (e) => /* @__PURE__ */ d(o, { status: e.status })
244
+ render: (e) => /* @__PURE__ */ f(a, { status: e.status })
245
245
  },
246
246
  {
247
247
  key: "authority",
248
248
  header: "Authority",
249
249
  hideOnMobile: !0,
250
- render: (e) => e.authority ? /* @__PURE__ */ d("span", {
250
+ render: (e) => e.authority ? /* @__PURE__ */ f("span", {
251
251
  className: "text-text-secondary",
252
252
  children: e.authority
253
- }) : /* @__PURE__ */ d("span", {
253
+ }) : /* @__PURE__ */ f("span", {
254
254
  className: "text-text-tertiary",
255
255
  children: "—"
256
256
  })
@@ -259,10 +259,10 @@ function M() {
259
259
  key: "certNumber",
260
260
  header: "Cert. no.",
261
261
  hideOnMobile: !0,
262
- render: (e) => e.certNumber ? /* @__PURE__ */ d("span", {
262
+ render: (e) => e.certNumber ? /* @__PURE__ */ f("span", {
263
263
  className: "tabular-nums text-text-secondary",
264
264
  children: e.certNumber
265
- }) : /* @__PURE__ */ d("span", {
265
+ }) : /* @__PURE__ */ f("span", {
266
266
  className: "text-text-tertiary",
267
267
  children: "—"
268
268
  })
@@ -272,7 +272,7 @@ function M() {
272
272
  header: "Issued",
273
273
  align: "right",
274
274
  hideOnMobile: !0,
275
- render: (e) => /* @__PURE__ */ d("span", {
275
+ render: (e) => /* @__PURE__ */ f("span", {
276
276
  className: "text-text-tertiary",
277
277
  children: r(e.issuedAt)
278
278
  })
@@ -282,25 +282,25 @@ function M() {
282
282
  header: "Expires",
283
283
  align: "right",
284
284
  render: (e) => {
285
- if (!e.expiresAt) return /* @__PURE__ */ d("span", {
285
+ if (!e.expiresAt) return /* @__PURE__ */ f("span", {
286
286
  className: "text-text-tertiary",
287
287
  children: "—"
288
288
  });
289
- let t = a(e.expiresAt), n = !t && A(e.expiresAt);
290
- return /* @__PURE__ */ f("div", {
289
+ let t = ee(e.expiresAt), n = !t && j(e.expiresAt);
290
+ return /* @__PURE__ */ p("div", {
291
291
  className: "flex items-center justify-end gap-2",
292
- children: [/* @__PURE__ */ d("span", {
292
+ children: [/* @__PURE__ */ f("span", {
293
293
  className: "tabular-nums text-text-secondary",
294
294
  children: r(e.expiresAt)
295
- }), t ? /* @__PURE__ */ f("span", {
295
+ }), t ? /* @__PURE__ */ p("span", {
296
296
  className: "inline-flex items-center gap-1 rounded-full bg-status-error-bg-subtle px-2 py-0.5 text-xs font-medium text-status-error-text",
297
- children: [/* @__PURE__ */ d(_e, {
297
+ children: [/* @__PURE__ */ f(ve, {
298
298
  className: "h-3 w-3",
299
299
  "aria-hidden": "true"
300
300
  }), " Expired"]
301
- }) : n ? /* @__PURE__ */ f("span", {
301
+ }) : n ? /* @__PURE__ */ p("span", {
302
302
  className: "inline-flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text",
303
- children: [/* @__PURE__ */ d(ye, {
303
+ children: [/* @__PURE__ */ f(u, {
304
304
  className: "h-3 w-3",
305
305
  "aria-hidden": "true"
306
306
  }), " Expiring soon"]
@@ -312,7 +312,7 @@ function M() {
312
312
  key: "evidence",
313
313
  header: "Evidence",
314
314
  hideOnMobile: !0,
315
- render: (e) => e.evidence?.id ? /* @__PURE__ */ d(c, { fileId: e.evidence.id }) : /* @__PURE__ */ d("span", {
315
+ render: (e) => e.evidence?.id ? /* @__PURE__ */ f(s, { fileId: e.evidence.id }) : /* @__PURE__ */ f("span", {
316
316
  className: "text-text-tertiary",
317
317
  children: "—"
318
318
  })
@@ -321,14 +321,14 @@ function M() {
321
321
  key: "details",
322
322
  header: "",
323
323
  align: "right",
324
- render: (e) => /* @__PURE__ */ f(p, {
324
+ render: (e) => /* @__PURE__ */ p(m, {
325
325
  size: "sm",
326
326
  variant: "ghost",
327
327
  onClick: () => {
328
- K(e), q(!0);
328
+ q(e), J(!0);
329
329
  },
330
330
  "aria-label": `View details for ${e.title}`,
331
- children: [/* @__PURE__ */ d(be, { className: "h-4 w-4" }), /* @__PURE__ */ d("span", {
331
+ children: [/* @__PURE__ */ f(be, { className: "h-4 w-4" }), /* @__PURE__ */ f("span", {
332
332
  className: "ml-1.5 hidden sm:inline",
333
333
  children: "Details"
334
334
  })]
@@ -339,25 +339,25 @@ function M() {
339
339
  header: "",
340
340
  align: "right",
341
341
  render: (e) => {
342
- let t = de(ue, e.status), n = t.length === 0;
343
- return /* @__PURE__ */ f(S, {
342
+ let t = fe(de, e.status), n = t.length === 0;
343
+ return /* @__PURE__ */ p(C, {
344
344
  value: e.status,
345
- disabled: n || Ae === e.id,
345
+ disabled: n || ke === e.id,
346
346
  onValueChange: (t) => {
347
- t !== e.status && (W(e.id), Ie.mutate({
347
+ t !== e.status && (G(e.id), Fe.mutate({
348
348
  id: e.id,
349
349
  status: t
350
350
  }, {
351
- onSuccess: () => M.success(`Status updated to ${i(t)}`),
352
- onError: (e) => M.fromError(e),
353
- onSettled: () => W(null)
351
+ onSuccess: () => N.success(`Status updated to ${i(t)}`),
352
+ onError: (e) => N.fromError(e),
353
+ onSettled: () => G(null)
354
354
  }));
355
355
  },
356
- children: [/* @__PURE__ */ d(T, {
356
+ children: [/* @__PURE__ */ f(E, {
357
357
  className: "h-8 w-36",
358
358
  "aria-label": n ? `Status for ${e.title}` : `Change status for ${e.title}`,
359
- children: /* @__PURE__ */ d(E, { placeholder: i(e.status) })
360
- }), /* @__PURE__ */ d(C, { children: t.map((e) => /* @__PURE__ */ d(w, {
359
+ children: /* @__PURE__ */ f(D, { placeholder: i(e.status) })
360
+ }), /* @__PURE__ */ f(w, { children: t.map((e) => /* @__PURE__ */ f(T, {
361
361
  value: e,
362
362
  children: i(e)
363
363
  }, e)) })]
@@ -365,302 +365,302 @@ function M() {
365
365
  }
366
366
  }
367
367
  ],
368
- rows: Z,
368
+ rows: Q,
369
369
  rowKey: (e) => e.id
370
- }), /* @__PURE__ */ d(pe, {
371
- page: I.page,
372
- pageSize: k,
373
- itemCount: Z.length,
374
- hasMore: Y?.pageInfo?.hasMore ?? !1,
375
- onPageChange: (e) => I.onPageChange(e, Y?.pageInfo?.cursor)
370
+ }), /* @__PURE__ */ f(me, {
371
+ page: L.page,
372
+ pageSize: A,
373
+ itemCount: Q.length,
374
+ hasMore: X?.pageInfo?.hasMore ?? !1,
375
+ onPageChange: L.onPageChange
376
376
  })] }),
377
- /* @__PURE__ */ d(g, {
378
- open: ke,
377
+ /* @__PURE__ */ f(_, {
378
+ open: Oe,
379
379
  onOpenChange: (e) => {
380
- L(e), e || Ue();
380
+ R(e), e || Ue();
381
381
  },
382
- children: /* @__PURE__ */ f(_, { children: [/* @__PURE__ */ f(b, { children: [/* @__PURE__ */ d(x, { children: "New certification" }), /* @__PURE__ */ d(v, { children: "Register a license, permit or certification and attach its supporting evidence." })] }), /* @__PURE__ */ f("form", {
382
+ children: /* @__PURE__ */ p(v, { children: [/* @__PURE__ */ p(x, { children: [/* @__PURE__ */ f(S, { children: "New certification" }), /* @__PURE__ */ f(y, { children: "Register a license, permit or certification and attach its supporting evidence." })] }), /* @__PURE__ */ p("form", {
383
383
  onSubmit: (e) => {
384
384
  e.preventDefault(), We();
385
385
  },
386
- children: [/* @__PURE__ */ f("div", {
386
+ children: [/* @__PURE__ */ p("div", {
387
387
  className: "grid gap-4 py-2",
388
388
  children: [
389
- /* @__PURE__ */ f("div", {
389
+ /* @__PURE__ */ p("div", {
390
390
  className: "grid gap-1.5",
391
- children: [/* @__PURE__ */ d(h, {
391
+ children: [/* @__PURE__ */ f(g, {
392
392
  htmlFor: "ccTitle",
393
393
  children: "Title *"
394
- }), /* @__PURE__ */ d(m, {
394
+ }), /* @__PURE__ */ f(h, {
395
395
  id: "ccTitle",
396
- value: R.title,
397
- onChange: (e) => z({
398
- ...R,
396
+ value: z.title,
397
+ onChange: (e) => B({
398
+ ...z,
399
399
  title: e.target.value
400
400
  }),
401
401
  placeholder: "Block 7 extraction license"
402
402
  })]
403
403
  }),
404
- /* @__PURE__ */ f("div", {
404
+ /* @__PURE__ */ p("div", {
405
405
  className: "grid gap-2 sm:grid-cols-2",
406
- children: [/* @__PURE__ */ f("div", {
406
+ children: [/* @__PURE__ */ p("div", {
407
407
  className: "grid gap-1.5",
408
- children: [/* @__PURE__ */ d(h, {
408
+ children: [/* @__PURE__ */ f(g, {
409
409
  htmlFor: "ccCategory",
410
410
  children: "Category"
411
- }), /* @__PURE__ */ f(S, {
412
- value: R.category,
413
- onValueChange: (e) => z({
414
- ...R,
411
+ }), /* @__PURE__ */ p(C, {
412
+ value: z.category,
413
+ onValueChange: (e) => B({
414
+ ...z,
415
415
  category: e
416
416
  }),
417
- children: [/* @__PURE__ */ d(T, {
417
+ children: [/* @__PURE__ */ f(E, {
418
418
  id: "ccCategory",
419
- children: /* @__PURE__ */ d(E, {})
420
- }), /* @__PURE__ */ d(C, { children: D.map((e) => /* @__PURE__ */ d(w, {
419
+ children: /* @__PURE__ */ f(D, {})
420
+ }), /* @__PURE__ */ f(w, { children: O.map((e) => /* @__PURE__ */ f(T, {
421
421
  value: e,
422
422
  children: i(e)
423
423
  }, e)) })]
424
424
  })]
425
- }), /* @__PURE__ */ f("div", {
425
+ }), /* @__PURE__ */ p("div", {
426
426
  className: "grid gap-1.5",
427
- children: [/* @__PURE__ */ d(h, {
427
+ children: [/* @__PURE__ */ f(g, {
428
428
  htmlFor: "ccAsset",
429
429
  children: "Asset"
430
- }), /* @__PURE__ */ f(S, {
431
- value: R.assetId,
432
- onValueChange: (e) => z({
433
- ...R,
430
+ }), /* @__PURE__ */ p(C, {
431
+ value: z.assetId,
432
+ onValueChange: (e) => B({
433
+ ...z,
434
434
  assetId: e
435
435
  }),
436
- children: [/* @__PURE__ */ d(T, {
436
+ children: [/* @__PURE__ */ f(E, {
437
437
  id: "ccAsset",
438
- children: /* @__PURE__ */ d(E, { placeholder: "Optional" })
439
- }), /* @__PURE__ */ d(C, { children: J.map((e) => /* @__PURE__ */ d(w, {
438
+ children: /* @__PURE__ */ f(D, { placeholder: "Optional" })
439
+ }), /* @__PURE__ */ f(w, { children: Y.map((e) => /* @__PURE__ */ f(T, {
440
440
  value: e.id,
441
441
  children: e.name
442
442
  }, e.id)) })]
443
443
  })]
444
444
  })]
445
445
  }),
446
- /* @__PURE__ */ f("div", {
446
+ /* @__PURE__ */ p("div", {
447
447
  className: "grid gap-2 sm:grid-cols-2",
448
- children: [/* @__PURE__ */ f("div", {
448
+ children: [/* @__PURE__ */ p("div", {
449
449
  className: "grid gap-1.5",
450
- children: [/* @__PURE__ */ d(h, {
450
+ children: [/* @__PURE__ */ f(g, {
451
451
  htmlFor: "ccAuthority",
452
452
  children: "Issuing authority"
453
- }), /* @__PURE__ */ d(m, {
453
+ }), /* @__PURE__ */ f(h, {
454
454
  id: "ccAuthority",
455
- value: R.authority,
456
- onChange: (e) => z({
457
- ...R,
455
+ value: z.authority,
456
+ onChange: (e) => B({
457
+ ...z,
458
458
  authority: e.target.value
459
459
  }),
460
460
  placeholder: "Ministry of Petroleum & Natural Gas"
461
461
  })]
462
- }), /* @__PURE__ */ f("div", {
462
+ }), /* @__PURE__ */ p("div", {
463
463
  className: "grid gap-1.5",
464
- children: [/* @__PURE__ */ d(h, {
464
+ children: [/* @__PURE__ */ f(g, {
465
465
  htmlFor: "ccNumber",
466
466
  children: "Certificate number"
467
- }), /* @__PURE__ */ d(m, {
467
+ }), /* @__PURE__ */ f(h, {
468
468
  id: "ccNumber",
469
- value: R.certNumber,
470
- onChange: (e) => z({
471
- ...R,
469
+ value: z.certNumber,
470
+ onChange: (e) => B({
471
+ ...z,
472
472
  certNumber: e.target.value
473
473
  }),
474
474
  placeholder: "EXT-2026-00471"
475
475
  })]
476
476
  })]
477
477
  }),
478
- /* @__PURE__ */ f("div", {
478
+ /* @__PURE__ */ p("div", {
479
479
  className: "grid gap-2 sm:grid-cols-2",
480
- children: [/* @__PURE__ */ f("div", {
480
+ children: [/* @__PURE__ */ p("div", {
481
481
  className: "grid gap-1.5",
482
- children: [/* @__PURE__ */ d(h, {
482
+ children: [/* @__PURE__ */ f(g, {
483
483
  htmlFor: "ccIssued",
484
484
  children: "Issued"
485
- }), /* @__PURE__ */ d(m, {
485
+ }), /* @__PURE__ */ f(h, {
486
486
  id: "ccIssued",
487
487
  type: "date",
488
- value: R.issuedAt,
489
- onChange: (e) => z({
490
- ...R,
488
+ value: z.issuedAt,
489
+ onChange: (e) => B({
490
+ ...z,
491
491
  issuedAt: e.target.value
492
492
  })
493
493
  })]
494
- }), /* @__PURE__ */ f("div", {
494
+ }), /* @__PURE__ */ p("div", {
495
495
  className: "grid gap-1.5",
496
- children: [/* @__PURE__ */ d(h, {
496
+ children: [/* @__PURE__ */ f(g, {
497
497
  htmlFor: "ccExpires",
498
498
  children: "Expires"
499
- }), /* @__PURE__ */ d(m, {
499
+ }), /* @__PURE__ */ f(h, {
500
500
  id: "ccExpires",
501
501
  type: "date",
502
- value: R.expiresAt,
503
- onChange: (e) => z({
504
- ...R,
502
+ value: z.expiresAt,
503
+ onChange: (e) => B({
504
+ ...z,
505
505
  expiresAt: e.target.value
506
506
  })
507
507
  })]
508
508
  })]
509
509
  }),
510
- /* @__PURE__ */ d(me, {
510
+ /* @__PURE__ */ f(he, {
511
511
  id: "evidence",
512
512
  label: "Evidence document",
513
513
  accept: "image/*,application/pdf",
514
- value: B,
515
- onChange: V,
514
+ value: V,
515
+ onChange: H,
516
516
  hint: "Attach the signed certificate, permit or audit report (PDF or image)."
517
517
  }),
518
- /* @__PURE__ */ f("div", {
518
+ /* @__PURE__ */ p("div", {
519
519
  className: "grid gap-1.5",
520
- children: [/* @__PURE__ */ d(h, {
520
+ children: [/* @__PURE__ */ f(g, {
521
521
  htmlFor: "ccNotes",
522
522
  children: "Notes"
523
- }), /* @__PURE__ */ d(we, {
523
+ }), /* @__PURE__ */ f(Ce, {
524
524
  id: "ccNotes",
525
525
  rows: 2,
526
- value: R.notes,
527
- onChange: (e) => z({
528
- ...R,
526
+ value: z.notes,
527
+ onChange: (e) => B({
528
+ ...z,
529
529
  notes: e.target.value
530
530
  }),
531
531
  placeholder: "Optional context about scope, conditions or renewal."
532
532
  })]
533
533
  }),
534
- H && /* @__PURE__ */ d("p", {
534
+ U && /* @__PURE__ */ f("p", {
535
535
  className: "text-sm text-status-error-text",
536
- children: H
536
+ children: U
537
537
  })
538
538
  ]
539
- }), /* @__PURE__ */ f(y, { children: [/* @__PURE__ */ d(p, {
539
+ }), /* @__PURE__ */ p(b, { children: [/* @__PURE__ */ f(m, {
540
540
  type: "button",
541
541
  variant: "outline",
542
- onClick: () => L(!1),
542
+ onClick: () => R(!1),
543
543
  children: "Cancel"
544
- }), /* @__PURE__ */ d(p, {
544
+ }), /* @__PURE__ */ f(m, {
545
545
  type: "submit",
546
- disabled: X.isPending,
547
- children: X.isPending ? "Creating…" : "Create certification"
546
+ disabled: Z.isPending,
547
+ children: Z.isPending ? "Creating…" : "Create certification"
548
548
  })] })]
549
549
  })] })
550
550
  }),
551
- /* @__PURE__ */ d(g, {
552
- open: je,
551
+ /* @__PURE__ */ f(_, {
552
+ open: Ae,
553
553
  onOpenChange: (e) => {
554
- q(e), e || K(null);
554
+ J(e), e || q(null);
555
555
  },
556
- children: /* @__PURE__ */ d(_, {
556
+ children: /* @__PURE__ */ f(v, {
557
557
  className: "sm:max-w-xl",
558
- children: G && /* @__PURE__ */ f(Ce, { children: [
559
- /* @__PURE__ */ f(b, { children: [/* @__PURE__ */ d(x, { children: G.title }), /* @__PURE__ */ d(v, { children: i(G.category) })] }),
560
- /* @__PURE__ */ f("div", {
558
+ children: K && /* @__PURE__ */ p(Se, { children: [
559
+ /* @__PURE__ */ p(x, { children: [/* @__PURE__ */ f(S, { children: K.title }), /* @__PURE__ */ f(y, { children: i(K.category) })] }),
560
+ /* @__PURE__ */ p("div", {
561
561
  className: "max-h-[70vh] space-y-6 overflow-y-auto py-2",
562
562
  children: [
563
- /* @__PURE__ */ f("dl", {
563
+ /* @__PURE__ */ p("dl", {
564
564
  className: "grid grid-cols-2 gap-x-4 gap-y-3 text-sm",
565
565
  children: [
566
- /* @__PURE__ */ f("div", {
566
+ /* @__PURE__ */ p("div", {
567
567
  className: "space-y-1",
568
- children: [/* @__PURE__ */ d("dt", {
568
+ children: [/* @__PURE__ */ f("dt", {
569
569
  className: "text-xs text-text-tertiary",
570
570
  children: "Status"
571
- }), /* @__PURE__ */ d("dd", { children: /* @__PURE__ */ d(o, { status: G.status }) })]
571
+ }), /* @__PURE__ */ f("dd", { children: /* @__PURE__ */ f(a, { status: K.status }) })]
572
572
  }),
573
- /* @__PURE__ */ f("div", {
573
+ /* @__PURE__ */ p("div", {
574
574
  className: "space-y-1",
575
- children: [/* @__PURE__ */ d("dt", {
575
+ children: [/* @__PURE__ */ f("dt", {
576
576
  className: "text-xs text-text-tertiary",
577
577
  children: "Asset"
578
- }), /* @__PURE__ */ d("dd", {
578
+ }), /* @__PURE__ */ f("dd", {
579
579
  className: "text-text-secondary",
580
- children: G.assetId ? J.find((e) => e.id === G.assetId)?.name ?? "—" : "—"
580
+ children: K.assetId ? Y.find((e) => e.id === K.assetId)?.name ?? "—" : "—"
581
581
  })]
582
582
  }),
583
- /* @__PURE__ */ f("div", {
583
+ /* @__PURE__ */ p("div", {
584
584
  className: "space-y-1",
585
- children: [/* @__PURE__ */ d("dt", {
585
+ children: [/* @__PURE__ */ f("dt", {
586
586
  className: "text-xs text-text-tertiary",
587
587
  children: "Authority"
588
- }), /* @__PURE__ */ d("dd", {
588
+ }), /* @__PURE__ */ f("dd", {
589
589
  className: "text-text-secondary",
590
- children: G.authority || "—"
590
+ children: K.authority || "—"
591
591
  })]
592
592
  }),
593
- /* @__PURE__ */ f("div", {
593
+ /* @__PURE__ */ p("div", {
594
594
  className: "space-y-1",
595
- children: [/* @__PURE__ */ d("dt", {
595
+ children: [/* @__PURE__ */ f("dt", {
596
596
  className: "text-xs text-text-tertiary",
597
597
  children: "Certificate no."
598
- }), /* @__PURE__ */ d("dd", {
598
+ }), /* @__PURE__ */ f("dd", {
599
599
  className: "tabular-nums text-text-secondary",
600
- children: G.certNumber || "—"
600
+ children: K.certNumber || "—"
601
601
  })]
602
602
  }),
603
- /* @__PURE__ */ f("div", {
603
+ /* @__PURE__ */ p("div", {
604
604
  className: "space-y-1",
605
- children: [/* @__PURE__ */ d("dt", {
605
+ children: [/* @__PURE__ */ f("dt", {
606
606
  className: "text-xs text-text-tertiary",
607
607
  children: "Issued"
608
- }), /* @__PURE__ */ d("dd", {
608
+ }), /* @__PURE__ */ f("dd", {
609
609
  className: "text-text-secondary",
610
- children: r(G.issuedAt)
610
+ children: r(K.issuedAt)
611
611
  })]
612
612
  }),
613
- /* @__PURE__ */ f("div", {
613
+ /* @__PURE__ */ p("div", {
614
614
  className: "space-y-1",
615
- children: [/* @__PURE__ */ d("dt", {
615
+ children: [/* @__PURE__ */ f("dt", {
616
616
  className: "text-xs text-text-tertiary",
617
617
  children: "Expires"
618
- }), /* @__PURE__ */ d("dd", {
618
+ }), /* @__PURE__ */ f("dd", {
619
619
  className: "text-text-secondary",
620
- children: r(G.expiresAt)
620
+ children: r(K.expiresAt)
621
621
  })]
622
622
  }),
623
- G.evidence?.id && /* @__PURE__ */ f("div", {
623
+ K.evidence?.id && /* @__PURE__ */ p("div", {
624
624
  className: "col-span-2 space-y-1",
625
- children: [/* @__PURE__ */ d("dt", {
625
+ children: [/* @__PURE__ */ f("dt", {
626
626
  className: "text-xs text-text-tertiary",
627
627
  children: "Evidence"
628
- }), /* @__PURE__ */ d("dd", { children: /* @__PURE__ */ d(c, { fileId: G.evidence.id }) })]
628
+ }), /* @__PURE__ */ f("dd", { children: /* @__PURE__ */ f(s, { fileId: K.evidence.id }) })]
629
629
  }),
630
- G.notes && /* @__PURE__ */ f("div", {
630
+ K.notes && /* @__PURE__ */ p("div", {
631
631
  className: "col-span-2 space-y-1",
632
- children: [/* @__PURE__ */ d("dt", {
632
+ children: [/* @__PURE__ */ f("dt", {
633
633
  className: "text-xs text-text-tertiary",
634
634
  children: "Notes"
635
- }), /* @__PURE__ */ d("dd", {
635
+ }), /* @__PURE__ */ f("dd", {
636
636
  className: "whitespace-pre-wrap text-text-secondary",
637
- children: G.notes
637
+ children: K.notes
638
638
  })]
639
639
  })
640
640
  ]
641
641
  }),
642
- /* @__PURE__ */ d("div", {
642
+ /* @__PURE__ */ f("div", {
643
643
  className: "border-t border-border-seam pt-4",
644
- children: /* @__PURE__ */ d(ge, {
644
+ children: /* @__PURE__ */ f(_e, {
645
645
  entityType: "theglobalfuel-compliance",
646
- entityId: G.id
646
+ entityId: K.id
647
647
  })
648
648
  }),
649
- /* @__PURE__ */ d("div", {
649
+ /* @__PURE__ */ f("div", {
650
650
  className: "border-t border-border-seam pt-4",
651
- children: /* @__PURE__ */ d(he, {
651
+ children: /* @__PURE__ */ f(ge, {
652
652
  entityType: "theglobalfuel-compliance",
653
- entityId: G.id,
653
+ entityId: K.id,
654
654
  title: "Discussion",
655
655
  description: "Coordinate review, renewal & audit evidence for this certification."
656
656
  })
657
657
  })
658
658
  ]
659
659
  }),
660
- /* @__PURE__ */ d(y, { children: /* @__PURE__ */ d(p, {
660
+ /* @__PURE__ */ f(b, { children: /* @__PURE__ */ f(m, {
661
661
  type: "button",
662
662
  variant: "outline",
663
- onClick: () => q(!1),
663
+ onClick: () => J(!1),
664
664
  children: "Close"
665
665
  }) })
666
666
  ] })
@@ -670,6 +670,6 @@ function M() {
670
670
  });
671
671
  }
672
672
  //#endregion
673
- export { M as CompliancePage };
673
+ export { N as CompliancePage };
674
674
 
675
675
  //# sourceMappingURL=CompliancePage.js.map