@burdenoff/microfe-theglobalfuel 2026.1101.1 → 2026.1102.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/theglobalfuel/components/AllocateProductionSheet.d.ts +13 -0
- package/dist/theglobalfuel/components/AllocateProductionSheet.d.ts.map +1 -0
- package/dist/theglobalfuel/components/AllocateProductionSheet.js +274 -0
- package/dist/theglobalfuel/components/AllocateProductionSheet.js.map +1 -0
- package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -1
- package/dist/theglobalfuel/components/StatusBadge.js +1 -0
- package/dist/theglobalfuel/components/StatusBadge.js.map +1 -1
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +32 -1
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -1
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +190 -99
- package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -1
- package/dist/theglobalfuel/pages/production/AllocationsPanel.d.ts +12 -0
- package/dist/theglobalfuel/pages/production/AllocationsPanel.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/production/AllocationsPanel.js +358 -0
- package/dist/theglobalfuel/pages/production/AllocationsPanel.js.map +1 -0
- package/dist/theglobalfuel/pages/production/NetPositionPanel.d.ts +12 -0
- package/dist/theglobalfuel/pages/production/NetPositionPanel.d.ts.map +1 -0
- package/dist/theglobalfuel/pages/production/NetPositionPanel.js +166 -0
- package/dist/theglobalfuel/pages/production/NetPositionPanel.js.map +1 -0
- package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +9 -5
- package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -1
- package/dist/theglobalfuel/pages/production/ProductionPage.js +165 -115
- package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
- package/dist/theglobalfuel/types/index.d.ts +83 -0
- package/dist/theglobalfuel/types/index.d.ts.map +1 -1
- package/dist/theglobalfuel/utils/allocationForm.d.ts +64 -0
- package/dist/theglobalfuel/utils/allocationForm.d.ts.map +1 -0
- package/dist/theglobalfuel/utils/allocationForm.js +125 -0
- package/dist/theglobalfuel/utils/allocationForm.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TheProductionRecord } from '../types';
|
|
2
|
+
|
|
3
|
+
interface AllocateProductionSheetProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
/** The measured record being allocated; the sheet renders nothing without one. */
|
|
7
|
+
record: TheProductionRecord | null;
|
|
8
|
+
/** Display name of the record's measurement asset. */
|
|
9
|
+
measurementAssetName?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function AllocateProductionSheet({ open, onOpenChange, record, measurementAssetName, }: AllocateProductionSheetProps): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=AllocateProductionSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AllocateProductionSheet.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/AllocateProductionSheet.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA8BH,OAAO,KAAK,EAAuB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEzE,UAAU,4BAA4B;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,kFAAkF;IAClF,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,sDAAsD;IACtD,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,YAAY,EACZ,MAAM,EACN,oBAAoB,GACrB,EAAE,4BAA4B,+BAiS9B"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { cn as e } from "../utils/cn.js";
|
|
2
|
+
import { formatDate as t, formatNumber as n, formatVolume as r } from "../utils/formatters.js";
|
|
3
|
+
import { useTheAllAssets as i, useTheCreateProductionAllocation as a } from "../hooks/useTheGlobalFuelApi.js";
|
|
4
|
+
import { useNotify as ee } from "../hooks/useNotify.js";
|
|
5
|
+
import "../hooks/index.js";
|
|
6
|
+
import { buildAllocationInput as o, newAllocationRow as s, previewAllocation as c } from "../utils/allocationForm.js";
|
|
7
|
+
import { useMemo as l, useState as u } from "react";
|
|
8
|
+
import { Plus as d, Trash2 as te } from "lucide-react";
|
|
9
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
10
|
+
import { Button as m, Input as h, Label as g, ResponsiveDialog as _, ResponsiveDialogContent as v, ResponsiveDialogDescription as y, ResponsiveDialogFooter as b, ResponsiveDialogHeader as x, ResponsiveDialogTitle as S, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as O } from "@burdenoff/fe-libs/ui";
|
|
11
|
+
//#region src/theglobalfuel/components/AllocateProductionSheet.tsx
|
|
12
|
+
function k({ open: k, onOpenChange: A, record: j, measurementAssetName: M }) {
|
|
13
|
+
let N = ee(), P = i({ enabled: k }), F = a(), I = l(() => [...P.data?.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [P.data]), L = l(() => {
|
|
14
|
+
let e = /* @__PURE__ */ new Map();
|
|
15
|
+
for (let t of I) e.set(t.id, t.workingInterestPct);
|
|
16
|
+
return e;
|
|
17
|
+
}, [I]), [R, z] = u("MANUAL"), [B, V] = u(() => [s()]), [H, U] = u(""), [W, G] = u(null), K = k && j ? `open:${j.id}` : "closed", [q, J] = u(K);
|
|
18
|
+
K !== q && (J(K), k && j && (z("MANUAL"), V([s()]), U(""), G(null)));
|
|
19
|
+
let Y = j?.volume ?? 0, X = j?.unit ?? "BARRELS", Z = c(R, Y, B, (e) => L.get(e) ?? 100), Q = (e, t) => V((n) => n.map((n) => n.key === e ? {
|
|
20
|
+
...n,
|
|
21
|
+
...t
|
|
22
|
+
} : n)), ne = (e) => V((t) => t.length > 1 ? t.filter((t) => t.key !== e) : t), $ = () => A(!1), re = async () => {
|
|
23
|
+
if (!j) return;
|
|
24
|
+
let e = o({
|
|
25
|
+
productionRecordId: j.id,
|
|
26
|
+
method: R,
|
|
27
|
+
measuredVolume: Y,
|
|
28
|
+
rows: B,
|
|
29
|
+
notes: H
|
|
30
|
+
});
|
|
31
|
+
if (!e.ok) {
|
|
32
|
+
G(e.error), N.error(e.error);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
G(null);
|
|
36
|
+
try {
|
|
37
|
+
await F.mutateAsync(e.input), N.success("Allocation drafted — approve it to lock the split"), $();
|
|
38
|
+
} catch (e) {
|
|
39
|
+
G(e instanceof Error ? e.message : "Failed to allocate production."), N.fromError(e);
|
|
40
|
+
}
|
|
41
|
+
}, ie = R === "PRO_RATA" ? "Factor" : "Volume";
|
|
42
|
+
return /* @__PURE__ */ f(_, {
|
|
43
|
+
open: k && !!j,
|
|
44
|
+
onOpenChange: A,
|
|
45
|
+
children: /* @__PURE__ */ p(v, {
|
|
46
|
+
"data-testid": "allocate-production-sheet",
|
|
47
|
+
className: "md:max-w-3xl",
|
|
48
|
+
children: [/* @__PURE__ */ p(x, { children: [/* @__PURE__ */ f(S, { children: "Allocate production" }), /* @__PURE__ */ f(y, { children: j ? `${r(j.volume, j.unit)} measured at ${M ?? "this asset"}, ${t(j.periodStart)} – ${t(j.periodEnd)}.` : "" })] }), /* @__PURE__ */ p("form", {
|
|
49
|
+
onSubmit: (e) => {
|
|
50
|
+
e.preventDefault(), re();
|
|
51
|
+
},
|
|
52
|
+
children: [/* @__PURE__ */ p("div", {
|
|
53
|
+
className: "grid gap-4 py-2",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ p("div", {
|
|
56
|
+
className: "grid gap-1.5",
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ f(g, {
|
|
59
|
+
htmlFor: "alMethod",
|
|
60
|
+
children: "Method"
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ p(C, {
|
|
63
|
+
value: R,
|
|
64
|
+
onValueChange: (e) => z(e),
|
|
65
|
+
children: [/* @__PURE__ */ f(E, {
|
|
66
|
+
id: "alMethod",
|
|
67
|
+
className: "h-11 md:h-10 md:w-72",
|
|
68
|
+
children: /* @__PURE__ */ f(D, {})
|
|
69
|
+
}), /* @__PURE__ */ p(w, { children: [/* @__PURE__ */ f(T, {
|
|
70
|
+
value: "MANUAL",
|
|
71
|
+
children: "Manual — enter each asset’s volume"
|
|
72
|
+
}), /* @__PURE__ */ f(T, {
|
|
73
|
+
value: "PRO_RATA",
|
|
74
|
+
children: "Pro rata — split by factor"
|
|
75
|
+
})] })]
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ f("p", {
|
|
78
|
+
className: "text-xs text-text-tertiary",
|
|
79
|
+
children: R === "PRO_RATA" ? "Factors can be well-test rates, theoretical volumes or metered shares. The measured volume is split in proportion." : "The volumes must add up to the measured volume."
|
|
80
|
+
})
|
|
81
|
+
]
|
|
82
|
+
}),
|
|
83
|
+
/* @__PURE__ */ p("div", {
|
|
84
|
+
className: "grid gap-3",
|
|
85
|
+
children: [
|
|
86
|
+
P.data?.truncated && /* @__PURE__ */ p("p", {
|
|
87
|
+
className: "text-xs text-status-warning-text",
|
|
88
|
+
children: [
|
|
89
|
+
"Showing the first ",
|
|
90
|
+
I.length,
|
|
91
|
+
" assets of this workspace."
|
|
92
|
+
]
|
|
93
|
+
}),
|
|
94
|
+
B.map((e, t) => {
|
|
95
|
+
let i = Z.rows[t], a = L.get(e.assetId);
|
|
96
|
+
return /* @__PURE__ */ p("div", {
|
|
97
|
+
className: "grid gap-2 rounded-lg border border-border-seam p-3",
|
|
98
|
+
"data-testid": "allocation-row",
|
|
99
|
+
children: [/* @__PURE__ */ p("div", {
|
|
100
|
+
className: "grid grid-cols-1 gap-2 md:grid-cols-[minmax(0,2fr)_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)_auto]",
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ p("div", {
|
|
103
|
+
className: "grid gap-1",
|
|
104
|
+
children: [/* @__PURE__ */ f(g, {
|
|
105
|
+
htmlFor: `${e.key}-asset`,
|
|
106
|
+
className: "text-xs",
|
|
107
|
+
children: "Contributing asset"
|
|
108
|
+
}), /* @__PURE__ */ p(C, {
|
|
109
|
+
value: e.assetId,
|
|
110
|
+
onValueChange: (t) => Q(e.key, { assetId: t }),
|
|
111
|
+
children: [/* @__PURE__ */ f(E, {
|
|
112
|
+
id: `${e.key}-asset`,
|
|
113
|
+
className: "h-10",
|
|
114
|
+
children: /* @__PURE__ */ f(D, { placeholder: "Select an asset" })
|
|
115
|
+
}), /* @__PURE__ */ f(w, { children: I.map((e) => /* @__PURE__ */ f(T, {
|
|
116
|
+
value: e.id,
|
|
117
|
+
children: e.name
|
|
118
|
+
}, e.id)) })]
|
|
119
|
+
})]
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ p("div", {
|
|
122
|
+
className: "grid gap-1",
|
|
123
|
+
children: [/* @__PURE__ */ f(g, {
|
|
124
|
+
htmlFor: `${e.key}-amount`,
|
|
125
|
+
className: "text-xs",
|
|
126
|
+
children: ie
|
|
127
|
+
}), /* @__PURE__ */ f(h, {
|
|
128
|
+
id: `${e.key}-amount`,
|
|
129
|
+
type: "number",
|
|
130
|
+
inputMode: "decimal",
|
|
131
|
+
min: "0",
|
|
132
|
+
step: "any",
|
|
133
|
+
className: "h-10 tabular-nums",
|
|
134
|
+
value: e.amount,
|
|
135
|
+
onChange: (t) => Q(e.key, { amount: t.target.value })
|
|
136
|
+
})]
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ p("div", {
|
|
139
|
+
className: "grid gap-1",
|
|
140
|
+
children: [/* @__PURE__ */ f(g, {
|
|
141
|
+
htmlFor: `${e.key}-wi`,
|
|
142
|
+
className: "text-xs",
|
|
143
|
+
children: "Working interest %"
|
|
144
|
+
}), /* @__PURE__ */ f(h, {
|
|
145
|
+
id: `${e.key}-wi`,
|
|
146
|
+
type: "number",
|
|
147
|
+
inputMode: "decimal",
|
|
148
|
+
min: "0",
|
|
149
|
+
max: "100",
|
|
150
|
+
step: "any",
|
|
151
|
+
className: "h-10 tabular-nums",
|
|
152
|
+
placeholder: a == null ? "100" : n(a),
|
|
153
|
+
value: e.workingInterestPct,
|
|
154
|
+
onChange: (t) => Q(e.key, { workingInterestPct: t.target.value })
|
|
155
|
+
})]
|
|
156
|
+
}),
|
|
157
|
+
/* @__PURE__ */ p("div", {
|
|
158
|
+
className: "grid gap-1",
|
|
159
|
+
children: [/* @__PURE__ */ f(g, {
|
|
160
|
+
htmlFor: `${e.key}-royalty`,
|
|
161
|
+
className: "text-xs",
|
|
162
|
+
children: "Royalty %"
|
|
163
|
+
}), /* @__PURE__ */ f(h, {
|
|
164
|
+
id: `${e.key}-royalty`,
|
|
165
|
+
type: "number",
|
|
166
|
+
inputMode: "decimal",
|
|
167
|
+
min: "0",
|
|
168
|
+
max: "100",
|
|
169
|
+
step: "any",
|
|
170
|
+
className: "h-10 tabular-nums",
|
|
171
|
+
placeholder: "0",
|
|
172
|
+
value: e.royaltyPct,
|
|
173
|
+
onChange: (t) => Q(e.key, { royaltyPct: t.target.value })
|
|
174
|
+
})]
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ f("div", {
|
|
177
|
+
className: "flex items-end",
|
|
178
|
+
children: /* @__PURE__ */ f(m, {
|
|
179
|
+
type: "button",
|
|
180
|
+
variant: "ghost",
|
|
181
|
+
size: "icon",
|
|
182
|
+
"aria-label": `Remove row ${t + 1}`,
|
|
183
|
+
disabled: B.length === 1,
|
|
184
|
+
onClick: () => ne(e.key),
|
|
185
|
+
children: /* @__PURE__ */ f(te, { className: "h-4 w-4" })
|
|
186
|
+
})
|
|
187
|
+
})
|
|
188
|
+
]
|
|
189
|
+
}), i && /* @__PURE__ */ p("p", {
|
|
190
|
+
className: "text-xs tabular-nums text-text-secondary",
|
|
191
|
+
children: [
|
|
192
|
+
"Gross ",
|
|
193
|
+
r(i.allocatedVolume, X),
|
|
194
|
+
" (",
|
|
195
|
+
n(i.sharePct, { maximumFractionDigits: 2 }),
|
|
196
|
+
"%) · Net WI",
|
|
197
|
+
" ",
|
|
198
|
+
r(i.netWorkingInterestVolume, X),
|
|
199
|
+
" · Royalty",
|
|
200
|
+
" ",
|
|
201
|
+
r(i.royaltyVolume, X),
|
|
202
|
+
" · Net revenue",
|
|
203
|
+
" ",
|
|
204
|
+
r(i.netRevenueVolume, X)
|
|
205
|
+
]
|
|
206
|
+
})]
|
|
207
|
+
}, e.key);
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ f("div", { children: /* @__PURE__ */ p(m, {
|
|
210
|
+
type: "button",
|
|
211
|
+
variant: "outline",
|
|
212
|
+
size: "sm",
|
|
213
|
+
onClick: () => V((e) => [...e, s()]),
|
|
214
|
+
children: [/* @__PURE__ */ f(d, { className: "mr-1.5 h-4 w-4" }), " Add asset"]
|
|
215
|
+
}) })
|
|
216
|
+
]
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ p("div", {
|
|
219
|
+
className: e("rounded-lg px-3 py-2 text-sm tabular-nums", Z.balanced ? "bg-status-success-bg-subtle text-status-success-text" : "bg-status-warning-bg-subtle text-status-warning-text"),
|
|
220
|
+
"data-testid": "allocation-balance",
|
|
221
|
+
children: [
|
|
222
|
+
"Allocated ",
|
|
223
|
+
r(Z.allocatedTotal, X),
|
|
224
|
+
" of",
|
|
225
|
+
" ",
|
|
226
|
+
r(Y, X),
|
|
227
|
+
R === "MANUAL" && !Z.balanced ? ` — ${r(Math.abs(Z.difference), X)} ${Z.difference > 0 ? "left to allocate" : "over-allocated"}` : "",
|
|
228
|
+
" · ",
|
|
229
|
+
"Net revenue ",
|
|
230
|
+
r(Z.netRevenueTotal, X)
|
|
231
|
+
]
|
|
232
|
+
}),
|
|
233
|
+
/* @__PURE__ */ p("div", {
|
|
234
|
+
className: "grid gap-1.5",
|
|
235
|
+
children: [/* @__PURE__ */ f(g, {
|
|
236
|
+
htmlFor: "alNotes",
|
|
237
|
+
children: "Notes"
|
|
238
|
+
}), /* @__PURE__ */ f(O, {
|
|
239
|
+
id: "alNotes",
|
|
240
|
+
rows: 2,
|
|
241
|
+
value: H,
|
|
242
|
+
onChange: (e) => U(e.target.value),
|
|
243
|
+
placeholder: "Basis for the split (well tests, meter proving, agreements)."
|
|
244
|
+
})]
|
|
245
|
+
}),
|
|
246
|
+
W && /* @__PURE__ */ f("p", {
|
|
247
|
+
role: "alert",
|
|
248
|
+
className: "text-sm text-status-error-text",
|
|
249
|
+
children: W
|
|
250
|
+
})
|
|
251
|
+
]
|
|
252
|
+
}), /* @__PURE__ */ p(b, {
|
|
253
|
+
className: "max-md:flex-col-reverse max-md:gap-2",
|
|
254
|
+
children: [/* @__PURE__ */ f(m, {
|
|
255
|
+
type: "button",
|
|
256
|
+
variant: "outline",
|
|
257
|
+
className: "max-md:h-11",
|
|
258
|
+
onClick: $,
|
|
259
|
+
children: "Cancel"
|
|
260
|
+
}), /* @__PURE__ */ f(m, {
|
|
261
|
+
type: "submit",
|
|
262
|
+
className: "max-md:h-11",
|
|
263
|
+
disabled: F.isPending,
|
|
264
|
+
children: F.isPending ? "Saving…" : "Save draft allocation"
|
|
265
|
+
})]
|
|
266
|
+
})]
|
|
267
|
+
})]
|
|
268
|
+
})
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
//#endregion
|
|
272
|
+
export { k as AllocateProductionSheet };
|
|
273
|
+
|
|
274
|
+
//# sourceMappingURL=AllocateProductionSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AllocateProductionSheet.js","names":[],"sources":["../../../src/theglobalfuel/components/AllocateProductionSheet.tsx"],"sourcesContent":["/**\n * AllocateProductionSheet — split one measured production record across the\n * assets that contributed to it (BOFF-4180).\n * @module theglobalfuel/components\n *\n * MANUAL: the operator enters each asset's volume; the rows must add up to the\n * measured volume. PRO_RATA: the operator enters a factor per asset (well-test\n * rate, theoretical volume, metered share) and the measured volume is split in\n * proportion. Each row can override the asset's working interest and add a\n * royalty burden; the live preview shows the split and the net volumes before\n * anything is saved. Writes `theCreateProductionAllocation` (creates a DRAFT).\n */\n\nimport { useMemo, useState } from 'react';\nimport { Plus, Trash2 } from 'lucide-react';\nimport {\n Button,\n Input,\n Label,\n Textarea,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogDescription,\n ResponsiveDialogFooter,\n} from '@burdenoff/fe-libs/ui';\nimport { useNotify, useTheAllAssets, useTheCreateProductionAllocation } from '../hooks';\nimport { cn } from '../utils/cn';\nimport { formatDate, formatNumber, formatVolume } from '../utils/formatters';\nimport {\n buildAllocationInput,\n newAllocationRow,\n previewAllocation,\n type AllocationRowState,\n} from '../utils/allocationForm';\nimport type { TheAllocationMethod, TheProductionRecord } from '../types';\n\ninterface AllocateProductionSheetProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n /** The measured record being allocated; the sheet renders nothing without one. */\n record: TheProductionRecord | null;\n /** Display name of the record's measurement asset. */\n measurementAssetName?: string;\n}\n\nexport function AllocateProductionSheet({\n open,\n onOpenChange,\n record,\n measurementAssetName,\n}: AllocateProductionSheetProps) {\n const notify = useNotify();\n // Every workspace asset, not just the first page: any of them can contribute.\n const assetsQuery = useTheAllAssets({ enabled: open });\n const createAllocation = useTheCreateProductionAllocation();\n const assets = useMemo(\n () => [...(assetsQuery.data?.items ?? [])].sort((a, b) => a.name.localeCompare(b.name)),\n [assetsQuery.data]\n );\n const workingInterestByAsset = useMemo(() => {\n const map = new Map<string, number>();\n for (const a of assets) map.set(a.id, a.workingInterestPct);\n return map;\n }, [assets]);\n\n const [method, setMethod] = useState<TheAllocationMethod>('MANUAL');\n const [rows, setRows] = useState<AllocationRowState[]>(() => [newAllocationRow()]);\n const [notes, setNotes] = useState('');\n const [formError, setFormError] = useState<string | null>(null);\n\n // Start from a clean form every time the sheet opens for a record (\"adjust\n // state on prop change\" while rendering, so the first frame is already fresh).\n const seedKey = open && record ? `open:${record.id}` : 'closed';\n const [prevSeedKey, setPrevSeedKey] = useState(seedKey);\n if (seedKey !== prevSeedKey) {\n setPrevSeedKey(seedKey);\n if (open && record) {\n setMethod('MANUAL');\n setRows([newAllocationRow()]);\n setNotes('');\n setFormError(null);\n }\n }\n\n const measured = record?.volume ?? 0;\n const unit = record?.unit ?? 'BARRELS';\n const preview = previewAllocation(\n method,\n measured,\n rows,\n (assetId) => workingInterestByAsset.get(assetId) ?? 100\n );\n\n const updateRow = (key: string, patch: Partial<AllocationRowState>) =>\n setRows((current) => current.map((r) => (r.key === key ? { ...r, ...patch } : r)));\n const removeRow = (key: string) =>\n setRows((current) => (current.length > 1 ? current.filter((r) => r.key !== key) : current));\n\n const close = () => onOpenChange(false);\n\n const handleSubmit = async () => {\n if (!record) return;\n const result = buildAllocationInput({\n productionRecordId: record.id,\n method,\n measuredVolume: measured,\n rows,\n notes,\n });\n if (!result.ok) {\n setFormError(result.error);\n notify.error(result.error);\n return;\n }\n setFormError(null);\n try {\n await createAllocation.mutateAsync(result.input);\n notify.success('Allocation drafted — approve it to lock the split');\n close();\n } catch (err) {\n setFormError(err instanceof Error ? err.message : 'Failed to allocate production.');\n notify.fromError(err);\n }\n };\n\n const amountLabel = method === 'PRO_RATA' ? 'Factor' : 'Volume';\n\n return (\n <ResponsiveDialog open={open && Boolean(record)} onOpenChange={onOpenChange}>\n <ResponsiveDialogContent data-testid=\"allocate-production-sheet\" className=\"md:max-w-3xl\">\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle>Allocate production</ResponsiveDialogTitle>\n <ResponsiveDialogDescription>\n {record\n ? `${formatVolume(record.volume, record.unit)} measured at ${\n measurementAssetName ?? 'this asset'\n }, ${formatDate(record.periodStart)} – ${formatDate(record.periodEnd)}.`\n : ''}\n </ResponsiveDialogDescription>\n </ResponsiveDialogHeader>\n\n <form\n onSubmit={(e) => {\n e.preventDefault();\n void handleSubmit();\n }}\n >\n <div className=\"grid gap-4 py-2\">\n <div className=\"grid gap-1.5\">\n <Label htmlFor=\"alMethod\">Method</Label>\n <Select value={method} onValueChange={(v) => setMethod(v as TheAllocationMethod)}>\n <SelectTrigger id=\"alMethod\" className=\"h-11 md:h-10 md:w-72\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"MANUAL\">Manual — enter each asset’s volume</SelectItem>\n <SelectItem value=\"PRO_RATA\">Pro rata — split by factor</SelectItem>\n </SelectContent>\n </Select>\n <p className=\"text-xs text-text-tertiary\">\n {method === 'PRO_RATA'\n ? 'Factors can be well-test rates, theoretical volumes or metered shares. The measured volume is split in proportion.'\n : 'The volumes must add up to the measured volume.'}\n </p>\n </div>\n\n <div className=\"grid gap-3\">\n {assetsQuery.data?.truncated && (\n <p className=\"text-xs text-status-warning-text\">\n Showing the first {assets.length} assets of this workspace.\n </p>\n )}\n {rows.map((row, i) => {\n const p = preview.rows[i];\n const assetWi = workingInterestByAsset.get(row.assetId);\n return (\n <div\n key={row.key}\n className=\"grid gap-2 rounded-lg border border-border-seam p-3\"\n data-testid=\"allocation-row\"\n >\n <div className=\"grid grid-cols-1 gap-2 md:grid-cols-[minmax(0,2fr)_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)_auto]\">\n <div className=\"grid gap-1\">\n <Label htmlFor={`${row.key}-asset`} className=\"text-xs\">\n Contributing asset\n </Label>\n <Select\n value={row.assetId}\n onValueChange={(v) => updateRow(row.key, { assetId: v })}\n >\n <SelectTrigger id={`${row.key}-asset`} className=\"h-10\">\n <SelectValue placeholder=\"Select an asset\" />\n </SelectTrigger>\n <SelectContent>\n {assets.map((a) => (\n <SelectItem key={a.id} value={a.id}>\n {a.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"grid gap-1\">\n <Label htmlFor={`${row.key}-amount`} className=\"text-xs\">\n {amountLabel}\n </Label>\n <Input\n id={`${row.key}-amount`}\n type=\"number\"\n inputMode=\"decimal\"\n min=\"0\"\n step=\"any\"\n className=\"h-10 tabular-nums\"\n value={row.amount}\n onChange={(e) => updateRow(row.key, { amount: e.target.value })}\n />\n </div>\n <div className=\"grid gap-1\">\n <Label htmlFor={`${row.key}-wi`} className=\"text-xs\">\n Working interest %\n </Label>\n <Input\n id={`${row.key}-wi`}\n type=\"number\"\n inputMode=\"decimal\"\n min=\"0\"\n max=\"100\"\n step=\"any\"\n className=\"h-10 tabular-nums\"\n placeholder={assetWi != null ? formatNumber(assetWi) : '100'}\n value={row.workingInterestPct}\n onChange={(e) =>\n updateRow(row.key, { workingInterestPct: e.target.value })\n }\n />\n </div>\n <div className=\"grid gap-1\">\n <Label htmlFor={`${row.key}-royalty`} className=\"text-xs\">\n Royalty %\n </Label>\n <Input\n id={`${row.key}-royalty`}\n type=\"number\"\n inputMode=\"decimal\"\n min=\"0\"\n max=\"100\"\n step=\"any\"\n className=\"h-10 tabular-nums\"\n placeholder=\"0\"\n value={row.royaltyPct}\n onChange={(e) => updateRow(row.key, { royaltyPct: e.target.value })}\n />\n </div>\n <div className=\"flex items-end\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n aria-label={`Remove row ${i + 1}`}\n disabled={rows.length === 1}\n onClick={() => removeRow(row.key)}\n >\n <Trash2 className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n {p && (\n <p className=\"text-xs tabular-nums text-text-secondary\">\n Gross {formatVolume(p.allocatedVolume, unit)} (\n {formatNumber(p.sharePct, { maximumFractionDigits: 2 })}%) · Net WI{' '}\n {formatVolume(p.netWorkingInterestVolume, unit)} · Royalty{' '}\n {formatVolume(p.royaltyVolume, unit)} · Net revenue{' '}\n {formatVolume(p.netRevenueVolume, unit)}\n </p>\n )}\n </div>\n );\n })}\n <div>\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setRows((current) => [...current, newAllocationRow()])}\n >\n <Plus className=\"mr-1.5 h-4 w-4\" /> Add asset\n </Button>\n </div>\n </div>\n\n <div\n className={cn(\n 'rounded-lg px-3 py-2 text-sm tabular-nums',\n preview.balanced\n ? 'bg-status-success-bg-subtle text-status-success-text'\n : 'bg-status-warning-bg-subtle text-status-warning-text'\n )}\n data-testid=\"allocation-balance\"\n >\n Allocated {formatVolume(preview.allocatedTotal, unit)} of{' '}\n {formatVolume(measured, unit)}\n {method === 'MANUAL' && !preview.balanced\n ? ` — ${formatVolume(Math.abs(preview.difference), unit)} ${\n preview.difference > 0 ? 'left to allocate' : 'over-allocated'\n }`\n : ''}\n {' · '}Net revenue {formatVolume(preview.netRevenueTotal, unit)}\n </div>\n\n <div className=\"grid gap-1.5\">\n <Label htmlFor=\"alNotes\">Notes</Label>\n <Textarea\n id=\"alNotes\"\n rows={2}\n value={notes}\n onChange={(e) => setNotes(e.target.value)}\n placeholder=\"Basis for the split (well tests, meter proving, agreements).\"\n />\n </div>\n\n {formError && (\n <p role=\"alert\" className=\"text-sm text-status-error-text\">\n {formError}\n </p>\n )}\n </div>\n\n <ResponsiveDialogFooter className=\"max-md:flex-col-reverse max-md:gap-2\">\n <Button type=\"button\" variant=\"outline\" className=\"max-md:h-11\" onClick={close}>\n Cancel\n </Button>\n <Button type=\"submit\" className=\"max-md:h-11\" disabled={createAllocation.isPending}>\n {createAllocation.isPending ? 'Saving…' : 'Save draft allocation'}\n </Button>\n </ResponsiveDialogFooter>\n </form>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n"],"mappings":";;;;;;;;;;;AAoDA,SAAgB,EAAwB,EACtC,SACA,iBACA,WACA,2BAC+B;CAC/B,IAAM,IAAS,IAAW,EAEpB,IAAc,EAAgB,EAAE,SAAS,GAAM,CAAC,EAChD,IAAmB,GAAkC,EACrD,IAAS,QACP,CAAC,GAAI,EAAY,M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;GAQG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"StatusBadge.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/components/StatusBadge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAIhC,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA4GD,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAsB5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/theglobalfuel/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module theglobalfuel/components\n *\n * A colored badge for TheGlobalFuel domain statuses (asset lifecycle, contract\n * lifecycle & side, shipment status, inventory status, compliance status,\n * emission scope, reserve category, pricing basis) with semantic color mapping.\n * Accepts the raw server enum value.\n */\n\nimport type { FC } from 'react';\nimport { cn } from '../utils/cn';\nimport { formatEnumLabel } from '../utils/formatters';\n\ninterface StatusBadgeProps {\n status: string;\n className?: string;\n}\n\ntype BadgeVariant = 'success' | 'warning' | 'destructive' | 'secondary' | 'info' | 'outline';\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-status-success-bg-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n destructive: 'bg-status-error-bg-subtle text-status-error-text',\n secondary: 'bg-bg-sunken text-text-secondary',\n info: 'bg-[var(--color-accent-soft)] text-text-primary',\n outline: 'border border-border-seam text-text-primary',\n};\n\n// Statuses that represent a \"live\" / in-progress condition get a subtle,\n// opacity-only glow pulse (reduced-motion safe via motion-safe:).\nconst liveStatuses = new Set(['PRODUCING', 'ACTIVE', 'IN_TRANSIT', 'LOADING']);\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Asset lifecycle\n EXPLORATION: 'secondary',\n APPRAISAL: 'info',\n DEVELOPMENT: 'warning',\n PRODUCING: 'success',\n SUSPENDED: 'warning',\n DECOMMISSIONING: 'warning',\n RETIRED: 'outline',\n\n // Offtake-contract lifecycle\n DRAFT: 'secondary',\n NEGOTIATION: 'info',\n SIGNED: 'info',\n ACTIVE: 'success',\n COMPLETED: 'success',\n TERMINATED: 'destructive',\n\n // Contract side\n BUY: 'info',\n SELL: 'secondary',\n\n // Pricing basis\n FIXED: 'outline',\n INDEX_LINKED: 'outline',\n FORMULA: 'outline',\n SPOT: 'secondary',\n\n // Shipment status\n SCHEDULED: 'secondary',\n LOADING: 'info',\n IN_TRANSIT: 'warning',\n DELIVERED: 'success',\n CANCELLED: 'destructive',\n\n // Inventory status\n AVAILABLE: 'success',\n RESERVED: 'info',\n CONSUMED: 'outline',\n WRITTEN_OFF: 'destructive',\n\n // Compliance status\n PENDING: 'secondary',\n SUBMITTED: 'info',\n APPROVED: 'success',\n REJECTED: 'destructive',\n EXPIRED: 'warning',\n REVOKED: 'destructive',\n\n // Emission scope\n SCOPE_1: 'destructive',\n SCOPE_2: 'warning',\n SCOPE_3: 'info',\n\n // Reserve category\n PROVED: 'success',\n PROBABLE: 'info',\n POSSIBLE: 'warning',\n CONTINGENT: 'secondary',\n PROSPECTIVE: 'outline',\n\n // Safety incident category\n NEAR_MISS: 'info',\n INJURY: 'destructive',\n SPILL: 'warning',\n RELEASE: 'warning',\n EQUIPMENT_FAILURE: 'secondary',\n\n // Safety incident severity\n LOW: 'secondary',\n MEDIUM: 'warning',\n HIGH: 'destructive',\n CRITICAL: 'destructive',\n\n // Safety incident investigation lifecycle\n REPORTED: 'secondary',\n INVESTIGATING: 'info',\n ROOT_CAUSE_IDENTIFIED: 'warning',\n CORRECTIVE_ACTION: 'warning',\n CLOSED: 'success',\n\n // Corrective/preventive action lifecycle\n OPEN: 'warning',\n IN_PROGRESS: 'info',\n VERIFIED: 'success',\n\n // ESG disclosure status (DRAFT is shared with the contract lifecycle above)\n FINAL: 'success',\n};\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ status, className }) => {\n const key = status.toUpperCase();\n const variant = statusVariantMap[key] ?? 'secondary';\n const isLive = liveStatuses.has(key);\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',\n variantStyles[variant],\n className\n )}\n >\n {isLive && (\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 rounded-full bg-current motion-safe:animate-vc-glow-pulse\"\n />\n )}\n {formatEnumLabel(status)}\n </span>\n );\n};\n"],"mappings":";;;;AAqBA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACV,EAIK,IAAe,IAAI,IAAI;CAAC;CAAa;CAAU;CAAc;CAAU,CAAC,EAExE,IAAiD;CAErD,aAAa;CACb,WAAW;CACX,aAAa;CACb,WAAW;CACX,WAAW;CACX,iBAAiB;CACjB,SAAS;CAGT,OAAO;CACP,aAAa;CACb,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,YAAY;CAGZ,KAAK;CACL,MAAM;CAGN,OAAO;CACP,cAAc;CACd,SAAS;CACT,MAAM;CAGN,WAAW;CACX,SAAS;CACT,YAAY;CACZ,WAAW;CACX,WAAW;CAGX,WAAW;CACX,UAAU;CACV,UAAU;CACV,aAAa;CAGb,SAAS;CACT,WAAW;CACX,UAAU;CACV,UAAU;CACV,SAAS;CACT,SAAS;CAGT,SAAS;CACT,SAAS;CACT,SAAS;CAGT,QAAQ;CACR,UAAU;CACV,UAAU;CACV,YAAY;CACZ,aAAa;CAGb,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,mBAAmB;CAGnB,KAAK;CACL,QAAQ;CACR,MAAM;CACN,UAAU;CAGV,UAAU;CACV,eAAe;CACf,uBAAuB;CACvB,mBAAmB;CACnB,QAAQ;CAGR,MAAM;CACN,aAAa;CACb,UAAU;CAGV,OAAO;CACR,EAEY,KAAqC,EAAE,WAAQ,mBAAgB;CAC1E,IAAM,IAAM,EAAO,aAAa,EAC1B,IAAU,EAAiB,MAAQ,aACnC,IAAS,EAAa,IAAI,EAAI;AAEpC,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAc,IACd,EACD;YALH,CAOG,KACC,kBAAC,QAAD;GACE,eAAY;GACZ,WAAU;GACV,CAAA,EAEH,EAAgB,EAAO,CACnB"}
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","names":[],"sources":["../../../src/theglobalfuel/components/StatusBadge.tsx"],"sourcesContent":["/**\n * Status Badge Component\n * @module theglobalfuel/components\n *\n * A colored badge for TheGlobalFuel domain statuses (asset lifecycle, contract\n * lifecycle & side, shipment status, inventory status, compliance status,\n * emission scope, reserve category, pricing basis) with semantic color mapping.\n * Accepts the raw server enum value.\n */\n\nimport type { FC } from 'react';\nimport { cn } from '../utils/cn';\nimport { formatEnumLabel } from '../utils/formatters';\n\ninterface StatusBadgeProps {\n status: string;\n className?: string;\n}\n\ntype BadgeVariant = 'success' | 'warning' | 'destructive' | 'secondary' | 'info' | 'outline';\n\nconst variantStyles: Record<BadgeVariant, string> = {\n success: 'bg-status-success-bg-subtle text-status-success-text',\n warning: 'bg-status-warning-bg-subtle text-status-warning-text',\n destructive: 'bg-status-error-bg-subtle text-status-error-text',\n secondary: 'bg-bg-sunken text-text-secondary',\n info: 'bg-[var(--color-accent-soft)] text-text-primary',\n outline: 'border border-border-seam text-text-primary',\n};\n\n// Statuses that represent a \"live\" / in-progress condition get a subtle,\n// opacity-only glow pulse (reduced-motion safe via motion-safe:).\nconst liveStatuses = new Set(['PRODUCING', 'ACTIVE', 'IN_TRANSIT', 'LOADING']);\n\nconst statusVariantMap: Record<string, BadgeVariant> = {\n // Asset lifecycle\n EXPLORATION: 'secondary',\n APPRAISAL: 'info',\n DEVELOPMENT: 'warning',\n PRODUCING: 'success',\n SUSPENDED: 'warning',\n DECOMMISSIONING: 'warning',\n RETIRED: 'outline',\n\n // Offtake-contract lifecycle\n DRAFT: 'secondary',\n NEGOTIATION: 'info',\n SIGNED: 'info',\n ACTIVE: 'success',\n COMPLETED: 'success',\n TERMINATED: 'destructive',\n\n // Contract side\n BUY: 'info',\n SELL: 'secondary',\n\n // Pricing basis\n FIXED: 'outline',\n INDEX_LINKED: 'outline',\n FORMULA: 'outline',\n SPOT: 'secondary',\n\n // Shipment status\n SCHEDULED: 'secondary',\n LOADING: 'info',\n IN_TRANSIT: 'warning',\n DELIVERED: 'success',\n CANCELLED: 'destructive',\n\n // Inventory status\n AVAILABLE: 'success',\n RESERVED: 'info',\n CONSUMED: 'outline',\n WRITTEN_OFF: 'destructive',\n\n // Compliance status\n PENDING: 'secondary',\n SUBMITTED: 'info',\n APPROVED: 'success',\n REVERSED: 'outline',\n REJECTED: 'destructive',\n EXPIRED: 'warning',\n REVOKED: 'destructive',\n\n // Emission scope\n SCOPE_1: 'destructive',\n SCOPE_2: 'warning',\n SCOPE_3: 'info',\n\n // Reserve category\n PROVED: 'success',\n PROBABLE: 'info',\n POSSIBLE: 'warning',\n CONTINGENT: 'secondary',\n PROSPECTIVE: 'outline',\n\n // Safety incident category\n NEAR_MISS: 'info',\n INJURY: 'destructive',\n SPILL: 'warning',\n RELEASE: 'warning',\n EQUIPMENT_FAILURE: 'secondary',\n\n // Safety incident severity\n LOW: 'secondary',\n MEDIUM: 'warning',\n HIGH: 'destructive',\n CRITICAL: 'destructive',\n\n // Safety incident investigation lifecycle\n REPORTED: 'secondary',\n INVESTIGATING: 'info',\n ROOT_CAUSE_IDENTIFIED: 'warning',\n CORRECTIVE_ACTION: 'warning',\n CLOSED: 'success',\n\n // Corrective/preventive action lifecycle\n OPEN: 'warning',\n IN_PROGRESS: 'info',\n VERIFIED: 'success',\n\n // ESG disclosure status (DRAFT is shared with the contract lifecycle above)\n FINAL: 'success',\n};\n\nexport const StatusBadge: FC<StatusBadgeProps> = ({ status, className }) => {\n const key = status.toUpperCase();\n const variant = statusVariantMap[key] ?? 'secondary';\n const isLive = liveStatuses.has(key);\n\n return (\n <span\n className={cn(\n 'inline-flex items-center gap-1.5 rounded-full px-2.5 py-0.5 text-xs font-medium',\n variantStyles[variant],\n className\n )}\n >\n {isLive && (\n <span\n aria-hidden=\"true\"\n className=\"size-1.5 rounded-full bg-current motion-safe:animate-vc-glow-pulse\"\n />\n )}\n {formatEnumLabel(status)}\n </span>\n );\n};\n"],"mappings":";;;;AAqBA,IAAM,IAA8C;CAClD,SAAS;CACT,SAAS;CACT,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACV,EAIK,IAAe,IAAI,IAAI;CAAC;CAAa;CAAU;CAAc;CAAU,CAAC,EAExE,IAAiD;CAErD,aAAa;CACb,WAAW;CACX,aAAa;CACb,WAAW;CACX,WAAW;CACX,iBAAiB;CACjB,SAAS;CAGT,OAAO;CACP,aAAa;CACb,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,YAAY;CAGZ,KAAK;CACL,MAAM;CAGN,OAAO;CACP,cAAc;CACd,SAAS;CACT,MAAM;CAGN,WAAW;CACX,SAAS;CACT,YAAY;CACZ,WAAW;CACX,WAAW;CAGX,WAAW;CACX,UAAU;CACV,UAAU;CACV,aAAa;CAGb,SAAS;CACT,WAAW;CACX,UAAU;CACV,UAAU;CACV,UAAU;CACV,SAAS;CACT,SAAS;CAGT,SAAS;CACT,SAAS;CACT,SAAS;CAGT,QAAQ;CACR,UAAU;CACV,UAAU;CACV,YAAY;CACZ,aAAa;CAGb,WAAW;CACX,QAAQ;CACR,OAAO;CACP,SAAS;CACT,mBAAmB;CAGnB,KAAK;CACL,QAAQ;CACR,MAAM;CACN,UAAU;CAGV,UAAU;CACV,eAAe;CACf,uBAAuB;CACvB,mBAAmB;CACnB,QAAQ;CAGR,MAAM;CACN,aAAa;CACb,UAAU;CAGV,OAAO;CACR,EAEY,KAAqC,EAAE,WAAQ,mBAAgB;CAC1E,IAAM,IAAM,EAAO,aAAa,EAC1B,IAAU,EAAiB,MAAQ,aACnC,IAAS,EAAa,IAAI,EAAI;AAEpC,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAc,IACd,EACD;YALH,CAOG,KACC,kBAAC,QAAD;GACE,eAAY;GACZ,WAAU;GACV,CAAA,EAEH,EAAgB,EAAO,CACnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QuotaOverviewRow } from '../utils/quotaUsage';
|
|
2
|
-
import { TheConnection, TheAsset, TheAssetKind, TheAssetStatus, TheCommodityType, TheProductionRecord, TheReserveEstimate, TheReserveCategory, TheOfftakeContract, TheContractSide, TheContractStatus, TheShipment, TheShipmentStatus, TheInventoryLot, TheInventoryStatus, TheEmissionRecord, TheEmissionScope, TheComplianceCert, TheComplianceCategory, TheComplianceStatus, TheEsgDisclosure, TheEsgFramework, TheGenerateEsgDisclosureInput, TheCreateAssetInput, TheUpdateAssetInput, TheRecordProductionInput, TheCreateReserveEstimateInput, TheCreateOfftakeContractInput, TheUpdateOfftakeContractInput, TheCreateShipmentInput, TheUpdateShipmentInput, TheCreateInventoryLotInput, TheRecordEmissionInput, TheCreateComplianceCertInput, TheSafetyIncident, TheSafetyIncidentCategory, TheSafetyIncidentSeverity, TheSafetyIncidentStatus, TheCorrectiveAction, TheCorrectiveActionStatus, TheSafetyDashboard, TheReportSafetyIncidentInput, TheCreateCorrectiveActionInput, PaginationInput } from '../types';
|
|
2
|
+
import { TheConnection, TheAsset, TheAssetKind, TheAssetStatus, TheCommodityType, TheProductionRecord, TheReserveEstimate, TheReserveCategory, TheOfftakeContract, TheContractSide, TheContractStatus, TheShipment, TheShipmentStatus, TheInventoryLot, TheInventoryStatus, TheEmissionRecord, TheEmissionScope, TheComplianceCert, TheComplianceCategory, TheComplianceStatus, TheEsgDisclosure, TheEsgFramework, TheGenerateEsgDisclosureInput, TheCreateAssetInput, TheUpdateAssetInput, TheRecordProductionInput, TheProductionAllocation, TheAllocationStatus, TheCreateProductionAllocationInput, TheNetProductionPosition, TheCreateReserveEstimateInput, TheCreateOfftakeContractInput, TheUpdateOfftakeContractInput, TheCreateShipmentInput, TheUpdateShipmentInput, TheCreateInventoryLotInput, TheRecordEmissionInput, TheCreateComplianceCertInput, TheSafetyIncident, TheSafetyIncidentCategory, TheSafetyIncidentSeverity, TheSafetyIncidentStatus, TheCorrectiveAction, TheCorrectiveActionStatus, TheSafetyDashboard, TheReportSafetyIncidentInput, TheCreateCorrectiveActionInput, PaginationInput } from '../types';
|
|
3
3
|
|
|
4
4
|
/** Quota assignments are workspace-scoped and must not survive a context switch. */
|
|
5
5
|
export declare const useTheQuotaOverview: () => import('@tanstack/react-query').UseQueryResult<QuotaOverviewRow[], Error>;
|
|
@@ -10,6 +10,12 @@ export interface AssetFilters {
|
|
|
10
10
|
pagination?: PaginationInput;
|
|
11
11
|
}
|
|
12
12
|
export declare const useTheAssets: (filters?: AssetFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheAsset>, Error>;
|
|
13
|
+
/**
|
|
14
|
+
* Every asset in the workspace (offset-paged to the end, capped by
|
|
15
|
+
* `collectAllPages`), for pickers that must offer any asset rather than the
|
|
16
|
+
* first page — e.g. the contributing-asset rows of a production allocation.
|
|
17
|
+
*/
|
|
18
|
+
export declare const useTheAllAssets: (options?: QueryToggle) => import('@tanstack/react-query').UseQueryResult<import('../utils/paging').CollectedPages<TheAsset>, Error>;
|
|
13
19
|
export declare const useTheAsset: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<TheAsset | null, Error>;
|
|
14
20
|
export declare const useTheCreateAsset: () => import('@tanstack/react-query').UseMutationResult<TheAsset, Error, TheCreateAssetInput, unknown>;
|
|
15
21
|
export declare const useTheUpdateAsset: () => import('@tanstack/react-query').UseMutationResult<TheAsset, Error, {
|
|
@@ -37,6 +43,31 @@ export declare const useTheProductionRecords: (filters?: ProductionFilters, opti
|
|
|
37
43
|
* stop at the first page: a long period that started earlier can end later.
|
|
38
44
|
*/
|
|
39
45
|
export declare const useTheAssetProductionHistory: (assetId: string, options?: QueryToggle) => import('@tanstack/react-query').UseQueryResult<import('../utils/paging').CollectedPages<TheProductionRecord>, Error>;
|
|
46
|
+
/**
|
|
47
|
+
* Production records for the Production page, each with its live allocation
|
|
48
|
+
* status (BOFF-4180). Kept separate from {@link useTheProductionRecords} so the
|
|
49
|
+
* other record readers do not pay for the extra field.
|
|
50
|
+
*/
|
|
51
|
+
export declare const useTheProductionRecordsWithAllocation: (filters?: ProductionFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheProductionRecord>, Error>;
|
|
52
|
+
export interface AllocationFilters {
|
|
53
|
+
productionRecordId?: string;
|
|
54
|
+
measurementAssetId?: string;
|
|
55
|
+
status?: TheAllocationStatus;
|
|
56
|
+
pagination?: PaginationInput;
|
|
57
|
+
}
|
|
58
|
+
export declare const useTheProductionAllocations: (filters?: AllocationFilters) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheProductionAllocation>, Error>;
|
|
59
|
+
export interface NetPositionWindow {
|
|
60
|
+
periodStart: string;
|
|
61
|
+
periodEnd: string;
|
|
62
|
+
assetId?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare const useTheNetProductionPosition: (window: NetPositionWindow, options?: QueryToggle) => import('@tanstack/react-query').UseQueryResult<TheNetProductionPosition, Error>;
|
|
65
|
+
export declare const useTheCreateProductionAllocation: () => import('@tanstack/react-query').UseMutationResult<TheProductionAllocation, Error, TheCreateProductionAllocationInput, unknown>;
|
|
66
|
+
export declare const useTheApproveProductionAllocation: () => import('@tanstack/react-query').UseMutationResult<TheProductionAllocation, Error, string, unknown>;
|
|
67
|
+
export declare const useTheReverseProductionAllocation: () => import('@tanstack/react-query').UseMutationResult<TheProductionAllocation, Error, {
|
|
68
|
+
id: string;
|
|
69
|
+
reason: string;
|
|
70
|
+
}, unknown>;
|
|
40
71
|
export declare const useTheRecordProduction: () => import('@tanstack/react-query').UseMutationResult<TheProductionRecord, Error, TheRecordProductionInput, unknown>;
|
|
41
72
|
export declare const useTheReserveEstimates: (assetId?: string, category?: TheReserveCategory, pagination?: PaginationInput, options?: QueryToggle) => import('@tanstack/react-query').UseQueryResult<TheConnection<TheReserveEstimate>, Error>;
|
|
42
73
|
export declare const useTheCreateReserveEstimate: () => import('@tanstack/react-query').UseMutationResult<TheReserveEstimate, Error, TheCreateReserveEstimateInput, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheGlobalFuelApi.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheGlobalFuelApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,KAAK,EACV,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,6BAA6B,EAC7B,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,4BAA4B,EAC5B,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,EAC9B,eAAe,EAChB,MAAM,UAAU,CAAC;AAmDlB,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,iFAiB/B,CAAC;
|
|
1
|
+
{"version":3,"file":"useTheGlobalFuelApi.d.ts","sourceRoot":"","sources":["../../../src/theglobalfuel/hooks/useTheGlobalFuelApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,KAAK,EACV,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,6BAA6B,EAC7B,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,kCAAkC,EAClC,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,4BAA4B,EAC5B,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,EAC9B,eAAe,EAChB,MAAM,UAAU,CAAC;AAmDlB,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,iFAiB/B,CAAC;AA0GF,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,eAAO,MAAM,YAAY,GAAI,UAAS,YAAiB,m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