@burdenoff/microfe-theglobalfuel 2026.705.1 → 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.
- 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/hooks/useCursorPager.js +6 -15
- package/dist/theglobalfuel/hooks/useCursorPager.js.map +1 -1
- package/dist/theglobalfuel/pages/assets/AssetsPage.js +99 -99
- package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/compliance/CompliancePage.js +250 -250
- package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js +2 -2
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +174 -174
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js +60 -60
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
- package/dist/theglobalfuel/pages/production/ProductionPage.js +2 -2
- package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
- package/dist/theglobalfuel/pages/reserves/ReservesPage.js +152 -152
- package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +6 -6
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
- package/dist/theglobalfuel/utils/cn.js +2 -2
- 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 -30
- 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 -11
- 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/useNotify.d.ts +0 -23
- package/dist/theglobalfuel/hooks/useNotify.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 -79
- 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 -11
- 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 -44
- 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 -10
- 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
- package/dist/theglobalfuel/utils/transitions.d.ts +0 -17
- package/dist/theglobalfuel/utils/transitions.d.ts.map +0 -1
|
@@ -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
|
|
5
|
-
import { StatusBadge as
|
|
6
|
-
import { DataTable as
|
|
7
|
-
import { ErrorView as
|
|
8
|
-
import { EmptyState as
|
|
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
|
|
11
|
-
import { useCursorPager as
|
|
12
|
-
import { useNotify as
|
|
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
|
|
15
|
-
import { FilterTabs as
|
|
16
|
-
import { Pagination as
|
|
17
|
-
import { EvidenceUpload as
|
|
18
|
-
import { FileLink as
|
|
19
|
-
import { TheDiscussion as
|
|
20
|
-
import { TheTags as
|
|
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
|
|
23
|
-
import { AlertTriangle as
|
|
24
|
-
import { Fragment as
|
|
25
|
-
import { Button as
|
|
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
|
|
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
|
-
],
|
|
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
|
-
],
|
|
65
|
-
function
|
|
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 <=
|
|
70
|
+
return n >= 0 && n <= k;
|
|
71
71
|
}
|
|
72
|
-
var
|
|
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
|
|
83
|
-
let { currentUser:
|
|
84
|
-
limit:
|
|
85
|
-
|
|
86
|
-
}),
|
|
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
|
|
88
|
+
for (let t of $) e[t.status] = (e[t.status] ?? 0) + 1;
|
|
89
89
|
return e;
|
|
90
|
-
}, [
|
|
90
|
+
}, [$]), He = we.map((e) => ({
|
|
91
91
|
...e,
|
|
92
|
-
count: e.value === "ALL" ?
|
|
92
|
+
count: e.value === "ALL" ? Le : Ve[e.value] ?? 0
|
|
93
93
|
})), Ue = () => {
|
|
94
|
-
|
|
94
|
+
B(M), H(null), W(null);
|
|
95
95
|
}, We = async () => {
|
|
96
|
-
if (!
|
|
97
|
-
|
|
96
|
+
if (!z.title.trim()) {
|
|
97
|
+
W("A certification title is required.");
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
W(null);
|
|
101
101
|
try {
|
|
102
|
-
await
|
|
103
|
-
title:
|
|
104
|
-
category:
|
|
105
|
-
assetId:
|
|
106
|
-
authority:
|
|
107
|
-
certNumber:
|
|
108
|
-
ownerId:
|
|
109
|
-
issuedAt:
|
|
110
|
-
expiresAt:
|
|
111
|
-
evidenceFileId:
|
|
112
|
-
notes:
|
|
113
|
-
}),
|
|
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
|
-
|
|
115
|
+
N.fromError(e), W(e instanceof Error ? e.message : "Failed to create certification.");
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
122
|
-
onClick: () =>
|
|
123
|
-
children: [/* @__PURE__ */ d
|
|
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__ */
|
|
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__ */
|
|
130
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
136
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
142
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
147
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
158
|
+
/* @__PURE__ */ p("div", {
|
|
159
159
|
className: "mb-5 mt-6 flex flex-wrap items-center gap-3",
|
|
160
160
|
children: [
|
|
161
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ f(pe, {
|
|
162
162
|
options: He,
|
|
163
|
-
value:
|
|
163
|
+
value: P,
|
|
164
164
|
onChange: (e) => {
|
|
165
|
-
|
|
165
|
+
Te(e), L.reset();
|
|
166
166
|
}
|
|
167
167
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
value:
|
|
168
|
+
/* @__PURE__ */ p(C, {
|
|
169
|
+
value: F,
|
|
170
170
|
onValueChange: (e) => {
|
|
171
|
-
|
|
171
|
+
Ee(e), L.reset();
|
|
172
172
|
},
|
|
173
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ f(E, {
|
|
174
174
|
className: "w-52",
|
|
175
175
|
"aria-label": "Filter by category",
|
|
176
|
-
children: /* @__PURE__ */
|
|
177
|
-
}), /* @__PURE__ */
|
|
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
|
-
}),
|
|
180
|
+
}), O.map((e) => /* @__PURE__ */ f(T, {
|
|
181
181
|
value: e,
|
|
182
182
|
children: i(e)
|
|
183
183
|
}, e))] })]
|
|
184
184
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
value:
|
|
185
|
+
/* @__PURE__ */ p(C, {
|
|
186
|
+
value: I,
|
|
187
187
|
onValueChange: (e) => {
|
|
188
|
-
|
|
188
|
+
De(e), L.reset();
|
|
189
189
|
},
|
|
190
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ f(E, {
|
|
191
191
|
className: "w-52",
|
|
192
192
|
"aria-label": "Filter by asset",
|
|
193
|
-
children: /* @__PURE__ */
|
|
194
|
-
}), /* @__PURE__ */
|
|
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
|
-
}),
|
|
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
|
-
|
|
204
|
+
Me ? /* @__PURE__ */ f(ie, { label: "Loading certifications…" }) : Ne ? /* @__PURE__ */ f(re, {
|
|
205
205
|
message: "Couldn't load certifications.",
|
|
206
|
-
onRetry: () =>
|
|
207
|
-
}) :
|
|
206
|
+
onRetry: () => Pe()
|
|
207
|
+
}) : Q.length === 0 ? /* @__PURE__ */ f(ae, {
|
|
208
208
|
illustration: "empty-data",
|
|
209
|
-
icon: /* @__PURE__ */
|
|
209
|
+
icon: /* @__PURE__ */ f(xe, { className: "h-10 w-10" }),
|
|
210
210
|
title: "No certifications yet",
|
|
211
|
-
description:
|
|
212
|
-
action:
|
|
213
|
-
onClick: () =>
|
|
214
|
-
children: [/* @__PURE__ */ d
|
|
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__ */
|
|
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__ */
|
|
221
|
+
render: (e) => /* @__PURE__ */ p("div", {
|
|
222
222
|
className: "min-w-0",
|
|
223
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ f("p", {
|
|
224
224
|
className: "truncate font-semibold text-text-primary",
|
|
225
225
|
children: e.title
|
|
226
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
250
|
+
render: (e) => e.authority ? /* @__PURE__ */ f("span", {
|
|
251
251
|
className: "text-text-secondary",
|
|
252
252
|
children: e.authority
|
|
253
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
262
|
+
render: (e) => e.certNumber ? /* @__PURE__ */ f("span", {
|
|
263
263
|
className: "tabular-nums text-text-secondary",
|
|
264
264
|
children: e.certNumber
|
|
265
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
285
|
+
if (!e.expiresAt) return /* @__PURE__ */ f("span", {
|
|
286
286
|
className: "text-text-tertiary",
|
|
287
287
|
children: "—"
|
|
288
288
|
});
|
|
289
|
-
let t =
|
|
290
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
292
|
+
children: [/* @__PURE__ */ f("span", {
|
|
293
293
|
className: "tabular-nums text-text-secondary",
|
|
294
294
|
children: r(e.expiresAt)
|
|
295
|
-
}), t ? /* @__PURE__ */
|
|
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__ */
|
|
297
|
+
children: [/* @__PURE__ */ f(ve, {
|
|
298
298
|
className: "h-3 w-3",
|
|
299
299
|
"aria-hidden": "true"
|
|
300
300
|
}), " Expired"]
|
|
301
|
-
}) : n ? /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
324
|
+
render: (e) => /* @__PURE__ */ p(m, {
|
|
325
325
|
size: "sm",
|
|
326
326
|
variant: "ghost",
|
|
327
327
|
onClick: () => {
|
|
328
|
-
|
|
328
|
+
q(e), J(!0);
|
|
329
329
|
},
|
|
330
330
|
"aria-label": `View details for ${e.title}`,
|
|
331
|
-
children: [/* @__PURE__ */
|
|
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
|
|
343
|
-
return /* @__PURE__ */
|
|
342
|
+
let t = fe(de, e.status), n = t.length === 0;
|
|
343
|
+
return /* @__PURE__ */ p(C, {
|
|
344
344
|
value: e.status,
|
|
345
|
-
disabled: n ||
|
|
345
|
+
disabled: n || ke === e.id,
|
|
346
346
|
onValueChange: (t) => {
|
|
347
|
-
t !== e.status && (
|
|
347
|
+
t !== e.status && (G(e.id), Fe.mutate({
|
|
348
348
|
id: e.id,
|
|
349
349
|
status: t
|
|
350
350
|
}, {
|
|
351
|
-
onSuccess: () =>
|
|
352
|
-
onError: (e) =>
|
|
353
|
-
onSettled: () =>
|
|
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__ */
|
|
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__ */
|
|
360
|
-
}), /* @__PURE__ */
|
|
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:
|
|
368
|
+
rows: Q,
|
|
369
369
|
rowKey: (e) => e.id
|
|
370
|
-
}), /* @__PURE__ */
|
|
371
|
-
page:
|
|
372
|
-
pageSize:
|
|
373
|
-
itemCount:
|
|
374
|
-
hasMore:
|
|
375
|
-
onPageChange:
|
|
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__ */
|
|
378
|
-
open:
|
|
377
|
+
/* @__PURE__ */ f(_, {
|
|
378
|
+
open: Oe,
|
|
379
379
|
onOpenChange: (e) => {
|
|
380
|
-
|
|
380
|
+
R(e), e || Ue();
|
|
381
381
|
},
|
|
382
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
386
|
+
children: [/* @__PURE__ */ p("div", {
|
|
387
387
|
className: "grid gap-4 py-2",
|
|
388
388
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ p("div", {
|
|
390
390
|
className: "grid gap-1.5",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
391
|
+
children: [/* @__PURE__ */ f(g, {
|
|
392
392
|
htmlFor: "ccTitle",
|
|
393
393
|
children: "Title *"
|
|
394
|
-
}), /* @__PURE__ */
|
|
394
|
+
}), /* @__PURE__ */ f(h, {
|
|
395
395
|
id: "ccTitle",
|
|
396
|
-
value:
|
|
397
|
-
onChange: (e) =>
|
|
398
|
-
...
|
|
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__ */
|
|
404
|
+
/* @__PURE__ */ p("div", {
|
|
405
405
|
className: "grid gap-2 sm:grid-cols-2",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ p("div", {
|
|
407
407
|
className: "grid gap-1.5",
|
|
408
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ f(g, {
|
|
409
409
|
htmlFor: "ccCategory",
|
|
410
410
|
children: "Category"
|
|
411
|
-
}), /* @__PURE__ */
|
|
412
|
-
value:
|
|
413
|
-
onValueChange: (e) =>
|
|
414
|
-
...
|
|
411
|
+
}), /* @__PURE__ */ p(C, {
|
|
412
|
+
value: z.category,
|
|
413
|
+
onValueChange: (e) => B({
|
|
414
|
+
...z,
|
|
415
415
|
category: e
|
|
416
416
|
}),
|
|
417
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ f(E, {
|
|
418
418
|
id: "ccCategory",
|
|
419
|
-
children: /* @__PURE__ */
|
|
420
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
425
|
+
}), /* @__PURE__ */ p("div", {
|
|
426
426
|
className: "grid gap-1.5",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ f(g, {
|
|
428
428
|
htmlFor: "ccAsset",
|
|
429
429
|
children: "Asset"
|
|
430
|
-
}), /* @__PURE__ */
|
|
431
|
-
value:
|
|
432
|
-
onValueChange: (e) =>
|
|
433
|
-
...
|
|
430
|
+
}), /* @__PURE__ */ p(C, {
|
|
431
|
+
value: z.assetId,
|
|
432
|
+
onValueChange: (e) => B({
|
|
433
|
+
...z,
|
|
434
434
|
assetId: e
|
|
435
435
|
}),
|
|
436
|
-
children: [/* @__PURE__ */
|
|
436
|
+
children: [/* @__PURE__ */ f(E, {
|
|
437
437
|
id: "ccAsset",
|
|
438
|
-
children: /* @__PURE__ */
|
|
439
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
446
|
+
/* @__PURE__ */ p("div", {
|
|
447
447
|
className: "grid gap-2 sm:grid-cols-2",
|
|
448
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ p("div", {
|
|
449
449
|
className: "grid gap-1.5",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
450
|
+
children: [/* @__PURE__ */ f(g, {
|
|
451
451
|
htmlFor: "ccAuthority",
|
|
452
452
|
children: "Issuing authority"
|
|
453
|
-
}), /* @__PURE__ */
|
|
453
|
+
}), /* @__PURE__ */ f(h, {
|
|
454
454
|
id: "ccAuthority",
|
|
455
|
-
value:
|
|
456
|
-
onChange: (e) =>
|
|
457
|
-
...
|
|
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__ */
|
|
462
|
+
}), /* @__PURE__ */ p("div", {
|
|
463
463
|
className: "grid gap-1.5",
|
|
464
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */ f(g, {
|
|
465
465
|
htmlFor: "ccNumber",
|
|
466
466
|
children: "Certificate number"
|
|
467
|
-
}), /* @__PURE__ */
|
|
467
|
+
}), /* @__PURE__ */ f(h, {
|
|
468
468
|
id: "ccNumber",
|
|
469
|
-
value:
|
|
470
|
-
onChange: (e) =>
|
|
471
|
-
...
|
|
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__ */
|
|
478
|
+
/* @__PURE__ */ p("div", {
|
|
479
479
|
className: "grid gap-2 sm:grid-cols-2",
|
|
480
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ p("div", {
|
|
481
481
|
className: "grid gap-1.5",
|
|
482
|
-
children: [/* @__PURE__ */
|
|
482
|
+
children: [/* @__PURE__ */ f(g, {
|
|
483
483
|
htmlFor: "ccIssued",
|
|
484
484
|
children: "Issued"
|
|
485
|
-
}), /* @__PURE__ */
|
|
485
|
+
}), /* @__PURE__ */ f(h, {
|
|
486
486
|
id: "ccIssued",
|
|
487
487
|
type: "date",
|
|
488
|
-
value:
|
|
489
|
-
onChange: (e) =>
|
|
490
|
-
...
|
|
488
|
+
value: z.issuedAt,
|
|
489
|
+
onChange: (e) => B({
|
|
490
|
+
...z,
|
|
491
491
|
issuedAt: e.target.value
|
|
492
492
|
})
|
|
493
493
|
})]
|
|
494
|
-
}), /* @__PURE__ */
|
|
494
|
+
}), /* @__PURE__ */ p("div", {
|
|
495
495
|
className: "grid gap-1.5",
|
|
496
|
-
children: [/* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ f(g, {
|
|
497
497
|
htmlFor: "ccExpires",
|
|
498
498
|
children: "Expires"
|
|
499
|
-
}), /* @__PURE__ */
|
|
499
|
+
}), /* @__PURE__ */ f(h, {
|
|
500
500
|
id: "ccExpires",
|
|
501
501
|
type: "date",
|
|
502
|
-
value:
|
|
503
|
-
onChange: (e) =>
|
|
504
|
-
...
|
|
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__ */
|
|
510
|
+
/* @__PURE__ */ f(he, {
|
|
511
511
|
id: "evidence",
|
|
512
512
|
label: "Evidence document",
|
|
513
513
|
accept: "image/*,application/pdf",
|
|
514
|
-
value:
|
|
515
|
-
onChange:
|
|
514
|
+
value: V,
|
|
515
|
+
onChange: H,
|
|
516
516
|
hint: "Attach the signed certificate, permit or audit report (PDF or image)."
|
|
517
517
|
}),
|
|
518
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ p("div", {
|
|
519
519
|
className: "grid gap-1.5",
|
|
520
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ f(g, {
|
|
521
521
|
htmlFor: "ccNotes",
|
|
522
522
|
children: "Notes"
|
|
523
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ f(Ce, {
|
|
524
524
|
id: "ccNotes",
|
|
525
525
|
rows: 2,
|
|
526
|
-
value:
|
|
527
|
-
onChange: (e) =>
|
|
528
|
-
...
|
|
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
|
-
|
|
534
|
+
U && /* @__PURE__ */ f("p", {
|
|
535
535
|
className: "text-sm text-status-error-text",
|
|
536
|
-
children:
|
|
536
|
+
children: U
|
|
537
537
|
})
|
|
538
538
|
]
|
|
539
|
-
}), /* @__PURE__ */
|
|
539
|
+
}), /* @__PURE__ */ p(b, { children: [/* @__PURE__ */ f(m, {
|
|
540
540
|
type: "button",
|
|
541
541
|
variant: "outline",
|
|
542
|
-
onClick: () =>
|
|
542
|
+
onClick: () => R(!1),
|
|
543
543
|
children: "Cancel"
|
|
544
|
-
}), /* @__PURE__ */
|
|
544
|
+
}), /* @__PURE__ */ f(m, {
|
|
545
545
|
type: "submit",
|
|
546
|
-
disabled:
|
|
547
|
-
children:
|
|
546
|
+
disabled: Z.isPending,
|
|
547
|
+
children: Z.isPending ? "Creating…" : "Create certification"
|
|
548
548
|
})] })]
|
|
549
549
|
})] })
|
|
550
550
|
}),
|
|
551
|
-
/* @__PURE__ */
|
|
552
|
-
open:
|
|
551
|
+
/* @__PURE__ */ f(_, {
|
|
552
|
+
open: Ae,
|
|
553
553
|
onOpenChange: (e) => {
|
|
554
|
-
|
|
554
|
+
J(e), e || q(null);
|
|
555
555
|
},
|
|
556
|
-
children: /* @__PURE__ */
|
|
556
|
+
children: /* @__PURE__ */ f(v, {
|
|
557
557
|
className: "sm:max-w-xl",
|
|
558
|
-
children:
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
/* @__PURE__ */
|
|
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__ */
|
|
563
|
+
/* @__PURE__ */ p("dl", {
|
|
564
564
|
className: "grid grid-cols-2 gap-x-4 gap-y-3 text-sm",
|
|
565
565
|
children: [
|
|
566
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ p("div", {
|
|
567
567
|
className: "space-y-1",
|
|
568
|
-
children: [/* @__PURE__ */
|
|
568
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
569
569
|
className: "text-xs text-text-tertiary",
|
|
570
570
|
children: "Status"
|
|
571
|
-
}), /* @__PURE__ */
|
|
571
|
+
}), /* @__PURE__ */ f("dd", { children: /* @__PURE__ */ f(a, { status: K.status }) })]
|
|
572
572
|
}),
|
|
573
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ p("div", {
|
|
574
574
|
className: "space-y-1",
|
|
575
|
-
children: [/* @__PURE__ */
|
|
575
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
576
576
|
className: "text-xs text-text-tertiary",
|
|
577
577
|
children: "Asset"
|
|
578
|
-
}), /* @__PURE__ */
|
|
578
|
+
}), /* @__PURE__ */ f("dd", {
|
|
579
579
|
className: "text-text-secondary",
|
|
580
|
-
children:
|
|
580
|
+
children: K.assetId ? Y.find((e) => e.id === K.assetId)?.name ?? "—" : "—"
|
|
581
581
|
})]
|
|
582
582
|
}),
|
|
583
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ p("div", {
|
|
584
584
|
className: "space-y-1",
|
|
585
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
586
586
|
className: "text-xs text-text-tertiary",
|
|
587
587
|
children: "Authority"
|
|
588
|
-
}), /* @__PURE__ */
|
|
588
|
+
}), /* @__PURE__ */ f("dd", {
|
|
589
589
|
className: "text-text-secondary",
|
|
590
|
-
children:
|
|
590
|
+
children: K.authority || "—"
|
|
591
591
|
})]
|
|
592
592
|
}),
|
|
593
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ p("div", {
|
|
594
594
|
className: "space-y-1",
|
|
595
|
-
children: [/* @__PURE__ */
|
|
595
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
596
596
|
className: "text-xs text-text-tertiary",
|
|
597
597
|
children: "Certificate no."
|
|
598
|
-
}), /* @__PURE__ */
|
|
598
|
+
}), /* @__PURE__ */ f("dd", {
|
|
599
599
|
className: "tabular-nums text-text-secondary",
|
|
600
|
-
children:
|
|
600
|
+
children: K.certNumber || "—"
|
|
601
601
|
})]
|
|
602
602
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ p("div", {
|
|
604
604
|
className: "space-y-1",
|
|
605
|
-
children: [/* @__PURE__ */
|
|
605
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
606
606
|
className: "text-xs text-text-tertiary",
|
|
607
607
|
children: "Issued"
|
|
608
|
-
}), /* @__PURE__ */
|
|
608
|
+
}), /* @__PURE__ */ f("dd", {
|
|
609
609
|
className: "text-text-secondary",
|
|
610
|
-
children: r(
|
|
610
|
+
children: r(K.issuedAt)
|
|
611
611
|
})]
|
|
612
612
|
}),
|
|
613
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ p("div", {
|
|
614
614
|
className: "space-y-1",
|
|
615
|
-
children: [/* @__PURE__ */
|
|
615
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
616
616
|
className: "text-xs text-text-tertiary",
|
|
617
617
|
children: "Expires"
|
|
618
|
-
}), /* @__PURE__ */
|
|
618
|
+
}), /* @__PURE__ */ f("dd", {
|
|
619
619
|
className: "text-text-secondary",
|
|
620
|
-
children: r(
|
|
620
|
+
children: r(K.expiresAt)
|
|
621
621
|
})]
|
|
622
622
|
}),
|
|
623
|
-
|
|
623
|
+
K.evidence?.id && /* @__PURE__ */ p("div", {
|
|
624
624
|
className: "col-span-2 space-y-1",
|
|
625
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
626
626
|
className: "text-xs text-text-tertiary",
|
|
627
627
|
children: "Evidence"
|
|
628
|
-
}), /* @__PURE__ */
|
|
628
|
+
}), /* @__PURE__ */ f("dd", { children: /* @__PURE__ */ f(s, { fileId: K.evidence.id }) })]
|
|
629
629
|
}),
|
|
630
|
-
|
|
630
|
+
K.notes && /* @__PURE__ */ p("div", {
|
|
631
631
|
className: "col-span-2 space-y-1",
|
|
632
|
-
children: [/* @__PURE__ */
|
|
632
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
633
633
|
className: "text-xs text-text-tertiary",
|
|
634
634
|
children: "Notes"
|
|
635
|
-
}), /* @__PURE__ */
|
|
635
|
+
}), /* @__PURE__ */ f("dd", {
|
|
636
636
|
className: "whitespace-pre-wrap text-text-secondary",
|
|
637
|
-
children:
|
|
637
|
+
children: K.notes
|
|
638
638
|
})]
|
|
639
639
|
})
|
|
640
640
|
]
|
|
641
641
|
}),
|
|
642
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ f("div", {
|
|
643
643
|
className: "border-t border-border-seam pt-4",
|
|
644
|
-
children: /* @__PURE__ */
|
|
644
|
+
children: /* @__PURE__ */ f(_e, {
|
|
645
645
|
entityType: "theglobalfuel-compliance",
|
|
646
|
-
entityId:
|
|
646
|
+
entityId: K.id
|
|
647
647
|
})
|
|
648
648
|
}),
|
|
649
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ f("div", {
|
|
650
650
|
className: "border-t border-border-seam pt-4",
|
|
651
|
-
children: /* @__PURE__ */
|
|
651
|
+
children: /* @__PURE__ */ f(ge, {
|
|
652
652
|
entityType: "theglobalfuel-compliance",
|
|
653
|
-
entityId:
|
|
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__ */
|
|
660
|
+
/* @__PURE__ */ f(b, { children: /* @__PURE__ */ f(m, {
|
|
661
661
|
type: "button",
|
|
662
662
|
variant: "outline",
|
|
663
|
-
onClick: () =>
|
|
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 {
|
|
673
|
+
export { N as CompliancePage };
|
|
674
674
|
|
|
675
675
|
//# sourceMappingURL=CompliancePage.js.map
|