@burdenoff/microfe-theglobalfuel 2026.709.1 → 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/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 +3 -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 +1 -0
- package/dist/theglobalfuel/hooks/useTheAnalytics.js.map +1 -1
- 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/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 +452 -415
- 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 +138 -135
- 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 +140 -137
- 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 +83 -83
- 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.map +1 -1
- 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.map +1 -1
- 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/transitions.d.ts +17 -0
- package/dist/theglobalfuel/utils/transitions.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -5,19 +5,21 @@ import { StatusBadge as te } from "../../components/StatusBadge.js";
|
|
|
5
5
|
import { DataTable as ne } from "../../components/DataTable.js";
|
|
6
6
|
import { ErrorView as re, LoadingView as ie } from "../../components/StateViews.js";
|
|
7
7
|
import { EmptyState as ae } from "../../components/EmptyState.js";
|
|
8
|
-
import { useTheAssets as oe, useTheCreateInventoryLot as se, useTheInventoryLots as c, useTheSetInventoryLotStatus as
|
|
9
|
-
import { useCursorPager as
|
|
10
|
-
import { useNotify as
|
|
8
|
+
import { useTheAssets as oe, useTheCreateInventoryLot as se, useTheInventoryLots as c, useTheSetInventoryLotStatus as l } from "../../hooks/useTheGlobalFuelApi.js";
|
|
9
|
+
import { useCursorPager as ce } from "../../hooks/useCursorPager.js";
|
|
10
|
+
import { useNotify as le } from "../../hooks/useNotify.js";
|
|
11
|
+
import { useThePageView as ue } from "../../hooks/useThePageView.js";
|
|
12
|
+
import { useTheTranslation as de } from "../../hooks/useTheTranslation.js";
|
|
11
13
|
import "../../hooks/index.js";
|
|
12
|
-
import { INVENTORY_TRANSITIONS as
|
|
13
|
-
import { FilterTabs as
|
|
14
|
-
import { Pagination as
|
|
15
|
-
import { useMemo as
|
|
16
|
-
import { Boxes as
|
|
17
|
-
import { Fragment as
|
|
18
|
-
import { Button as
|
|
14
|
+
import { INVENTORY_TRANSITIONS as fe, nextStatuses as pe } from "../../utils/transitions.js";
|
|
15
|
+
import { FilterTabs as me } from "../../components/FilterTabs.js";
|
|
16
|
+
import { Pagination as he } from "../../components/Pagination.js";
|
|
17
|
+
import { useMemo as u, useState as d } from "react";
|
|
18
|
+
import { Boxes as f, Coins as ge, Layers as _e, Plus as p, Warehouse as ve } from "lucide-react";
|
|
19
|
+
import { Fragment as ye, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
20
|
+
import { Button as g, Input as _, Label as v, ResponsiveDialog as be, ResponsiveDialogContent as xe, ResponsiveDialogDescription as Se, ResponsiveDialogFooter as Ce, ResponsiveDialogHeader as y, ResponsiveDialogTitle as b, Select as x, SelectContent as S, SelectItem as C, SelectTrigger as w, SelectValue as T, Textarea as E } from "@burdenoff/fe-libs/ui";
|
|
19
21
|
//#region src/theglobalfuel/pages/inventory/InventoryPage.tsx
|
|
20
|
-
var
|
|
22
|
+
var D = [
|
|
21
23
|
{
|
|
22
24
|
value: "ALL",
|
|
23
25
|
label: "All"
|
|
@@ -42,7 +44,7 @@ var O = [
|
|
|
42
44
|
value: "WRITTEN_OFF",
|
|
43
45
|
label: "Written off"
|
|
44
46
|
}
|
|
45
|
-
],
|
|
47
|
+
], O = "__none__", k = [
|
|
46
48
|
"CRUDE_OIL",
|
|
47
49
|
"NATURAL_GAS",
|
|
48
50
|
"LNG",
|
|
@@ -56,7 +58,7 @@ var O = [
|
|
|
56
58
|
"GOLD",
|
|
57
59
|
"LITHIUM",
|
|
58
60
|
"RARE_EARTH"
|
|
59
|
-
],
|
|
61
|
+
], A = [
|
|
60
62
|
"BARRELS",
|
|
61
63
|
"CUBIC_METERS",
|
|
62
64
|
"TONNES",
|
|
@@ -64,7 +66,7 @@ var O = [
|
|
|
64
66
|
"MWH",
|
|
65
67
|
"GJ",
|
|
66
68
|
"MCF"
|
|
67
|
-
],
|
|
69
|
+
], j = 25, M = (e) => e.quantity * e.unitValue, N = {
|
|
68
70
|
lotCode: "",
|
|
69
71
|
commodity: "CRUDE_OIL",
|
|
70
72
|
assetId: "",
|
|
@@ -77,19 +79,20 @@ var O = [
|
|
|
77
79
|
producedAt: "",
|
|
78
80
|
notes: ""
|
|
79
81
|
};
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
+
function P() {
|
|
83
|
+
ue("inventory");
|
|
84
|
+
let P = de(), [F, we] = d("ALL"), [I, Te] = d("ALL"), L = ce(), [R, z] = d(!1), [B, V] = d(N), [H, U] = d(null), [Ee, W] = d(null), G = le(), { data: K, isLoading: De, isError: Oe, refetch: ke } = c({
|
|
82
85
|
status: F === "ALL" ? void 0 : F,
|
|
83
86
|
commodity: I === "ALL" ? void 0 : I,
|
|
84
87
|
pagination: {
|
|
85
|
-
limit:
|
|
86
|
-
offset:
|
|
88
|
+
limit: j,
|
|
89
|
+
offset: L.page * j
|
|
87
90
|
}
|
|
88
|
-
}), q = c({ pagination: { limit: 200 } }), J = oe({ pagination: { limit: 200 } }), Y = se(),
|
|
91
|
+
}), q = c({ pagination: { limit: 200 } }), J = oe({ pagination: { limit: 200 } }), Y = se(), Ae = l(), X = u(() => K?.items ?? [], [K]), Z = u(() => {
|
|
89
92
|
let e = {};
|
|
90
93
|
for (let t of J.data?.items ?? []) e[t.id] = t.code ? `${t.name} · ${t.code}` : t.name;
|
|
91
94
|
return e;
|
|
92
|
-
}, [J.data]), Q =
|
|
95
|
+
}, [J.data]), Q = u(() => {
|
|
93
96
|
let e = q.data?.items ?? [], t = e.filter((e) => e.status === "AVAILABLE"), n = /* @__PURE__ */ new Map();
|
|
94
97
|
for (let e of t) n.set(e.unit, (n.get(e.unit) ?? 0) + (e.quantity ?? 0));
|
|
95
98
|
let r = null, i = 0;
|
|
@@ -97,7 +100,7 @@ function F() {
|
|
|
97
100
|
let a = /* @__PURE__ */ new Map();
|
|
98
101
|
for (let e of t) {
|
|
99
102
|
let t = e.currency || "USD";
|
|
100
|
-
a.set(t, (a.get(t) ?? 0) +
|
|
103
|
+
a.set(t, (a.get(t) ?? 0) + M(e));
|
|
101
104
|
}
|
|
102
105
|
let o = "USD", s = 0;
|
|
103
106
|
for (let [e, t] of a) t > s && (s = t, o = e);
|
|
@@ -111,21 +114,21 @@ function F() {
|
|
|
111
114
|
topValue: s,
|
|
112
115
|
otherCurrencies: Math.max(0, a.size - 1)
|
|
113
116
|
};
|
|
114
|
-
}, [q.data]),
|
|
117
|
+
}, [q.data]), je = [
|
|
115
118
|
{
|
|
116
119
|
key: "lotCode",
|
|
117
120
|
header: "Lot",
|
|
118
|
-
render: (e) => /* @__PURE__ */
|
|
121
|
+
render: (e) => /* @__PURE__ */ h("div", {
|
|
119
122
|
className: "flex items-center gap-3",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ m("div", {
|
|
121
124
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent",
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
-
}), /* @__PURE__ */
|
|
125
|
+
children: /* @__PURE__ */ m(f, { className: "h-4 w-4" })
|
|
126
|
+
}), /* @__PURE__ */ h("div", {
|
|
124
127
|
className: "min-w-0",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ m("p", {
|
|
126
129
|
className: "truncate font-semibold text-text-primary",
|
|
127
130
|
children: e.lotCode
|
|
128
|
-
}), e.assetId && Z[e.assetId] && /* @__PURE__ */
|
|
131
|
+
}), e.assetId && Z[e.assetId] && /* @__PURE__ */ m("p", {
|
|
129
132
|
className: "truncate text-xs text-text-tertiary",
|
|
130
133
|
children: Z[e.assetId]
|
|
131
134
|
})]
|
|
@@ -136,7 +139,7 @@ function F() {
|
|
|
136
139
|
key: "commodity",
|
|
137
140
|
header: "Commodity",
|
|
138
141
|
hideOnMobile: !0,
|
|
139
|
-
render: (e) => /* @__PURE__ */
|
|
142
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
140
143
|
className: "text-text-secondary",
|
|
141
144
|
children: r(e.commodity)
|
|
142
145
|
})
|
|
@@ -146,7 +149,7 @@ function F() {
|
|
|
146
149
|
header: "Quantity",
|
|
147
150
|
align: "right",
|
|
148
151
|
sortValue: (e) => e.quantity,
|
|
149
|
-
render: (e) => /* @__PURE__ */
|
|
152
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
150
153
|
className: "tabular-nums text-text-primary",
|
|
151
154
|
children: s(e.quantity, e.unit)
|
|
152
155
|
})
|
|
@@ -157,10 +160,10 @@ function F() {
|
|
|
157
160
|
align: "right",
|
|
158
161
|
hideOnMobile: !0,
|
|
159
162
|
sortValue: (e) => e.grade ?? -1,
|
|
160
|
-
render: (e) => e.grade == null ? /* @__PURE__ */
|
|
163
|
+
render: (e) => e.grade == null ? /* @__PURE__ */ m("span", {
|
|
161
164
|
className: "text-text-tertiary",
|
|
162
165
|
children: "—"
|
|
163
|
-
}) : /* @__PURE__ */
|
|
166
|
+
}) : /* @__PURE__ */ m("span", {
|
|
164
167
|
className: "tabular-nums text-text-secondary",
|
|
165
168
|
children: a(e.grade)
|
|
166
169
|
})
|
|
@@ -168,16 +171,16 @@ function F() {
|
|
|
168
171
|
{
|
|
169
172
|
key: "status",
|
|
170
173
|
header: "Status",
|
|
171
|
-
render: (e) => /* @__PURE__ */
|
|
174
|
+
render: (e) => /* @__PURE__ */ m(te, { status: e.status })
|
|
172
175
|
},
|
|
173
176
|
{
|
|
174
177
|
key: "location",
|
|
175
178
|
header: "Location",
|
|
176
179
|
hideOnMobile: !0,
|
|
177
|
-
render: (e) => e.location ? /* @__PURE__ */
|
|
180
|
+
render: (e) => e.location ? /* @__PURE__ */ m("span", {
|
|
178
181
|
className: "text-text-secondary",
|
|
179
182
|
children: e.location
|
|
180
|
-
}) : /* @__PURE__ */
|
|
183
|
+
}) : /* @__PURE__ */ m("span", {
|
|
181
184
|
className: "text-text-tertiary",
|
|
182
185
|
children: "—"
|
|
183
186
|
})
|
|
@@ -187,10 +190,10 @@ function F() {
|
|
|
187
190
|
header: "Value",
|
|
188
191
|
align: "right",
|
|
189
192
|
hideOnMobile: !0,
|
|
190
|
-
sortValue: (e) =>
|
|
191
|
-
render: (e) => /* @__PURE__ */
|
|
193
|
+
sortValue: (e) => M(e),
|
|
194
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
192
195
|
className: "tabular-nums text-text-secondary",
|
|
193
|
-
children: i(
|
|
196
|
+
children: i(M(e), e.currency)
|
|
194
197
|
})
|
|
195
198
|
},
|
|
196
199
|
{
|
|
@@ -199,7 +202,7 @@ function F() {
|
|
|
199
202
|
align: "right",
|
|
200
203
|
hideOnMobile: !0,
|
|
201
204
|
sortValue: (e) => e.producedAt ? new Date(e.producedAt).getTime() : 0,
|
|
202
|
-
render: (e) => /* @__PURE__ */
|
|
205
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
203
206
|
className: "text-text-tertiary",
|
|
204
207
|
children: n(e.producedAt)
|
|
205
208
|
})
|
|
@@ -209,12 +212,12 @@ function F() {
|
|
|
209
212
|
header: "",
|
|
210
213
|
align: "right",
|
|
211
214
|
render: (e) => {
|
|
212
|
-
let t = fe
|
|
213
|
-
return /* @__PURE__ */
|
|
215
|
+
let t = pe(fe, e.status), n = t.length === 0, i = Ee === e.id;
|
|
216
|
+
return /* @__PURE__ */ h(x, {
|
|
214
217
|
value: e.status,
|
|
215
218
|
disabled: n || i,
|
|
216
219
|
onValueChange: (t) => {
|
|
217
|
-
W(e.id),
|
|
220
|
+
W(e.id), Ae.mutate({
|
|
218
221
|
id: e.id,
|
|
219
222
|
status: t
|
|
220
223
|
}, {
|
|
@@ -223,15 +226,15 @@ function F() {
|
|
|
223
226
|
onSettled: () => W(null)
|
|
224
227
|
});
|
|
225
228
|
},
|
|
226
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ m(w, {
|
|
227
230
|
className: "h-8 w-36",
|
|
228
231
|
"aria-label": `Change status for lot ${e.lotCode}`,
|
|
229
|
-
children: /* @__PURE__ */
|
|
230
|
-
}), /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ m(T, {})
|
|
233
|
+
}), /* @__PURE__ */ h(S, { children: [/* @__PURE__ */ m(C, {
|
|
231
234
|
value: e.status,
|
|
232
235
|
disabled: !0,
|
|
233
236
|
children: r(e.status)
|
|
234
|
-
}), t.map((e) => /* @__PURE__ */
|
|
237
|
+
}), t.map((e) => /* @__PURE__ */ m(C, {
|
|
235
238
|
value: e,
|
|
236
239
|
children: r(e)
|
|
237
240
|
}, e))] })]
|
|
@@ -239,8 +242,8 @@ function F() {
|
|
|
239
242
|
}
|
|
240
243
|
}
|
|
241
244
|
], $ = () => {
|
|
242
|
-
V(
|
|
243
|
-
},
|
|
245
|
+
V(N), U(null);
|
|
246
|
+
}, Me = async () => {
|
|
244
247
|
if (!B.lotCode.trim()) {
|
|
245
248
|
U("Lot code is required.");
|
|
246
249
|
return;
|
|
@@ -268,13 +271,13 @@ function F() {
|
|
|
268
271
|
} catch (e) {
|
|
269
272
|
U(e instanceof Error ? e.message : "Failed to create inventory lot."), G.fromError(e);
|
|
270
273
|
}
|
|
271
|
-
},
|
|
274
|
+
}, Ne = (() => {
|
|
272
275
|
if (q.data) {
|
|
273
|
-
if (Q.qtyByUnit.size > 1) return /* @__PURE__ */
|
|
276
|
+
if (Q.qtyByUnit.size > 1) return /* @__PURE__ */ m("p", {
|
|
274
277
|
className: "text-xs text-text-tertiary",
|
|
275
278
|
children: [...Q.qtyByUnit.entries()].sort((e, t) => t[1] - e[1]).map(([e, t]) => s(t, e)).join(" · ")
|
|
276
279
|
});
|
|
277
|
-
if (Q.availableCount > 0) return /* @__PURE__ */
|
|
280
|
+
if (Q.availableCount > 0) return /* @__PURE__ */ h("p", {
|
|
278
281
|
className: "text-xs text-text-tertiary",
|
|
279
282
|
children: [
|
|
280
283
|
"across ",
|
|
@@ -284,7 +287,7 @@ function F() {
|
|
|
284
287
|
]
|
|
285
288
|
});
|
|
286
289
|
}
|
|
287
|
-
})(),
|
|
290
|
+
})(), Pe = q.data && Q.otherCurrencies > 0 ? /* @__PURE__ */ h("p", {
|
|
288
291
|
className: "text-xs text-text-tertiary",
|
|
289
292
|
children: [
|
|
290
293
|
"in ",
|
|
@@ -296,111 +299,112 @@ function F() {
|
|
|
296
299
|
Q.otherCurrencies === 1 ? "currency" : "currencies"
|
|
297
300
|
]
|
|
298
301
|
}) : void 0;
|
|
299
|
-
return /* @__PURE__ */
|
|
300
|
-
title: "Inventory",
|
|
301
|
-
description: "Commodity inventory lots — on-hand quantity, grade, location & book value across the portfolio.",
|
|
302
|
-
|
|
302
|
+
return /* @__PURE__ */ h(e, {
|
|
303
|
+
title: P("theglobalfuel.pages.inventory.title", "Inventory"),
|
|
304
|
+
description: P("theglobalfuel.pages.inventory.description", "Commodity inventory lots — on-hand quantity, grade, location & book value across the portfolio."),
|
|
305
|
+
dataTour: "theglobalfuel-inventory-page",
|
|
306
|
+
actions: /* @__PURE__ */ h(g, {
|
|
303
307
|
onClick: () => z(!0),
|
|
304
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New lot"]
|
|
305
309
|
}),
|
|
306
310
|
children: [
|
|
307
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ h("div", {
|
|
308
312
|
className: "mb-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
309
313
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
icon: /* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ m(t, {
|
|
315
|
+
icon: /* @__PURE__ */ m(ve, { className: "h-5 w-5" }),
|
|
312
316
|
value: q.data ? a(Q.totalLots) : "—",
|
|
313
317
|
label: "Inventory lots",
|
|
314
318
|
featured: !0,
|
|
315
|
-
footer: q.data ? /* @__PURE__ */
|
|
319
|
+
footer: q.data ? /* @__PURE__ */ h("p", {
|
|
316
320
|
className: "text-xs text-text-tertiary",
|
|
317
321
|
children: [a(Q.availableCount), " available"]
|
|
318
322
|
}) : void 0
|
|
319
323
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
icon: /* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ m(t, {
|
|
325
|
+
icon: /* @__PURE__ */ m(_e, { className: "h-5 w-5" }),
|
|
322
326
|
value: q.data ? s(Q.topUnitQty, Q.topUnit) : "—",
|
|
323
327
|
label: "On-hand quantity",
|
|
324
328
|
accent: "success",
|
|
325
|
-
footer:
|
|
329
|
+
footer: Ne
|
|
326
330
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
icon: /* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ m(t, {
|
|
332
|
+
icon: /* @__PURE__ */ m(ge, { className: "h-5 w-5" }),
|
|
329
333
|
value: q.data ? i(Q.topValue, Q.topCurrency) : "—",
|
|
330
334
|
label: "Inventory value",
|
|
331
|
-
footer:
|
|
335
|
+
footer: Pe
|
|
332
336
|
})
|
|
333
337
|
]
|
|
334
338
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ h("div", {
|
|
336
340
|
className: "mb-5 flex flex-wrap items-center gap-3",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
338
|
-
options:
|
|
341
|
+
children: [/* @__PURE__ */ m(me, {
|
|
342
|
+
options: D,
|
|
339
343
|
value: F,
|
|
340
344
|
onChange: (e) => {
|
|
341
|
-
|
|
345
|
+
we(e), L.reset();
|
|
342
346
|
}
|
|
343
|
-
}), /* @__PURE__ */
|
|
347
|
+
}), /* @__PURE__ */ h(x, {
|
|
344
348
|
value: I,
|
|
345
349
|
onValueChange: (e) => {
|
|
346
|
-
|
|
350
|
+
Te(e), L.reset();
|
|
347
351
|
},
|
|
348
|
-
children: [/* @__PURE__ */
|
|
352
|
+
children: [/* @__PURE__ */ m(w, {
|
|
349
353
|
className: "w-48",
|
|
350
354
|
"aria-label": "Filter by commodity",
|
|
351
|
-
children: /* @__PURE__ */
|
|
352
|
-
}), /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ m(T, { placeholder: "All commodities" })
|
|
356
|
+
}), /* @__PURE__ */ h(S, { children: [/* @__PURE__ */ m(C, {
|
|
353
357
|
value: "ALL",
|
|
354
358
|
children: "All commodities"
|
|
355
|
-
}),
|
|
359
|
+
}), k.map((e) => /* @__PURE__ */ m(C, {
|
|
356
360
|
value: e,
|
|
357
361
|
children: r(e)
|
|
358
362
|
}, e))] })]
|
|
359
363
|
})]
|
|
360
364
|
}),
|
|
361
|
-
|
|
365
|
+
De ? /* @__PURE__ */ m(ie, { label: "Loading inventory…" }) : Oe ? /* @__PURE__ */ m(re, {
|
|
362
366
|
message: "Couldn't load inventory lots.",
|
|
363
|
-
onRetry: () =>
|
|
364
|
-
}) : X.length === 0 ? /* @__PURE__ */
|
|
367
|
+
onRetry: () => ke()
|
|
368
|
+
}) : X.length === 0 ? /* @__PURE__ */ m(ae, {
|
|
365
369
|
illustration: "empty-data",
|
|
366
|
-
icon: /* @__PURE__ */
|
|
370
|
+
icon: /* @__PURE__ */ m(f, { className: "h-10 w-10" }),
|
|
367
371
|
title: "No inventory lots yet",
|
|
368
372
|
description: F === "ALL" && I === "ALL" ? "Create your first inventory lot to track on-hand commodity quantity, grade and value." : "No lots match these filters.",
|
|
369
|
-
action: /* @__PURE__ */ g
|
|
373
|
+
action: /* @__PURE__ */ h(g, {
|
|
370
374
|
onClick: () => z(!0),
|
|
371
|
-
children: [/* @__PURE__ */
|
|
375
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New lot"]
|
|
372
376
|
})
|
|
373
|
-
}) : /* @__PURE__ */
|
|
374
|
-
columns:
|
|
377
|
+
}) : /* @__PURE__ */ h(ye, { children: [/* @__PURE__ */ m(ne, {
|
|
378
|
+
columns: je,
|
|
375
379
|
rows: X,
|
|
376
380
|
rowKey: (e) => e.id
|
|
377
|
-
}), /* @__PURE__ */
|
|
378
|
-
page:
|
|
379
|
-
pageSize:
|
|
381
|
+
}), /* @__PURE__ */ m(he, {
|
|
382
|
+
page: L.page,
|
|
383
|
+
pageSize: j,
|
|
380
384
|
itemCount: X.length,
|
|
381
385
|
hasMore: K?.pageInfo?.hasMore ?? !1,
|
|
382
|
-
onPageChange:
|
|
386
|
+
onPageChange: L.onPageChange
|
|
383
387
|
})] }),
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
open:
|
|
388
|
+
/* @__PURE__ */ m(be, {
|
|
389
|
+
open: R,
|
|
386
390
|
onOpenChange: (e) => {
|
|
387
391
|
z(e), e || $();
|
|
388
392
|
},
|
|
389
|
-
children: /* @__PURE__ */
|
|
393
|
+
children: /* @__PURE__ */ h(xe, { children: [/* @__PURE__ */ h(y, { children: [/* @__PURE__ */ m(b, { children: "New inventory lot" }), /* @__PURE__ */ m(Se, { children: "Register an on-hand quantity of a commodity — optionally attributed to a producing asset." })] }), /* @__PURE__ */ h("form", {
|
|
390
394
|
onSubmit: (e) => {
|
|
391
|
-
e.preventDefault(),
|
|
395
|
+
e.preventDefault(), Me();
|
|
392
396
|
},
|
|
393
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ h("div", {
|
|
394
398
|
className: "grid gap-4 py-2",
|
|
395
399
|
children: [
|
|
396
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ h("div", {
|
|
397
401
|
className: "grid gap-2 sm:grid-cols-2",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ h("div", {
|
|
399
403
|
className: "grid gap-1.5",
|
|
400
|
-
children: [/* @__PURE__ */
|
|
404
|
+
children: [/* @__PURE__ */ m(v, {
|
|
401
405
|
htmlFor: "lotCode",
|
|
402
406
|
children: "Lot code *"
|
|
403
|
-
}), /* @__PURE__ */
|
|
407
|
+
}), /* @__PURE__ */ m(_, {
|
|
404
408
|
id: "lotCode",
|
|
405
409
|
value: B.lotCode,
|
|
406
410
|
onChange: (e) => V({
|
|
@@ -409,59 +413,59 @@ function F() {
|
|
|
409
413
|
}),
|
|
410
414
|
placeholder: "LOT-2026-0042"
|
|
411
415
|
})]
|
|
412
|
-
}), /* @__PURE__ */
|
|
416
|
+
}), /* @__PURE__ */ h("div", {
|
|
413
417
|
className: "grid gap-1.5",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
418
|
+
children: [/* @__PURE__ */ m(v, {
|
|
415
419
|
htmlFor: "commodity",
|
|
416
420
|
children: "Commodity *"
|
|
417
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ h(x, {
|
|
418
422
|
value: B.commodity,
|
|
419
423
|
onValueChange: (e) => V({
|
|
420
424
|
...B,
|
|
421
425
|
commodity: e
|
|
422
426
|
}),
|
|
423
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ m(w, {
|
|
424
428
|
id: "commodity",
|
|
425
|
-
children: /* @__PURE__ */
|
|
426
|
-
}), /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ m(T, {})
|
|
430
|
+
}), /* @__PURE__ */ m(S, { children: k.map((e) => /* @__PURE__ */ m(C, {
|
|
427
431
|
value: e,
|
|
428
432
|
children: r(e)
|
|
429
433
|
}, e)) })]
|
|
430
434
|
})]
|
|
431
435
|
})]
|
|
432
436
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ h("div", {
|
|
434
438
|
className: "grid gap-1.5",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ m(v, {
|
|
436
440
|
htmlFor: "assetId",
|
|
437
441
|
children: "Produced by asset"
|
|
438
|
-
}), /* @__PURE__ */
|
|
439
|
-
value: B.assetId ||
|
|
442
|
+
}), /* @__PURE__ */ h(x, {
|
|
443
|
+
value: B.assetId || O,
|
|
440
444
|
onValueChange: (e) => V({
|
|
441
445
|
...B,
|
|
442
|
-
assetId: e ===
|
|
446
|
+
assetId: e === O ? "" : e
|
|
443
447
|
}),
|
|
444
|
-
children: [/* @__PURE__ */
|
|
448
|
+
children: [/* @__PURE__ */ m(w, {
|
|
445
449
|
id: "assetId",
|
|
446
|
-
children: /* @__PURE__ */
|
|
447
|
-
}), /* @__PURE__ */
|
|
448
|
-
value:
|
|
450
|
+
children: /* @__PURE__ */ m(T, { placeholder: "Optional — link to a producing asset" })
|
|
451
|
+
}), /* @__PURE__ */ h(S, { children: [/* @__PURE__ */ m(C, {
|
|
452
|
+
value: O,
|
|
449
453
|
children: "None"
|
|
450
|
-
}), Object.entries(Z).map(([e, t]) => /* @__PURE__ */
|
|
454
|
+
}), Object.entries(Z).map(([e, t]) => /* @__PURE__ */ m(C, {
|
|
451
455
|
value: e,
|
|
452
456
|
children: t
|
|
453
457
|
}, e))] })]
|
|
454
458
|
})]
|
|
455
459
|
}),
|
|
456
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ h("div", {
|
|
457
461
|
className: "grid gap-2 sm:grid-cols-3",
|
|
458
462
|
children: [
|
|
459
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ h("div", {
|
|
460
464
|
className: "grid gap-1.5",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
465
|
+
children: [/* @__PURE__ */ m(v, {
|
|
462
466
|
htmlFor: "quantity",
|
|
463
467
|
children: "Quantity *"
|
|
464
|
-
}), /* @__PURE__ */
|
|
468
|
+
}), /* @__PURE__ */ m(_, {
|
|
465
469
|
id: "quantity",
|
|
466
470
|
type: "number",
|
|
467
471
|
min: "0",
|
|
@@ -474,32 +478,32 @@ function F() {
|
|
|
474
478
|
placeholder: "120000"
|
|
475
479
|
})]
|
|
476
480
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ h("div", {
|
|
478
482
|
className: "grid gap-1.5",
|
|
479
|
-
children: [/* @__PURE__ */
|
|
483
|
+
children: [/* @__PURE__ */ m(v, {
|
|
480
484
|
htmlFor: "unit",
|
|
481
485
|
children: "Unit"
|
|
482
|
-
}), /* @__PURE__ */
|
|
486
|
+
}), /* @__PURE__ */ h(x, {
|
|
483
487
|
value: B.unit,
|
|
484
488
|
onValueChange: (e) => V({
|
|
485
489
|
...B,
|
|
486
490
|
unit: e
|
|
487
491
|
}),
|
|
488
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ m(w, {
|
|
489
493
|
id: "unit",
|
|
490
|
-
children: /* @__PURE__ */
|
|
491
|
-
}), /* @__PURE__ */
|
|
494
|
+
children: /* @__PURE__ */ m(T, {})
|
|
495
|
+
}), /* @__PURE__ */ m(S, { children: A.map((e) => /* @__PURE__ */ m(C, {
|
|
492
496
|
value: e,
|
|
493
497
|
children: o(e)
|
|
494
498
|
}, e)) })]
|
|
495
499
|
})]
|
|
496
500
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ h("div", {
|
|
498
502
|
className: "grid gap-1.5",
|
|
499
|
-
children: [/* @__PURE__ */
|
|
503
|
+
children: [/* @__PURE__ */ m(v, {
|
|
500
504
|
htmlFor: "grade",
|
|
501
505
|
children: "Grade"
|
|
502
|
-
}), /* @__PURE__ */
|
|
506
|
+
}), /* @__PURE__ */ m(_, {
|
|
503
507
|
id: "grade",
|
|
504
508
|
type: "number",
|
|
505
509
|
step: "any",
|
|
@@ -513,15 +517,15 @@ function F() {
|
|
|
513
517
|
})
|
|
514
518
|
]
|
|
515
519
|
}),
|
|
516
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ h("div", {
|
|
517
521
|
className: "grid gap-2 sm:grid-cols-3",
|
|
518
522
|
children: [
|
|
519
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ h("div", {
|
|
520
524
|
className: "grid gap-1.5",
|
|
521
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ m(v, {
|
|
522
526
|
htmlFor: "unitValue",
|
|
523
527
|
children: "Unit value"
|
|
524
|
-
}), /* @__PURE__ */
|
|
528
|
+
}), /* @__PURE__ */ m(_, {
|
|
525
529
|
id: "unitValue",
|
|
526
530
|
type: "number",
|
|
527
531
|
min: "0",
|
|
@@ -534,12 +538,12 @@ function F() {
|
|
|
534
538
|
placeholder: "82.50"
|
|
535
539
|
})]
|
|
536
540
|
}),
|
|
537
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ h("div", {
|
|
538
542
|
className: "grid gap-1.5",
|
|
539
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ m(v, {
|
|
540
544
|
htmlFor: "currency",
|
|
541
545
|
children: "Currency"
|
|
542
|
-
}), /* @__PURE__ */
|
|
546
|
+
}), /* @__PURE__ */ m(_, {
|
|
543
547
|
id: "currency",
|
|
544
548
|
value: B.currency,
|
|
545
549
|
onChange: (e) => V({
|
|
@@ -549,12 +553,12 @@ function F() {
|
|
|
549
553
|
placeholder: "USD"
|
|
550
554
|
})]
|
|
551
555
|
}),
|
|
552
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ h("div", {
|
|
553
557
|
className: "grid gap-1.5",
|
|
554
|
-
children: [/* @__PURE__ */
|
|
558
|
+
children: [/* @__PURE__ */ m(v, {
|
|
555
559
|
htmlFor: "producedAt",
|
|
556
560
|
children: "Produced at"
|
|
557
|
-
}), /* @__PURE__ */
|
|
561
|
+
}), /* @__PURE__ */ m(_, {
|
|
558
562
|
id: "producedAt",
|
|
559
563
|
type: "date",
|
|
560
564
|
value: B.producedAt,
|
|
@@ -566,12 +570,12 @@ function F() {
|
|
|
566
570
|
})
|
|
567
571
|
]
|
|
568
572
|
}),
|
|
569
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ h("div", {
|
|
570
574
|
className: "grid gap-1.5",
|
|
571
|
-
children: [/* @__PURE__ */
|
|
575
|
+
children: [/* @__PURE__ */ m(v, {
|
|
572
576
|
htmlFor: "location",
|
|
573
577
|
children: "Location"
|
|
574
|
-
}), /* @__PURE__ */
|
|
578
|
+
}), /* @__PURE__ */ m(_, {
|
|
575
579
|
id: "location",
|
|
576
580
|
value: B.location,
|
|
577
581
|
onChange: (e) => V({
|
|
@@ -581,12 +585,12 @@ function F() {
|
|
|
581
585
|
placeholder: "Rotterdam Tank Farm 3"
|
|
582
586
|
})]
|
|
583
587
|
}),
|
|
584
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ h("div", {
|
|
585
589
|
className: "grid gap-1.5",
|
|
586
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ m(v, {
|
|
587
591
|
htmlFor: "notes",
|
|
588
592
|
children: "Notes"
|
|
589
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ m(E, {
|
|
590
594
|
id: "notes",
|
|
591
595
|
rows: 2,
|
|
592
596
|
value: B.notes,
|
|
@@ -597,19 +601,19 @@ function F() {
|
|
|
597
601
|
placeholder: "Optional context about this lot."
|
|
598
602
|
})]
|
|
599
603
|
}),
|
|
600
|
-
H && /* @__PURE__ */
|
|
604
|
+
H && /* @__PURE__ */ m("p", {
|
|
601
605
|
className: "text-sm text-status-error-text",
|
|
602
606
|
children: H
|
|
603
607
|
})
|
|
604
608
|
]
|
|
605
|
-
}), /* @__PURE__ */
|
|
609
|
+
}), /* @__PURE__ */ h(Ce, { children: [/* @__PURE__ */ m(g, {
|
|
606
610
|
type: "button",
|
|
607
611
|
variant: "outline",
|
|
608
612
|
onClick: () => {
|
|
609
613
|
z(!1), $();
|
|
610
614
|
},
|
|
611
615
|
children: "Cancel"
|
|
612
|
-
}), /* @__PURE__ */
|
|
616
|
+
}), /* @__PURE__ */ m(g, {
|
|
613
617
|
type: "submit",
|
|
614
618
|
disabled: Y.isPending,
|
|
615
619
|
children: Y.isPending ? "Creating…" : "Create lot"
|
|
@@ -620,6 +624,6 @@ function F() {
|
|
|
620
624
|
});
|
|
621
625
|
}
|
|
622
626
|
//#endregion
|
|
623
|
-
export {
|
|
627
|
+
export { P as InventoryPage };
|
|
624
628
|
|
|
625
629
|
//# sourceMappingURL=InventoryPage.js.map
|