@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.
- package/dist/components/freight-cost/FreightCommercialFactEditor.js +46 -46
- package/dist/components/freight-cost/FreightCommercialHistory.js +7 -7
- package/dist/components/freight-cost/FreightDraftForm.js +20 -20
- package/dist/components/freight-invoice/InvoiceReviewPanel.js +255 -0
- package/dist/components/freight-invoice/InvoiceReviewQueue.js +93 -0
- package/dist/generated/freight-invoice-operations.d.ts +461 -0
- package/dist/hooks/useInvoiceComparisonRecovery.js +26 -26
- package/dist/hooks/useInvoiceReviewPermissions.js +14 -0
- package/dist/movethewheels/components/freight-invoice/InvoiceReviewPanel.d.ts +11 -0
- package/dist/movethewheels/components/freight-invoice/InvoiceReviewQueue.d.ts +22 -0
- package/dist/movethewheels/hooks/useInvoiceReviewPermissions.d.ts +5 -0
- package/dist/movethewheels/pages/FinancePage.d.ts +3 -1
- package/dist/movethewheels/utils/invoiceReview.d.ts +26 -0
- package/dist/pages/FinancePage.js +109 -67
- package/dist/pages/FreightEstimatePage.js +89 -89
- package/dist/pages/FreightInvoicePage.js +138 -120
- package/dist/src/generated/freight-invoice-operations.js +2100 -1
- package/dist/utils/invoiceReview.js +84 -0
- package/package.json +2 -2
- package/src/generated/freight-invoice-operations.ts +245 -1
- package/src/movethewheels/components/freight-invoice/InvoiceReviewPanel.tsx +319 -0
- package/src/movethewheels/components/freight-invoice/InvoiceReviewQueue.tsx +96 -0
- package/src/movethewheels/hooks/useInvoiceReviewPermissions.ts +25 -0
- package/src/movethewheels/pages/FinancePage.tsx +34 -2
- package/src/movethewheels/pages/FreightInvoicePage.tsx +44 -3
- package/src/movethewheels/utils/invoiceReview.ts +146 -0
- 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 {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
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
|
|
22
|
+
function y() {
|
|
20
23
|
let n = t();
|
|
21
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
25
|
-
children: /* @__PURE__ */ v
|
|
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__ */
|
|
31
|
+
children: /* @__PURE__ */ g(b, {})
|
|
29
32
|
}, `${n.workspaceId}:${n.tenantId}:${n.currentUser?.id}:${n.apiGatewayUrl}`)
|
|
30
33
|
});
|
|
31
34
|
}
|
|
32
|
-
function
|
|
33
|
-
let e = u(), t =
|
|
34
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
40
|
+
}), /* @__PURE__ */ g(x, {
|
|
38
41
|
access: e,
|
|
39
42
|
scope: t,
|
|
40
43
|
actions: n
|
|
41
44
|
}, n.scopeKey)] });
|
|
42
45
|
}
|
|
43
|
-
function
|
|
44
|
-
let l = i(),
|
|
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:
|
|
47
|
-
} } : null, r.revision), K = a(
|
|
48
|
-
shipmentId:
|
|
49
|
+
offset: x
|
|
50
|
+
} } : null, r.revision), K = a(re, U && y ? {
|
|
51
|
+
shipmentId: y,
|
|
49
52
|
pagination: {
|
|
50
53
|
limit: 25,
|
|
51
|
-
offset:
|
|
54
|
+
offset: w
|
|
52
55
|
}
|
|
53
|
-
} : null, r.revision), q = a(
|
|
54
|
-
shipmentId:
|
|
55
|
-
id:
|
|
56
|
-
} : null, r.revision), J = a(
|
|
57
|
-
shipmentId:
|
|
58
|
-
invoiceIdentityId:
|
|
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:
|
|
64
|
+
offset: I
|
|
62
65
|
}
|
|
63
|
-
} : null, r.revision), Y = a(
|
|
64
|
-
shipmentId:
|
|
65
|
-
id:
|
|
66
|
-
} : null, r.revision), X = Y.data?.mtwFreightInvoiceComparison ??
|
|
67
|
-
|
|
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
|
-
|
|
76
|
-
id:
|
|
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
|
|
87
|
+
let he = G.data ? {
|
|
80
88
|
total: G.data.shipmentsCount,
|
|
81
89
|
limit: 25,
|
|
82
|
-
offset:
|
|
83
|
-
hasMore:
|
|
84
|
-
nextOffset:
|
|
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__ */
|
|
94
|
+
return /* @__PURE__ */ _("div", {
|
|
87
95
|
className: "min-w-0 space-y-6 break-words",
|
|
88
96
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
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.
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
107
|
-
/* @__PURE__ */
|
|
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__ */
|
|
123
|
+
/* @__PURE__ */ g("h2", {
|
|
111
124
|
className: "text-lg font-semibold",
|
|
112
125
|
children: "Choose the exact recorded estimate"
|
|
113
126
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ g(o, {
|
|
115
128
|
label: "Invoice shipment",
|
|
116
|
-
value:
|
|
117
|
-
disabled: W ||
|
|
129
|
+
value: y,
|
|
130
|
+
disabled: W || O,
|
|
118
131
|
options: Q,
|
|
119
132
|
onChange: (e) => {
|
|
120
|
-
|
|
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__ */
|
|
139
|
+
/* @__PURE__ */ g(c, {
|
|
127
140
|
loading: G.loading,
|
|
128
141
|
error: G.error
|
|
129
142
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
page:
|
|
132
|
-
busy: W ||
|
|
133
|
-
offset:
|
|
134
|
-
onChange:
|
|
143
|
+
/* @__PURE__ */ g(s, {
|
|
144
|
+
page: he,
|
|
145
|
+
busy: W || O || G.loading,
|
|
146
|
+
offset: x,
|
|
147
|
+
onChange: C
|
|
135
148
|
}),
|
|
136
|
-
|
|
137
|
-
/* @__PURE__ */
|
|
149
|
+
y && /* @__PURE__ */ _(h, { children: [
|
|
150
|
+
/* @__PURE__ */ g(o, {
|
|
138
151
|
label: "Exact estimate version",
|
|
139
|
-
value:
|
|
140
|
-
disabled: W ||
|
|
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) =>
|
|
158
|
+
onChange: (e) => D(e)
|
|
146
159
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ g(c, {
|
|
148
161
|
loading: K.loading,
|
|
149
162
|
error: K.error
|
|
150
163
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ g(s, {
|
|
152
165
|
page: K.data?.mtwFreightEstimatePage,
|
|
153
|
-
busy: W ||
|
|
154
|
-
offset:
|
|
155
|
-
onChange:
|
|
166
|
+
busy: W || O || K.loading,
|
|
167
|
+
offset: w,
|
|
168
|
+
onChange: T
|
|
156
169
|
})
|
|
157
170
|
] }),
|
|
158
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ g(c, {
|
|
159
172
|
loading: q.loading,
|
|
160
173
|
error: q.error
|
|
161
174
|
}),
|
|
162
|
-
$ && /* @__PURE__ */
|
|
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__ */
|
|
191
|
+
/* @__PURE__ */ _("div", {
|
|
179
192
|
className: "flex flex-wrap gap-3",
|
|
180
193
|
children: [
|
|
181
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ g(n, {
|
|
182
195
|
type: "button",
|
|
183
|
-
disabled: W || !$ || $.shipmentId !==
|
|
196
|
+
disabled: W || !$ || $.shipmentId !== y || q.loading || !!q.error,
|
|
184
197
|
onClick: () => {
|
|
185
|
-
|
|
198
|
+
k(!0), H(null);
|
|
186
199
|
},
|
|
187
|
-
children:
|
|
200
|
+
children: A ? `Start correction draft after revision ${A.revision}` : "Start manual invoice draft"
|
|
188
201
|
}),
|
|
189
|
-
|
|
202
|
+
O && /* @__PURE__ */ g(n, {
|
|
190
203
|
type: "button",
|
|
191
204
|
variant: "outline",
|
|
192
205
|
disabled: W,
|
|
193
206
|
onClick: () => {
|
|
194
|
-
|
|
207
|
+
k(!1), j(null);
|
|
195
208
|
},
|
|
196
209
|
children: "Discard unsent draft"
|
|
197
210
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
222
|
+
O && $ && $.shipmentId === y && /* @__PURE__ */ g(le, {
|
|
210
223
|
estimate: $,
|
|
211
|
-
previous:
|
|
224
|
+
previous: A,
|
|
212
225
|
disabled: W || q.loading || !!q.error,
|
|
213
226
|
canRecord: e.canUpdate,
|
|
214
|
-
onPreview: async (e) => (await l(
|
|
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}:${
|
|
220
|
-
V && /* @__PURE__ */
|
|
232
|
+
}, `${$.id}:${A?.id ?? "first"}`),
|
|
233
|
+
V && /* @__PURE__ */ g("p", {
|
|
221
234
|
role: "alert",
|
|
222
235
|
children: V
|
|
223
236
|
}),
|
|
224
|
-
|
|
237
|
+
y && /* @__PURE__ */ _("section", {
|
|
225
238
|
className: "space-y-4 rounded-xl border bg-bg-surface p-5",
|
|
226
239
|
children: [
|
|
227
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ g("h2", {
|
|
228
241
|
className: "text-lg font-semibold",
|
|
229
242
|
children: "Recorded invoice history"
|
|
230
243
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
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__ */
|
|
250
|
+
/* @__PURE__ */ g(ee, {
|
|
238
251
|
label: "Known invoice identity ID",
|
|
239
|
-
value:
|
|
252
|
+
value: P,
|
|
240
253
|
disabled: r.busy,
|
|
241
|
-
onChange:
|
|
254
|
+
onChange: F
|
|
242
255
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ g(n, {
|
|
244
257
|
type: "button",
|
|
245
258
|
variant: "outline",
|
|
246
|
-
disabled: r.busy || !
|
|
259
|
+
disabled: r.busy || !P.trim(),
|
|
247
260
|
onClick: () => {
|
|
248
|
-
|
|
261
|
+
N(P.trim()), L(0), z(""), B(null), v((e) => {
|
|
249
262
|
let t = new URLSearchParams(e);
|
|
250
|
-
return t.set("invoiceShipment",
|
|
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
|
-
|
|
257
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
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__ */
|
|
292
|
+
/* @__PURE__ */ g(s, {
|
|
280
293
|
page: J.data?.mtwFreightInvoiceComparisonPage,
|
|
281
294
|
busy: J.loading || r.busy,
|
|
282
|
-
offset:
|
|
283
|
-
onChange:
|
|
295
|
+
offset: I,
|
|
296
|
+
onChange: L
|
|
284
297
|
})
|
|
285
298
|
] })
|
|
286
299
|
]
|
|
287
300
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ g(c, {
|
|
289
302
|
loading: Y.loading,
|
|
290
303
|
error: Y.error
|
|
291
304
|
}),
|
|
292
|
-
X && X.shipmentId ===
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
/* @__PURE__ */
|
|
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 ||
|
|
314
|
+
disabled: W || !e.canUpdate || !J.data || J.data.mtwFreightInvoiceComparisonPage.items[0]?.id !== X.id || I !== 0,
|
|
297
315
|
onClick: () => {
|
|
298
|
-
|
|
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__ */
|
|
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
|
|
309
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
330
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
313
331
|
className: "font-semibold",
|
|
314
332
|
children: "Original save is unresolved"
|
|
315
|
-
}), e && d(e.scope, t) ? /* @__PURE__ */
|
|
316
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
353
|
+
/* @__PURE__ */ _("details", { children: [/* @__PURE__ */ g("summary", {
|
|
336
354
|
className: "min-h-11 cursor-pointer",
|
|
337
355
|
children: "Retained original source intent"
|
|
338
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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 {
|
|
364
|
+
export { S as InvoiceRequestRecovery, y as default };
|