@burdenoff/microfe-movethewheels 2026.1102.1 → 2026.1102.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.
Files changed (27) hide show
  1. package/dist/components/freight-cost/FreightCommercialFactEditor.js +46 -46
  2. package/dist/components/freight-cost/FreightCommercialHistory.js +7 -7
  3. package/dist/components/freight-cost/FreightDraftForm.js +20 -20
  4. package/dist/components/freight-invoice/InvoiceReviewPanel.js +255 -0
  5. package/dist/components/freight-invoice/InvoiceReviewQueue.js +93 -0
  6. package/dist/generated/freight-invoice-operations.d.ts +461 -0
  7. package/dist/hooks/useInvoiceComparisonRecovery.js +26 -26
  8. package/dist/hooks/useInvoiceReviewPermissions.js +14 -0
  9. package/dist/movethewheels/components/freight-invoice/InvoiceReviewPanel.d.ts +11 -0
  10. package/dist/movethewheels/components/freight-invoice/InvoiceReviewQueue.d.ts +22 -0
  11. package/dist/movethewheels/hooks/useInvoiceReviewPermissions.d.ts +5 -0
  12. package/dist/movethewheels/pages/FinancePage.d.ts +3 -1
  13. package/dist/movethewheels/utils/invoiceReview.d.ts +26 -0
  14. package/dist/pages/FinancePage.js +109 -67
  15. package/dist/pages/FreightEstimatePage.js +89 -89
  16. package/dist/pages/FreightInvoicePage.js +138 -120
  17. package/dist/src/generated/freight-invoice-operations.js +2100 -1
  18. package/dist/utils/invoiceReview.js +84 -0
  19. package/package.json +2 -2
  20. package/src/generated/freight-invoice-operations.ts +245 -1
  21. package/src/movethewheels/components/freight-invoice/InvoiceReviewPanel.tsx +319 -0
  22. package/src/movethewheels/components/freight-invoice/InvoiceReviewQueue.tsx +96 -0
  23. package/src/movethewheels/hooks/useInvoiceReviewPermissions.ts +25 -0
  24. package/src/movethewheels/pages/FinancePage.tsx +34 -2
  25. package/src/movethewheels/pages/FreightInvoicePage.tsx +44 -3
  26. package/src/movethewheels/utils/invoiceReview.ts +146 -0
  27. package/src/operations/freight-invoice/review.graphql +26 -0
@@ -6,65 +6,73 @@ import { useConditionApi as i, useConditionQuery as a } from "../hooks/useContai
6
6
  import { PinnedSelect as o, ReusePager as s, ReuseState as c, reuseCard as l } from "../components/ReuseControls.js";
7
7
  import { useShipmentPermissions as u } from "../hooks/useShipmentPermissions.js";
8
8
  import { FreightText as ee } from "../components/freight-cost/FreightFields.js";
9
+ import { InvoiceComparisonExactDocument as te, InvoiceComparisonHistoryDocument as ne, InvoiceEstimatePageDocument as re, InvoiceEstimateVersionDocument as ie, InvoiceShipmentsDocument as ae, InvoiceStructuralPreviewDocument as oe } from "../src/generated/freight-invoice-operations.js";
9
10
  import { sameInvoiceScope as d } from "../utils/invoiceComparison.js";
10
- import { InvoiceHistoryRecord as te } from "../components/freight-invoice/InvoiceResults.js";
11
- import { InvoiceForm as ne } from "../components/freight-invoice/InvoiceForm.js";
12
- import { InvoiceComparisonExactDocument as re, InvoiceComparisonHistoryDocument as f, InvoiceEstimatePageDocument as ie, InvoiceEstimateVersionDocument as ae, InvoiceShipmentsDocument as oe, InvoiceStructuralPreviewDocument as se } from "../src/generated/freight-invoice-operations.js";
13
- import { useInvoiceComparisonRecovery as p, useInvoiceComparisonScope as m } from "../hooks/useInvoiceComparisonRecovery.js";
14
- import { useState as h } from "react";
15
- import { useSearchParams as g } from "react-router";
16
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
17
- import { PermissionProvider as b } from "@burdenoff/fe-libs/shared/providers/shell";
11
+ import { InvoiceReviewQueue as se } from "../components/freight-invoice/InvoiceReviewQueue.js";
12
+ import { InvoiceHistoryRecord as ce } from "../components/freight-invoice/InvoiceResults.js";
13
+ import { InvoiceForm as le } from "../components/freight-invoice/InvoiceForm.js";
14
+ import { InvoiceReviewPanel as ue } from "../components/freight-invoice/InvoiceReviewPanel.js";
15
+ import { useInvoiceReviewPermissions as de } from "../hooks/useInvoiceReviewPermissions.js";
16
+ import { useInvoiceComparisonRecovery as f, useInvoiceComparisonScope as p } from "../hooks/useInvoiceComparisonRecovery.js";
17
+ import { useState as m } from "react";
18
+ import { useSearchParams as fe } from "react-router";
19
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
20
+ import { PermissionProvider as v } from "@burdenoff/fe-libs/shared/providers/shell";
18
21
  //#region src/movethewheels/pages/FreightInvoicePage.tsx
19
- function x() {
22
+ function y() {
20
23
  let n = t();
21
- return /* @__PURE__ */ v(r, {
24
+ return /* @__PURE__ */ g(r, {
22
25
  title: "Freight invoice comparisons",
23
26
  subtitle: "Compare manually reported source facts with one immutable estimate version.",
24
- icon: /* @__PURE__ */ v(e, { "aria-hidden": "true" }),
25
- children: /* @__PURE__ */ v(b, {
27
+ icon: /* @__PURE__ */ g(e, { "aria-hidden": "true" }),
28
+ children: /* @__PURE__ */ g(v, {
26
29
  scopeId: n.workspaceId ?? null,
27
30
  gateway: "workspace",
28
- children: /* @__PURE__ */ v(S, {})
31
+ children: /* @__PURE__ */ g(b, {})
29
32
  }, `${n.workspaceId}:${n.tenantId}:${n.currentUser?.id}:${n.apiGatewayUrl}`)
30
33
  });
31
34
  }
32
- function S() {
33
- let e = u(), t = m(e.canRead), n = p(t, () => e.allows("update"));
34
- return /* @__PURE__ */ y(_, { children: [!e.canRead && /* @__PURE__ */ v("p", {
35
+ function b() {
36
+ let e = u(), t = p(e.canRead), n = f(t, () => e.allows("update"));
37
+ return /* @__PURE__ */ _(h, { children: [!e.canRead && /* @__PURE__ */ g("p", {
35
38
  role: "status",
36
39
  children: e.loading ? "Checking shipment read permission…" : e.failed ? "Shipment permissions are unavailable. Reload to inspect them." : "Shipment read permission in the current workspace is required."
37
- }), /* @__PURE__ */ v(C, {
40
+ }), /* @__PURE__ */ g(x, {
38
41
  access: e,
39
42
  scope: t,
40
43
  actions: n
41
44
  }, n.scopeKey)] });
42
45
  }
43
- function C({ access: e, scope: t, actions: r }) {
44
- let l = i(), [u, d] = g(), [p, m] = h(() => u.get("invoiceShipment")?.slice(0, 255) ?? ""), [b, x] = h(0), [S, C] = h(0), [T, E] = h(""), [D, O] = h(!1), [k, A] = h(null), [j, M] = h(() => u.get("invoiceIdentity")?.slice(0, 255) ?? ""), [N, P] = h(j), [F, I] = h(0), [L, R] = h(""), [z, B] = h(null), [V, H] = h(null), U = !!t && e.canRead, W = r.busy || r.uncertain, G = a(oe, U ? { pagination: {
46
+ function x({ access: e, scope: t, actions: r }) {
47
+ let l = i(), u = de(), [d, f] = m(0), [p, v] = fe(), [y, b] = m(() => p.get("invoiceShipment")?.slice(0, 255) ?? ""), [x, C] = m(0), [w, T] = m(0), [E, D] = m(""), [O, k] = m(!1), [A, j] = m(null), [M, N] = m(() => p.get("invoiceIdentity")?.slice(0, 255) ?? ""), [P, F] = m(M), [I, L] = m(0), [R, z] = m(""), [pe, B] = m(null), [V, H] = m(null), U = !!t && e.canRead, W = r.busy || r.uncertain, G = a(ae, U ? { pagination: {
45
48
  limit: 25,
46
- offset: b
47
- } } : null, r.revision), K = a(ie, U && p ? {
48
- shipmentId: p,
49
+ offset: x
50
+ } } : null, r.revision), K = a(re, U && y ? {
51
+ shipmentId: y,
49
52
  pagination: {
50
53
  limit: 25,
51
- offset: S
54
+ offset: w
52
55
  }
53
- } : null, r.revision), q = a(ae, U && p && T ? {
54
- shipmentId: p,
55
- id: T
56
- } : null, r.revision), J = a(f, U && p && j ? {
57
- shipmentId: p,
58
- invoiceIdentityId: j,
56
+ } : null, r.revision), q = a(ie, U && y && E ? {
57
+ shipmentId: y,
58
+ id: E
59
+ } : null, r.revision), J = a(ne, U && y && M ? {
60
+ shipmentId: y,
61
+ invoiceIdentityId: M,
59
62
  pagination: {
60
63
  limit: 10,
61
- offset: F
64
+ offset: I
62
65
  }
63
- } : null, r.revision), Y = a(re, U && p && L ? {
64
- shipmentId: p,
65
- id: L
66
- } : null, r.revision), X = Y.data?.mtwFreightInvoiceComparison ?? z, Z = (e) => {
67
- m(e.shipmentId), B(e), R(e.id), M(e.invoiceIdentityId), P(e.invoiceIdentityId), I(0), O(!1), A(null), d((t) => {
66
+ } : null, r.revision), Y = a(te, U && y && R ? {
67
+ shipmentId: y,
68
+ id: R
69
+ } : null, r.revision), X = Y.data?.mtwFreightInvoiceComparison ?? pe, Z = (e) => {
70
+ b(e.shipmentId), B(e), z(e.id), N(e.invoiceIdentityId), F(e.invoiceIdentityId), L(0), k(!1), j(null), v((t) => {
71
+ let n = new URLSearchParams(t);
72
+ return n.set("invoiceShipment", e.shipmentId), n.set("invoiceIdentity", e.invoiceIdentityId), n;
73
+ }, { replace: !0 });
74
+ }, me = (e) => {
75
+ b(e.shipmentId), D(""), T(0), B(null), z(e.comparisonId), N(e.invoiceIdentityId), F(e.invoiceIdentityId), L(0), k(!1), j(null), v((t) => {
68
76
  let n = new URLSearchParams(t);
69
77
  return n.set("invoiceShipment", e.shipmentId), n.set("invoiceIdentity", e.invoiceIdentityId), n;
70
78
  }, { replace: !0 });
@@ -72,25 +80,25 @@ function C({ access: e, scope: t, actions: r }) {
72
80
  id: e.id,
73
81
  label: `${e.shipmentNumber} — ${e.primaryMode} — ${e.status}`
74
82
  })) ?? [];
75
- p && !Q.some((e) => e.id === p) && Q.unshift({
76
- id: p,
83
+ y && !Q.some((e) => e.id === y) && Q.unshift({
84
+ id: y,
77
85
  label: "Selected shipment outside this loaded page"
78
86
  });
79
- let ce = G.data ? {
87
+ let he = G.data ? {
80
88
  total: G.data.shipmentsCount,
81
89
  limit: 25,
82
- offset: b,
83
- hasMore: b + G.data.shipments.length < G.data.shipmentsCount,
84
- nextOffset: b + 25
90
+ offset: x,
91
+ hasMore: x + G.data.shipments.length < G.data.shipmentsCount,
92
+ nextOffset: x + 25
85
93
  } : void 0, $ = q.data?.mtwFreightEstimateVersion;
86
- return /* @__PURE__ */ y("div", {
94
+ return /* @__PURE__ */ _("div", {
87
95
  className: "min-w-0 space-y-6 break-words",
88
96
  children: [
89
- /* @__PURE__ */ v("p", {
97
+ /* @__PURE__ */ g("p", {
90
98
  className: "rounded border p-4 text-sm",
91
- children: "Record only what the supplier source reports. Unknown is not zero. This comparison establishes no quote acceptance, liability, invoice approval or payment. Corrections append a new immutable revision."
99
+ children: "Record only what the supplier source reports. Unknown is not zero. Recording a comparison does not approve it: someone other than its author accepts or disputes each revision, and only an accepted invoice is handed to Billing for settlement. Corrections append a new immutable revision."
92
100
  }),
93
- r.uncertain && /* @__PURE__ */ v(w, {
101
+ r.uncertain && /* @__PURE__ */ g(S, {
94
102
  pending: r.pending,
95
103
  scope: t,
96
104
  busy: r.busy,
@@ -99,67 +107,72 @@ function C({ access: e, scope: t, actions: r }) {
99
107
  e && Z(e);
100
108
  })
101
109
  }),
102
- r.feedback && /* @__PURE__ */ v("p", {
110
+ r.feedback && /* @__PURE__ */ g("p", {
103
111
  role: r.feedback.error ? "alert" : "status",
104
112
  children: r.feedback.message
105
113
  }),
106
- U && /* @__PURE__ */ y(_, { children: [
107
- /* @__PURE__ */ y("section", {
114
+ U && /* @__PURE__ */ _(h, { children: [
115
+ u.canRead && /* @__PURE__ */ g(se, {
116
+ revision: d + r.revision,
117
+ onOpen: me,
118
+ locked: W || O
119
+ }),
120
+ /* @__PURE__ */ _("section", {
108
121
  className: "space-y-4 rounded-xl border bg-bg-surface p-5",
109
122
  children: [
110
- /* @__PURE__ */ v("h2", {
123
+ /* @__PURE__ */ g("h2", {
111
124
  className: "text-lg font-semibold",
112
125
  children: "Choose the exact recorded estimate"
113
126
  }),
114
- /* @__PURE__ */ v(o, {
127
+ /* @__PURE__ */ g(o, {
115
128
  label: "Invoice shipment",
116
- value: p,
117
- disabled: W || D,
129
+ value: y,
130
+ disabled: W || O,
118
131
  options: Q,
119
132
  onChange: (e) => {
120
- m(e), E(""), C(0), M(""), P(""), R(""), B(null), A(null), O(!1), d((t) => {
133
+ b(e), D(""), T(0), N(""), F(""), z(""), B(null), j(null), k(!1), v((t) => {
121
134
  let n = new URLSearchParams(t);
122
135
  return n.set("invoiceShipment", e), n.delete("invoiceIdentity"), n;
123
136
  }, { replace: !0 });
124
137
  }
125
138
  }),
126
- /* @__PURE__ */ v(c, {
139
+ /* @__PURE__ */ g(c, {
127
140
  loading: G.loading,
128
141
  error: G.error
129
142
  }),
130
- /* @__PURE__ */ v(s, {
131
- page: ce,
132
- busy: W || D || G.loading,
133
- offset: b,
134
- onChange: x
143
+ /* @__PURE__ */ g(s, {
144
+ page: he,
145
+ busy: W || O || G.loading,
146
+ offset: x,
147
+ onChange: C
135
148
  }),
136
- p && /* @__PURE__ */ y(_, { children: [
137
- /* @__PURE__ */ v(o, {
149
+ y && /* @__PURE__ */ _(h, { children: [
150
+ /* @__PURE__ */ g(o, {
138
151
  label: "Exact estimate version",
139
- value: T,
140
- disabled: W || D,
152
+ value: E,
153
+ disabled: W || O,
141
154
  options: K.data?.mtwFreightEstimatePage.items.map((e) => ({
142
155
  id: e.id,
143
156
  label: `${e.estimateReference} / version ${e.version} / ${e.facts.kind} / ${e.facts.title}`
144
157
  })) ?? [],
145
- onChange: (e) => E(e)
158
+ onChange: (e) => D(e)
146
159
  }),
147
- /* @__PURE__ */ v(c, {
160
+ /* @__PURE__ */ g(c, {
148
161
  loading: K.loading,
149
162
  error: K.error
150
163
  }),
151
- /* @__PURE__ */ v(s, {
164
+ /* @__PURE__ */ g(s, {
152
165
  page: K.data?.mtwFreightEstimatePage,
153
- busy: W || D || K.loading,
154
- offset: S,
155
- onChange: C
166
+ busy: W || O || K.loading,
167
+ offset: w,
168
+ onChange: T
156
169
  })
157
170
  ] }),
158
- /* @__PURE__ */ v(c, {
171
+ /* @__PURE__ */ g(c, {
159
172
  loading: q.loading,
160
173
  error: q.error
161
174
  }),
162
- $ && /* @__PURE__ */ y("p", { children: [
175
+ $ && /* @__PURE__ */ _("p", { children: [
163
176
  "Pinned ",
164
177
  $.facts.kind,
165
178
  ": ",
@@ -175,27 +188,27 @@ function C({ access: e, scope: t, actions: r }) {
175
188
  $.validityAtRead,
176
189
  ". This does not establish acceptance."
177
190
  ] }),
178
- /* @__PURE__ */ y("div", {
191
+ /* @__PURE__ */ _("div", {
179
192
  className: "flex flex-wrap gap-3",
180
193
  children: [
181
- /* @__PURE__ */ v(n, {
194
+ /* @__PURE__ */ g(n, {
182
195
  type: "button",
183
- disabled: W || !$ || $.shipmentId !== p || q.loading || !!q.error,
196
+ disabled: W || !$ || $.shipmentId !== y || q.loading || !!q.error,
184
197
  onClick: () => {
185
- O(!0), H(null);
198
+ k(!0), H(null);
186
199
  },
187
- children: k ? `Start correction draft after revision ${k.revision}` : "Start manual invoice draft"
200
+ children: A ? `Start correction draft after revision ${A.revision}` : "Start manual invoice draft"
188
201
  }),
189
- D && /* @__PURE__ */ v(n, {
202
+ O && /* @__PURE__ */ g(n, {
190
203
  type: "button",
191
204
  variant: "outline",
192
205
  disabled: W,
193
206
  onClick: () => {
194
- O(!1), A(null);
207
+ k(!1), j(null);
195
208
  },
196
209
  children: "Discard unsent draft"
197
210
  }),
198
- /* @__PURE__ */ v(n, {
211
+ /* @__PURE__ */ g(n, {
199
212
  type: "button",
200
213
  variant: "outline",
201
214
  disabled: r.busy,
@@ -206,64 +219,64 @@ function C({ access: e, scope: t, actions: r }) {
206
219
  })
207
220
  ]
208
221
  }),
209
- D && $ && $.shipmentId === p && /* @__PURE__ */ v(ne, {
222
+ O && $ && $.shipmentId === y && /* @__PURE__ */ g(le, {
210
223
  estimate: $,
211
- previous: k,
224
+ previous: A,
212
225
  disabled: W || q.loading || !!q.error,
213
226
  canRecord: e.canUpdate,
214
- onPreview: async (e) => (await l(se, { input: e })).previewMtwFreightInvoice,
227
+ onPreview: async (e) => (await l(oe, { input: e })).previewMtwFreightInvoice,
215
228
  onSave: async (e, t) => {
216
229
  let n = await r.run(e, t);
217
230
  return n && Z(n), n;
218
231
  }
219
- }, `${$.id}:${k?.id ?? "first"}`),
220
- V && /* @__PURE__ */ v("p", {
232
+ }, `${$.id}:${A?.id ?? "first"}`),
233
+ V && /* @__PURE__ */ g("p", {
221
234
  role: "alert",
222
235
  children: V
223
236
  }),
224
- p && /* @__PURE__ */ y("section", {
237
+ y && /* @__PURE__ */ _("section", {
225
238
  className: "space-y-4 rounded-xl border bg-bg-surface p-5",
226
239
  children: [
227
- /* @__PURE__ */ v("h2", {
240
+ /* @__PURE__ */ g("h2", {
228
241
  className: "text-lg font-semibold",
229
242
  children: "Recorded invoice history"
230
243
  }),
231
- /* @__PURE__ */ v("p", { children: "A confirmed save opens its invoice history here. Bookmark this page to return to it. Complete invoice browsing is not available in this view. A missing page never proves that an unresolved save had no effect." }),
232
- /* @__PURE__ */ y("details", { children: [
233
- /* @__PURE__ */ v("summary", {
244
+ /* @__PURE__ */ g("p", { children: "A confirmed save opens its invoice history here. Bookmark this page to return to it. Complete invoice browsing is not available in this view. A missing page never proves that an unresolved save had no effect." }),
245
+ /* @__PURE__ */ _("details", { children: [
246
+ /* @__PURE__ */ g("summary", {
234
247
  className: "min-h-11 cursor-pointer",
235
248
  children: "Advanced: open a known receipt identity"
236
249
  }),
237
- /* @__PURE__ */ v(ee, {
250
+ /* @__PURE__ */ g(ee, {
238
251
  label: "Known invoice identity ID",
239
- value: N,
252
+ value: P,
240
253
  disabled: r.busy,
241
- onChange: P
254
+ onChange: F
242
255
  }),
243
- /* @__PURE__ */ v(n, {
256
+ /* @__PURE__ */ g(n, {
244
257
  type: "button",
245
258
  variant: "outline",
246
- disabled: r.busy || !N.trim(),
259
+ disabled: r.busy || !P.trim(),
247
260
  onClick: () => {
248
- M(N.trim()), I(0), R(""), B(null), d((e) => {
261
+ N(P.trim()), L(0), z(""), B(null), v((e) => {
249
262
  let t = new URLSearchParams(e);
250
- return t.set("invoiceShipment", p), t.set("invoiceIdentity", N.trim()), t;
263
+ return t.set("invoiceShipment", y), t.set("invoiceIdentity", P.trim()), t;
251
264
  }, { replace: !0 });
252
265
  },
253
266
  children: "Read identity history"
254
267
  })
255
268
  ] }),
256
- j && /* @__PURE__ */ y(_, { children: [
257
- /* @__PURE__ */ v(c, {
269
+ M && /* @__PURE__ */ _(h, { children: [
270
+ /* @__PURE__ */ g(c, {
258
271
  loading: J.loading,
259
272
  error: J.error
260
273
  }),
261
- J.data?.mtwFreightInvoiceComparisonPage.items.map((e) => /* @__PURE__ */ y(n, {
274
+ J.data?.mtwFreightInvoiceComparisonPage.items.map((e) => /* @__PURE__ */ _(n, {
262
275
  className: "h-auto max-w-full whitespace-normal break-words text-left",
263
276
  type: "button",
264
277
  variant: "outline",
265
278
  onClick: () => {
266
- R(e.id), B(null);
279
+ z(e.id), B(null);
267
280
  },
268
281
  children: [
269
282
  e.facts.supplierLabel ?? e.facts.supplierReference,
@@ -276,44 +289,49 @@ function C({ access: e, scope: t, actions: r }) {
276
289
  e.recordedAt
277
290
  ]
278
291
  }, e.id)),
279
- /* @__PURE__ */ v(s, {
292
+ /* @__PURE__ */ g(s, {
280
293
  page: J.data?.mtwFreightInvoiceComparisonPage,
281
294
  busy: J.loading || r.busy,
282
- offset: F,
283
- onChange: I
295
+ offset: I,
296
+ onChange: L
284
297
  })
285
298
  ] })
286
299
  ]
287
300
  }),
288
- /* @__PURE__ */ v(c, {
301
+ /* @__PURE__ */ g(c, {
289
302
  loading: Y.loading,
290
303
  error: Y.error
291
304
  }),
292
- X && X.shipmentId === p && /* @__PURE__ */ y(_, { children: [
293
- /* @__PURE__ */ v(te, { record: X }),
294
- /* @__PURE__ */ v(n, {
305
+ X && X.shipmentId === y && /* @__PURE__ */ _(h, { children: [
306
+ /* @__PURE__ */ g(ce, { record: X }),
307
+ /* @__PURE__ */ g(ue, {
308
+ record: X,
309
+ permissions: u,
310
+ onChanged: () => f((e) => e + 1)
311
+ }, `${X.id}:${r.revision}`),
312
+ /* @__PURE__ */ g(n, {
295
313
  type: "button",
296
- disabled: W || !e.canUpdate || !J.data || J.data.mtwFreightInvoiceComparisonPage.items[0]?.id !== X.id || F !== 0,
314
+ disabled: W || !e.canUpdate || !J.data || J.data.mtwFreightInvoiceComparisonPage.items[0]?.id !== X.id || I !== 0,
297
315
  onClick: () => {
298
- E(X.estimate.id), A(X), O(!1), H(null);
316
+ D(X.estimate.id), j(X), k(!1), H(null);
299
317
  },
300
318
  children: "Prepare correction to this latest revision"
301
319
  }),
302
- /* @__PURE__ */ v("p", { children: "Refresh the first history page to pin its latest revision before correcting. The server checks the exact predecessor again." })
320
+ /* @__PURE__ */ g("p", { children: "Refresh the first history page to pin its latest revision before correcting. The server checks the exact predecessor again." })
303
321
  ] })
304
322
  ] })
305
323
  ]
306
324
  });
307
325
  }
308
- function w({ pending: e, scope: t, busy: r, canReconcile: i, onRead: a }) {
309
- return /* @__PURE__ */ y("section", {
326
+ function S({ pending: e, scope: t, busy: r, canReconcile: i, onRead: a }) {
327
+ return /* @__PURE__ */ _("section", {
310
328
  className: l,
311
329
  "aria-label": "Original invoice request recovery",
312
- children: [/* @__PURE__ */ v("h2", {
330
+ children: [/* @__PURE__ */ g("h2", {
313
331
  className: "font-semibold",
314
332
  children: "Original save is unresolved"
315
- }), e && d(e.scope, t) ? /* @__PURE__ */ y(_, { children: [
316
- /* @__PURE__ */ y("p", { children: [
333
+ }), e && d(e.scope, t) ? /* @__PURE__ */ _(h, { children: [
334
+ /* @__PURE__ */ _("p", { children: [
317
335
  "Invoice ",
318
336
  e.input.facts.invoiceReference ?? "reference unknown",
319
337
  "; exact",
@@ -326,21 +344,21 @@ function w({ pending: e, scope: t, busy: r, canReconcile: i, onRead: a }) {
326
344
  e.estimate.version,
327
345
  ". No automatic resend or new request is allowed."
328
346
  ] }),
329
- /* @__PURE__ */ v(n, {
347
+ /* @__PURE__ */ g(n, {
330
348
  type: "button",
331
349
  disabled: !i || r,
332
350
  onClick: a,
333
351
  children: "Read original request receipt"
334
352
  }),
335
- /* @__PURE__ */ y("details", { children: [/* @__PURE__ */ v("summary", {
353
+ /* @__PURE__ */ _("details", { children: [/* @__PURE__ */ g("summary", {
336
354
  className: "min-h-11 cursor-pointer",
337
355
  children: "Retained original source intent"
338
- }), /* @__PURE__ */ v("pre", {
356
+ }), /* @__PURE__ */ g("pre", {
339
357
  className: "max-w-full whitespace-pre-wrap break-all text-xs",
340
358
  children: JSON.stringify(e.input, null, 2)
341
359
  })] })
342
- ] }) : /* @__PURE__ */ v("p", { children: e ? "The original request is retained in another or unavailable context. Return to the original account, organization, workspace and project with read permission; its source facts remain hidden here." : "The saved intent is malformed or unavailable. It remains blocked; do not discard it or start another request as proof of no effect." })]
360
+ ] }) : /* @__PURE__ */ g("p", { children: e ? "The original request is retained in another or unavailable context. Return to the original account, organization, workspace and project with read permission; its source facts remain hidden here." : "The saved intent is malformed or unavailable. It remains blocked; do not discard it or start another request as proof of no effect." })]
343
361
  });
344
362
  }
345
363
  //#endregion
346
- export { w as InvoiceRequestRecovery, x as default };
364
+ export { S as InvoiceRequestRecovery, y as default };