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