@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,21 +3,23 @@ import { MetricsCard as t } from "../../components/MetricsCard.js";
|
|
|
3
3
|
import { formatDate as n, formatEnumLabel as r, formatPercent as i, formatRelativeTime as ee, formatTonnesCo2e as a, toBackendDate as o } from "../../utils/formatters.js";
|
|
4
4
|
import { StatusBadge as te } from "../../components/StatusBadge.js";
|
|
5
5
|
import { MiniBar as s } from "../../components/MiniBar.js";
|
|
6
|
-
import { DataTable as
|
|
7
|
-
import { ErrorView as
|
|
8
|
-
import { EmptyState as
|
|
9
|
-
import { DonutChart as
|
|
10
|
-
import { useTheAssets as
|
|
11
|
-
import { useCursorPager as
|
|
12
|
-
import { useNotify as
|
|
6
|
+
import { DataTable as ne } from "../../components/DataTable.js";
|
|
7
|
+
import { ErrorView as re, LoadingView as ie } from "../../components/StateViews.js";
|
|
8
|
+
import { EmptyState as ae } from "../../components/EmptyState.js";
|
|
9
|
+
import { DonutChart as oe } from "../../components/viz/DonutChart.js";
|
|
10
|
+
import { useTheAssets as se, useTheEmissionRecords as c, useTheRecordEmission as ce, useTheVerifyEmission as le } from "../../hooks/useTheGlobalFuelApi.js";
|
|
11
|
+
import { useCursorPager as ue } from "../../hooks/useCursorPager.js";
|
|
12
|
+
import { useNotify as de } from "../../hooks/useNotify.js";
|
|
13
|
+
import { useThePageView as fe } from "../../hooks/useThePageView.js";
|
|
14
|
+
import { useTheTranslation as pe } from "../../hooks/useTheTranslation.js";
|
|
13
15
|
import "../../hooks/index.js";
|
|
14
|
-
import { FilterTabs as
|
|
15
|
-
import { Pagination as
|
|
16
|
+
import { FilterTabs as me } from "../../components/FilterTabs.js";
|
|
17
|
+
import { Pagination as he } from "../../components/Pagination.js";
|
|
16
18
|
import "../../components/index.js";
|
|
17
|
-
import { useMemo as
|
|
18
|
-
import { CheckCircle2 as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { Button as
|
|
19
|
+
import { useMemo as l, useState as u } from "react";
|
|
20
|
+
import { CheckCircle2 as ge, Circle as _e, Cloud as d, Factory as ve, Flame as ye, Plus as f, Truck as be, Zap as xe } from "lucide-react";
|
|
21
|
+
import { Fragment as Se, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
22
|
+
import { Button as h, Input as g, Label as _, ResponsiveDialog as Ce, ResponsiveDialogContent as v, ResponsiveDialogDescription as we, ResponsiveDialogFooter as Te, ResponsiveDialogHeader as Ee, ResponsiveDialogTitle as De, Select as y, SelectContent as b, SelectItem as x, SelectTrigger as S, SelectValue as C, Textarea as w } from "@burdenoff/fe-libs/ui";
|
|
21
23
|
//#region src/theglobalfuel/pages/emissions/EmissionsPage.tsx
|
|
22
24
|
var T = [
|
|
23
25
|
"SCOPE_1",
|
|
@@ -44,57 +46,58 @@ var T = [
|
|
|
44
46
|
SCOPE_1: "bg-status-error-text",
|
|
45
47
|
SCOPE_2: "bg-status-warning-text",
|
|
46
48
|
SCOPE_3: "bg-accent"
|
|
47
|
-
},
|
|
49
|
+
}, Oe = {
|
|
48
50
|
SCOPE_1: "Scope 1",
|
|
49
51
|
SCOPE_2: "Scope 2",
|
|
50
52
|
SCOPE_3: "Scope 3"
|
|
51
|
-
},
|
|
53
|
+
}, ke = {
|
|
52
54
|
SCOPE_1: "var(--color-status-error-text)",
|
|
53
55
|
SCOPE_2: "var(--color-status-warning-text)",
|
|
54
56
|
SCOPE_3: "var(--color-accent-blue)"
|
|
55
|
-
},
|
|
57
|
+
}, Ae = (e) => new Intl.NumberFormat("en", {
|
|
56
58
|
notation: "compact",
|
|
57
59
|
maximumFractionDigits: 1
|
|
58
|
-
}).format(e),
|
|
60
|
+
}).format(e), O = 25, k = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), A = () => ({
|
|
59
61
|
assetId: "",
|
|
60
62
|
scope: "SCOPE_1",
|
|
61
63
|
co2eTonnes: "",
|
|
62
|
-
periodStart:
|
|
63
|
-
periodEnd:
|
|
64
|
+
periodStart: k(),
|
|
65
|
+
periodEnd: k(),
|
|
64
66
|
source: "",
|
|
65
67
|
methodology: "",
|
|
66
68
|
notes: ""
|
|
67
|
-
}),
|
|
69
|
+
}), j = (e, t, n) => {
|
|
68
70
|
if (t <= 0) return;
|
|
69
71
|
let r = e / t * 100;
|
|
70
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ m("div", {
|
|
71
73
|
className: "space-y-2",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ p(s, {
|
|
73
75
|
value: r,
|
|
74
76
|
barClassName: D[n],
|
|
75
77
|
height: 4
|
|
76
|
-
}), /* @__PURE__ */
|
|
78
|
+
}), /* @__PURE__ */ m("p", {
|
|
77
79
|
className: "text-xs tabular-nums text-text-tertiary",
|
|
78
80
|
children: [i(r), " of total"]
|
|
79
81
|
})]
|
|
80
82
|
});
|
|
81
83
|
};
|
|
82
|
-
function
|
|
83
|
-
|
|
84
|
+
function M() {
|
|
85
|
+
fe("emissions");
|
|
86
|
+
let i = pe(), s = de(), [D, k] = u("ALL"), [M, N] = u("ALL"), P = ue(), [je, F] = u(!1), [I, L] = u(A), [R, z] = u(null), [B, V] = u(null), H = se({ pagination: { limit: 100 } }), Me = l(() => {
|
|
84
87
|
let e = {};
|
|
85
88
|
for (let t of H.data?.items ?? []) e[t.id] = t.name;
|
|
86
89
|
return e;
|
|
87
|
-
}, [H.data]), U = H.data?.items ?? [], { data: W, isLoading:
|
|
88
|
-
scope:
|
|
89
|
-
assetId:
|
|
90
|
+
}, [H.data]), U = H.data?.items ?? [], { data: W, isLoading: Ne, isError: Pe, refetch: Fe } = c({
|
|
91
|
+
scope: D === "ALL" ? void 0 : D,
|
|
92
|
+
assetId: M === "ALL" ? void 0 : M,
|
|
90
93
|
pagination: {
|
|
91
|
-
limit:
|
|
92
|
-
offset: P.page *
|
|
94
|
+
limit: O,
|
|
95
|
+
offset: P.page * O
|
|
93
96
|
}
|
|
94
|
-
}), G =
|
|
95
|
-
assetId:
|
|
97
|
+
}), G = ce(), Ie = le(), K = l(() => W?.items ?? [], [W]), q = c({
|
|
98
|
+
assetId: M === "ALL" ? void 0 : M,
|
|
96
99
|
pagination: { limit: 200 }
|
|
97
|
-
}), J =
|
|
100
|
+
}), J = l(() => q.data?.items ?? [], [q.data]), Y = J.length, { total: X, byScope: Z } = l(() => {
|
|
98
101
|
let e = {
|
|
99
102
|
SCOPE_1: 0,
|
|
100
103
|
SCOPE_2: 0,
|
|
@@ -105,22 +108,22 @@ function N() {
|
|
|
105
108
|
total: t,
|
|
106
109
|
byScope: e
|
|
107
110
|
};
|
|
108
|
-
}, [J]), Q =
|
|
109
|
-
label:
|
|
111
|
+
}, [J]), Q = l(() => T.filter((e) => Z[e] > 0).map((e) => ({
|
|
112
|
+
label: Oe[e],
|
|
110
113
|
value: Z[e],
|
|
111
|
-
color:
|
|
112
|
-
})), [Z]),
|
|
114
|
+
color: ke[e]
|
|
115
|
+
})), [Z]), Le = [
|
|
113
116
|
{
|
|
114
117
|
key: "scope",
|
|
115
118
|
header: "Scope",
|
|
116
|
-
render: (e) => /* @__PURE__ */
|
|
119
|
+
render: (e) => /* @__PURE__ */ p(te, { status: e.scope })
|
|
117
120
|
},
|
|
118
121
|
{
|
|
119
122
|
key: "asset",
|
|
120
123
|
header: "Asset",
|
|
121
|
-
render: (e) => /* @__PURE__ */
|
|
124
|
+
render: (e) => /* @__PURE__ */ p("span", {
|
|
122
125
|
className: "text-text-secondary",
|
|
123
|
-
children: e.assetId ?
|
|
126
|
+
children: e.assetId ? Me[e.assetId] ?? `${e.assetId.slice(0, 8)}…` : "—"
|
|
124
127
|
})
|
|
125
128
|
},
|
|
126
129
|
{
|
|
@@ -128,7 +131,7 @@ function N() {
|
|
|
128
131
|
header: "CO₂e",
|
|
129
132
|
align: "right",
|
|
130
133
|
sortValue: (e) => e.co2eTonnes,
|
|
131
|
-
render: (e) => /* @__PURE__ */
|
|
134
|
+
render: (e) => /* @__PURE__ */ p("span", {
|
|
132
135
|
className: "tabular-nums font-medium text-text-primary",
|
|
133
136
|
children: a(e.co2eTonnes)
|
|
134
137
|
})
|
|
@@ -138,7 +141,7 @@ function N() {
|
|
|
138
141
|
header: "Period",
|
|
139
142
|
hideOnMobile: !0,
|
|
140
143
|
sortValue: (e) => new Date(e.periodStart).getTime(),
|
|
141
|
-
render: (e) => /* @__PURE__ */
|
|
144
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
142
145
|
className: "text-text-secondary",
|
|
143
146
|
children: [
|
|
144
147
|
n(e.periodStart),
|
|
@@ -151,7 +154,7 @@ function N() {
|
|
|
151
154
|
key: "source",
|
|
152
155
|
header: "Source",
|
|
153
156
|
hideOnMobile: !0,
|
|
154
|
-
render: (e) => /* @__PURE__ */
|
|
157
|
+
render: (e) => /* @__PURE__ */ p("span", {
|
|
155
158
|
className: "text-text-secondary",
|
|
156
159
|
children: e.source ?? "—"
|
|
157
160
|
})
|
|
@@ -159,22 +162,22 @@ function N() {
|
|
|
159
162
|
{
|
|
160
163
|
key: "verified",
|
|
161
164
|
header: "Verified",
|
|
162
|
-
render: (e) => e.verified ? /* @__PURE__ */
|
|
165
|
+
render: (e) => e.verified ? /* @__PURE__ */ m("span", {
|
|
163
166
|
className: "inline-flex items-center gap-1.5 text-status-success-text",
|
|
164
167
|
children: [
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ p(ge, { className: "h-4 w-4" }),
|
|
169
|
+
/* @__PURE__ */ p("span", {
|
|
167
170
|
className: "text-xs font-medium",
|
|
168
171
|
children: "Verified"
|
|
169
172
|
}),
|
|
170
|
-
e.verifiedAt && /* @__PURE__ */
|
|
173
|
+
e.verifiedAt && /* @__PURE__ */ p("span", {
|
|
171
174
|
className: "text-xs font-normal tabular-nums text-text-tertiary",
|
|
172
175
|
children: n(e.verifiedAt)
|
|
173
176
|
})
|
|
174
177
|
]
|
|
175
|
-
}) : /* @__PURE__ */
|
|
178
|
+
}) : /* @__PURE__ */ m("span", {
|
|
176
179
|
className: "inline-flex items-center gap-1.5 text-text-tertiary",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ p(_e, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ p("span", {
|
|
178
181
|
className: "text-xs",
|
|
179
182
|
children: "Unverified"
|
|
180
183
|
})]
|
|
@@ -185,7 +188,7 @@ function N() {
|
|
|
185
188
|
header: "Logged",
|
|
186
189
|
align: "right",
|
|
187
190
|
hideOnMobile: !0,
|
|
188
|
-
render: (e) => /* @__PURE__ */
|
|
191
|
+
render: (e) => /* @__PURE__ */ p("span", {
|
|
189
192
|
className: "text-text-tertiary",
|
|
190
193
|
children: ee(e.createdAt)
|
|
191
194
|
})
|
|
@@ -194,13 +197,13 @@ function N() {
|
|
|
194
197
|
key: "verify",
|
|
195
198
|
header: "",
|
|
196
199
|
align: "right",
|
|
197
|
-
render: (e) => e.verified ? null : /* @__PURE__ */
|
|
200
|
+
render: (e) => e.verified ? null : /* @__PURE__ */ p(h, {
|
|
198
201
|
size: "sm",
|
|
199
202
|
variant: "outline",
|
|
200
203
|
onClick: () => {
|
|
201
|
-
V(e.id),
|
|
202
|
-
onSuccess: () =>
|
|
203
|
-
onError: (e) =>
|
|
204
|
+
V(e.id), Ie.mutate(e.id, {
|
|
205
|
+
onSuccess: () => s.success("Emission verified"),
|
|
206
|
+
onError: (e) => s.fromError(e),
|
|
204
207
|
onSettled: () => V(null)
|
|
205
208
|
});
|
|
206
209
|
},
|
|
@@ -209,12 +212,12 @@ function N() {
|
|
|
209
212
|
})
|
|
210
213
|
}
|
|
211
214
|
], $ = () => {
|
|
212
|
-
L(
|
|
213
|
-
},
|
|
215
|
+
L(A()), z(null), F(!0);
|
|
216
|
+
}, Re = async () => {
|
|
214
217
|
let e = Number(I.co2eTonnes);
|
|
215
218
|
if (!I.co2eTonnes || Number.isNaN(e) || e <= 0) {
|
|
216
219
|
let e = "CO₂e (tonnes) must be greater than zero.";
|
|
217
|
-
z(e),
|
|
220
|
+
z(e), s.error(e);
|
|
218
221
|
return;
|
|
219
222
|
}
|
|
220
223
|
if (!I.periodStart || !I.periodEnd) {
|
|
@@ -241,56 +244,57 @@ function N() {
|
|
|
241
244
|
source: I.source.trim() || null,
|
|
242
245
|
methodology: I.methodology.trim() || null,
|
|
243
246
|
notes: I.notes.trim() || null
|
|
244
|
-
}),
|
|
247
|
+
}), s.success("Emission recorded"), F(!1), L(A());
|
|
245
248
|
} catch (e) {
|
|
246
|
-
|
|
249
|
+
s.fromError(e), z(e instanceof Error ? e.message : "Failed to record emission.");
|
|
247
250
|
}
|
|
248
251
|
};
|
|
249
|
-
return /* @__PURE__ */
|
|
250
|
-
title: "Emissions",
|
|
251
|
-
description: "ESG greenhouse-gas ledger across every asset — GHG Protocol Scope 1 / 2 / 3, with third-party verification.",
|
|
252
|
-
|
|
252
|
+
return /* @__PURE__ */ m(e, {
|
|
253
|
+
title: i("theglobalfuel.pages.emissions.title", "Emissions"),
|
|
254
|
+
description: i("theglobalfuel.pages.emissions.description", "ESG greenhouse-gas ledger across every asset — GHG Protocol Scope 1 / 2 / 3, with third-party verification."),
|
|
255
|
+
dataTour: "theglobalfuel-emissions-page",
|
|
256
|
+
actions: /* @__PURE__ */ m(h, {
|
|
253
257
|
onClick: $,
|
|
254
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ p(f, { className: "mr-1.5 h-4 w-4" }), " Record emission"]
|
|
255
259
|
}),
|
|
256
260
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ m("div", {
|
|
258
262
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ m("div", {
|
|
260
264
|
className: "flex flex-col rounded-[var(--radius-card)] border border-border-subtle bg-bg-surface p-5 shadow-elevation-1",
|
|
261
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ m("div", {
|
|
262
266
|
className: "mb-1 flex items-center justify-between gap-2",
|
|
263
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
264
268
|
className: "text-sm font-semibold text-text-secondary",
|
|
265
269
|
children: "Emissions by scope"
|
|
266
|
-
}), /* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ p(d, {
|
|
267
271
|
className: "h-4 w-4 shrink-0 text-text-muted",
|
|
268
272
|
"aria-hidden": "true"
|
|
269
273
|
})]
|
|
270
|
-
}), q.isLoading ? /* @__PURE__ */
|
|
274
|
+
}), q.isLoading ? /* @__PURE__ */ p("p", {
|
|
271
275
|
className: "flex flex-1 items-center py-8 text-sm text-text-tertiary",
|
|
272
276
|
children: "Loading breakdown…"
|
|
273
|
-
}) : Q.length > 0 ? /* @__PURE__ */
|
|
277
|
+
}) : Q.length > 0 ? /* @__PURE__ */ p(oe, {
|
|
274
278
|
className: "mt-3",
|
|
275
279
|
segments: Q,
|
|
276
280
|
size: 148,
|
|
277
281
|
thickness: .32,
|
|
278
|
-
centerLabel:
|
|
282
|
+
centerLabel: Ae(X),
|
|
279
283
|
centerCaption: "t CO₂e",
|
|
280
284
|
valueFormatter: a
|
|
281
|
-
}) : /* @__PURE__ */
|
|
285
|
+
}) : /* @__PURE__ */ p("p", {
|
|
282
286
|
className: "flex flex-1 items-center py-8 text-sm text-text-tertiary",
|
|
283
287
|
children: "No emissions recorded yet."
|
|
284
288
|
})]
|
|
285
|
-
}), /* @__PURE__ */
|
|
289
|
+
}), /* @__PURE__ */ m("div", {
|
|
286
290
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:col-span-2",
|
|
287
291
|
children: [
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
icon: /* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ p(t, {
|
|
293
|
+
icon: /* @__PURE__ */ p(ve, { className: "h-5 w-5" }),
|
|
290
294
|
value: Y > 0 ? a(X) : "—",
|
|
291
295
|
label: "Total CO₂e",
|
|
292
296
|
featured: !0,
|
|
293
|
-
footer: /* @__PURE__ */
|
|
297
|
+
footer: /* @__PURE__ */ m("p", {
|
|
294
298
|
className: "text-xs tabular-nums text-text-tertiary",
|
|
295
299
|
children: [
|
|
296
300
|
Y,
|
|
@@ -300,119 +304,119 @@ function N() {
|
|
|
300
304
|
]
|
|
301
305
|
})
|
|
302
306
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
icon: /* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ p(t, {
|
|
308
|
+
icon: /* @__PURE__ */ p(ye, { className: "h-5 w-5" }),
|
|
305
309
|
value: Y > 0 ? a(Z.SCOPE_1) : "—",
|
|
306
310
|
label: "Scope 1 · Direct",
|
|
307
|
-
footer:
|
|
311
|
+
footer: j(Z.SCOPE_1, X, "SCOPE_1")
|
|
308
312
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
icon: /* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ p(t, {
|
|
314
|
+
icon: /* @__PURE__ */ p(xe, { className: "h-5 w-5" }),
|
|
311
315
|
value: Y > 0 ? a(Z.SCOPE_2) : "—",
|
|
312
316
|
label: "Scope 2 · Purchased energy",
|
|
313
|
-
footer:
|
|
317
|
+
footer: j(Z.SCOPE_2, X, "SCOPE_2")
|
|
314
318
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
icon: /* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ p(t, {
|
|
320
|
+
icon: /* @__PURE__ */ p(be, { className: "h-5 w-5" }),
|
|
317
321
|
value: Y > 0 ? a(Z.SCOPE_3) : "—",
|
|
318
322
|
label: "Scope 3 · Value chain",
|
|
319
|
-
footer:
|
|
323
|
+
footer: j(Z.SCOPE_3, X, "SCOPE_3")
|
|
320
324
|
})
|
|
321
325
|
]
|
|
322
326
|
})]
|
|
323
327
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ m("div", {
|
|
325
329
|
className: "mt-6 mb-5 flex flex-wrap items-center gap-3",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ p(me, {
|
|
327
331
|
options: E,
|
|
328
|
-
value:
|
|
332
|
+
value: D,
|
|
329
333
|
onChange: (e) => {
|
|
330
|
-
|
|
334
|
+
k(e), P.reset();
|
|
331
335
|
}
|
|
332
|
-
}), /* @__PURE__ */
|
|
333
|
-
value:
|
|
336
|
+
}), /* @__PURE__ */ m(y, {
|
|
337
|
+
value: M,
|
|
334
338
|
onValueChange: (e) => {
|
|
335
339
|
N(e), P.reset();
|
|
336
340
|
},
|
|
337
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ p(S, {
|
|
338
342
|
className: "w-56",
|
|
339
343
|
"aria-label": "Filter by asset",
|
|
340
|
-
children: /* @__PURE__ */
|
|
341
|
-
}), /* @__PURE__ */
|
|
344
|
+
children: /* @__PURE__ */ p(C, { placeholder: "All assets" })
|
|
345
|
+
}), /* @__PURE__ */ m(b, { children: [/* @__PURE__ */ p(x, {
|
|
342
346
|
value: "ALL",
|
|
343
347
|
children: "All assets"
|
|
344
|
-
}), U.map((e) => /* @__PURE__ */
|
|
348
|
+
}), U.map((e) => /* @__PURE__ */ p(x, {
|
|
345
349
|
value: e.id,
|
|
346
350
|
children: e.name
|
|
347
351
|
}, e.id))] })]
|
|
348
352
|
})]
|
|
349
353
|
}),
|
|
350
|
-
|
|
354
|
+
Ne ? /* @__PURE__ */ p(ie, { label: "Loading emission records…" }) : Pe ? /* @__PURE__ */ p(re, {
|
|
351
355
|
message: "Couldn't load emission records.",
|
|
352
|
-
onRetry: () =>
|
|
353
|
-
}) : K.length === 0 ? /* @__PURE__ */
|
|
356
|
+
onRetry: () => Fe()
|
|
357
|
+
}) : K.length === 0 ? /* @__PURE__ */ p(ae, {
|
|
354
358
|
illustration: "empty-data",
|
|
355
|
-
icon: /* @__PURE__ */
|
|
359
|
+
icon: /* @__PURE__ */ p(d, { className: "h-10 w-10" }),
|
|
356
360
|
title: "No emissions recorded",
|
|
357
|
-
description:
|
|
358
|
-
action: /* @__PURE__ */ h
|
|
361
|
+
description: D === "ALL" && M === "ALL" ? "Record a CO₂e figure to start building your Scope 1–3 emissions ledger." : "No emission records match these filters.",
|
|
362
|
+
action: /* @__PURE__ */ m(h, {
|
|
359
363
|
onClick: $,
|
|
360
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ p(f, { className: "mr-1.5 h-4 w-4" }), " Record emission"]
|
|
361
365
|
})
|
|
362
|
-
}) : /* @__PURE__ */
|
|
363
|
-
columns:
|
|
366
|
+
}) : /* @__PURE__ */ m(Se, { children: [/* @__PURE__ */ p(ne, {
|
|
367
|
+
columns: Le,
|
|
364
368
|
rows: K,
|
|
365
369
|
rowKey: (e) => e.id,
|
|
366
370
|
defaultSort: {
|
|
367
371
|
key: "period",
|
|
368
372
|
dir: "desc"
|
|
369
373
|
}
|
|
370
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ p(he, {
|
|
371
375
|
page: P.page,
|
|
372
|
-
pageSize:
|
|
376
|
+
pageSize: O,
|
|
373
377
|
itemCount: K.length,
|
|
374
378
|
hasMore: W?.pageInfo?.hasMore ?? !1,
|
|
375
379
|
onPageChange: P.onPageChange
|
|
376
380
|
})] }),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
open:
|
|
381
|
+
/* @__PURE__ */ p(Ce, {
|
|
382
|
+
open: je,
|
|
379
383
|
onOpenChange: (e) => {
|
|
380
|
-
F(e), e || (L(
|
|
384
|
+
F(e), e || (L(A()), z(null));
|
|
381
385
|
},
|
|
382
|
-
children: /* @__PURE__ */
|
|
386
|
+
children: /* @__PURE__ */ m(v, { children: [/* @__PURE__ */ m(Ee, { children: [/* @__PURE__ */ p(De, { children: "Record emission" }), /* @__PURE__ */ p(we, { children: "Log a CO₂e figure for a reporting period — optionally attributed to an asset." })] }), /* @__PURE__ */ m("form", {
|
|
383
387
|
onSubmit: (e) => {
|
|
384
|
-
e.preventDefault(),
|
|
388
|
+
e.preventDefault(), Re();
|
|
385
389
|
},
|
|
386
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ m("div", {
|
|
387
391
|
className: "grid gap-4 py-2",
|
|
388
392
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ m("div", {
|
|
390
394
|
className: "grid gap-2 sm:grid-cols-2",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ m("div", {
|
|
392
396
|
className: "grid gap-1.5",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ p(_, {
|
|
394
398
|
htmlFor: "emScope",
|
|
395
399
|
children: "Scope"
|
|
396
|
-
}), /* @__PURE__ */
|
|
400
|
+
}), /* @__PURE__ */ m(y, {
|
|
397
401
|
value: I.scope,
|
|
398
402
|
onValueChange: (e) => L({
|
|
399
403
|
...I,
|
|
400
404
|
scope: e
|
|
401
405
|
}),
|
|
402
|
-
children: [/* @__PURE__ */
|
|
406
|
+
children: [/* @__PURE__ */ p(S, {
|
|
403
407
|
id: "emScope",
|
|
404
|
-
children: /* @__PURE__ */
|
|
405
|
-
}), /* @__PURE__ */
|
|
408
|
+
children: /* @__PURE__ */ p(C, {})
|
|
409
|
+
}), /* @__PURE__ */ p(b, { children: T.map((e) => /* @__PURE__ */ p(x, {
|
|
406
410
|
value: e,
|
|
407
411
|
children: r(e)
|
|
408
412
|
}, e)) })]
|
|
409
413
|
})]
|
|
410
|
-
}), /* @__PURE__ */
|
|
414
|
+
}), /* @__PURE__ */ m("div", {
|
|
411
415
|
className: "grid gap-1.5",
|
|
412
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ p(_, {
|
|
413
417
|
htmlFor: "emCo2e",
|
|
414
418
|
children: "CO₂e (tonnes) *"
|
|
415
|
-
}), /* @__PURE__ */
|
|
419
|
+
}), /* @__PURE__ */ p(g, {
|
|
416
420
|
id: "emCo2e",
|
|
417
421
|
type: "number",
|
|
418
422
|
min: "0",
|
|
@@ -426,34 +430,34 @@ function N() {
|
|
|
426
430
|
})]
|
|
427
431
|
})]
|
|
428
432
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ m("div", {
|
|
430
434
|
className: "grid gap-1.5",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ p(_, {
|
|
432
436
|
htmlFor: "emAsset",
|
|
433
437
|
children: "Asset"
|
|
434
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ m(y, {
|
|
435
439
|
value: I.assetId,
|
|
436
440
|
onValueChange: (e) => L({
|
|
437
441
|
...I,
|
|
438
442
|
assetId: e
|
|
439
443
|
}),
|
|
440
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ p(S, {
|
|
441
445
|
id: "emAsset",
|
|
442
|
-
children: /* @__PURE__ */
|
|
443
|
-
}), /* @__PURE__ */
|
|
446
|
+
children: /* @__PURE__ */ p(C, { placeholder: "Optional — org-wide if unset" })
|
|
447
|
+
}), /* @__PURE__ */ p(b, { children: U.map((e) => /* @__PURE__ */ p(x, {
|
|
444
448
|
value: e.id,
|
|
445
449
|
children: e.name
|
|
446
450
|
}, e.id)) })]
|
|
447
451
|
})]
|
|
448
452
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ m("div", {
|
|
450
454
|
className: "grid gap-2 sm:grid-cols-2",
|
|
451
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ m("div", {
|
|
452
456
|
className: "grid gap-1.5",
|
|
453
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ p(_, {
|
|
454
458
|
htmlFor: "emStart",
|
|
455
459
|
children: "Period start *"
|
|
456
|
-
}), /* @__PURE__ */
|
|
460
|
+
}), /* @__PURE__ */ p(g, {
|
|
457
461
|
id: "emStart",
|
|
458
462
|
type: "date",
|
|
459
463
|
value: I.periodStart,
|
|
@@ -462,12 +466,12 @@ function N() {
|
|
|
462
466
|
periodStart: e.target.value
|
|
463
467
|
})
|
|
464
468
|
})]
|
|
465
|
-
}), /* @__PURE__ */
|
|
469
|
+
}), /* @__PURE__ */ m("div", {
|
|
466
470
|
className: "grid gap-1.5",
|
|
467
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ p(_, {
|
|
468
472
|
htmlFor: "emEnd",
|
|
469
473
|
children: "Period end *"
|
|
470
|
-
}), /* @__PURE__ */
|
|
474
|
+
}), /* @__PURE__ */ p(g, {
|
|
471
475
|
id: "emEnd",
|
|
472
476
|
type: "date",
|
|
473
477
|
value: I.periodEnd,
|
|
@@ -478,14 +482,14 @@ function N() {
|
|
|
478
482
|
})]
|
|
479
483
|
})]
|
|
480
484
|
}),
|
|
481
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ m("div", {
|
|
482
486
|
className: "grid gap-2 sm:grid-cols-2",
|
|
483
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ m("div", {
|
|
484
488
|
className: "grid gap-1.5",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ p(_, {
|
|
486
490
|
htmlFor: "emSource",
|
|
487
491
|
children: "Source"
|
|
488
|
-
}), /* @__PURE__ */
|
|
492
|
+
}), /* @__PURE__ */ p(g, {
|
|
489
493
|
id: "emSource",
|
|
490
494
|
value: I.source,
|
|
491
495
|
onChange: (e) => L({
|
|
@@ -494,12 +498,12 @@ function N() {
|
|
|
494
498
|
}),
|
|
495
499
|
placeholder: "Flaring, grid electricity…"
|
|
496
500
|
})]
|
|
497
|
-
}), /* @__PURE__ */
|
|
501
|
+
}), /* @__PURE__ */ m("div", {
|
|
498
502
|
className: "grid gap-1.5",
|
|
499
|
-
children: [/* @__PURE__ */
|
|
503
|
+
children: [/* @__PURE__ */ p(_, {
|
|
500
504
|
htmlFor: "emMethod",
|
|
501
505
|
children: "Methodology"
|
|
502
|
-
}), /* @__PURE__ */
|
|
506
|
+
}), /* @__PURE__ */ p(g, {
|
|
503
507
|
id: "emMethod",
|
|
504
508
|
value: I.methodology,
|
|
505
509
|
onChange: (e) => L({
|
|
@@ -510,12 +514,12 @@ function N() {
|
|
|
510
514
|
})]
|
|
511
515
|
})]
|
|
512
516
|
}),
|
|
513
|
-
/* @__PURE__ */
|
|
517
|
+
/* @__PURE__ */ m("div", {
|
|
514
518
|
className: "grid gap-1.5",
|
|
515
|
-
children: [/* @__PURE__ */
|
|
519
|
+
children: [/* @__PURE__ */ p(_, {
|
|
516
520
|
htmlFor: "emNotes",
|
|
517
521
|
children: "Notes"
|
|
518
|
-
}), /* @__PURE__ */
|
|
522
|
+
}), /* @__PURE__ */ p(w, {
|
|
519
523
|
id: "emNotes",
|
|
520
524
|
rows: 2,
|
|
521
525
|
value: I.notes,
|
|
@@ -526,17 +530,17 @@ function N() {
|
|
|
526
530
|
placeholder: "Optional context about this figure."
|
|
527
531
|
})]
|
|
528
532
|
}),
|
|
529
|
-
R && /* @__PURE__ */
|
|
533
|
+
R && /* @__PURE__ */ p("p", {
|
|
530
534
|
className: "text-sm text-status-error-text",
|
|
531
535
|
children: R
|
|
532
536
|
})
|
|
533
537
|
]
|
|
534
|
-
}), /* @__PURE__ */
|
|
538
|
+
}), /* @__PURE__ */ m(Te, { children: [/* @__PURE__ */ p(h, {
|
|
535
539
|
type: "button",
|
|
536
540
|
variant: "outline",
|
|
537
541
|
onClick: () => F(!1),
|
|
538
542
|
children: "Cancel"
|
|
539
|
-
}), /* @__PURE__ */
|
|
543
|
+
}), /* @__PURE__ */ p(h, {
|
|
540
544
|
type: "submit",
|
|
541
545
|
disabled: G.isPending,
|
|
542
546
|
children: G.isPending ? "Recording…" : "Record emission"
|
|
@@ -547,6 +551,6 @@ function N() {
|
|
|
547
551
|
});
|
|
548
552
|
}
|
|
549
553
|
//#endregion
|
|
550
|
-
export {
|
|
554
|
+
export { M as EmissionsPage };
|
|
551
555
|
|
|
552
556
|
//# sourceMappingURL=EmissionsPage.js.map
|