@burdenoff/microfe-theglobalfuel 2026.705.3 → 2026.705.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/theglobalfuel/TheGlobalFuelRoot.js +54 -46
- package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js +10 -6
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
- package/dist/theglobalfuel/components/DataTable.js +126 -58
- package/dist/theglobalfuel/components/DataTable.js.map +1 -1
- package/dist/theglobalfuel/components/EmptyState.js +4 -4
- package/dist/theglobalfuel/components/EmptyState.js.map +1 -1
- package/dist/theglobalfuel/components/MetricsCard.js +2 -2
- package/dist/theglobalfuel/components/MetricsCard.js.map +1 -1
- package/dist/theglobalfuel/components/WorldMap.js +115 -0
- package/dist/theglobalfuel/components/WorldMap.js.map +1 -0
- package/dist/theglobalfuel/components/index.js +9 -0
- package/dist/theglobalfuel/components/viz/AllocationBar.js +68 -0
- package/dist/theglobalfuel/components/viz/AllocationBar.js.map +1 -0
- package/dist/theglobalfuel/components/viz/AreaChart.js +102 -0
- package/dist/theglobalfuel/components/viz/AreaChart.js.map +1 -0
- package/dist/theglobalfuel/components/viz/AvatarStack.js +2 -0
- package/dist/theglobalfuel/components/viz/BarChart.js +4 -0
- package/dist/theglobalfuel/components/viz/CertificateCard.js +4 -0
- package/dist/theglobalfuel/components/viz/DonutChart.js +109 -0
- package/dist/theglobalfuel/components/viz/DonutChart.js.map +1 -0
- package/dist/theglobalfuel/components/viz/HBarFunnel.js +3 -0
- package/dist/theglobalfuel/components/viz/Heatmap.js +3 -0
- package/dist/theglobalfuel/components/viz/KanbanBoard.js +2 -0
- package/dist/theglobalfuel/components/viz/LineChart.js +4 -0
- package/dist/theglobalfuel/components/viz/OrgTree.js +2 -0
- package/dist/theglobalfuel/components/viz/PathSteps.js +68 -0
- package/dist/theglobalfuel/components/viz/PathSteps.js.map +1 -0
- package/dist/theglobalfuel/components/viz/ProgressRing.js +6 -0
- package/dist/theglobalfuel/components/viz/ProgressRing.js.map +1 -0
- package/dist/theglobalfuel/components/viz/RatingStars.js +3 -0
- package/dist/theglobalfuel/components/viz/SegmentedTabs.js +3 -0
- package/dist/theglobalfuel/components/viz/SkillBar.js +3 -0
- package/dist/theglobalfuel/components/viz/Sparkline.js +74 -0
- package/dist/theglobalfuel/components/viz/Sparkline.js.map +1 -0
- package/dist/theglobalfuel/components/viz/StatCard.js +3 -0
- package/dist/theglobalfuel/components/viz/StepProgress.js +64 -0
- package/dist/theglobalfuel/components/viz/StepProgress.js.map +1 -0
- package/dist/theglobalfuel/components/viz/Timeline.js +66 -0
- package/dist/theglobalfuel/components/viz/Timeline.js.map +1 -0
- package/dist/theglobalfuel/components/viz/index.js +23 -0
- package/dist/theglobalfuel/components/viz/lib/Avatar.js +1 -0
- package/dist/theglobalfuel/components/viz/lib/CartesianFrame.js +119 -0
- package/dist/theglobalfuel/components/viz/lib/CartesianFrame.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.js +35 -0
- package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/format.js +17 -0
- package/dist/theglobalfuel/components/viz/lib/format.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/geometry.js +61 -0
- package/dist/theglobalfuel/components/viz/lib/geometry.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/hooks.js +39 -0
- package/dist/theglobalfuel/components/viz/lib/hooks.js.map +1 -0
- package/dist/theglobalfuel/components/viz/lib/palette.js +27 -0
- package/dist/theglobalfuel/components/viz/lib/palette.js.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +431 -316
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +525 -227
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +255 -206
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +465 -0
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +356 -227
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { useTheGlobalFuel as e } from "../../context/TheGlobalFuelContext.js";
|
|
2
2
|
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
3
|
import { MetricsCard as n } from "../../components/MetricsCard.js";
|
|
4
|
-
import { formatCoords as ee, formatDate as r, formatEnumLabel as i, formatNumber as a, formatPercent as
|
|
5
|
-
import { StatusBadge as
|
|
6
|
-
import { DataTable as
|
|
7
|
-
import { ErrorView as
|
|
8
|
-
import { EmptyState as
|
|
4
|
+
import { formatCoords as ee, formatDate as r, formatEnumLabel as i, formatNumber as a, formatPercent as o, formatRelativeTime as s, formatTonnesCo2e as te, formatVolume as c, toBackendDate as l } from "../../utils/formatters.js";
|
|
5
|
+
import { StatusBadge as u } from "../../components/StatusBadge.js";
|
|
6
|
+
import { DataTable as d } from "../../components/DataTable.js";
|
|
7
|
+
import { ErrorView as ne, LoadingView as f, Section as p } from "../../components/StateViews.js";
|
|
8
|
+
import { EmptyState as m } from "../../components/EmptyState.js";
|
|
9
9
|
import "../../context/index.js";
|
|
10
|
-
import { useTheAsset as
|
|
11
|
-
import { useNotify as
|
|
10
|
+
import { useTheAsset as re, useTheCreateReserveEstimate as ie, useTheEmissionRecords as ae, useTheRecordProduction as oe, useTheRetireAsset as se, useTheTransitionAsset as ce } from "../../hooks/useTheGlobalFuelApi.js";
|
|
11
|
+
import { useNotify as le } from "../../hooks/useNotify.js";
|
|
12
12
|
import "../../hooks/index.js";
|
|
13
|
-
import { ASSET_TRANSITIONS as
|
|
14
|
-
import { Tabs as
|
|
15
|
-
import { TheDiscussion as
|
|
16
|
-
import { TheTags as
|
|
13
|
+
import { ASSET_TRANSITIONS as ue, nextStatuses as de } from "../../utils/transitions.js";
|
|
14
|
+
import { Tabs as fe } from "../../components/Tabs.js";
|
|
15
|
+
import { TheDiscussion as pe } from "../../components/TheDiscussion.js";
|
|
16
|
+
import { TheTags as me } from "../../components/TheTags.js";
|
|
17
|
+
import { WorldMap as he } from "../../components/WorldMap.js";
|
|
17
18
|
import "../../components/index.js";
|
|
18
|
-
import { useState as
|
|
19
|
-
import { Activity as ge, Archive as _e, ArrowLeft as
|
|
20
|
-
import { useParams as
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { Button as
|
|
19
|
+
import { useState as h } from "react";
|
|
20
|
+
import { Activity as ge, Archive as _e, ArrowLeft as ve, CalendarClock as ye, Factory as be, Fuel as xe, Gauge as Se, Layers as Ce, MapPin as we, MessageSquare as Te, Percent as Ee, Plus as g, Tag as De } from "lucide-react";
|
|
21
|
+
import { useParams as Oe } from "react-router-dom";
|
|
22
|
+
import { Fragment as ke, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
23
|
+
import { Button as y, GlassCard as b, Input as x, Label as S, ResponsiveDialog as C, ResponsiveDialogContent as w, ResponsiveDialogDescription as Ae, ResponsiveDialogFooter as je, ResponsiveDialogHeader as Me, ResponsiveDialogTitle as Ne, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k, Textarea as Pe } from "@burdenoff/fe-libs/ui";
|
|
23
24
|
//#region src/theglobalfuel/pages/assets/AssetDetailPage.tsx
|
|
24
|
-
var
|
|
25
|
+
var Fe = [
|
|
25
26
|
"BARRELS",
|
|
26
27
|
"CUBIC_METERS",
|
|
27
28
|
"TONNES",
|
|
@@ -29,15 +30,27 @@ var A = [
|
|
|
29
30
|
"MWH",
|
|
30
31
|
"GJ",
|
|
31
32
|
"MCF"
|
|
32
|
-
],
|
|
33
|
+
], Ie = [
|
|
33
34
|
"PROVED",
|
|
34
35
|
"PROBABLE",
|
|
35
36
|
"POSSIBLE",
|
|
36
37
|
"CONTINGENT",
|
|
37
38
|
"PROSPECTIVE"
|
|
38
|
-
],
|
|
39
|
+
], A = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
40
|
+
function j({ label: e, value: t }) {
|
|
41
|
+
return /* @__PURE__ */ v("div", {
|
|
42
|
+
className: "flex flex-col gap-0.5 border-b border-border-seam/60 py-2.5 last:border-b-0",
|
|
43
|
+
children: [/* @__PURE__ */ _("dt", {
|
|
44
|
+
className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
|
|
45
|
+
children: e
|
|
46
|
+
}), /* @__PURE__ */ _("dd", {
|
|
47
|
+
className: "truncate text-sm text-text-primary",
|
|
48
|
+
children: t
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
39
52
|
function M() {
|
|
40
|
-
let { id: M } =
|
|
53
|
+
let { id: M } = Oe(), { navigateTo: N } = e(), P = le(), { data: F, isLoading: Le, isError: Re, refetch: ze } = re(M), I = ae({ assetId: M }), Be = ce(), Ve = se(), L = oe(), R = ie(), [z, He] = h("production"), [B, V] = h(null), [Ue, H] = h(!1), [U, W] = h({
|
|
41
54
|
periodStart: "",
|
|
42
55
|
periodEnd: "",
|
|
43
56
|
volume: "",
|
|
@@ -45,7 +58,7 @@ function M() {
|
|
|
45
58
|
grade: "",
|
|
46
59
|
downtimeHours: "",
|
|
47
60
|
notes: ""
|
|
48
|
-
}), [
|
|
61
|
+
}), [We, G] = h(!1), [K, q] = h({
|
|
49
62
|
category: "PROVED",
|
|
50
63
|
asOfDate: "",
|
|
51
64
|
recoverable: "",
|
|
@@ -54,53 +67,58 @@ function M() {
|
|
|
54
67
|
methodology: "",
|
|
55
68
|
notes: ""
|
|
56
69
|
});
|
|
57
|
-
if (
|
|
70
|
+
if (Le) return /* @__PURE__ */ _(t, {
|
|
58
71
|
title: "Asset",
|
|
59
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ _(f, { label: "Loading asset…" })
|
|
60
73
|
});
|
|
61
|
-
if (
|
|
74
|
+
if (Re || !F) return /* @__PURE__ */ _(t, {
|
|
62
75
|
title: "Asset",
|
|
63
|
-
actions: /* @__PURE__ */
|
|
76
|
+
actions: /* @__PURE__ */ v(y, {
|
|
64
77
|
variant: "ghost",
|
|
65
78
|
onClick: () => N("assets"),
|
|
66
|
-
children: [/* @__PURE__ */
|
|
79
|
+
children: [/* @__PURE__ */ _(ve, { className: "mr-1.5 h-4 w-4" }), " Back"]
|
|
67
80
|
}),
|
|
68
|
-
children:
|
|
81
|
+
children: Re ? /* @__PURE__ */ _(ne, {
|
|
69
82
|
message: "This asset could not be loaded.",
|
|
70
|
-
onRetry: () =>
|
|
71
|
-
}) : /* @__PURE__ */
|
|
83
|
+
onRetry: () => ze()
|
|
84
|
+
}) : /* @__PURE__ */ _(m, {
|
|
72
85
|
illustration: "empty-search",
|
|
73
|
-
icon: /* @__PURE__ */
|
|
86
|
+
icon: /* @__PURE__ */ _(xe, { className: "h-10 w-10" }),
|
|
74
87
|
title: "Asset not found",
|
|
75
88
|
description: "This asset may have been retired or you may not have access to it.",
|
|
76
|
-
action: /* @__PURE__ */ y
|
|
89
|
+
action: /* @__PURE__ */ _(y, {
|
|
77
90
|
onClick: () => N("assets"),
|
|
78
91
|
children: "Back to assets"
|
|
79
92
|
})
|
|
80
93
|
})
|
|
81
94
|
});
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
95
|
+
let J = F.productionRecords ?? [], Y = F.reserveEstimates ?? [], X = I.data?.items ?? [], Ge = F.status === "RETIRED", Ke = de(ue, F.status), qe = typeof F.latitude == "number" && typeof F.longitude == "number" ? {
|
|
96
|
+
lat: F.latitude,
|
|
97
|
+
lng: F.longitude,
|
|
98
|
+
label: F.name,
|
|
99
|
+
primary: !0
|
|
100
|
+
} : null, Je = () => {
|
|
101
|
+
V(null), W({
|
|
102
|
+
periodStart: A(),
|
|
103
|
+
periodEnd: A(),
|
|
86
104
|
volume: "",
|
|
87
105
|
unit: F.capacityUnit,
|
|
88
106
|
grade: "",
|
|
89
107
|
downtimeHours: "",
|
|
90
108
|
notes: ""
|
|
91
|
-
}),
|
|
92
|
-
},
|
|
93
|
-
|
|
109
|
+
}), H(!0);
|
|
110
|
+
}, Z = () => {
|
|
111
|
+
V(null), q({
|
|
94
112
|
category: "PROVED",
|
|
95
|
-
asOfDate:
|
|
113
|
+
asOfDate: A(),
|
|
96
114
|
recoverable: "",
|
|
97
115
|
recoveryFactor: "",
|
|
98
116
|
unit: F.capacityUnit,
|
|
99
117
|
methodology: "",
|
|
100
118
|
notes: ""
|
|
101
|
-
}),
|
|
119
|
+
}), G(!0);
|
|
102
120
|
}, Q = () => {
|
|
103
|
-
|
|
121
|
+
H(!1), V(null), W({
|
|
104
122
|
periodStart: "",
|
|
105
123
|
periodEnd: "",
|
|
106
124
|
volume: "",
|
|
@@ -110,7 +128,7 @@ function M() {
|
|
|
110
128
|
notes: ""
|
|
111
129
|
});
|
|
112
130
|
}, $ = () => {
|
|
113
|
-
|
|
131
|
+
G(!1), V(null), q({
|
|
114
132
|
category: "PROVED",
|
|
115
133
|
asOfDate: "",
|
|
116
134
|
recoverable: "",
|
|
@@ -119,87 +137,87 @@ function M() {
|
|
|
119
137
|
methodology: "",
|
|
120
138
|
notes: ""
|
|
121
139
|
});
|
|
122
|
-
},
|
|
140
|
+
}, Ye = async (e) => {
|
|
123
141
|
if (!(!M || e === F.status)) {
|
|
124
|
-
|
|
142
|
+
V(null);
|
|
125
143
|
try {
|
|
126
|
-
await
|
|
144
|
+
await Be.mutateAsync({
|
|
127
145
|
id: M,
|
|
128
146
|
status: e
|
|
129
147
|
}), P.success(`Status changed to ${i(e)}`);
|
|
130
148
|
} catch (e) {
|
|
131
|
-
P.fromError(e),
|
|
149
|
+
P.fromError(e), V(e instanceof Error ? e.message : "Failed to change asset status.");
|
|
132
150
|
}
|
|
133
151
|
}
|
|
134
|
-
},
|
|
152
|
+
}, Xe = async () => {
|
|
135
153
|
if (M && window.confirm(`Retire ${F.name}? This marks the asset as decommissioned.`)) {
|
|
136
|
-
|
|
154
|
+
V(null);
|
|
137
155
|
try {
|
|
138
|
-
await
|
|
156
|
+
await Ve.mutateAsync(M), P.success("Asset retired"), N("assets");
|
|
139
157
|
} catch (e) {
|
|
140
|
-
P.fromError(e),
|
|
158
|
+
P.fromError(e), V(e instanceof Error ? e.message : "Failed to retire asset.");
|
|
141
159
|
}
|
|
142
160
|
}
|
|
143
|
-
},
|
|
144
|
-
let e =
|
|
161
|
+
}, Ze = async () => {
|
|
162
|
+
let e = l(U.periodStart), t = l(U.periodEnd);
|
|
145
163
|
if (!M || !e || !t) {
|
|
146
|
-
|
|
164
|
+
V("Period start and period end are required.");
|
|
147
165
|
return;
|
|
148
166
|
}
|
|
149
|
-
let n = Number(
|
|
150
|
-
if (!
|
|
167
|
+
let n = Number(U.volume);
|
|
168
|
+
if (!U.volume || !Number.isFinite(n) || n <= 0) {
|
|
151
169
|
let e = "Volume must be greater than zero.";
|
|
152
|
-
|
|
170
|
+
V(e), P.error(e);
|
|
153
171
|
return;
|
|
154
172
|
}
|
|
155
|
-
|
|
173
|
+
V(null);
|
|
156
174
|
try {
|
|
157
|
-
await
|
|
175
|
+
await L.mutateAsync({
|
|
158
176
|
assetId: M,
|
|
159
177
|
periodStart: e,
|
|
160
178
|
periodEnd: t,
|
|
161
179
|
volume: n,
|
|
162
|
-
unit:
|
|
163
|
-
grade:
|
|
164
|
-
downtimeHours:
|
|
165
|
-
notes:
|
|
180
|
+
unit: U.unit,
|
|
181
|
+
grade: U.grade ? Number(U.grade) : null,
|
|
182
|
+
downtimeHours: U.downtimeHours ? Number(U.downtimeHours) : null,
|
|
183
|
+
notes: U.notes.trim() || null
|
|
166
184
|
}), P.success("Production recorded"), Q();
|
|
167
185
|
} catch (e) {
|
|
168
|
-
P.fromError(e),
|
|
186
|
+
P.fromError(e), V(e instanceof Error ? e.message : "Failed to record production.");
|
|
169
187
|
}
|
|
170
|
-
},
|
|
171
|
-
let e =
|
|
188
|
+
}, Qe = async () => {
|
|
189
|
+
let e = l(K.asOfDate);
|
|
172
190
|
if (!M || !e) {
|
|
173
|
-
|
|
191
|
+
V("As-of date is required.");
|
|
174
192
|
return;
|
|
175
193
|
}
|
|
176
|
-
let t = Number(
|
|
177
|
-
if (!
|
|
194
|
+
let t = Number(K.recoverable);
|
|
195
|
+
if (!K.recoverable || !Number.isFinite(t) || t <= 0) {
|
|
178
196
|
let e = "Recoverable volume must be greater than zero.";
|
|
179
|
-
|
|
197
|
+
V(e), P.error(e);
|
|
180
198
|
return;
|
|
181
199
|
}
|
|
182
|
-
|
|
200
|
+
V(null);
|
|
183
201
|
try {
|
|
184
|
-
await
|
|
202
|
+
await R.mutateAsync({
|
|
185
203
|
assetId: M,
|
|
186
|
-
category:
|
|
204
|
+
category: K.category,
|
|
187
205
|
asOfDate: e,
|
|
188
206
|
recoverable: t,
|
|
189
|
-
recoveryFactor:
|
|
190
|
-
unit:
|
|
191
|
-
methodology:
|
|
192
|
-
notes:
|
|
207
|
+
recoveryFactor: K.recoveryFactor ? Number(K.recoveryFactor) : null,
|
|
208
|
+
unit: K.unit,
|
|
209
|
+
methodology: K.methodology.trim() || null,
|
|
210
|
+
notes: K.notes.trim() || null
|
|
193
211
|
}), P.success("Reserve estimate added"), $();
|
|
194
212
|
} catch (e) {
|
|
195
|
-
P.fromError(e),
|
|
213
|
+
P.fromError(e), V(e instanceof Error ? e.message : "Failed to add reserve estimate.");
|
|
196
214
|
}
|
|
197
|
-
},
|
|
215
|
+
}, $e = [
|
|
198
216
|
{
|
|
199
217
|
key: "period",
|
|
200
218
|
header: "Period",
|
|
201
219
|
sortValue: (e) => new Date(e.periodEnd || e.createdAt).getTime(),
|
|
202
|
-
render: (e) => /* @__PURE__ */
|
|
220
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
203
221
|
className: "font-medium text-text-primary",
|
|
204
222
|
children: [
|
|
205
223
|
r(e.periodStart),
|
|
@@ -213,9 +231,9 @@ function M() {
|
|
|
213
231
|
header: "Volume",
|
|
214
232
|
align: "right",
|
|
215
233
|
sortValue: (e) => e.volume,
|
|
216
|
-
render: (e) => /* @__PURE__ */
|
|
234
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
217
235
|
className: "tabular-nums font-medium text-text-primary",
|
|
218
|
-
children:
|
|
236
|
+
children: c(e.volume, e.unit)
|
|
219
237
|
})
|
|
220
238
|
},
|
|
221
239
|
{
|
|
@@ -223,10 +241,10 @@ function M() {
|
|
|
223
241
|
header: "Grade",
|
|
224
242
|
align: "right",
|
|
225
243
|
hideOnMobile: !0,
|
|
226
|
-
render: (e) => e.grade == null ? /* @__PURE__ */
|
|
244
|
+
render: (e) => e.grade == null ? /* @__PURE__ */ _("span", {
|
|
227
245
|
className: "text-text-tertiary",
|
|
228
246
|
children: "—"
|
|
229
|
-
}) : /* @__PURE__ */
|
|
247
|
+
}) : /* @__PURE__ */ _("span", {
|
|
230
248
|
className: "tabular-nums text-text-secondary",
|
|
231
249
|
children: a(e.grade)
|
|
232
250
|
})
|
|
@@ -237,7 +255,7 @@ function M() {
|
|
|
237
255
|
align: "right",
|
|
238
256
|
hideOnMobile: !0,
|
|
239
257
|
sortValue: (e) => e.downtimeHours,
|
|
240
|
-
render: (e) => /* @__PURE__ */
|
|
258
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
241
259
|
className: "tabular-nums text-text-secondary",
|
|
242
260
|
children: [a(e.downtimeHours), " h"]
|
|
243
261
|
})
|
|
@@ -246,10 +264,10 @@ function M() {
|
|
|
246
264
|
key: "notes",
|
|
247
265
|
header: "Notes",
|
|
248
266
|
hideOnMobile: !0,
|
|
249
|
-
render: (e) => e.notes ? /* @__PURE__ */
|
|
267
|
+
render: (e) => e.notes ? /* @__PURE__ */ _("span", {
|
|
250
268
|
className: "block max-w-[16rem] truncate text-text-secondary",
|
|
251
269
|
children: e.notes
|
|
252
|
-
}) : /* @__PURE__ */
|
|
270
|
+
}) : /* @__PURE__ */ _("span", {
|
|
253
271
|
className: "text-text-tertiary",
|
|
254
272
|
children: "—"
|
|
255
273
|
})
|
|
@@ -259,21 +277,21 @@ function M() {
|
|
|
259
277
|
header: "Recorded",
|
|
260
278
|
align: "right",
|
|
261
279
|
hideOnMobile: !0,
|
|
262
|
-
render: (e) => /* @__PURE__ */
|
|
280
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
263
281
|
className: "text-text-tertiary",
|
|
264
|
-
children:
|
|
282
|
+
children: s(e.createdAt)
|
|
265
283
|
})
|
|
266
284
|
}
|
|
267
|
-
],
|
|
285
|
+
], et = [
|
|
268
286
|
{
|
|
269
287
|
key: "category",
|
|
270
288
|
header: "Category",
|
|
271
|
-
render: (e) => /* @__PURE__ */
|
|
289
|
+
render: (e) => /* @__PURE__ */ _(u, { status: e.category })
|
|
272
290
|
},
|
|
273
291
|
{
|
|
274
292
|
key: "asOf",
|
|
275
293
|
header: "As of",
|
|
276
|
-
render: (e) => /* @__PURE__ */
|
|
294
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
277
295
|
className: "text-text-secondary",
|
|
278
296
|
children: r(e.asOfDate)
|
|
279
297
|
})
|
|
@@ -283,9 +301,9 @@ function M() {
|
|
|
283
301
|
header: "Recoverable",
|
|
284
302
|
align: "right",
|
|
285
303
|
sortValue: (e) => e.recoverable,
|
|
286
|
-
render: (e) => /* @__PURE__ */
|
|
304
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
287
305
|
className: "tabular-nums font-medium text-text-primary",
|
|
288
|
-
children:
|
|
306
|
+
children: c(e.recoverable, e.unit)
|
|
289
307
|
})
|
|
290
308
|
},
|
|
291
309
|
{
|
|
@@ -293,22 +311,22 @@ function M() {
|
|
|
293
311
|
header: "Recovery factor",
|
|
294
312
|
align: "right",
|
|
295
313
|
hideOnMobile: !0,
|
|
296
|
-
render: (e) => e.recoveryFactor == null ? /* @__PURE__ */
|
|
314
|
+
render: (e) => e.recoveryFactor == null ? /* @__PURE__ */ _("span", {
|
|
297
315
|
className: "text-text-tertiary",
|
|
298
316
|
children: "—"
|
|
299
|
-
}) : /* @__PURE__ */
|
|
317
|
+
}) : /* @__PURE__ */ _("span", {
|
|
300
318
|
className: "tabular-nums text-text-secondary",
|
|
301
|
-
children:
|
|
319
|
+
children: o(e.recoveryFactor)
|
|
302
320
|
})
|
|
303
321
|
},
|
|
304
322
|
{
|
|
305
323
|
key: "methodology",
|
|
306
324
|
header: "Methodology",
|
|
307
325
|
hideOnMobile: !0,
|
|
308
|
-
render: (e) => e.methodology ? /* @__PURE__ */
|
|
326
|
+
render: (e) => e.methodology ? /* @__PURE__ */ _("span", {
|
|
309
327
|
className: "block max-w-[14rem] truncate text-text-secondary",
|
|
310
328
|
children: e.methodology
|
|
311
|
-
}) : /* @__PURE__ */
|
|
329
|
+
}) : /* @__PURE__ */ _("span", {
|
|
312
330
|
className: "text-text-tertiary",
|
|
313
331
|
children: "—"
|
|
314
332
|
})
|
|
@@ -318,32 +336,32 @@ function M() {
|
|
|
318
336
|
header: "Added",
|
|
319
337
|
align: "right",
|
|
320
338
|
hideOnMobile: !0,
|
|
321
|
-
render: (e) => /* @__PURE__ */
|
|
339
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
322
340
|
className: "text-text-tertiary",
|
|
323
|
-
children:
|
|
341
|
+
children: s(e.createdAt)
|
|
324
342
|
})
|
|
325
343
|
}
|
|
326
|
-
],
|
|
344
|
+
], tt = [
|
|
327
345
|
{
|
|
328
346
|
key: "scope",
|
|
329
347
|
header: "Scope",
|
|
330
|
-
render: (e) => /* @__PURE__ */
|
|
348
|
+
render: (e) => /* @__PURE__ */ _(u, { status: e.scope })
|
|
331
349
|
},
|
|
332
350
|
{
|
|
333
351
|
key: "co2e",
|
|
334
352
|
header: "CO₂e",
|
|
335
353
|
align: "right",
|
|
336
354
|
sortValue: (e) => e.co2eTonnes,
|
|
337
|
-
render: (e) => /* @__PURE__ */
|
|
355
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
338
356
|
className: "tabular-nums font-medium text-text-primary",
|
|
339
|
-
children:
|
|
357
|
+
children: te(e.co2eTonnes)
|
|
340
358
|
})
|
|
341
359
|
},
|
|
342
360
|
{
|
|
343
361
|
key: "period",
|
|
344
362
|
header: "Period",
|
|
345
363
|
hideOnMobile: !0,
|
|
346
|
-
render: (e) => /* @__PURE__ */
|
|
364
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
347
365
|
className: "text-text-secondary",
|
|
348
366
|
children: [
|
|
349
367
|
r(e.periodStart),
|
|
@@ -356,7 +374,7 @@ function M() {
|
|
|
356
374
|
key: "source",
|
|
357
375
|
header: "Source",
|
|
358
376
|
hideOnMobile: !0,
|
|
359
|
-
render: (e) => /* @__PURE__ */
|
|
377
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
360
378
|
className: "text-text-secondary",
|
|
361
379
|
children: e.source ?? "—"
|
|
362
380
|
})
|
|
@@ -364,10 +382,10 @@ function M() {
|
|
|
364
382
|
{
|
|
365
383
|
key: "verified",
|
|
366
384
|
header: "Verified",
|
|
367
|
-
render: (e) => e.verified ? /* @__PURE__ */
|
|
385
|
+
render: (e) => e.verified ? /* @__PURE__ */ _("span", {
|
|
368
386
|
className: "text-sm font-medium text-status-success-text",
|
|
369
387
|
children: "Verified"
|
|
370
|
-
}) : /* @__PURE__ */
|
|
388
|
+
}) : /* @__PURE__ */ _("span", {
|
|
371
389
|
className: "text-sm text-text-tertiary",
|
|
372
390
|
children: "Unverified"
|
|
373
391
|
})
|
|
@@ -377,142 +395,239 @@ function M() {
|
|
|
377
395
|
header: "Recorded",
|
|
378
396
|
align: "right",
|
|
379
397
|
hideOnMobile: !0,
|
|
380
|
-
render: (e) => /* @__PURE__ */
|
|
398
|
+
render: (e) => /* @__PURE__ */ _("span", {
|
|
381
399
|
className: "text-text-tertiary",
|
|
382
|
-
children:
|
|
400
|
+
children: s(e.createdAt)
|
|
383
401
|
})
|
|
384
402
|
}
|
|
385
|
-
],
|
|
403
|
+
], nt = [
|
|
386
404
|
{
|
|
387
405
|
value: "production",
|
|
388
406
|
label: "Production",
|
|
389
|
-
icon: /* @__PURE__ */
|
|
390
|
-
count:
|
|
407
|
+
icon: /* @__PURE__ */ _(ge, { className: "h-4 w-4" }),
|
|
408
|
+
count: J.length
|
|
391
409
|
},
|
|
392
410
|
{
|
|
393
411
|
value: "reserves",
|
|
394
412
|
label: "Reserves",
|
|
395
|
-
icon: /* @__PURE__ */
|
|
396
|
-
count:
|
|
413
|
+
icon: /* @__PURE__ */ _(Ce, { className: "h-4 w-4" }),
|
|
414
|
+
count: Y.length
|
|
397
415
|
},
|
|
398
416
|
{
|
|
399
417
|
value: "emissions",
|
|
400
418
|
label: "Emissions",
|
|
401
|
-
icon: /* @__PURE__ */
|
|
402
|
-
count:
|
|
419
|
+
icon: /* @__PURE__ */ _(be, { className: "h-4 w-4" }),
|
|
420
|
+
count: X.length
|
|
403
421
|
},
|
|
404
422
|
{
|
|
405
423
|
value: "tags",
|
|
406
424
|
label: "Tags",
|
|
407
|
-
icon: /* @__PURE__ */
|
|
425
|
+
icon: /* @__PURE__ */ _(De, { className: "h-4 w-4" })
|
|
408
426
|
},
|
|
409
427
|
{
|
|
410
428
|
value: "discussion",
|
|
411
429
|
label: "Discussion",
|
|
412
|
-
icon: /* @__PURE__ */
|
|
430
|
+
icon: /* @__PURE__ */ _(Te, { className: "h-4 w-4" })
|
|
413
431
|
}
|
|
414
432
|
];
|
|
415
|
-
return /* @__PURE__ */
|
|
433
|
+
return /* @__PURE__ */ v(t, {
|
|
416
434
|
title: F.name,
|
|
417
435
|
description: [F.code, i(F.kind)].filter(Boolean).join(" · "),
|
|
418
|
-
actions: /* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
!
|
|
436
|
+
actions: /* @__PURE__ */ v(ke, { children: [
|
|
437
|
+
/* @__PURE__ */ _(u, { status: F.status }),
|
|
438
|
+
!Ge && Ke.length > 0 && /* @__PURE__ */ v(T, {
|
|
421
439
|
value: F.status,
|
|
422
|
-
onValueChange: (e) =>
|
|
423
|
-
children: [/* @__PURE__ */
|
|
440
|
+
onValueChange: (e) => Ye(e),
|
|
441
|
+
children: [/* @__PURE__ */ _(O, {
|
|
424
442
|
className: "h-9 w-44",
|
|
425
443
|
"aria-label": "Change asset status",
|
|
426
|
-
children: /* @__PURE__ */
|
|
427
|
-
}), /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ _(k, { placeholder: "Change status" })
|
|
445
|
+
}), /* @__PURE__ */ v(E, { children: [/* @__PURE__ */ _(D, {
|
|
428
446
|
value: F.status,
|
|
429
447
|
disabled: !0,
|
|
430
448
|
children: i(F.status)
|
|
431
|
-
}),
|
|
449
|
+
}), Ke.map((e) => /* @__PURE__ */ _(D, {
|
|
432
450
|
value: e,
|
|
433
451
|
children: i(e)
|
|
434
452
|
}, e))] })]
|
|
435
453
|
}),
|
|
436
|
-
!
|
|
454
|
+
!Ge && /* @__PURE__ */ v(y, {
|
|
437
455
|
variant: "ghost",
|
|
438
|
-
onClick:
|
|
439
|
-
disabled:
|
|
456
|
+
onClick: Xe,
|
|
457
|
+
disabled: Ve.isPending,
|
|
440
458
|
className: "text-status-error-text hover:text-status-error-text",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ _(_e, { className: "mr-1.5 h-4 w-4" }), " Retire"]
|
|
442
460
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ v(y, {
|
|
444
462
|
variant: "ghost",
|
|
445
463
|
onClick: () => N("assets"),
|
|
446
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */ _(ve, { className: "mr-1.5 h-4 w-4" }), " Back"]
|
|
447
465
|
})
|
|
448
466
|
] }),
|
|
449
467
|
children: [
|
|
450
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ v("div", {
|
|
451
469
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",
|
|
452
470
|
children: [
|
|
453
|
-
/* @__PURE__ */
|
|
454
|
-
icon: /* @__PURE__ */
|
|
455
|
-
value: F.capacityPerDay > 0 ? `${
|
|
471
|
+
/* @__PURE__ */ _(n, {
|
|
472
|
+
icon: /* @__PURE__ */ _(Se, { className: "h-5 w-5" }),
|
|
473
|
+
value: F.capacityPerDay > 0 ? `${c(F.capacityPerDay, F.capacityUnit)}/day` : "—",
|
|
456
474
|
label: "Capacity"
|
|
457
475
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
icon: /* @__PURE__ */
|
|
460
|
-
value:
|
|
476
|
+
/* @__PURE__ */ _(n, {
|
|
477
|
+
icon: /* @__PURE__ */ _(Ee, { className: "h-5 w-5" }),
|
|
478
|
+
value: o(F.workingInterestPct),
|
|
461
479
|
label: "Working interest"
|
|
462
480
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
icon: /* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ _(n, {
|
|
482
|
+
icon: /* @__PURE__ */ _(xe, { className: "h-5 w-5" }),
|
|
465
483
|
value: i(F.commodity),
|
|
466
484
|
label: "Commodity"
|
|
467
485
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
icon: /* @__PURE__ */
|
|
486
|
+
/* @__PURE__ */ _(n, {
|
|
487
|
+
icon: /* @__PURE__ */ _(ye, { className: "h-5 w-5" }),
|
|
470
488
|
value: r(F.commissionedAt),
|
|
471
489
|
label: "Commissioned"
|
|
472
490
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
icon: /* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ _(n, {
|
|
492
|
+
icon: /* @__PURE__ */ _(we, { className: "h-5 w-5" }),
|
|
475
493
|
value: ee(F.latitude, F.longitude),
|
|
476
494
|
label: "Location",
|
|
477
|
-
footer: F.location ? /* @__PURE__ */
|
|
495
|
+
footer: F.location ? /* @__PURE__ */ _("p", {
|
|
478
496
|
className: "truncate text-xs text-text-tertiary",
|
|
479
497
|
children: F.location
|
|
480
498
|
}) : void 0
|
|
481
499
|
})
|
|
482
500
|
]
|
|
483
501
|
}),
|
|
484
|
-
|
|
502
|
+
/* @__PURE__ */ v("div", {
|
|
503
|
+
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
504
|
+
children: [/* @__PURE__ */ v(b, {
|
|
505
|
+
treatment: "glass",
|
|
506
|
+
className: "p-6 lg:col-span-2",
|
|
507
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
508
|
+
className: "mb-2 text-base font-semibold text-text-primary",
|
|
509
|
+
children: "Asset details"
|
|
510
|
+
}), /* @__PURE__ */ v("dl", {
|
|
511
|
+
className: "grid grid-cols-1 gap-x-8 sm:grid-cols-2",
|
|
512
|
+
children: [
|
|
513
|
+
/* @__PURE__ */ _(j, {
|
|
514
|
+
label: "Asset code",
|
|
515
|
+
value: F.code || "—"
|
|
516
|
+
}),
|
|
517
|
+
/* @__PURE__ */ _(j, {
|
|
518
|
+
label: "Kind",
|
|
519
|
+
value: i(F.kind)
|
|
520
|
+
}),
|
|
521
|
+
/* @__PURE__ */ _(j, {
|
|
522
|
+
label: "Commodity",
|
|
523
|
+
value: i(F.commodity)
|
|
524
|
+
}),
|
|
525
|
+
/* @__PURE__ */ _(j, {
|
|
526
|
+
label: "Status",
|
|
527
|
+
value: /* @__PURE__ */ _(u, { status: F.status })
|
|
528
|
+
}),
|
|
529
|
+
/* @__PURE__ */ _(j, {
|
|
530
|
+
label: "Capacity / day",
|
|
531
|
+
value: F.capacityPerDay > 0 ? `${c(F.capacityPerDay, F.capacityUnit)}/day` : "—"
|
|
532
|
+
}),
|
|
533
|
+
/* @__PURE__ */ _(j, {
|
|
534
|
+
label: "Working interest",
|
|
535
|
+
value: o(F.workingInterestPct)
|
|
536
|
+
}),
|
|
537
|
+
/* @__PURE__ */ _(j, {
|
|
538
|
+
label: "Operator lead",
|
|
539
|
+
value: F.operatorLeadId ? /* @__PURE__ */ _("span", {
|
|
540
|
+
className: "font-mono text-xs",
|
|
541
|
+
title: F.operatorLeadId,
|
|
542
|
+
children: F.operatorLeadId
|
|
543
|
+
}) : "—"
|
|
544
|
+
}),
|
|
545
|
+
/* @__PURE__ */ _(j, {
|
|
546
|
+
label: "Location",
|
|
547
|
+
value: F.location || "—"
|
|
548
|
+
}),
|
|
549
|
+
/* @__PURE__ */ _(j, {
|
|
550
|
+
label: "Coordinates",
|
|
551
|
+
value: ee(F.latitude, F.longitude)
|
|
552
|
+
}),
|
|
553
|
+
/* @__PURE__ */ _(j, {
|
|
554
|
+
label: "Commissioned",
|
|
555
|
+
value: r(F.commissionedAt)
|
|
556
|
+
}),
|
|
557
|
+
/* @__PURE__ */ _(j, {
|
|
558
|
+
label: "Decommissioned",
|
|
559
|
+
value: r(F.decommissionedAt)
|
|
560
|
+
}),
|
|
561
|
+
/* @__PURE__ */ _(j, {
|
|
562
|
+
label: "Registered",
|
|
563
|
+
value: /* @__PURE__ */ _("span", {
|
|
564
|
+
title: r(F.createdAt),
|
|
565
|
+
children: s(F.createdAt)
|
|
566
|
+
})
|
|
567
|
+
}),
|
|
568
|
+
/* @__PURE__ */ _(j, {
|
|
569
|
+
label: "Last updated",
|
|
570
|
+
value: /* @__PURE__ */ _("span", {
|
|
571
|
+
title: r(F.updatedAt),
|
|
572
|
+
children: s(F.updatedAt)
|
|
573
|
+
})
|
|
574
|
+
})
|
|
575
|
+
]
|
|
576
|
+
})]
|
|
577
|
+
}), /* @__PURE__ */ v(b, {
|
|
578
|
+
treatment: "glass",
|
|
579
|
+
className: "flex flex-col gap-3 p-6",
|
|
580
|
+
children: [
|
|
581
|
+
/* @__PURE__ */ v("div", {
|
|
582
|
+
className: "flex items-center gap-2",
|
|
583
|
+
children: [/* @__PURE__ */ _(we, { className: "h-4 w-4 text-accent" }), /* @__PURE__ */ _("h2", {
|
|
584
|
+
className: "text-base font-semibold text-text-primary",
|
|
585
|
+
children: "Location"
|
|
586
|
+
})]
|
|
587
|
+
}),
|
|
588
|
+
qe ? /* @__PURE__ */ _(he, { points: [qe] }) : /* @__PURE__ */ _("div", {
|
|
589
|
+
className: "flex flex-1 items-center justify-center rounded-xl border border-dashed border-border-seam py-10 text-center text-sm text-text-secondary",
|
|
590
|
+
children: "No coordinates recorded for this asset."
|
|
591
|
+
}),
|
|
592
|
+
F.location && /* @__PURE__ */ _("p", {
|
|
593
|
+
className: "text-xs text-text-tertiary",
|
|
594
|
+
children: F.location
|
|
595
|
+
})
|
|
596
|
+
]
|
|
597
|
+
})]
|
|
598
|
+
}),
|
|
599
|
+
B && /* @__PURE__ */ _("p", {
|
|
485
600
|
className: "mt-4 text-sm text-status-error-text",
|
|
486
|
-
children:
|
|
601
|
+
children: B
|
|
487
602
|
}),
|
|
488
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ _("div", {
|
|
489
604
|
className: "mt-6",
|
|
490
|
-
children: /* @__PURE__ */
|
|
491
|
-
items:
|
|
492
|
-
value:
|
|
493
|
-
onChange:
|
|
605
|
+
children: /* @__PURE__ */ _(fe, {
|
|
606
|
+
items: nt,
|
|
607
|
+
value: z,
|
|
608
|
+
onChange: He
|
|
494
609
|
})
|
|
495
610
|
}),
|
|
496
|
-
|
|
611
|
+
z === "production" && /* @__PURE__ */ _(p, {
|
|
497
612
|
title: "Production",
|
|
498
613
|
description: "Volumes produced per reporting period, with grade & downtime.",
|
|
499
|
-
action: /* @__PURE__ */
|
|
614
|
+
action: /* @__PURE__ */ v(y, {
|
|
500
615
|
size: "sm",
|
|
501
|
-
onClick:
|
|
502
|
-
children: [/* @__PURE__ */
|
|
616
|
+
onClick: Je,
|
|
617
|
+
children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
|
|
503
618
|
}),
|
|
504
|
-
children:
|
|
619
|
+
children: J.length === 0 ? /* @__PURE__ */ _(m, {
|
|
505
620
|
illustration: "empty-data",
|
|
506
|
-
icon: /* @__PURE__ */
|
|
621
|
+
icon: /* @__PURE__ */ _(ge, { className: "h-10 w-10" }),
|
|
507
622
|
title: "No production recorded",
|
|
508
623
|
description: "Record a production period to start tracking volumes for this asset.",
|
|
509
|
-
action: /* @__PURE__ */
|
|
510
|
-
onClick:
|
|
511
|
-
children: [/* @__PURE__ */
|
|
624
|
+
action: /* @__PURE__ */ v(y, {
|
|
625
|
+
onClick: Je,
|
|
626
|
+
children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
|
|
512
627
|
})
|
|
513
|
-
}) : /* @__PURE__ */
|
|
514
|
-
columns:
|
|
515
|
-
rows:
|
|
628
|
+
}) : /* @__PURE__ */ _(d, {
|
|
629
|
+
columns: $e,
|
|
630
|
+
rows: J,
|
|
516
631
|
rowKey: (e) => e.id,
|
|
517
632
|
defaultSort: {
|
|
518
633
|
key: "period",
|
|
@@ -520,335 +635,335 @@ function M() {
|
|
|
520
635
|
}
|
|
521
636
|
})
|
|
522
637
|
}),
|
|
523
|
-
|
|
638
|
+
z === "reserves" && /* @__PURE__ */ _(p, {
|
|
524
639
|
title: "Reserve estimates",
|
|
525
640
|
description: "Recoverable volumes by SPE-PRMS reserve category & as-of date.",
|
|
526
|
-
action: /* @__PURE__ */
|
|
641
|
+
action: /* @__PURE__ */ v(y, {
|
|
527
642
|
size: "sm",
|
|
528
|
-
onClick:
|
|
529
|
-
children: [/* @__PURE__ */
|
|
643
|
+
onClick: Z,
|
|
644
|
+
children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
|
|
530
645
|
}),
|
|
531
|
-
children:
|
|
646
|
+
children: Y.length === 0 ? /* @__PURE__ */ _(m, {
|
|
532
647
|
illustration: "empty-data",
|
|
533
|
-
icon: /* @__PURE__ */
|
|
648
|
+
icon: /* @__PURE__ */ _(Ce, { className: "h-10 w-10" }),
|
|
534
649
|
title: "No reserve estimates",
|
|
535
650
|
description: "Add a reserve estimate to record recoverable volumes for this asset.",
|
|
536
|
-
action: /* @__PURE__ */
|
|
537
|
-
onClick:
|
|
538
|
-
children: [/* @__PURE__ */
|
|
651
|
+
action: /* @__PURE__ */ v(y, {
|
|
652
|
+
onClick: Z,
|
|
653
|
+
children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
|
|
539
654
|
})
|
|
540
|
-
}) : /* @__PURE__ */
|
|
541
|
-
columns:
|
|
542
|
-
rows:
|
|
655
|
+
}) : /* @__PURE__ */ _(d, {
|
|
656
|
+
columns: et,
|
|
657
|
+
rows: Y,
|
|
543
658
|
rowKey: (e) => e.id
|
|
544
659
|
})
|
|
545
660
|
}),
|
|
546
|
-
|
|
661
|
+
z === "emissions" && /* @__PURE__ */ _(p, {
|
|
547
662
|
title: "Emissions",
|
|
548
663
|
description: "GHG emission records attributed to this asset (Scope 1 / 2 / 3).",
|
|
549
|
-
children:
|
|
664
|
+
children: I.isLoading ? /* @__PURE__ */ _(f, { label: "Loading emissions…" }) : I.isError ? /* @__PURE__ */ _(ne, {
|
|
550
665
|
message: "Couldn't load emission records.",
|
|
551
|
-
onRetry: () =>
|
|
552
|
-
}) :
|
|
666
|
+
onRetry: () => I.refetch()
|
|
667
|
+
}) : X.length === 0 ? /* @__PURE__ */ _(m, {
|
|
553
668
|
illustration: "empty-data",
|
|
554
|
-
icon: /* @__PURE__ */
|
|
669
|
+
icon: /* @__PURE__ */ _(be, { className: "h-10 w-10" }),
|
|
555
670
|
title: "No emissions recorded",
|
|
556
671
|
description: "Emission records attributed to this asset will appear here."
|
|
557
|
-
}) : /* @__PURE__ */
|
|
558
|
-
columns:
|
|
559
|
-
rows:
|
|
672
|
+
}) : /* @__PURE__ */ _(d, {
|
|
673
|
+
columns: tt,
|
|
674
|
+
rows: X,
|
|
560
675
|
rowKey: (e) => e.id
|
|
561
676
|
})
|
|
562
677
|
}),
|
|
563
|
-
|
|
678
|
+
z === "tags" && /* @__PURE__ */ _(p, {
|
|
564
679
|
title: "Tags",
|
|
565
680
|
description: "Label this asset for search, grouping & reporting.",
|
|
566
|
-
children: /* @__PURE__ */
|
|
681
|
+
children: /* @__PURE__ */ _(b, {
|
|
567
682
|
treatment: "glass",
|
|
568
683
|
className: "p-6",
|
|
569
|
-
children: /* @__PURE__ */
|
|
684
|
+
children: /* @__PURE__ */ _(me, {
|
|
570
685
|
entityType: "theglobalfuel-asset",
|
|
571
686
|
entityId: F.id
|
|
572
687
|
})
|
|
573
688
|
})
|
|
574
689
|
}),
|
|
575
|
-
|
|
690
|
+
z === "discussion" && /* @__PURE__ */ _("div", {
|
|
576
691
|
className: "mt-8",
|
|
577
|
-
children: /* @__PURE__ */
|
|
692
|
+
children: /* @__PURE__ */ _(pe, {
|
|
578
693
|
entityType: "theglobalfuel-asset",
|
|
579
694
|
entityId: F.id,
|
|
580
695
|
title: "Discussion",
|
|
581
696
|
description: "Notes & coordination for this asset."
|
|
582
697
|
})
|
|
583
698
|
}),
|
|
584
|
-
/* @__PURE__ */
|
|
585
|
-
open:
|
|
586
|
-
onOpenChange: (e) => e ?
|
|
587
|
-
children: /* @__PURE__ */
|
|
588
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ _(C, {
|
|
700
|
+
open: Ue,
|
|
701
|
+
onOpenChange: (e) => e ? H(!0) : Q(),
|
|
702
|
+
children: /* @__PURE__ */ v(w, { children: [
|
|
703
|
+
/* @__PURE__ */ v(Me, { children: [/* @__PURE__ */ _(Ne, { children: "Record production" }), /* @__PURE__ */ v(Ae, { children: [
|
|
589
704
|
"Log a production period for ",
|
|
590
705
|
F.name,
|
|
591
706
|
"."
|
|
592
707
|
] })] }),
|
|
593
|
-
/* @__PURE__ */
|
|
708
|
+
/* @__PURE__ */ v("form", {
|
|
594
709
|
id: "recordProductionForm",
|
|
595
710
|
onSubmit: (e) => {
|
|
596
|
-
e.preventDefault(),
|
|
711
|
+
e.preventDefault(), Ze();
|
|
597
712
|
},
|
|
598
713
|
className: "grid gap-4 py-2",
|
|
599
714
|
children: [
|
|
600
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ v("div", {
|
|
601
716
|
className: "grid gap-2 sm:grid-cols-2",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
717
|
+
children: [/* @__PURE__ */ v("div", {
|
|
603
718
|
className: "grid gap-1.5",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
719
|
+
children: [/* @__PURE__ */ _(S, {
|
|
605
720
|
htmlFor: "prodStart",
|
|
606
721
|
children: "Period start *"
|
|
607
|
-
}), /* @__PURE__ */
|
|
722
|
+
}), /* @__PURE__ */ _(x, {
|
|
608
723
|
id: "prodStart",
|
|
609
724
|
type: "date",
|
|
610
|
-
value:
|
|
611
|
-
onChange: (e) =>
|
|
612
|
-
...
|
|
725
|
+
value: U.periodStart,
|
|
726
|
+
onChange: (e) => W({
|
|
727
|
+
...U,
|
|
613
728
|
periodStart: e.target.value
|
|
614
729
|
})
|
|
615
730
|
})]
|
|
616
|
-
}), /* @__PURE__ */
|
|
731
|
+
}), /* @__PURE__ */ v("div", {
|
|
617
732
|
className: "grid gap-1.5",
|
|
618
|
-
children: [/* @__PURE__ */
|
|
733
|
+
children: [/* @__PURE__ */ _(S, {
|
|
619
734
|
htmlFor: "prodEnd",
|
|
620
735
|
children: "Period end *"
|
|
621
|
-
}), /* @__PURE__ */
|
|
736
|
+
}), /* @__PURE__ */ _(x, {
|
|
622
737
|
id: "prodEnd",
|
|
623
738
|
type: "date",
|
|
624
|
-
value:
|
|
625
|
-
onChange: (e) =>
|
|
626
|
-
...
|
|
739
|
+
value: U.periodEnd,
|
|
740
|
+
onChange: (e) => W({
|
|
741
|
+
...U,
|
|
627
742
|
periodEnd: e.target.value
|
|
628
743
|
})
|
|
629
744
|
})]
|
|
630
745
|
})]
|
|
631
746
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ v("div", {
|
|
633
748
|
className: "grid gap-2 sm:grid-cols-2",
|
|
634
|
-
children: [/* @__PURE__ */
|
|
749
|
+
children: [/* @__PURE__ */ v("div", {
|
|
635
750
|
className: "grid gap-1.5",
|
|
636
|
-
children: [/* @__PURE__ */
|
|
751
|
+
children: [/* @__PURE__ */ _(S, {
|
|
637
752
|
htmlFor: "prodVolume",
|
|
638
753
|
children: "Volume *"
|
|
639
|
-
}), /* @__PURE__ */
|
|
754
|
+
}), /* @__PURE__ */ _(x, {
|
|
640
755
|
id: "prodVolume",
|
|
641
756
|
type: "number",
|
|
642
757
|
min: "0",
|
|
643
758
|
step: "any",
|
|
644
|
-
value:
|
|
645
|
-
onChange: (e) =>
|
|
646
|
-
...
|
|
759
|
+
value: U.volume,
|
|
760
|
+
onChange: (e) => W({
|
|
761
|
+
...U,
|
|
647
762
|
volume: e.target.value
|
|
648
763
|
}),
|
|
649
764
|
placeholder: "118500"
|
|
650
765
|
})]
|
|
651
|
-
}), /* @__PURE__ */
|
|
766
|
+
}), /* @__PURE__ */ v("div", {
|
|
652
767
|
className: "grid gap-1.5",
|
|
653
|
-
children: [/* @__PURE__ */
|
|
768
|
+
children: [/* @__PURE__ */ _(S, {
|
|
654
769
|
htmlFor: "prodUnit",
|
|
655
770
|
children: "Unit"
|
|
656
|
-
}), /* @__PURE__ */
|
|
657
|
-
value:
|
|
658
|
-
onValueChange: (e) =>
|
|
659
|
-
...
|
|
771
|
+
}), /* @__PURE__ */ v(T, {
|
|
772
|
+
value: U.unit,
|
|
773
|
+
onValueChange: (e) => W({
|
|
774
|
+
...U,
|
|
660
775
|
unit: e
|
|
661
776
|
}),
|
|
662
|
-
children: [/* @__PURE__ */
|
|
777
|
+
children: [/* @__PURE__ */ _(O, {
|
|
663
778
|
id: "prodUnit",
|
|
664
|
-
children: /* @__PURE__ */
|
|
665
|
-
}), /* @__PURE__ */
|
|
779
|
+
children: /* @__PURE__ */ _(k, {})
|
|
780
|
+
}), /* @__PURE__ */ _(E, { children: Fe.map((e) => /* @__PURE__ */ _(D, {
|
|
666
781
|
value: e,
|
|
667
782
|
children: i(e)
|
|
668
783
|
}, e)) })]
|
|
669
784
|
})]
|
|
670
785
|
})]
|
|
671
786
|
}),
|
|
672
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ v("div", {
|
|
673
788
|
className: "grid gap-2 sm:grid-cols-2",
|
|
674
|
-
children: [/* @__PURE__ */
|
|
789
|
+
children: [/* @__PURE__ */ v("div", {
|
|
675
790
|
className: "grid gap-1.5",
|
|
676
|
-
children: [/* @__PURE__ */
|
|
791
|
+
children: [/* @__PURE__ */ _(S, {
|
|
677
792
|
htmlFor: "prodGrade",
|
|
678
793
|
children: "Grade"
|
|
679
|
-
}), /* @__PURE__ */
|
|
794
|
+
}), /* @__PURE__ */ _(x, {
|
|
680
795
|
id: "prodGrade",
|
|
681
796
|
type: "number",
|
|
682
797
|
step: "any",
|
|
683
|
-
value:
|
|
684
|
-
onChange: (e) =>
|
|
685
|
-
...
|
|
798
|
+
value: U.grade,
|
|
799
|
+
onChange: (e) => W({
|
|
800
|
+
...U,
|
|
686
801
|
grade: e.target.value
|
|
687
802
|
}),
|
|
688
803
|
placeholder: "Optional (e.g. API / assay)"
|
|
689
804
|
})]
|
|
690
|
-
}), /* @__PURE__ */
|
|
805
|
+
}), /* @__PURE__ */ v("div", {
|
|
691
806
|
className: "grid gap-1.5",
|
|
692
|
-
children: [/* @__PURE__ */
|
|
807
|
+
children: [/* @__PURE__ */ _(S, {
|
|
693
808
|
htmlFor: "prodDowntime",
|
|
694
809
|
children: "Downtime (hours)"
|
|
695
|
-
}), /* @__PURE__ */
|
|
810
|
+
}), /* @__PURE__ */ _(x, {
|
|
696
811
|
id: "prodDowntime",
|
|
697
812
|
type: "number",
|
|
698
813
|
min: "0",
|
|
699
814
|
step: "any",
|
|
700
|
-
value:
|
|
701
|
-
onChange: (e) =>
|
|
702
|
-
...
|
|
815
|
+
value: U.downtimeHours,
|
|
816
|
+
onChange: (e) => W({
|
|
817
|
+
...U,
|
|
703
818
|
downtimeHours: e.target.value
|
|
704
819
|
}),
|
|
705
820
|
placeholder: "0"
|
|
706
821
|
})]
|
|
707
822
|
})]
|
|
708
823
|
}),
|
|
709
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ v("div", {
|
|
710
825
|
className: "grid gap-1.5",
|
|
711
|
-
children: [/* @__PURE__ */
|
|
826
|
+
children: [/* @__PURE__ */ _(S, {
|
|
712
827
|
htmlFor: "prodNotes",
|
|
713
828
|
children: "Notes"
|
|
714
|
-
}), /* @__PURE__ */
|
|
829
|
+
}), /* @__PURE__ */ _(Pe, {
|
|
715
830
|
id: "prodNotes",
|
|
716
831
|
rows: 2,
|
|
717
|
-
value:
|
|
718
|
-
onChange: (e) =>
|
|
719
|
-
...
|
|
832
|
+
value: U.notes,
|
|
833
|
+
onChange: (e) => W({
|
|
834
|
+
...U,
|
|
720
835
|
notes: e.target.value
|
|
721
836
|
}),
|
|
722
837
|
placeholder: "Optional context about this period."
|
|
723
838
|
})]
|
|
724
839
|
}),
|
|
725
|
-
|
|
840
|
+
B && Ue && /* @__PURE__ */ _("p", {
|
|
726
841
|
className: "text-sm text-status-error-text",
|
|
727
|
-
children:
|
|
842
|
+
children: B
|
|
728
843
|
})
|
|
729
844
|
]
|
|
730
845
|
}),
|
|
731
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ v(je, { children: [/* @__PURE__ */ _(y, {
|
|
732
847
|
variant: "outline",
|
|
733
848
|
type: "button",
|
|
734
849
|
onClick: Q,
|
|
735
850
|
children: "Cancel"
|
|
736
|
-
}), /* @__PURE__ */ y
|
|
851
|
+
}), /* @__PURE__ */ _(y, {
|
|
737
852
|
type: "submit",
|
|
738
853
|
form: "recordProductionForm",
|
|
739
|
-
disabled:
|
|
740
|
-
children:
|
|
854
|
+
disabled: L.isPending,
|
|
855
|
+
children: L.isPending ? "Recording…" : "Record production"
|
|
741
856
|
})] })
|
|
742
857
|
] })
|
|
743
858
|
}),
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
-
open:
|
|
746
|
-
onOpenChange: (e) => e ?
|
|
747
|
-
children: /* @__PURE__ */
|
|
748
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ _(C, {
|
|
860
|
+
open: We,
|
|
861
|
+
onOpenChange: (e) => e ? G(!0) : $(),
|
|
862
|
+
children: /* @__PURE__ */ v(w, { children: [
|
|
863
|
+
/* @__PURE__ */ v(Me, { children: [/* @__PURE__ */ _(Ne, { children: "Add reserve estimate" }), /* @__PURE__ */ v(Ae, { children: [
|
|
749
864
|
"Record a recoverable-volume estimate for ",
|
|
750
865
|
F.name,
|
|
751
866
|
"."
|
|
752
867
|
] })] }),
|
|
753
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ v("form", {
|
|
754
869
|
id: "reserveEstimateForm",
|
|
755
870
|
onSubmit: (e) => {
|
|
756
|
-
e.preventDefault(),
|
|
871
|
+
e.preventDefault(), Qe();
|
|
757
872
|
},
|
|
758
873
|
className: "grid gap-4 py-2",
|
|
759
874
|
children: [
|
|
760
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ v("div", {
|
|
761
876
|
className: "grid gap-2 sm:grid-cols-2",
|
|
762
|
-
children: [/* @__PURE__ */
|
|
877
|
+
children: [/* @__PURE__ */ v("div", {
|
|
763
878
|
className: "grid gap-1.5",
|
|
764
|
-
children: [/* @__PURE__ */
|
|
879
|
+
children: [/* @__PURE__ */ _(S, {
|
|
765
880
|
htmlFor: "resCategory",
|
|
766
881
|
children: "Category"
|
|
767
|
-
}), /* @__PURE__ */
|
|
768
|
-
value:
|
|
769
|
-
onValueChange: (e) =>
|
|
770
|
-
...
|
|
882
|
+
}), /* @__PURE__ */ v(T, {
|
|
883
|
+
value: K.category,
|
|
884
|
+
onValueChange: (e) => q({
|
|
885
|
+
...K,
|
|
771
886
|
category: e
|
|
772
887
|
}),
|
|
773
|
-
children: [/* @__PURE__ */
|
|
888
|
+
children: [/* @__PURE__ */ _(O, {
|
|
774
889
|
id: "resCategory",
|
|
775
|
-
children: /* @__PURE__ */
|
|
776
|
-
}), /* @__PURE__ */
|
|
890
|
+
children: /* @__PURE__ */ _(k, {})
|
|
891
|
+
}), /* @__PURE__ */ _(E, { children: Ie.map((e) => /* @__PURE__ */ _(D, {
|
|
777
892
|
value: e,
|
|
778
893
|
children: i(e)
|
|
779
894
|
}, e)) })]
|
|
780
895
|
})]
|
|
781
|
-
}), /* @__PURE__ */
|
|
896
|
+
}), /* @__PURE__ */ v("div", {
|
|
782
897
|
className: "grid gap-1.5",
|
|
783
|
-
children: [/* @__PURE__ */
|
|
898
|
+
children: [/* @__PURE__ */ _(S, {
|
|
784
899
|
htmlFor: "resAsOf",
|
|
785
900
|
children: "As-of date *"
|
|
786
|
-
}), /* @__PURE__ */
|
|
901
|
+
}), /* @__PURE__ */ _(x, {
|
|
787
902
|
id: "resAsOf",
|
|
788
903
|
type: "date",
|
|
789
|
-
value:
|
|
790
|
-
onChange: (e) =>
|
|
791
|
-
...
|
|
904
|
+
value: K.asOfDate,
|
|
905
|
+
onChange: (e) => q({
|
|
906
|
+
...K,
|
|
792
907
|
asOfDate: e.target.value
|
|
793
908
|
})
|
|
794
909
|
})]
|
|
795
910
|
})]
|
|
796
911
|
}),
|
|
797
|
-
/* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ v("div", {
|
|
798
913
|
className: "grid gap-2 sm:grid-cols-3",
|
|
799
914
|
children: [
|
|
800
|
-
/* @__PURE__ */
|
|
915
|
+
/* @__PURE__ */ v("div", {
|
|
801
916
|
className: "grid gap-1.5",
|
|
802
|
-
children: [/* @__PURE__ */
|
|
917
|
+
children: [/* @__PURE__ */ _(S, {
|
|
803
918
|
htmlFor: "resRecoverable",
|
|
804
919
|
children: "Recoverable *"
|
|
805
|
-
}), /* @__PURE__ */
|
|
920
|
+
}), /* @__PURE__ */ _(x, {
|
|
806
921
|
id: "resRecoverable",
|
|
807
922
|
type: "number",
|
|
808
923
|
min: "0",
|
|
809
924
|
step: "any",
|
|
810
|
-
value:
|
|
811
|
-
onChange: (e) =>
|
|
812
|
-
...
|
|
925
|
+
value: K.recoverable,
|
|
926
|
+
onChange: (e) => q({
|
|
927
|
+
...K,
|
|
813
928
|
recoverable: e.target.value
|
|
814
929
|
}),
|
|
815
930
|
placeholder: "2400000"
|
|
816
931
|
})]
|
|
817
932
|
}),
|
|
818
|
-
/* @__PURE__ */
|
|
933
|
+
/* @__PURE__ */ v("div", {
|
|
819
934
|
className: "grid gap-1.5",
|
|
820
|
-
children: [/* @__PURE__ */
|
|
935
|
+
children: [/* @__PURE__ */ _(S, {
|
|
821
936
|
htmlFor: "resUnit",
|
|
822
937
|
children: "Unit"
|
|
823
|
-
}), /* @__PURE__ */
|
|
824
|
-
value:
|
|
825
|
-
onValueChange: (e) =>
|
|
826
|
-
...
|
|
938
|
+
}), /* @__PURE__ */ v(T, {
|
|
939
|
+
value: K.unit,
|
|
940
|
+
onValueChange: (e) => q({
|
|
941
|
+
...K,
|
|
827
942
|
unit: e
|
|
828
943
|
}),
|
|
829
|
-
children: [/* @__PURE__ */
|
|
944
|
+
children: [/* @__PURE__ */ _(O, {
|
|
830
945
|
id: "resUnit",
|
|
831
|
-
children: /* @__PURE__ */
|
|
832
|
-
}), /* @__PURE__ */
|
|
946
|
+
children: /* @__PURE__ */ _(k, {})
|
|
947
|
+
}), /* @__PURE__ */ _(E, { children: Fe.map((e) => /* @__PURE__ */ _(D, {
|
|
833
948
|
value: e,
|
|
834
949
|
children: i(e)
|
|
835
950
|
}, e)) })]
|
|
836
951
|
})]
|
|
837
952
|
}),
|
|
838
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ v("div", {
|
|
839
954
|
className: "grid gap-1.5",
|
|
840
|
-
children: [/* @__PURE__ */
|
|
955
|
+
children: [/* @__PURE__ */ _(S, {
|
|
841
956
|
htmlFor: "resFactor",
|
|
842
957
|
children: "Recovery factor (%)"
|
|
843
|
-
}), /* @__PURE__ */
|
|
958
|
+
}), /* @__PURE__ */ _(x, {
|
|
844
959
|
id: "resFactor",
|
|
845
960
|
type: "number",
|
|
846
961
|
min: "0",
|
|
847
962
|
max: "100",
|
|
848
963
|
step: "any",
|
|
849
|
-
value:
|
|
850
|
-
onChange: (e) =>
|
|
851
|
-
...
|
|
964
|
+
value: K.recoveryFactor,
|
|
965
|
+
onChange: (e) => q({
|
|
966
|
+
...K,
|
|
852
967
|
recoveryFactor: e.target.value
|
|
853
968
|
}),
|
|
854
969
|
placeholder: "35"
|
|
@@ -856,53 +971,53 @@ function M() {
|
|
|
856
971
|
})
|
|
857
972
|
]
|
|
858
973
|
}),
|
|
859
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ v("div", {
|
|
860
975
|
className: "grid gap-1.5",
|
|
861
|
-
children: [/* @__PURE__ */
|
|
976
|
+
children: [/* @__PURE__ */ _(S, {
|
|
862
977
|
htmlFor: "resMethodology",
|
|
863
978
|
children: "Methodology"
|
|
864
|
-
}), /* @__PURE__ */
|
|
979
|
+
}), /* @__PURE__ */ _(x, {
|
|
865
980
|
id: "resMethodology",
|
|
866
|
-
value:
|
|
867
|
-
onChange: (e) =>
|
|
868
|
-
...
|
|
981
|
+
value: K.methodology,
|
|
982
|
+
onChange: (e) => q({
|
|
983
|
+
...K,
|
|
869
984
|
methodology: e.target.value
|
|
870
985
|
}),
|
|
871
986
|
placeholder: "Volumetric / material balance / decline curve"
|
|
872
987
|
})]
|
|
873
988
|
}),
|
|
874
|
-
/* @__PURE__ */
|
|
989
|
+
/* @__PURE__ */ v("div", {
|
|
875
990
|
className: "grid gap-1.5",
|
|
876
|
-
children: [/* @__PURE__ */
|
|
991
|
+
children: [/* @__PURE__ */ _(S, {
|
|
877
992
|
htmlFor: "resNotes",
|
|
878
993
|
children: "Notes"
|
|
879
|
-
}), /* @__PURE__ */
|
|
994
|
+
}), /* @__PURE__ */ _(Pe, {
|
|
880
995
|
id: "resNotes",
|
|
881
996
|
rows: 2,
|
|
882
|
-
value:
|
|
883
|
-
onChange: (e) =>
|
|
884
|
-
...
|
|
997
|
+
value: K.notes,
|
|
998
|
+
onChange: (e) => q({
|
|
999
|
+
...K,
|
|
885
1000
|
notes: e.target.value
|
|
886
1001
|
}),
|
|
887
1002
|
placeholder: "Optional context about this estimate."
|
|
888
1003
|
})]
|
|
889
1004
|
}),
|
|
890
|
-
|
|
1005
|
+
B && We && /* @__PURE__ */ _("p", {
|
|
891
1006
|
className: "text-sm text-status-error-text",
|
|
892
|
-
children:
|
|
1007
|
+
children: B
|
|
893
1008
|
})
|
|
894
1009
|
]
|
|
895
1010
|
}),
|
|
896
|
-
/* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ v(je, { children: [/* @__PURE__ */ _(y, {
|
|
897
1012
|
variant: "outline",
|
|
898
1013
|
type: "button",
|
|
899
1014
|
onClick: $,
|
|
900
1015
|
children: "Cancel"
|
|
901
|
-
}), /* @__PURE__ */ y
|
|
1016
|
+
}), /* @__PURE__ */ _(y, {
|
|
902
1017
|
type: "submit",
|
|
903
1018
|
form: "reserveEstimateForm",
|
|
904
|
-
disabled:
|
|
905
|
-
children:
|
|
1019
|
+
disabled: R.isPending,
|
|
1020
|
+
children: R.isPending ? "Adding…" : "Add estimate"
|
|
906
1021
|
})] })
|
|
907
1022
|
] })
|
|
908
1023
|
})
|