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