@burdenoff/microfe-theglobalfuel 2026.716.1 → 2026.720.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -1
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js +34 -22
- package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
- package/dist/theglobalfuel/components/DataTable.js +1 -1
- package/dist/theglobalfuel/components/DataTable.js.map +1 -1
- package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -1
- package/dist/theglobalfuel/components/MiniBar.js +1 -1
- package/dist/theglobalfuel/components/MiniBar.js.map +1 -1
- package/dist/theglobalfuel/components/Tabs.js +1 -1
- package/dist/theglobalfuel/components/Tabs.js.map +1 -1
- package/dist/theglobalfuel/components/index.js +2 -0
- package/dist/theglobalfuel/components/viz/BarChart.js +83 -4
- package/dist/theglobalfuel/components/viz/BarChart.js.map +1 -0
- package/dist/theglobalfuel/components/viz/StatCard.js +60 -3
- package/dist/theglobalfuel/components/viz/StatCard.js.map +1 -0
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +10 -1
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -1
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +1 -1
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -1
- package/dist/theglobalfuel/pages/alerts/AlertsPage.d.ts +16 -0
- package/dist/theglobalfuel/pages/alerts/AlertsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/alerts/AlertsPage.js +295 -0
- package/dist/theglobalfuel/pages/alerts/AlertsPage.js.map +1 -0
- package/dist/theglobalfuel/pages/analytics/AnalyticsPage.d.ts +13 -0
- package/dist/theglobalfuel/pages/analytics/AnalyticsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/analytics/AnalyticsPage.js +358 -0
- package/dist/theglobalfuel/pages/analytics/AnalyticsPage.js.map +1 -0
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -1
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +386 -342
- package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
- package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -1
- package/dist/theglobalfuel/pages/assets/AssetsPage.js +277 -199
- package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js +1 -1
- package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +6 -6
- package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +1 -1
- package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js +1 -1
- package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts.map +1 -1
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +372 -216
- package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -1
- package/dist/theglobalfuel/pages/reports/ReportsPage.d.ts +16 -0
- package/dist/theglobalfuel/pages/reports/ReportsPage.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/reports/ReportsPage.js +578 -0
- package/dist/theglobalfuel/pages/reports/ReportsPage.js.map +1 -0
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -1
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +43 -12
- package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
- package/dist/theglobalfuel/types/index.d.ts +37 -8
- package/dist/theglobalfuel/types/index.d.ts.map +1 -1
- package/dist/theglobalfuel/utils/csv.d.ts +16 -0
- package/dist/theglobalfuel/utils/csv.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/csv.js +14 -0
- package/dist/theglobalfuel/utils/csv.js.map +1 -0
- package/dist/theglobalfuel/utils/index.d.ts +2 -0
- package/dist/theglobalfuel/utils/index.d.ts.map +1 -1
- package/dist/theglobalfuel/utils/pageContext.d.ts.map +1 -1
- package/dist/theglobalfuel/utils/pageContext.js +32 -0
- package/dist/theglobalfuel/utils/pageContext.js.map +1 -1
- package/dist/theglobalfuel/utils/provenance.d.ts +135 -0
- package/dist/theglobalfuel/utils/provenance.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/provenance.js +57 -0
- package/dist/theglobalfuel/utils/provenance.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { useTheGlobalFuel as e } from "../../context/TheGlobalFuelContext.js";
|
|
2
|
-
import { PageLayout as
|
|
3
|
-
import { formatEnumLabel as
|
|
4
|
-
import { StatusBadge as
|
|
5
|
-
import { DataTable as
|
|
6
|
-
import { ErrorView as
|
|
7
|
-
import { EmptyState as
|
|
2
|
+
import { PageLayout as ee } from "../../components/PageLayout.js";
|
|
3
|
+
import { formatEnumLabel as t, formatPercent as n, formatRelativeTime as te, formatVolume as ne, toBackendDate as re } from "../../utils/formatters.js";
|
|
4
|
+
import { StatusBadge as ie } from "../../components/StatusBadge.js";
|
|
5
|
+
import { DataTable as ae } from "../../components/DataTable.js";
|
|
6
|
+
import { ErrorView as oe, LoadingView as se } from "../../components/StateViews.js";
|
|
7
|
+
import { EmptyState as r } from "../../components/EmptyState.js";
|
|
8
8
|
import "../../context/index.js";
|
|
9
|
-
import { useTheAssets as
|
|
10
|
-
import { useCursorPager as
|
|
11
|
-
import { useNotify as
|
|
12
|
-
import { useTheAnalytics as
|
|
13
|
-
import { useThePageView as
|
|
14
|
-
import { useTheNativeControls as
|
|
15
|
-
import { useTheTranslation as
|
|
9
|
+
import { useTheAssets as i, useTheCreateAsset as a } from "../../hooks/useTheGlobalFuelApi.js";
|
|
10
|
+
import { useCursorPager as o } from "../../hooks/useCursorPager.js";
|
|
11
|
+
import { useNotify as s } from "../../hooks/useNotify.js";
|
|
12
|
+
import { useTheAnalytics as c } from "../../hooks/useTheAnalytics.js";
|
|
13
|
+
import { useThePageView as l } from "../../hooks/useThePageView.js";
|
|
14
|
+
import { useTheNativeControls as u } from "../../hooks/useTheNativeControls.js";
|
|
15
|
+
import { useTheTranslation as d } from "../../hooks/useTheTranslation.js";
|
|
16
16
|
import "../../hooks/index.js";
|
|
17
|
-
import { FilterTabs as
|
|
18
|
-
import { Pagination as
|
|
17
|
+
import { FilterTabs as f } from "../../components/FilterTabs.js";
|
|
18
|
+
import { Pagination as p } from "../../components/Pagination.js";
|
|
19
19
|
import "../../components/index.js";
|
|
20
|
-
import { useMemo as
|
|
21
|
-
import { Fuel as
|
|
22
|
-
import { Fragment as
|
|
23
|
-
import { Button as
|
|
20
|
+
import { useMemo as m, useState as h } from "react";
|
|
21
|
+
import { Fuel as g, MapPin as ce, Plus as _ } from "lucide-react";
|
|
22
|
+
import { Fragment as le, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
23
|
+
import { Button as b, Input as x, Label as S, ResponsiveDialog as ue, ResponsiveDialogContent as de, ResponsiveDialogDescription as fe, ResponsiveDialogFooter as pe, ResponsiveDialogHeader as me, ResponsiveDialogTitle as C, Select as w, SelectContent as T, SelectItem as E, SelectTrigger as D, SelectValue as O } from "@burdenoff/fe-libs/ui";
|
|
24
24
|
//#region src/theglobalfuel/pages/assets/AssetsPage.tsx
|
|
25
25
|
var k = [
|
|
26
26
|
{
|
|
@@ -101,33 +101,37 @@ var k = [
|
|
|
101
101
|
longitude: "",
|
|
102
102
|
capacityPerDay: "",
|
|
103
103
|
capacityUnit: "BARRELS",
|
|
104
|
-
workingInterestPct: ""
|
|
104
|
+
workingInterestPct: "",
|
|
105
|
+
discoveryAt: "",
|
|
106
|
+
area: "",
|
|
107
|
+
reservoirType: "",
|
|
108
|
+
waterDepth: ""
|
|
105
109
|
};
|
|
106
110
|
function F() {
|
|
107
|
-
|
|
108
|
-
let F =
|
|
109
|
-
status:
|
|
110
|
-
commodity:
|
|
111
|
-
kind:
|
|
111
|
+
l("assets");
|
|
112
|
+
let F = d(), { navigateTo: I } = e(), L = s(), { haptic: R } = u(), { trackAssetCreateClicked: z, trackAssetCreated: he } = c(), [B, ge] = h("ALL"), [V, _e] = h("ALL"), [H, ve] = h("ALL"), U = o(), [ye, W] = h(!1), [G, K] = h(P), [q, J] = h(null), { data: Y, isLoading: X, isError: be, refetch: xe } = i({
|
|
113
|
+
status: B === "ALL" ? void 0 : B,
|
|
114
|
+
commodity: V === "ALL" ? void 0 : V,
|
|
115
|
+
kind: H === "ALL" ? void 0 : H,
|
|
112
116
|
pagination: {
|
|
113
117
|
limit: N,
|
|
114
|
-
offset:
|
|
118
|
+
offset: U.page * N
|
|
115
119
|
}
|
|
116
|
-
}), Z =
|
|
120
|
+
}), Z = a(), Q = m(() => Y?.items ?? [], [Y]), Se = B !== "ALL" || V !== "ALL" || H !== "ALL", Ce = [
|
|
117
121
|
{
|
|
118
122
|
key: "name",
|
|
119
123
|
header: "Asset",
|
|
120
|
-
render: (e) => /* @__PURE__ */
|
|
124
|
+
render: (e) => /* @__PURE__ */ y("div", {
|
|
121
125
|
className: "flex items-center gap-3",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ v("span", {
|
|
123
127
|
className: "grid size-9 shrink-0 place-items-center rounded-lg bg-bg-sunken text-text-secondary",
|
|
124
|
-
children: /* @__PURE__ */ g
|
|
125
|
-
}), /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ v(g, { className: "h-4 w-4" })
|
|
129
|
+
}), /* @__PURE__ */ y("div", {
|
|
126
130
|
className: "min-w-0",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ v("p", {
|
|
128
132
|
className: "truncate font-semibold text-text-primary",
|
|
129
133
|
children: e.name
|
|
130
|
-
}), e.code && /* @__PURE__ */
|
|
134
|
+
}), e.code && /* @__PURE__ */ v("p", {
|
|
131
135
|
className: "truncate text-xs text-text-tertiary",
|
|
132
136
|
children: e.code
|
|
133
137
|
})]
|
|
@@ -138,24 +142,24 @@ function F() {
|
|
|
138
142
|
key: "kind",
|
|
139
143
|
header: "Kind",
|
|
140
144
|
hideOnMobile: !0,
|
|
141
|
-
render: (e) => /* @__PURE__ */
|
|
145
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
142
146
|
className: "text-text-secondary",
|
|
143
|
-
children:
|
|
147
|
+
children: t(e.kind)
|
|
144
148
|
})
|
|
145
149
|
},
|
|
146
150
|
{
|
|
147
151
|
key: "commodity",
|
|
148
152
|
header: "Commodity",
|
|
149
153
|
hideOnMobile: !0,
|
|
150
|
-
render: (e) => /* @__PURE__ */
|
|
154
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
151
155
|
className: "text-text-secondary",
|
|
152
|
-
children:
|
|
156
|
+
children: t(e.commodity)
|
|
153
157
|
})
|
|
154
158
|
},
|
|
155
159
|
{
|
|
156
160
|
key: "status",
|
|
157
161
|
header: "Status",
|
|
158
|
-
render: (e) => /* @__PURE__ */
|
|
162
|
+
render: (e) => /* @__PURE__ */ v(ie, { status: e.status })
|
|
159
163
|
},
|
|
160
164
|
{
|
|
161
165
|
key: "capacity",
|
|
@@ -163,10 +167,10 @@ function F() {
|
|
|
163
167
|
align: "right",
|
|
164
168
|
hideOnMobile: !0,
|
|
165
169
|
sortValue: (e) => e.capacityPerDay,
|
|
166
|
-
render: (e) => e.capacityPerDay > 0 ? /* @__PURE__ */
|
|
170
|
+
render: (e) => e.capacityPerDay > 0 ? /* @__PURE__ */ y("span", {
|
|
167
171
|
className: "tabular-nums text-text-secondary",
|
|
168
172
|
children: [ne(e.capacityPerDay, e.capacityUnit), "/day"]
|
|
169
|
-
}) : /* @__PURE__ */
|
|
173
|
+
}) : /* @__PURE__ */ v("span", {
|
|
170
174
|
className: "text-text-tertiary",
|
|
171
175
|
children: "—"
|
|
172
176
|
})
|
|
@@ -177,19 +181,19 @@ function F() {
|
|
|
177
181
|
align: "right",
|
|
178
182
|
hideOnMobile: !0,
|
|
179
183
|
sortValue: (e) => e.workingInterestPct,
|
|
180
|
-
render: (e) => /* @__PURE__ */
|
|
184
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
181
185
|
className: "tabular-nums text-text-secondary",
|
|
182
|
-
children:
|
|
186
|
+
children: n(e.workingInterestPct)
|
|
183
187
|
})
|
|
184
188
|
},
|
|
185
189
|
{
|
|
186
190
|
key: "location",
|
|
187
191
|
header: "Location",
|
|
188
192
|
hideOnMobile: !0,
|
|
189
|
-
render: (e) => e.location ? /* @__PURE__ */
|
|
193
|
+
render: (e) => e.location ? /* @__PURE__ */ y("span", {
|
|
190
194
|
className: "inline-flex items-center gap-1.5 text-text-secondary",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
192
|
-
}) : /* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ v(ce, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }), e.location]
|
|
196
|
+
}) : /* @__PURE__ */ v("span", {
|
|
193
197
|
className: "text-text-tertiary",
|
|
194
198
|
children: "—"
|
|
195
199
|
})
|
|
@@ -199,222 +203,226 @@ function F() {
|
|
|
199
203
|
header: "Updated",
|
|
200
204
|
align: "right",
|
|
201
205
|
hideOnMobile: !0,
|
|
202
|
-
render: (e) => /* @__PURE__ */
|
|
206
|
+
render: (e) => /* @__PURE__ */ v("span", {
|
|
203
207
|
className: "text-text-tertiary",
|
|
204
208
|
children: te(e.updatedAt)
|
|
205
209
|
})
|
|
206
210
|
}
|
|
207
211
|
], $ = () => {
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
if (!
|
|
211
|
-
|
|
212
|
+
K(P), J(null);
|
|
213
|
+
}, we = async () => {
|
|
214
|
+
if (!G.name.trim()) {
|
|
215
|
+
J("Asset name is required.");
|
|
212
216
|
return;
|
|
213
217
|
}
|
|
214
|
-
|
|
218
|
+
J(null), R("light"), z();
|
|
215
219
|
try {
|
|
216
220
|
let e = await Z.mutateAsync({
|
|
217
|
-
name:
|
|
218
|
-
code:
|
|
219
|
-
commodity:
|
|
220
|
-
kind:
|
|
221
|
-
status:
|
|
222
|
-
location:
|
|
223
|
-
latitude:
|
|
224
|
-
longitude:
|
|
225
|
-
capacityPerDay:
|
|
226
|
-
capacityUnit:
|
|
227
|
-
workingInterestPct:
|
|
221
|
+
name: G.name.trim(),
|
|
222
|
+
code: G.code.trim() || null,
|
|
223
|
+
commodity: G.commodity,
|
|
224
|
+
kind: G.kind,
|
|
225
|
+
status: G.status,
|
|
226
|
+
location: G.location.trim() || null,
|
|
227
|
+
latitude: G.latitude ? Number(G.latitude) : null,
|
|
228
|
+
longitude: G.longitude ? Number(G.longitude) : null,
|
|
229
|
+
capacityPerDay: G.capacityPerDay ? Number(G.capacityPerDay) : null,
|
|
230
|
+
capacityUnit: G.capacityUnit,
|
|
231
|
+
workingInterestPct: G.workingInterestPct ? Number(G.workingInterestPct) : null,
|
|
232
|
+
discoveryAt: re(G.discoveryAt) || null,
|
|
233
|
+
area: G.area ? Number(G.area) : null,
|
|
234
|
+
reservoirType: G.reservoirType.trim() || null,
|
|
235
|
+
waterDepth: G.waterDepth ? Number(G.waterDepth) : null
|
|
228
236
|
});
|
|
229
|
-
|
|
237
|
+
he(e.id), L.success("Asset created"), W(!1), $(), I(`assets/${e.id}`);
|
|
230
238
|
} catch (e) {
|
|
231
|
-
L.fromError(e),
|
|
239
|
+
L.fromError(e), J(e instanceof Error ? e.message : "Failed to create asset.");
|
|
232
240
|
}
|
|
233
241
|
};
|
|
234
|
-
return /* @__PURE__ */
|
|
242
|
+
return /* @__PURE__ */ y(ee, {
|
|
235
243
|
title: F("theglobalfuel.pages.assets.title", "Assets"),
|
|
236
244
|
description: F("theglobalfuel.pages.assets.description", "Resource registry — fields, wells, mines, plants, terminals & pipelines across every commodity."),
|
|
237
245
|
dataTour: "theglobalfuel-assets-page",
|
|
238
|
-
actions: /* @__PURE__ */
|
|
239
|
-
onClick: () =>
|
|
240
|
-
children: [/* @__PURE__ */
|
|
246
|
+
actions: /* @__PURE__ */ y(b, {
|
|
247
|
+
onClick: () => W(!0),
|
|
248
|
+
children: [/* @__PURE__ */ v(_, { className: "mr-1.5 h-4 w-4" }), " New asset"]
|
|
241
249
|
}),
|
|
242
250
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ y("div", {
|
|
244
252
|
className: "mb-5 flex flex-wrap items-center gap-3",
|
|
245
253
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ v(f, {
|
|
247
255
|
options: k,
|
|
248
|
-
value:
|
|
256
|
+
value: B,
|
|
249
257
|
onChange: (e) => {
|
|
250
|
-
|
|
258
|
+
ge(e), U.reset();
|
|
251
259
|
}
|
|
252
260
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
value:
|
|
261
|
+
/* @__PURE__ */ y(w, {
|
|
262
|
+
value: V,
|
|
255
263
|
onValueChange: (e) => {
|
|
256
|
-
|
|
264
|
+
_e(e), U.reset();
|
|
257
265
|
},
|
|
258
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ v(D, {
|
|
259
267
|
className: "w-48",
|
|
260
268
|
"aria-label": "Filter by commodity",
|
|
261
|
-
children: /* @__PURE__ */
|
|
262
|
-
}), /* @__PURE__ */
|
|
269
|
+
children: /* @__PURE__ */ v(O, { placeholder: "All commodities" })
|
|
270
|
+
}), /* @__PURE__ */ y(T, { children: [/* @__PURE__ */ v(E, {
|
|
263
271
|
value: "ALL",
|
|
264
272
|
children: "All commodities"
|
|
265
|
-
}), j.map((e) => /* @__PURE__ */
|
|
273
|
+
}), j.map((e) => /* @__PURE__ */ v(E, {
|
|
266
274
|
value: e,
|
|
267
|
-
children:
|
|
275
|
+
children: t(e)
|
|
268
276
|
}, e))] })]
|
|
269
277
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
value:
|
|
278
|
+
/* @__PURE__ */ y(w, {
|
|
279
|
+
value: H,
|
|
272
280
|
onValueChange: (e) => {
|
|
273
|
-
|
|
281
|
+
ve(e), U.reset();
|
|
274
282
|
},
|
|
275
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ v(D, {
|
|
276
284
|
className: "w-48",
|
|
277
285
|
"aria-label": "Filter by kind",
|
|
278
|
-
children: /* @__PURE__ */
|
|
279
|
-
}), /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ v(O, { placeholder: "All kinds" })
|
|
287
|
+
}), /* @__PURE__ */ y(T, { children: [/* @__PURE__ */ v(E, {
|
|
280
288
|
value: "ALL",
|
|
281
289
|
children: "All kinds"
|
|
282
|
-
}), A.map((e) => /* @__PURE__ */
|
|
290
|
+
}), A.map((e) => /* @__PURE__ */ v(E, {
|
|
283
291
|
value: e,
|
|
284
|
-
children:
|
|
292
|
+
children: t(e)
|
|
285
293
|
}, e))] })]
|
|
286
294
|
})
|
|
287
295
|
]
|
|
288
296
|
}),
|
|
289
|
-
|
|
297
|
+
X ? /* @__PURE__ */ v(se, { label: "Loading assets…" }) : be ? /* @__PURE__ */ v(oe, {
|
|
290
298
|
message: "Couldn't load assets.",
|
|
291
|
-
onRetry: () =>
|
|
292
|
-
}) : Q.length === 0 ? /* @__PURE__ */
|
|
299
|
+
onRetry: () => xe()
|
|
300
|
+
}) : Q.length === 0 ? /* @__PURE__ */ v(r, {
|
|
293
301
|
illustration: "empty-data",
|
|
294
|
-
icon: /* @__PURE__ */ g
|
|
302
|
+
icon: /* @__PURE__ */ v(g, { className: "h-10 w-10" }),
|
|
295
303
|
title: "No assets yet",
|
|
296
|
-
description:
|
|
297
|
-
action: /* @__PURE__ */
|
|
298
|
-
onClick: () =>
|
|
299
|
-
children: [/* @__PURE__ */
|
|
304
|
+
description: Se ? "No assets match these filters." : "Register your first resource asset to start tracking production, reserves & emissions.",
|
|
305
|
+
action: /* @__PURE__ */ y(b, {
|
|
306
|
+
onClick: () => W(!0),
|
|
307
|
+
children: [/* @__PURE__ */ v(_, { className: "mr-1.5 h-4 w-4" }), " New asset"]
|
|
300
308
|
})
|
|
301
|
-
}) : /* @__PURE__ */
|
|
302
|
-
columns:
|
|
309
|
+
}) : /* @__PURE__ */ y(le, { children: [/* @__PURE__ */ v(ae, {
|
|
310
|
+
columns: Ce,
|
|
303
311
|
rows: Q,
|
|
304
312
|
rowKey: (e) => e.id,
|
|
305
313
|
onRowClick: (e) => I(`assets/${e.id}`),
|
|
306
314
|
rowLabel: (e) => `Open ${e.name}`
|
|
307
|
-
}), /* @__PURE__ */
|
|
308
|
-
page:
|
|
315
|
+
}), /* @__PURE__ */ v(p, {
|
|
316
|
+
page: U.page,
|
|
309
317
|
pageSize: N,
|
|
310
318
|
itemCount: Q.length,
|
|
311
|
-
hasMore:
|
|
312
|
-
onPageChange:
|
|
319
|
+
hasMore: Y?.pageInfo?.hasMore ?? !1,
|
|
320
|
+
onPageChange: U.onPageChange
|
|
313
321
|
})] }),
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
open:
|
|
322
|
+
/* @__PURE__ */ v(ue, {
|
|
323
|
+
open: ye,
|
|
316
324
|
onOpenChange: (e) => {
|
|
317
|
-
|
|
325
|
+
W(e), e || $();
|
|
318
326
|
},
|
|
319
|
-
children: /* @__PURE__ */
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
/* @__PURE__ */
|
|
327
|
+
children: /* @__PURE__ */ y(de, { children: [
|
|
328
|
+
/* @__PURE__ */ y(me, { children: [/* @__PURE__ */ v(C, { children: "New asset" }), /* @__PURE__ */ v(fe, { children: "Register a resource asset — a field, well, mine, plant, terminal or pipeline." })] }),
|
|
329
|
+
/* @__PURE__ */ y("form", {
|
|
322
330
|
id: "createAssetForm",
|
|
323
331
|
onSubmit: (e) => {
|
|
324
|
-
e.preventDefault(),
|
|
332
|
+
e.preventDefault(), we();
|
|
325
333
|
},
|
|
326
334
|
className: "grid gap-4 py-2",
|
|
327
335
|
children: [
|
|
328
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ y("div", {
|
|
329
337
|
className: "grid gap-2 sm:grid-cols-2",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ y("div", {
|
|
331
339
|
className: "grid gap-1.5",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
340
|
+
children: [/* @__PURE__ */ v(S, {
|
|
333
341
|
htmlFor: "assetName",
|
|
334
342
|
children: "Name *"
|
|
335
|
-
}), /* @__PURE__ */
|
|
343
|
+
}), /* @__PURE__ */ v(x, {
|
|
336
344
|
id: "assetName",
|
|
337
|
-
value:
|
|
338
|
-
onChange: (e) =>
|
|
339
|
-
...
|
|
345
|
+
value: G.name,
|
|
346
|
+
onChange: (e) => K({
|
|
347
|
+
...G,
|
|
340
348
|
name: e.target.value
|
|
341
349
|
}),
|
|
342
350
|
placeholder: "Rumaila North Field"
|
|
343
351
|
})]
|
|
344
|
-
}), /* @__PURE__ */
|
|
352
|
+
}), /* @__PURE__ */ y("div", {
|
|
345
353
|
className: "grid gap-1.5",
|
|
346
|
-
children: [/* @__PURE__ */
|
|
354
|
+
children: [/* @__PURE__ */ v(S, {
|
|
347
355
|
htmlFor: "assetCode",
|
|
348
356
|
children: "Code"
|
|
349
|
-
}), /* @__PURE__ */
|
|
357
|
+
}), /* @__PURE__ */ v(x, {
|
|
350
358
|
id: "assetCode",
|
|
351
|
-
value:
|
|
352
|
-
onChange: (e) =>
|
|
353
|
-
...
|
|
359
|
+
value: G.code,
|
|
360
|
+
onChange: (e) => K({
|
|
361
|
+
...G,
|
|
354
362
|
code: e.target.value
|
|
355
363
|
}),
|
|
356
364
|
placeholder: "AST-RMB-N"
|
|
357
365
|
})]
|
|
358
366
|
})]
|
|
359
367
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ y("div", {
|
|
361
369
|
className: "grid gap-2 sm:grid-cols-3",
|
|
362
370
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ y("div", {
|
|
364
372
|
className: "grid gap-1.5",
|
|
365
|
-
children: [/* @__PURE__ */
|
|
373
|
+
children: [/* @__PURE__ */ v(S, {
|
|
366
374
|
htmlFor: "assetCommodity",
|
|
367
375
|
children: "Commodity *"
|
|
368
|
-
}), /* @__PURE__ */
|
|
369
|
-
value:
|
|
370
|
-
onValueChange: (e) =>
|
|
371
|
-
...
|
|
376
|
+
}), /* @__PURE__ */ y(w, {
|
|
377
|
+
value: G.commodity,
|
|
378
|
+
onValueChange: (e) => K({
|
|
379
|
+
...G,
|
|
372
380
|
commodity: e
|
|
373
381
|
}),
|
|
374
|
-
children: [/* @__PURE__ */
|
|
382
|
+
children: [/* @__PURE__ */ v(D, {
|
|
375
383
|
id: "assetCommodity",
|
|
376
|
-
children: /* @__PURE__ */
|
|
377
|
-
}), /* @__PURE__ */
|
|
384
|
+
children: /* @__PURE__ */ v(O, {})
|
|
385
|
+
}), /* @__PURE__ */ v(T, { children: j.map((e) => /* @__PURE__ */ v(E, {
|
|
378
386
|
value: e,
|
|
379
|
-
children:
|
|
387
|
+
children: t(e)
|
|
380
388
|
}, e)) })]
|
|
381
389
|
})]
|
|
382
390
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ y("div", {
|
|
384
392
|
className: "grid gap-1.5",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ v(S, {
|
|
386
394
|
htmlFor: "assetKind",
|
|
387
395
|
children: "Kind"
|
|
388
|
-
}), /* @__PURE__ */
|
|
389
|
-
value:
|
|
390
|
-
onValueChange: (e) =>
|
|
391
|
-
...
|
|
396
|
+
}), /* @__PURE__ */ y(w, {
|
|
397
|
+
value: G.kind,
|
|
398
|
+
onValueChange: (e) => K({
|
|
399
|
+
...G,
|
|
392
400
|
kind: e
|
|
393
401
|
}),
|
|
394
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ v(D, {
|
|
395
403
|
id: "assetKind",
|
|
396
|
-
children: /* @__PURE__ */
|
|
397
|
-
}), /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ v(O, {})
|
|
405
|
+
}), /* @__PURE__ */ v(T, { children: A.map((e) => /* @__PURE__ */ v(E, {
|
|
398
406
|
value: e,
|
|
399
|
-
children:
|
|
407
|
+
children: t(e)
|
|
400
408
|
}, e)) })]
|
|
401
409
|
})]
|
|
402
410
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ y("div", {
|
|
404
412
|
className: "grid gap-1.5",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: [/* @__PURE__ */ v(S, {
|
|
406
414
|
htmlFor: "assetStatus",
|
|
407
415
|
children: "Status"
|
|
408
|
-
}), /* @__PURE__ */
|
|
409
|
-
value:
|
|
410
|
-
onValueChange: (e) =>
|
|
411
|
-
...
|
|
416
|
+
}), /* @__PURE__ */ y(w, {
|
|
417
|
+
value: G.status,
|
|
418
|
+
onValueChange: (e) => K({
|
|
419
|
+
...G,
|
|
412
420
|
status: e
|
|
413
421
|
}),
|
|
414
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ v(D, {
|
|
415
423
|
id: "assetStatus",
|
|
416
|
-
children: /* @__PURE__ */
|
|
417
|
-
}), /* @__PURE__ */
|
|
424
|
+
children: /* @__PURE__ */ v(O, {})
|
|
425
|
+
}), /* @__PURE__ */ v(T, { children: k.filter((e) => e.value !== "ALL").map((e) => /* @__PURE__ */ v(E, {
|
|
418
426
|
value: e.value,
|
|
419
427
|
children: e.label
|
|
420
428
|
}, e.value)) })]
|
|
@@ -422,112 +430,112 @@ function F() {
|
|
|
422
430
|
})
|
|
423
431
|
]
|
|
424
432
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ y("div", {
|
|
426
434
|
className: "grid gap-1.5",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ v(S, {
|
|
428
436
|
htmlFor: "assetLocation",
|
|
429
437
|
children: "Location"
|
|
430
|
-
}), /* @__PURE__ */
|
|
438
|
+
}), /* @__PURE__ */ v(x, {
|
|
431
439
|
id: "assetLocation",
|
|
432
|
-
value:
|
|
433
|
-
onChange: (e) =>
|
|
434
|
-
...
|
|
440
|
+
value: G.location,
|
|
441
|
+
onChange: (e) => K({
|
|
442
|
+
...G,
|
|
435
443
|
location: e.target.value
|
|
436
444
|
}),
|
|
437
445
|
placeholder: "Basra, Iraq"
|
|
438
446
|
})]
|
|
439
447
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ y("div", {
|
|
441
449
|
className: "grid gap-2 sm:grid-cols-2",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
450
|
+
children: [/* @__PURE__ */ y("div", {
|
|
443
451
|
className: "grid gap-1.5",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
452
|
+
children: [/* @__PURE__ */ v(S, {
|
|
445
453
|
htmlFor: "assetLat",
|
|
446
454
|
children: "Latitude"
|
|
447
|
-
}), /* @__PURE__ */
|
|
455
|
+
}), /* @__PURE__ */ v(x, {
|
|
448
456
|
id: "assetLat",
|
|
449
457
|
type: "number",
|
|
450
458
|
step: "any",
|
|
451
|
-
value:
|
|
452
|
-
onChange: (e) =>
|
|
453
|
-
...
|
|
459
|
+
value: G.latitude,
|
|
460
|
+
onChange: (e) => K({
|
|
461
|
+
...G,
|
|
454
462
|
latitude: e.target.value
|
|
455
463
|
}),
|
|
456
464
|
placeholder: "30.5085"
|
|
457
465
|
})]
|
|
458
|
-
}), /* @__PURE__ */
|
|
466
|
+
}), /* @__PURE__ */ y("div", {
|
|
459
467
|
className: "grid gap-1.5",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ v(S, {
|
|
461
469
|
htmlFor: "assetLng",
|
|
462
470
|
children: "Longitude"
|
|
463
|
-
}), /* @__PURE__ */
|
|
471
|
+
}), /* @__PURE__ */ v(x, {
|
|
464
472
|
id: "assetLng",
|
|
465
473
|
type: "number",
|
|
466
474
|
step: "any",
|
|
467
|
-
value:
|
|
468
|
-
onChange: (e) =>
|
|
469
|
-
...
|
|
475
|
+
value: G.longitude,
|
|
476
|
+
onChange: (e) => K({
|
|
477
|
+
...G,
|
|
470
478
|
longitude: e.target.value
|
|
471
479
|
}),
|
|
472
480
|
placeholder: "47.7804"
|
|
473
481
|
})]
|
|
474
482
|
})]
|
|
475
483
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ y("div", {
|
|
477
485
|
className: "grid gap-2 sm:grid-cols-3",
|
|
478
486
|
children: [
|
|
479
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ y("div", {
|
|
480
488
|
className: "grid gap-1.5 sm:col-span-1",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ v(S, {
|
|
482
490
|
htmlFor: "assetCapacity",
|
|
483
491
|
children: "Capacity / day"
|
|
484
|
-
}), /* @__PURE__ */
|
|
492
|
+
}), /* @__PURE__ */ v(x, {
|
|
485
493
|
id: "assetCapacity",
|
|
486
494
|
type: "number",
|
|
487
495
|
min: "0",
|
|
488
496
|
step: "any",
|
|
489
|
-
value:
|
|
490
|
-
onChange: (e) =>
|
|
491
|
-
...
|
|
497
|
+
value: G.capacityPerDay,
|
|
498
|
+
onChange: (e) => K({
|
|
499
|
+
...G,
|
|
492
500
|
capacityPerDay: e.target.value
|
|
493
501
|
}),
|
|
494
502
|
placeholder: "120000"
|
|
495
503
|
})]
|
|
496
504
|
}),
|
|
497
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ y("div", {
|
|
498
506
|
className: "grid gap-1.5",
|
|
499
|
-
children: [/* @__PURE__ */
|
|
507
|
+
children: [/* @__PURE__ */ v(S, {
|
|
500
508
|
htmlFor: "assetUnit",
|
|
501
509
|
children: "Capacity unit"
|
|
502
|
-
}), /* @__PURE__ */
|
|
503
|
-
value:
|
|
504
|
-
onValueChange: (e) =>
|
|
505
|
-
...
|
|
510
|
+
}), /* @__PURE__ */ y(w, {
|
|
511
|
+
value: G.capacityUnit,
|
|
512
|
+
onValueChange: (e) => K({
|
|
513
|
+
...G,
|
|
506
514
|
capacityUnit: e
|
|
507
515
|
}),
|
|
508
|
-
children: [/* @__PURE__ */
|
|
516
|
+
children: [/* @__PURE__ */ v(D, {
|
|
509
517
|
id: "assetUnit",
|
|
510
|
-
children: /* @__PURE__ */
|
|
511
|
-
}), /* @__PURE__ */
|
|
518
|
+
children: /* @__PURE__ */ v(O, {})
|
|
519
|
+
}), /* @__PURE__ */ v(T, { children: M.map((e) => /* @__PURE__ */ v(E, {
|
|
512
520
|
value: e,
|
|
513
|
-
children:
|
|
521
|
+
children: t(e)
|
|
514
522
|
}, e)) })]
|
|
515
523
|
})]
|
|
516
524
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ y("div", {
|
|
518
526
|
className: "grid gap-1.5",
|
|
519
|
-
children: [/* @__PURE__ */
|
|
527
|
+
children: [/* @__PURE__ */ v(S, {
|
|
520
528
|
htmlFor: "assetWi",
|
|
521
529
|
children: "Working interest (%)"
|
|
522
|
-
}), /* @__PURE__ */
|
|
530
|
+
}), /* @__PURE__ */ v(x, {
|
|
523
531
|
id: "assetWi",
|
|
524
532
|
type: "number",
|
|
525
533
|
min: "0",
|
|
526
534
|
max: "100",
|
|
527
535
|
step: "any",
|
|
528
|
-
value:
|
|
529
|
-
onChange: (e) =>
|
|
530
|
-
...
|
|
536
|
+
value: G.workingInterestPct,
|
|
537
|
+
onChange: (e) => K({
|
|
538
|
+
...G,
|
|
531
539
|
workingInterestPct: e.target.value
|
|
532
540
|
}),
|
|
533
541
|
placeholder: "47.5"
|
|
@@ -535,20 +543,90 @@ function F() {
|
|
|
535
543
|
})
|
|
536
544
|
]
|
|
537
545
|
}),
|
|
538
|
-
|
|
546
|
+
/* @__PURE__ */ y("div", {
|
|
547
|
+
className: "grid gap-2 sm:grid-cols-2",
|
|
548
|
+
children: [/* @__PURE__ */ y("div", {
|
|
549
|
+
className: "grid gap-1.5",
|
|
550
|
+
children: [/* @__PURE__ */ v(S, {
|
|
551
|
+
htmlFor: "assetDiscovery",
|
|
552
|
+
children: "Field discovery"
|
|
553
|
+
}), /* @__PURE__ */ v(x, {
|
|
554
|
+
id: "assetDiscovery",
|
|
555
|
+
type: "date",
|
|
556
|
+
value: G.discoveryAt,
|
|
557
|
+
onChange: (e) => K({
|
|
558
|
+
...G,
|
|
559
|
+
discoveryAt: e.target.value
|
|
560
|
+
})
|
|
561
|
+
})]
|
|
562
|
+
}), /* @__PURE__ */ y("div", {
|
|
563
|
+
className: "grid gap-1.5",
|
|
564
|
+
children: [/* @__PURE__ */ v(S, {
|
|
565
|
+
htmlFor: "assetArea",
|
|
566
|
+
children: "Area (km²)"
|
|
567
|
+
}), /* @__PURE__ */ v(x, {
|
|
568
|
+
id: "assetArea",
|
|
569
|
+
type: "number",
|
|
570
|
+
min: "0",
|
|
571
|
+
step: "any",
|
|
572
|
+
value: G.area,
|
|
573
|
+
onChange: (e) => K({
|
|
574
|
+
...G,
|
|
575
|
+
area: e.target.value
|
|
576
|
+
}),
|
|
577
|
+
placeholder: "2600"
|
|
578
|
+
})]
|
|
579
|
+
})]
|
|
580
|
+
}),
|
|
581
|
+
/* @__PURE__ */ y("div", {
|
|
582
|
+
className: "grid gap-2 sm:grid-cols-2",
|
|
583
|
+
children: [/* @__PURE__ */ y("div", {
|
|
584
|
+
className: "grid gap-1.5",
|
|
585
|
+
children: [/* @__PURE__ */ v(S, {
|
|
586
|
+
htmlFor: "assetReservoirType",
|
|
587
|
+
children: "Reservoir type"
|
|
588
|
+
}), /* @__PURE__ */ v(x, {
|
|
589
|
+
id: "assetReservoirType",
|
|
590
|
+
value: G.reservoirType,
|
|
591
|
+
onChange: (e) => K({
|
|
592
|
+
...G,
|
|
593
|
+
reservoirType: e.target.value
|
|
594
|
+
}),
|
|
595
|
+
placeholder: "Carbonate"
|
|
596
|
+
})]
|
|
597
|
+
}), /* @__PURE__ */ y("div", {
|
|
598
|
+
className: "grid gap-1.5",
|
|
599
|
+
children: [/* @__PURE__ */ v(S, {
|
|
600
|
+
htmlFor: "assetWaterDepth",
|
|
601
|
+
children: "Water depth (m)"
|
|
602
|
+
}), /* @__PURE__ */ v(x, {
|
|
603
|
+
id: "assetWaterDepth",
|
|
604
|
+
type: "number",
|
|
605
|
+
min: "0",
|
|
606
|
+
step: "any",
|
|
607
|
+
value: G.waterDepth,
|
|
608
|
+
onChange: (e) => K({
|
|
609
|
+
...G,
|
|
610
|
+
waterDepth: e.target.value
|
|
611
|
+
}),
|
|
612
|
+
placeholder: "Leave blank for onshore"
|
|
613
|
+
})]
|
|
614
|
+
})]
|
|
615
|
+
}),
|
|
616
|
+
q && /* @__PURE__ */ v("p", {
|
|
539
617
|
className: "text-sm text-status-error-text",
|
|
540
|
-
children:
|
|
618
|
+
children: q
|
|
541
619
|
})
|
|
542
620
|
]
|
|
543
621
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ y(pe, { children: [/* @__PURE__ */ v(b, {
|
|
545
623
|
variant: "outline",
|
|
546
624
|
type: "button",
|
|
547
625
|
onClick: () => {
|
|
548
|
-
|
|
626
|
+
W(!1), $();
|
|
549
627
|
},
|
|
550
628
|
children: "Cancel"
|
|
551
|
-
}), /* @__PURE__ */
|
|
629
|
+
}), /* @__PURE__ */ v(b, {
|
|
552
630
|
type: "submit",
|
|
553
631
|
form: "createAssetForm",
|
|
554
632
|
disabled: Z.isPending,
|