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