@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
|
@@ -3,20 +3,22 @@ import { cn as t } from "../../utils/cn.js";
|
|
|
3
3
|
import { PageLayout as n } from "../../components/PageLayout.js";
|
|
4
4
|
import { formatCoords as r, formatDate as i, formatEnumLabel as a, formatNumber as o, formatTonnesCo2e as ee, formatVolume as s } from "../../utils/formatters.js";
|
|
5
5
|
import { StatusBadge as c } from "../../components/StatusBadge.js";
|
|
6
|
-
import { ErrorView as l, LoadingView as
|
|
7
|
-
import { EmptyState as
|
|
8
|
-
import { Timeline as
|
|
9
|
-
import { StepProgress as
|
|
6
|
+
import { ErrorView as l, LoadingView as te } from "../../components/StateViews.js";
|
|
7
|
+
import { EmptyState as ne } from "../../components/EmptyState.js";
|
|
8
|
+
import { Timeline as re } from "../../components/viz/Timeline.js";
|
|
9
|
+
import { StepProgress as ie } from "../../components/viz/StepProgress.js";
|
|
10
10
|
import "../../context/index.js";
|
|
11
|
-
import { useTheAsset as
|
|
11
|
+
import { useTheAsset as ae, useTheAssets as oe, useTheComplianceCerts as se, useTheContract as ce, useTheContracts as le, useTheEmissionRecords as ue, useTheInventoryLots as de } from "../../hooks/useTheGlobalFuelApi.js";
|
|
12
|
+
import { useThePageView as fe } from "../../hooks/useThePageView.js";
|
|
13
|
+
import { useTheTranslation as pe } from "../../hooks/useTheTranslation.js";
|
|
12
14
|
import "../../hooks/index.js";
|
|
13
|
-
import { FileLink as
|
|
14
|
-
import { WorldMap as
|
|
15
|
+
import { FileLink as u } from "../../components/FileLink.js";
|
|
16
|
+
import { WorldMap as me } from "../../components/WorldMap.js";
|
|
15
17
|
import "../../components/index.js";
|
|
16
|
-
import { useMemo as
|
|
17
|
-
import { Boxes as
|
|
18
|
-
import { Fragment as
|
|
19
|
-
import { GlassCard as b, Select as
|
|
18
|
+
import { useMemo as d, useState as he } from "react";
|
|
19
|
+
import { Boxes as f, CheckCircle2 as p, Factory as ge, Fuel as _e, Gauge as m, Layers as ve, Link2 as ye, MapPin as h, Route as be, Shield as xe, ShieldCheck as g, Ship as _ } from "lucide-react";
|
|
20
|
+
import { Fragment as Se, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
21
|
+
import { GlassCard as b, Select as Ce, SelectContent as we, SelectItem as Te, SelectTrigger as Ee, SelectValue as De } from "@burdenoff/fe-libs/ui";
|
|
20
22
|
//#region src/theglobalfuel/pages/provenance/ProvenancePage.tsx
|
|
21
23
|
var x = { limit: 200 };
|
|
22
24
|
function S(e) {
|
|
@@ -25,23 +27,23 @@ function S(e) {
|
|
|
25
27
|
return new Date(e(n) ?? n.createdAt).getTime() - r;
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
|
-
var
|
|
30
|
+
var Oe = {
|
|
29
31
|
done: "bg-status-success-bg-subtle text-status-success-text",
|
|
30
32
|
active: "bg-[var(--color-accent-soft)] text-accent",
|
|
31
33
|
todo: "bg-bg-sunken text-text-muted",
|
|
32
34
|
locked: "bg-bg-sunken text-text-muted"
|
|
33
|
-
},
|
|
35
|
+
}, C = {
|
|
34
36
|
done: "bg-status-success-bg-subtle text-status-success-text",
|
|
35
37
|
active: "bg-[var(--color-accent-soft)] text-accent",
|
|
36
38
|
todo: "bg-bg-sunken text-text-tertiary",
|
|
37
39
|
locked: "bg-bg-sunken text-text-tertiary"
|
|
38
|
-
},
|
|
40
|
+
}, w = {
|
|
39
41
|
done: "bg-status-success-text",
|
|
40
42
|
active: "bg-[var(--color-accent-primary)] motion-safe:animate-vc-glow-pulse",
|
|
41
43
|
todo: "bg-border-strong",
|
|
42
44
|
locked: "bg-border-strong"
|
|
43
45
|
};
|
|
44
|
-
function
|
|
46
|
+
function ke({ node: e }) {
|
|
45
47
|
return /* @__PURE__ */ y(b, {
|
|
46
48
|
treatment: "glass",
|
|
47
49
|
className: t("relative flex h-full flex-col gap-3 p-5 transition-shadow", e.state === "done" && "shadow-[inset_0_2px_0_0_var(--color-status-success-text)]", e.state === "active" && "shadow-[inset_0_2px_0_0_var(--color-accent-primary)]"),
|
|
@@ -49,15 +51,15 @@ function Ee({ node: e }) {
|
|
|
49
51
|
/* @__PURE__ */ y("div", {
|
|
50
52
|
className: "flex items-center justify-between",
|
|
51
53
|
children: [/* @__PURE__ */ v("span", {
|
|
52
|
-
className: t("flex size-7 items-center justify-center rounded-full text-xs font-semibold tabular-nums",
|
|
54
|
+
className: t("flex size-7 items-center justify-center rounded-full text-xs font-semibold tabular-nums", Oe[e.state]),
|
|
53
55
|
children: e.step
|
|
54
56
|
}), /* @__PURE__ */ v("span", {
|
|
55
57
|
"aria-hidden": "true",
|
|
56
|
-
className: t("size-2 rounded-full",
|
|
58
|
+
className: t("size-2 rounded-full", w[e.state])
|
|
57
59
|
})]
|
|
58
60
|
}),
|
|
59
61
|
/* @__PURE__ */ v("span", {
|
|
60
|
-
className: t("flex size-11 items-center justify-center rounded-xl [&_svg]:size-6",
|
|
62
|
+
className: t("flex size-11 items-center justify-center rounded-xl [&_svg]:size-6", C[e.state]),
|
|
61
63
|
children: e.icon
|
|
62
64
|
}),
|
|
63
65
|
/* @__PURE__ */ y("div", {
|
|
@@ -80,12 +82,12 @@ function Ee({ node: e }) {
|
|
|
80
82
|
}),
|
|
81
83
|
(e.badge || e.present && e.fileId) && /* @__PURE__ */ y("div", {
|
|
82
84
|
className: "mt-auto flex flex-wrap items-center gap-2 pt-1",
|
|
83
|
-
children: [e.badge, e.present && e.fileId && /* @__PURE__ */ v(
|
|
85
|
+
children: [e.badge, e.present && e.fileId && /* @__PURE__ */ v(u, { fileId: e.fileId })]
|
|
84
86
|
})
|
|
85
87
|
]
|
|
86
88
|
});
|
|
87
89
|
}
|
|
88
|
-
function
|
|
90
|
+
function T({ icon: e, label: t, value: n, caption: r }) {
|
|
89
91
|
return /* @__PURE__ */ y("div", {
|
|
90
92
|
className: "flex items-start gap-3",
|
|
91
93
|
children: [/* @__PURE__ */ v("span", {
|
|
@@ -110,24 +112,25 @@ function E({ icon: e, label: t, value: n, caption: r }) {
|
|
|
110
112
|
})]
|
|
111
113
|
});
|
|
112
114
|
}
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
function E() {
|
|
116
|
+
fe("provenance");
|
|
117
|
+
let u = pe(), { navigateTo: Oe } = e(), C = oe({ pagination: x }), w = d(() => C.data?.items ?? [], [C.data]), [E, Ae] = he(""), je = d(() => w.find((e) => e.status === "PRODUCING")?.id ?? w[0]?.id ?? "", [w]), D = E || je, O = ae(D || void 0), k = de({ pagination: x }), A = ue({
|
|
118
|
+
assetId: D || void 0,
|
|
116
119
|
pagination: x
|
|
117
|
-
}),
|
|
118
|
-
commodity:
|
|
120
|
+
}), j = se(D || void 0, void 0, void 0, x), M = le({
|
|
121
|
+
commodity: O.data?.commodity,
|
|
119
122
|
pagination: x
|
|
120
|
-
}),
|
|
121
|
-
let e = [...
|
|
123
|
+
}), N = d(() => {
|
|
124
|
+
let e = [...M.data?.items ?? []].sort(S((e) => e.createdAt));
|
|
122
125
|
return (e.find((e) => e.deliveredVolume > 0 && e.side === "SELL") ?? e.find((e) => e.deliveredVolume > 0) ?? e.find((e) => e.side === "SELL") ?? e[0])?.id;
|
|
123
|
-
}, [
|
|
124
|
-
!!
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
!!H,
|
|
126
|
+
}, [M.data]), P = ce(N), F = d(() => [...O.data?.productionRecords ?? []].sort(S((e) => e.periodEnd)), [O.data]), I = F[0], L = d(() => (k.data?.items ?? []).filter((e) => e.assetId === D).sort(S((e) => e.producedAt)), [k.data, D]), R = L[0], z = d(() => P.data?.shipments ?? [], [P.data]), B = d(() => [...z].filter((e) => e.status === "DELIVERED").sort(S((e) => e.deliveredAt))[0], [z]), V = d(() => B ?? [...z].sort(S((e) => e.departedAt ?? e.scheduledAt))[0], [B, z]), H = d(() => M.data?.items.find((e) => e.id === N), [M.data, N]), U = d(() => j.data?.items ?? [], [j.data]), W = d(() => U.find((e) => e.category === "CHAIN_OF_CUSTODY") ?? U.find((e) => e.status === "APPROVED") ?? U[0], [U]), G = W?.status === "APPROVED", K = d(() => A.data?.items ?? [], [A.data]), Me = K.reduce((e, t) => e + (t.co2eTonnes ?? 0), 0), Ne = K.filter((e) => e.verified).length, q = O.data, J = [
|
|
127
|
+
!!q,
|
|
128
|
+
F.length > 0,
|
|
129
|
+
L.length > 0,
|
|
128
130
|
!!V,
|
|
131
|
+
!!B,
|
|
129
132
|
G
|
|
130
|
-
],
|
|
133
|
+
], Pe = J.filter(Boolean).length, Fe = J.findIndex((e) => !e), Ie = Fe === -1 ? J.length : Fe, Y = G && !!B, X = (e) => J[e] ? "done" : e === Ie ? "active" : "todo", Le = [
|
|
131
134
|
{
|
|
132
135
|
label: "Asset",
|
|
133
136
|
description: "Origin"
|
|
@@ -152,59 +155,59 @@ function D() {
|
|
|
152
155
|
label: "Certificate",
|
|
153
156
|
description: "Verified"
|
|
154
157
|
}
|
|
155
|
-
], Z =
|
|
158
|
+
], Z = V && (V.origin || V.destination) ? [V.origin, V.destination].filter(Boolean).join(" → ") : void 0, Re = q ? [
|
|
156
159
|
{
|
|
157
160
|
step: 1,
|
|
158
|
-
icon: /* @__PURE__ */ v(
|
|
161
|
+
icon: /* @__PURE__ */ v(h, {}),
|
|
159
162
|
label: "Asset",
|
|
160
|
-
primary:
|
|
161
|
-
secondary:
|
|
162
|
-
badge: /* @__PURE__ */ v(c, { status:
|
|
163
|
+
primary: q.name,
|
|
164
|
+
secondary: q.location ?? r(q.latitude, q.longitude),
|
|
165
|
+
badge: /* @__PURE__ */ v(c, { status: q.status }),
|
|
163
166
|
state: X(0),
|
|
164
167
|
present: !0
|
|
165
168
|
},
|
|
166
169
|
{
|
|
167
170
|
step: 2,
|
|
168
|
-
icon: /* @__PURE__ */ v(
|
|
171
|
+
icon: /* @__PURE__ */ v(m, {}),
|
|
169
172
|
label: "Production",
|
|
170
|
-
primary:
|
|
171
|
-
secondary:
|
|
173
|
+
primary: I ? s(I.volume, I.unit) : "Not yet recorded",
|
|
174
|
+
secondary: I ? `${i(I.periodStart)} – ${i(I.periodEnd)}` : void 0,
|
|
172
175
|
state: X(1),
|
|
173
|
-
present: !!
|
|
176
|
+
present: !!I
|
|
174
177
|
},
|
|
175
178
|
{
|
|
176
179
|
step: 3,
|
|
177
|
-
icon: /* @__PURE__ */ v(
|
|
180
|
+
icon: /* @__PURE__ */ v(f, {}),
|
|
178
181
|
label: "Inventory lot",
|
|
179
|
-
primary:
|
|
180
|
-
secondary:
|
|
181
|
-
badge:
|
|
182
|
+
primary: R ? R.lotCode : "No lot yet",
|
|
183
|
+
secondary: R ? s(R.quantity, R.unit) : void 0,
|
|
184
|
+
badge: R ? /* @__PURE__ */ v(c, { status: R.status }) : void 0,
|
|
182
185
|
state: X(2),
|
|
183
|
-
present: !!
|
|
186
|
+
present: !!R
|
|
184
187
|
},
|
|
185
188
|
{
|
|
186
189
|
step: 4,
|
|
187
|
-
icon: /* @__PURE__ */ v(
|
|
190
|
+
icon: /* @__PURE__ */ v(_, {}),
|
|
188
191
|
label: "Shipment",
|
|
189
|
-
primary:
|
|
190
|
-
secondary:
|
|
191
|
-
badge:
|
|
192
|
-
fileId:
|
|
192
|
+
primary: V ? V.reference : "Not shipped",
|
|
193
|
+
secondary: V ? [a(V.mode), Z].filter(Boolean).join(" · ") : void 0,
|
|
194
|
+
badge: V ? /* @__PURE__ */ v(c, { status: V.status }) : void 0,
|
|
195
|
+
fileId: V?.document?.id,
|
|
193
196
|
state: X(3),
|
|
194
|
-
present: !!
|
|
197
|
+
present: !!V
|
|
195
198
|
},
|
|
196
199
|
{
|
|
197
200
|
step: 5,
|
|
198
|
-
icon: /* @__PURE__ */ v(
|
|
201
|
+
icon: /* @__PURE__ */ v(p, {}),
|
|
199
202
|
label: "Delivered",
|
|
200
|
-
primary:
|
|
201
|
-
secondary:
|
|
203
|
+
primary: B ? s(B.volume, B.unit) : "Awaiting delivery",
|
|
204
|
+
secondary: B && [B.deliveredAt ? i(B.deliveredAt) : null, H ? `Contract ${H.reference}` : null].filter(Boolean).join(" · ") || void 0,
|
|
202
205
|
state: X(4),
|
|
203
|
-
present: !!
|
|
206
|
+
present: !!B
|
|
204
207
|
},
|
|
205
208
|
{
|
|
206
209
|
step: 6,
|
|
207
|
-
icon: /* @__PURE__ */ v(
|
|
210
|
+
icon: /* @__PURE__ */ v(g, {}),
|
|
208
211
|
label: "Certificate",
|
|
209
212
|
primary: W ? W.certNumber ?? W.title : "No certificate",
|
|
210
213
|
secondary: W ? a(W.category) : void 0,
|
|
@@ -213,8 +216,8 @@ function D() {
|
|
|
213
216
|
state: X(5),
|
|
214
217
|
present: !!W
|
|
215
218
|
}
|
|
216
|
-
] : [],
|
|
217
|
-
if (!
|
|
219
|
+
] : [], ze = d(() => {
|
|
220
|
+
if (!q) return [];
|
|
218
221
|
let e = [], t = (t, n) => {
|
|
219
222
|
if (!t) return;
|
|
220
223
|
let r = new Date(t).getTime();
|
|
@@ -223,84 +226,88 @@ function D() {
|
|
|
223
226
|
item: n
|
|
224
227
|
});
|
|
225
228
|
};
|
|
226
|
-
return t(
|
|
229
|
+
return t(q.commissionedAt ?? q.createdAt, {
|
|
227
230
|
title: "Asset registered",
|
|
228
|
-
meta:
|
|
231
|
+
meta: q.name,
|
|
229
232
|
tone: "accent",
|
|
230
|
-
icon: /* @__PURE__ */ v(
|
|
231
|
-
}),
|
|
233
|
+
icon: /* @__PURE__ */ v(h, { className: "h-3 w-3" })
|
|
234
|
+
}), I && t(I.periodEnd ?? I.createdAt, {
|
|
232
235
|
title: "Production recorded",
|
|
233
|
-
meta: s(
|
|
236
|
+
meta: s(I.volume, I.unit),
|
|
234
237
|
tone: "info",
|
|
235
|
-
icon: /* @__PURE__ */ v(
|
|
236
|
-
}),
|
|
238
|
+
icon: /* @__PURE__ */ v(m, { className: "h-3 w-3" })
|
|
239
|
+
}), R && t(R.producedAt ?? R.createdAt, {
|
|
237
240
|
title: "Inventory lot created",
|
|
238
|
-
meta: `${
|
|
241
|
+
meta: `${R.lotCode} · ${s(R.quantity, R.unit)}`,
|
|
239
242
|
tone: "info",
|
|
240
|
-
icon: /* @__PURE__ */ v(
|
|
241
|
-
}),
|
|
242
|
-
title:
|
|
243
|
-
meta: [
|
|
243
|
+
icon: /* @__PURE__ */ v(f, { className: "h-3 w-3" })
|
|
244
|
+
}), V && t(V.departedAt ?? V.scheduledAt ?? V.createdAt, {
|
|
245
|
+
title: V.departedAt ? "Shipment departed" : "Shipment scheduled",
|
|
246
|
+
meta: [V.reference, Z].filter(Boolean).join(" · "),
|
|
244
247
|
tone: "accent",
|
|
245
|
-
icon: /* @__PURE__ */ v(
|
|
246
|
-
}),
|
|
248
|
+
icon: /* @__PURE__ */ v(_, { className: "h-3 w-3" })
|
|
249
|
+
}), B?.deliveredAt && t(B.deliveredAt, {
|
|
247
250
|
title: "Delivered",
|
|
248
|
-
meta: s(
|
|
251
|
+
meta: s(B.volume, B.unit),
|
|
249
252
|
tone: "success",
|
|
250
|
-
icon: /* @__PURE__ */ v(
|
|
253
|
+
icon: /* @__PURE__ */ v(p, { className: "h-3 w-3" })
|
|
251
254
|
}), W && t(W.issuedAt ?? W.createdAt, {
|
|
252
255
|
title: G ? "Certificate approved" : "Certificate registered",
|
|
253
256
|
meta: W.certNumber ?? W.title,
|
|
254
257
|
tone: G ? "success" : "warning",
|
|
255
|
-
icon: /* @__PURE__ */ v(
|
|
258
|
+
icon: /* @__PURE__ */ v(g, { className: "h-3 w-3" })
|
|
256
259
|
}), e.sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()).map(({ date: e, item: t }) => ({
|
|
257
260
|
...t,
|
|
258
261
|
time: i(e)
|
|
259
262
|
}));
|
|
260
263
|
}, [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
H,
|
|
264
|
+
q,
|
|
265
|
+
I,
|
|
266
|
+
R,
|
|
265
267
|
V,
|
|
268
|
+
B,
|
|
266
269
|
W,
|
|
267
270
|
G,
|
|
268
271
|
Z
|
|
269
|
-
]),
|
|
270
|
-
lat:
|
|
271
|
-
lng:
|
|
272
|
-
label:
|
|
272
|
+
]), Be = q && typeof q.latitude == "number" && typeof q.longitude == "number" ? {
|
|
273
|
+
lat: q.latitude,
|
|
274
|
+
lng: q.longitude,
|
|
275
|
+
label: q.name,
|
|
273
276
|
primary: !0
|
|
274
|
-
} : null,
|
|
277
|
+
} : null, Q = u("theglobalfuel.pages.provenance.description", "Pit to port to certificate — end-to-end traceability from origin to verified certificate."), $ = u("theglobalfuel.pages.provenance.title", "Provenance");
|
|
275
278
|
return C.isLoading && w.length === 0 ? /* @__PURE__ */ v(n, {
|
|
276
|
-
title:
|
|
277
|
-
description:
|
|
278
|
-
|
|
279
|
+
title: $,
|
|
280
|
+
description: Q,
|
|
281
|
+
dataTour: "theglobalfuel-provenance-page",
|
|
282
|
+
children: /* @__PURE__ */ v(te, { label: "Loading assets…" })
|
|
279
283
|
}) : C.isError ? /* @__PURE__ */ v(n, {
|
|
280
|
-
title:
|
|
281
|
-
description:
|
|
284
|
+
title: $,
|
|
285
|
+
description: Q,
|
|
286
|
+
dataTour: "theglobalfuel-provenance-page",
|
|
282
287
|
children: /* @__PURE__ */ v(l, {
|
|
283
288
|
message: "Couldn't load assets to trace.",
|
|
284
289
|
onRetry: () => C.refetch()
|
|
285
290
|
})
|
|
286
291
|
}) : w.length === 0 ? /* @__PURE__ */ v(n, {
|
|
287
|
-
title:
|
|
288
|
-
description:
|
|
289
|
-
|
|
292
|
+
title: $,
|
|
293
|
+
description: Q,
|
|
294
|
+
dataTour: "theglobalfuel-provenance-page",
|
|
295
|
+
children: /* @__PURE__ */ v(ne, {
|
|
290
296
|
illustration: "empty-data",
|
|
291
|
-
icon: /* @__PURE__ */ v(
|
|
297
|
+
icon: /* @__PURE__ */ v(ye, { className: "h-10 w-10" }),
|
|
292
298
|
title: "No assets to trace",
|
|
293
299
|
description: "Register a resource asset to build its end-to-end chain of custody.",
|
|
294
300
|
action: /* @__PURE__ */ v("button", {
|
|
295
301
|
type: "button",
|
|
296
|
-
onClick: () =>
|
|
302
|
+
onClick: () => Oe("assets"),
|
|
297
303
|
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
|
|
298
304
|
children: "Go to assets"
|
|
299
305
|
})
|
|
300
306
|
})
|
|
301
307
|
}) : /* @__PURE__ */ y(n, {
|
|
302
|
-
title:
|
|
303
|
-
description:
|
|
308
|
+
title: $,
|
|
309
|
+
description: Q,
|
|
310
|
+
dataTour: "theglobalfuel-provenance-page",
|
|
304
311
|
children: [/* @__PURE__ */ y(b, {
|
|
305
312
|
treatment: "glass",
|
|
306
313
|
className: "flex flex-col gap-4 p-5 sm:flex-row sm:items-center sm:justify-between",
|
|
@@ -310,15 +317,15 @@ function D() {
|
|
|
310
317
|
htmlFor: "provenance-asset",
|
|
311
318
|
className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
|
|
312
319
|
children: "Trace asset"
|
|
313
|
-
}), /* @__PURE__ */ y(
|
|
314
|
-
value:
|
|
315
|
-
onValueChange:
|
|
316
|
-
children: [/* @__PURE__ */ v(
|
|
320
|
+
}), /* @__PURE__ */ y(Ce, {
|
|
321
|
+
value: D,
|
|
322
|
+
onValueChange: Ae,
|
|
323
|
+
children: [/* @__PURE__ */ v(Ee, {
|
|
317
324
|
id: "provenance-asset",
|
|
318
325
|
className: "h-10 w-full sm:w-96",
|
|
319
326
|
"aria-label": "Select an asset to trace",
|
|
320
|
-
children: /* @__PURE__ */ v(
|
|
321
|
-
}), /* @__PURE__ */ v(
|
|
327
|
+
children: /* @__PURE__ */ v(De, { placeholder: "Select an asset to trace" })
|
|
328
|
+
}), /* @__PURE__ */ v(we, { children: w.map((e) => /* @__PURE__ */ y(Te, {
|
|
322
329
|
value: e.id,
|
|
323
330
|
children: [
|
|
324
331
|
e.name,
|
|
@@ -329,29 +336,29 @@ function D() {
|
|
|
329
336
|
})]
|
|
330
337
|
}), /* @__PURE__ */ y("div", {
|
|
331
338
|
className: t("flex items-center gap-2 self-start rounded-full px-3.5 py-1.5 text-sm font-medium", Y ? "bg-status-success-bg-subtle text-status-success-text" : "bg-bg-sunken text-text-secondary"),
|
|
332
|
-
children: [v(Y ?
|
|
339
|
+
children: [v(Y ? g : xe, { className: "h-4 w-4" }), Y ? "Chain of custody verified" : `Traceability in progress · ${Pe}/6`]
|
|
333
340
|
})]
|
|
334
|
-
}),
|
|
341
|
+
}), O.isLoading ? /* @__PURE__ */ v("div", {
|
|
335
342
|
className: "mt-6",
|
|
336
|
-
children: /* @__PURE__ */ v(
|
|
337
|
-
}) :
|
|
343
|
+
children: /* @__PURE__ */ v(te, { label: "Assembling chain of custody…" })
|
|
344
|
+
}) : O.isError || !q ? /* @__PURE__ */ v("div", {
|
|
338
345
|
className: "mt-6",
|
|
339
346
|
children: /* @__PURE__ */ v(l, {
|
|
340
347
|
message: "Couldn't load this asset's provenance.",
|
|
341
|
-
onRetry: () =>
|
|
348
|
+
onRetry: () => O.refetch()
|
|
342
349
|
})
|
|
343
|
-
}) : /* @__PURE__ */ y(
|
|
350
|
+
}) : /* @__PURE__ */ y(Se, { children: [
|
|
344
351
|
/* @__PURE__ */ v(b, {
|
|
345
352
|
treatment: "glass",
|
|
346
353
|
className: "mt-6 p-5",
|
|
347
|
-
children: /* @__PURE__ */ v(
|
|
348
|
-
steps:
|
|
349
|
-
current:
|
|
354
|
+
children: /* @__PURE__ */ v(ie, {
|
|
355
|
+
steps: Le,
|
|
356
|
+
current: Ie
|
|
350
357
|
})
|
|
351
358
|
}),
|
|
352
359
|
/* @__PURE__ */ v("div", {
|
|
353
360
|
className: "mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6",
|
|
354
|
-
children:
|
|
361
|
+
children: Re.map((e) => /* @__PURE__ */ v(ke, { node: e }, e.step))
|
|
355
362
|
}),
|
|
356
363
|
/* @__PURE__ */ y("div", {
|
|
357
364
|
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
@@ -362,7 +369,7 @@ function D() {
|
|
|
362
369
|
className: "mb-4 flex items-center gap-2.5",
|
|
363
370
|
children: [/* @__PURE__ */ v("span", {
|
|
364
371
|
className: "flex size-8 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent",
|
|
365
|
-
children: /* @__PURE__ */ v(
|
|
372
|
+
children: /* @__PURE__ */ v(be, { className: "h-4 w-4" })
|
|
366
373
|
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
|
|
367
374
|
className: "text-base font-semibold text-text-primary",
|
|
368
375
|
children: "Traceability timeline"
|
|
@@ -370,7 +377,7 @@ function D() {
|
|
|
370
377
|
className: "text-xs text-text-tertiary",
|
|
371
378
|
children: "Recorded custody events, oldest to newest."
|
|
372
379
|
})] })]
|
|
373
|
-
}),
|
|
380
|
+
}), ze.length > 0 ? /* @__PURE__ */ v(re, { items: ze }) : /* @__PURE__ */ v("div", {
|
|
374
381
|
className: "rounded-xl border border-dashed border-border-seam py-8 text-center text-sm text-text-secondary",
|
|
375
382
|
children: "No dated custody events yet."
|
|
376
383
|
})]
|
|
@@ -381,7 +388,7 @@ function D() {
|
|
|
381
388
|
className: "flex items-center gap-2.5",
|
|
382
389
|
children: [/* @__PURE__ */ v("span", {
|
|
383
390
|
className: "flex size-8 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent",
|
|
384
|
-
children: /* @__PURE__ */ v(
|
|
391
|
+
children: /* @__PURE__ */ v(h, { className: "h-4 w-4" })
|
|
385
392
|
}), /* @__PURE__ */ y("div", {
|
|
386
393
|
className: "min-w-0",
|
|
387
394
|
children: [/* @__PURE__ */ v("h2", {
|
|
@@ -389,10 +396,10 @@ function D() {
|
|
|
389
396
|
children: "Origin"
|
|
390
397
|
}), /* @__PURE__ */ v("p", {
|
|
391
398
|
className: "truncate text-xs text-text-tertiary",
|
|
392
|
-
children:
|
|
399
|
+
children: q.location ?? a(q.kind)
|
|
393
400
|
})]
|
|
394
401
|
})]
|
|
395
|
-
}),
|
|
402
|
+
}), Be ? /* @__PURE__ */ v(me, { points: [Be] }) : /* @__PURE__ */ v("div", {
|
|
396
403
|
className: "rounded-xl border border-dashed border-border-seam py-8 text-center text-sm text-text-secondary",
|
|
397
404
|
children: "No coordinates recorded for this asset."
|
|
398
405
|
})]
|
|
@@ -407,38 +414,38 @@ function D() {
|
|
|
407
414
|
}), /* @__PURE__ */ y("div", {
|
|
408
415
|
className: "grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6",
|
|
409
416
|
children: [
|
|
410
|
-
/* @__PURE__ */ v(
|
|
411
|
-
icon: /* @__PURE__ */ v(
|
|
417
|
+
/* @__PURE__ */ v(T, {
|
|
418
|
+
icon: /* @__PURE__ */ v(_e, {}),
|
|
412
419
|
label: "Commodity",
|
|
413
|
-
value: a(
|
|
414
|
-
caption: a(
|
|
420
|
+
value: a(q.commodity),
|
|
421
|
+
caption: a(q.kind)
|
|
415
422
|
}),
|
|
416
|
-
/* @__PURE__ */ v(
|
|
417
|
-
icon: /* @__PURE__ */ v(
|
|
423
|
+
/* @__PURE__ */ v(T, {
|
|
424
|
+
icon: /* @__PURE__ */ v(h, {}),
|
|
418
425
|
label: "Origin",
|
|
419
|
-
value:
|
|
420
|
-
caption: r(
|
|
426
|
+
value: q.location ?? q.name,
|
|
427
|
+
caption: r(q.latitude, q.longitude)
|
|
421
428
|
}),
|
|
422
|
-
/* @__PURE__ */ v(
|
|
423
|
-
icon: /* @__PURE__ */ v(
|
|
429
|
+
/* @__PURE__ */ v(T, {
|
|
430
|
+
icon: /* @__PURE__ */ v(m, {}),
|
|
424
431
|
label: "Production",
|
|
425
|
-
value: `${o(
|
|
426
|
-
caption:
|
|
432
|
+
value: `${o(F.length)} records`,
|
|
433
|
+
caption: I ? `Latest ${s(I.volume, I.unit)}` : "None yet"
|
|
427
434
|
}),
|
|
428
|
-
/* @__PURE__ */ v(
|
|
429
|
-
icon: /* @__PURE__ */ v(
|
|
435
|
+
/* @__PURE__ */ v(T, {
|
|
436
|
+
icon: /* @__PURE__ */ v(f, {}),
|
|
430
437
|
label: "Inventory",
|
|
431
|
-
value: `${o(
|
|
432
|
-
caption:
|
|
438
|
+
value: `${o(L.length)} lots`,
|
|
439
|
+
caption: R ? R.lotCode : "None yet"
|
|
433
440
|
}),
|
|
434
|
-
/* @__PURE__ */ v(
|
|
435
|
-
icon: /* @__PURE__ */ v(
|
|
441
|
+
/* @__PURE__ */ v(T, {
|
|
442
|
+
icon: /* @__PURE__ */ v(ge, {}),
|
|
436
443
|
label: "Emissions",
|
|
437
|
-
value:
|
|
438
|
-
caption: `${
|
|
444
|
+
value: A.isError ? "—" : ee(Me),
|
|
445
|
+
caption: `${Ne} verified`
|
|
439
446
|
}),
|
|
440
|
-
/* @__PURE__ */ v(
|
|
441
|
-
icon: /* @__PURE__ */ v(
|
|
447
|
+
/* @__PURE__ */ v(T, {
|
|
448
|
+
icon: /* @__PURE__ */ v(g, {}),
|
|
442
449
|
label: "Certificates",
|
|
443
450
|
value: `${o(U.length)} tracked`,
|
|
444
451
|
caption: G ? "Custody approved" : W ? "Under review" : "None yet"
|
|
@@ -446,13 +453,13 @@ function D() {
|
|
|
446
453
|
]
|
|
447
454
|
})]
|
|
448
455
|
}),
|
|
449
|
-
(
|
|
456
|
+
(q.reserveEstimates?.length ?? 0) > 0 && /* @__PURE__ */ y("p", {
|
|
450
457
|
className: "mt-4 flex items-center gap-1.5 text-xs text-text-tertiary",
|
|
451
458
|
children: [
|
|
452
|
-
/* @__PURE__ */ v(
|
|
453
|
-
o(
|
|
459
|
+
/* @__PURE__ */ v(ve, { className: "h-3.5 w-3.5" }),
|
|
460
|
+
o(q.reserveEstimates?.length ?? 0),
|
|
454
461
|
" reserve estimate",
|
|
455
|
-
(
|
|
462
|
+
(q.reserveEstimates?.length ?? 0) === 1 ? "" : "s",
|
|
456
463
|
" on record for this asset."
|
|
457
464
|
]
|
|
458
465
|
})
|
|
@@ -460,6 +467,6 @@ function D() {
|
|
|
460
467
|
});
|
|
461
468
|
}
|
|
462
469
|
//#endregion
|
|
463
|
-
export {
|
|
470
|
+
export { E as ProvenancePage };
|
|
464
471
|
|
|
465
472
|
//# sourceMappingURL=ProvenancePage.js.map
|