@burdenoff/microfe-movethewheels 2026.1016.2 → 2026.1016.4
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/README.md +10 -0
- package/dist/MoveTheWheelsRoot.js +5 -0
- package/dist/MoveTheWheelsRoutes.js +25 -21
- package/dist/components/ContainerEvidencePicker.js +55 -55
- package/dist/components/FleetAlertsPanel.js +2 -2
- package/dist/components/freight-cost/FreightCommercialEditor.js +217 -0
- package/dist/components/freight-cost/FreightCommercialFactEditor.js +217 -0
- package/dist/components/freight-cost/FreightCommercialHistory.js +115 -0
- package/dist/components/freight-cost/FreightDraftForm.js +106 -91
- package/dist/components/freight-cost/FreightHistory.js +42 -40
- package/dist/components/freight-invoice/InvoiceForm.js +366 -0
- package/dist/components/freight-invoice/InvoiceResults.js +240 -0
- package/dist/generated/consolidation-operations.d.ts +195 -265
- package/dist/generated/container-condition-operations.d.ts +124 -187
- package/dist/generated/container-operations.d.ts +59 -85
- package/dist/generated/empty-reuse-operations.d.ts +165 -271
- package/dist/generated/free-time-operations.d.ts +120 -184
- package/dist/generated/freight-cost-operations.d.ts +955 -165
- package/dist/generated/freight-invoice-operations.d.ts +1447 -0
- package/dist/generated/logistics-procedure-operations.d.ts +100 -156
- package/dist/generated/pending-pick-operations.d.ts +769 -1025
- package/dist/generated/shipment-status-authority-operations.d.ts +82 -103
- package/dist/generated/stock-binding-operations.d.ts +188 -260
- package/dist/generated/stock-observation-operations.d.ts +103 -138
- package/dist/generated/tracking-quality-operations.d.ts +27 -41
- package/dist/generated/trip-utilization-operations.d.ts +137 -185
- package/dist/generated/wspace-operations.d.ts +628 -2272
- package/dist/generated/wspace-types.d.ts +4 -23
- package/dist/hooks/useFreightRecoveryAction.js +20 -20
- package/dist/hooks/useInvoiceComparisonRecovery.js +118 -0
- package/dist/movethewheels/components/ContainerEvidencePicker.d.ts +2 -1
- package/dist/movethewheels/components/freight-cost/FreightCommercialEditor.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightCommercialFactEditor.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightCommercialHistory.d.ts +4 -0
- package/dist/movethewheels/components/freight-cost/FreightDraftForm.d.ts +4 -2
- package/dist/movethewheels/components/freight-cost/FreightHistory.d.ts +2 -2
- package/dist/movethewheels/components/freight-invoice/InvoiceForm.d.ts +19 -0
- package/dist/movethewheels/components/freight-invoice/InvoiceResults.d.ts +9 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +1 -1
- package/dist/movethewheels/hooks/useFleetIntelligence.d.ts +1 -1
- package/dist/movethewheels/hooks/useInvoiceComparisonRecovery.d.ts +22 -0
- package/dist/movethewheels/hooks/useProcedureSelection.d.ts +1 -3
- package/dist/movethewheels/pages/FreightInvoicePage.d.ts +10 -0
- package/dist/movethewheels/utils/driverLicenseExpiry.d.ts +6 -0
- package/dist/movethewheels/utils/freightCommercial.d.ts +44 -0
- package/dist/movethewheels/utils/invoiceComparison.d.ts +32 -0
- package/dist/pages/DriverDetailsPage.js +306 -282
- package/dist/pages/FreightEstimatePage.js +97 -92
- package/dist/pages/FreightInvoicePage.js +346 -0
- package/dist/src/generated/consolidation-operations.js +3961 -503
- package/dist/src/generated/container-condition-operations.js +2968 -206
- package/dist/src/generated/container-operations.js +997 -99
- package/dist/src/generated/empty-reuse-operations.js +4811 -747
- package/dist/src/generated/free-time-operations.js +2824 -233
- package/dist/src/generated/freight-cost-operations.js +4852 -323
- package/dist/src/generated/freight-invoice-operations.js +4894 -0
- package/dist/src/generated/logistics-procedure-operations.js +2707 -360
- package/dist/src/generated/pending-pick-operations.js +8244 -1196
- package/dist/src/generated/shipment-status-authority-operations.js +1157 -84
- package/dist/src/generated/stock-binding-operations.js +2779 -173
- package/dist/src/generated/stock-observation-operations.js +1274 -91
- package/dist/src/generated/tracking-quality-operations.js +407 -42
- package/dist/src/generated/trip-utilization-operations.js +1765 -138
- package/dist/src/generated/wspace-operations.js +428 -706
- package/dist/utils/driverLicenseExpiry.js +14 -0
- package/dist/utils/freightAcknowledgement.js +6 -5
- package/dist/utils/freightCommercial.js +194 -0
- package/dist/utils/freightRecovery.js +22 -22
- package/dist/utils/invoiceComparison.js +272 -0
- package/package.json +30 -29
- package/src/generated/consolidation-operations.ts +60 -559
- package/src/generated/container-condition-operations.ts +63 -265
- package/src/generated/container-operations.ts +37 -132
- package/src/generated/empty-reuse-operations.ts +83 -824
- package/src/generated/free-time-operations.ts +55 -284
- package/src/generated/freight-cost-operations.ts +373 -349
- package/src/generated/freight-invoice-operations.ts +830 -0
- package/src/generated/logistics-procedure-operations.ts +60 -414
- package/src/generated/pending-pick-operations.ts +48 -1239
- package/src/generated/shipment-status-authority-operations.ts +33 -113
- package/src/generated/stock-binding-operations.ts +29 -198
- package/src/generated/stock-observation-operations.ts +24 -111
- package/src/generated/tracking-quality-operations.ts +19 -57
- package/src/generated/trip-utilization-operations.ts +32 -166
- package/src/generated/wspace-operations.ts +284 -2906
- package/src/generated/wspace-types.ts +2 -8
- package/src/movethewheels/MoveTheWheelsRoot.tsx +6 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +2 -0
- package/src/movethewheels/components/ContainerEvidencePicker.tsx +12 -4
- package/src/movethewheels/components/FleetAlertsPanel.tsx +4 -2
- package/src/movethewheels/components/freight-cost/FreightCommercialEditor.tsx +236 -0
- package/src/movethewheels/components/freight-cost/FreightCommercialFactEditor.tsx +258 -0
- package/src/movethewheels/components/freight-cost/FreightCommercialHistory.tsx +90 -0
- package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +33 -4
- package/src/movethewheels/components/freight-cost/FreightHistory.tsx +4 -2
- package/src/movethewheels/components/freight-invoice/InvoiceForm.tsx +412 -0
- package/src/movethewheels/components/freight-invoice/InvoiceResults.tsx +162 -0
- package/src/movethewheels/hooks/useFleet.ts +1 -1
- package/src/movethewheels/hooks/useFleetIntelligence.ts +5 -1
- package/src/movethewheels/hooks/useFreightRecoveryAction.ts +2 -1
- package/src/movethewheels/hooks/useInvoiceComparisonRecovery.ts +227 -0
- package/src/movethewheels/pages/DriverDetailsPage.tsx +35 -9
- package/src/movethewheels/pages/FreightEstimatePage.tsx +15 -7
- package/src/movethewheels/pages/FreightInvoicePage.tsx +477 -0
- package/src/movethewheels/utils/driverLicenseExpiry.ts +25 -0
- package/src/movethewheels/utils/freightAcknowledgement.ts +3 -1
- package/src/movethewheels/utils/freightCommercial.ts +388 -0
- package/src/movethewheels/utils/freightRecovery.ts +6 -2
- package/src/movethewheels/utils/invoiceComparison.ts +520 -0
- package/src/operations/freight-cost/commercial.graphql +483 -0
- package/src/operations/freight-invoice/comparison.graphql +40 -0
- package/src/operations/wspace/freight-invoice-evidence.graphql +6 -0
- package/patches/braces@3.0.3.patch +0 -87
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { reuseCard as e } from "../ReuseControls.js";
|
|
2
|
+
import { freightLabel as t } from "../../utils/freightDraft.js";
|
|
3
|
+
import { invoiceMoney as n, invoiceRowDifference as r } from "../../utils/invoiceComparison.js";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
//#region src/movethewheels/components/freight-invoice/InvoiceResults.tsx
|
|
6
|
+
function o({ value: o }) {
|
|
7
|
+
let { estimate: s, outcome: c } = o;
|
|
8
|
+
return /* @__PURE__ */ a("section", {
|
|
9
|
+
className: e,
|
|
10
|
+
"aria-label": "Invoice comparison results",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ i("h2", {
|
|
13
|
+
className: "text-lg font-semibold",
|
|
14
|
+
children: "Recorded-fact comparison"
|
|
15
|
+
}),
|
|
16
|
+
/* @__PURE__ */ a("p", { children: [
|
|
17
|
+
"Exact ",
|
|
18
|
+
s.kind.toLowerCase(),
|
|
19
|
+
" ",
|
|
20
|
+
s.estimateReference,
|
|
21
|
+
", version ",
|
|
22
|
+
s.version,
|
|
23
|
+
". Source ",
|
|
24
|
+
s.sourceReference,
|
|
25
|
+
" / ",
|
|
26
|
+
s.sourceRevision,
|
|
27
|
+
"."
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ a("p", { children: [
|
|
30
|
+
"Quote date ",
|
|
31
|
+
s.quotedAt ?? "Unknown",
|
|
32
|
+
"; source validity",
|
|
33
|
+
" ",
|
|
34
|
+
s.validFrom ?? "Unknown",
|
|
35
|
+
" to ",
|
|
36
|
+
s.validUntil ?? "Unknown",
|
|
37
|
+
". Acceptance is not established by this comparison."
|
|
38
|
+
] }),
|
|
39
|
+
"recordable" in o && /* @__PURE__ */ a("p", {
|
|
40
|
+
role: "status",
|
|
41
|
+
children: [
|
|
42
|
+
"Structural preview only.",
|
|
43
|
+
" ",
|
|
44
|
+
o.recordable ? "Source structure is recordable; current permission and Files eligibility are checked when recording." : `Not recordable: ${o.blockers.map(t).join(", ")}.`
|
|
45
|
+
]
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ i("p", {
|
|
48
|
+
className: "font-medium",
|
|
49
|
+
children: c.allLinesMatched ? "All explicitly compared rows and expected coverage agree under this method." : "Differences or unknown coverage remain."
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ i("p", { children: "This is not an all-in cost, contracted-rate audit, liability finding, invoice approval or payment." }),
|
|
52
|
+
c.rows.map((e, n) => /* @__PURE__ */ a("article", {
|
|
53
|
+
className: "min-w-0 space-y-2 rounded border p-3",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ a("h3", {
|
|
56
|
+
className: "font-medium",
|
|
57
|
+
children: [
|
|
58
|
+
"Row ",
|
|
59
|
+
n + 1,
|
|
60
|
+
":",
|
|
61
|
+
" ",
|
|
62
|
+
o.facts.rows.find((t) => t.id === e.invoiceLineId)?.description ?? "Reported charge"
|
|
63
|
+
]
|
|
64
|
+
}),
|
|
65
|
+
/* @__PURE__ */ i("p", { children: e.estimateLineId ? "Mapped to the selected estimate row." : "No estimate row mapped." }),
|
|
66
|
+
/* @__PURE__ */ i("p", { children: e.flags.map(t).join(" · ") }),
|
|
67
|
+
e.reasons.length > 0 && /* @__PURE__ */ a("p", { children: ["Unknown reasons: ", e.reasons.map(t).join(", ")] }),
|
|
68
|
+
/* @__PURE__ */ a("p", { children: ["Comparable amount difference: ", r(o, e.invoiceLineId)] })
|
|
69
|
+
]
|
|
70
|
+
}, e.invoiceLineId)),
|
|
71
|
+
c.missingExpectedLineIds.map((e) => /* @__PURE__ */ a("p", { children: [
|
|
72
|
+
"Missing expected line: ",
|
|
73
|
+
e,
|
|
74
|
+
". An unknown value is not treated as zero."
|
|
75
|
+
] }, e)),
|
|
76
|
+
c.unknownExpectedCoverage.map((e) => /* @__PURE__ */ a("p", { children: [
|
|
77
|
+
"Unknown expected-charge coverage: ",
|
|
78
|
+
e.estimateLineId,
|
|
79
|
+
". This is not a proven missing charge."
|
|
80
|
+
] }, e.estimateLineId)),
|
|
81
|
+
/* @__PURE__ */ a("section", {
|
|
82
|
+
className: "space-y-2",
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ i("h3", {
|
|
85
|
+
className: "font-semibold",
|
|
86
|
+
children: "Comparable pairs only"
|
|
87
|
+
}),
|
|
88
|
+
c.comparableSubtotals.length === 0 && /* @__PURE__ */ i("p", { children: "No bounded comparable subtotal." }),
|
|
89
|
+
c.comparableSubtotals.map((e) => /* @__PURE__ */ a("p", { children: [
|
|
90
|
+
"Payer",
|
|
91
|
+
" ",
|
|
92
|
+
o.facts.rows.find((t) => t.payerReference === e.payerReference)?.payerLabel ?? e.payerReference,
|
|
93
|
+
": estimate ",
|
|
94
|
+
n(e.estimateMinor, e.currency),
|
|
95
|
+
", invoice",
|
|
96
|
+
" ",
|
|
97
|
+
n(e.invoiceMinor, e.currency),
|
|
98
|
+
", difference",
|
|
99
|
+
" ",
|
|
100
|
+
n(e.deltaMinor, e.currency),
|
|
101
|
+
". Included rows",
|
|
102
|
+
" ",
|
|
103
|
+
e.invoiceLineIds.map((e) => o.facts.rows.find((t) => t.id === e)?.description ?? "Reported charge").join(", "),
|
|
104
|
+
". Other rows are omitted."
|
|
105
|
+
] }, JSON.stringify([e.currency, e.payerReference])))
|
|
106
|
+
]
|
|
107
|
+
}),
|
|
108
|
+
[["Declared estimate subtotals", o.estimateDeclaredSubtotals], ["Declared invoice subtotals", o.invoiceDeclaredSubtotals]].map(([e, t]) => /* @__PURE__ */ a("section", {
|
|
109
|
+
className: "space-y-2",
|
|
110
|
+
children: [/* @__PURE__ */ i("h3", {
|
|
111
|
+
className: "font-semibold",
|
|
112
|
+
children: e
|
|
113
|
+
}), t.map((e, t) => /* @__PURE__ */ a("p", { children: [
|
|
114
|
+
"Payer ",
|
|
115
|
+
e.payerLabel ?? "Unknown",
|
|
116
|
+
" (",
|
|
117
|
+
e.payerReference ?? "Unknown reference",
|
|
118
|
+
");",
|
|
119
|
+
" ",
|
|
120
|
+
"known ",
|
|
121
|
+
n(e.knownAmountMinor, e.currency),
|
|
122
|
+
"; total",
|
|
123
|
+
" ",
|
|
124
|
+
n(e.totalAmountMinor, e.currency),
|
|
125
|
+
"."
|
|
126
|
+
] }, JSON.stringify([
|
|
127
|
+
e.currency,
|
|
128
|
+
e.payerReference,
|
|
129
|
+
t
|
|
130
|
+
])))]
|
|
131
|
+
}, e))
|
|
132
|
+
]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function s({ record: e }) {
|
|
136
|
+
return /* @__PURE__ */ a("section", {
|
|
137
|
+
className: "min-w-0 space-y-4 break-words",
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ a("h2", {
|
|
140
|
+
className: "text-lg font-semibold",
|
|
141
|
+
children: ["Immutable comparison revision ", e.revision]
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ a("p", { children: [
|
|
144
|
+
"Invoice ",
|
|
145
|
+
e.facts.invoiceReference,
|
|
146
|
+
"; supplier",
|
|
147
|
+
" ",
|
|
148
|
+
e.facts.supplierLabel ?? "Unknown label",
|
|
149
|
+
" (",
|
|
150
|
+
e.facts.supplierReference,
|
|
151
|
+
"). Source",
|
|
152
|
+
" ",
|
|
153
|
+
e.facts.sourceReference,
|
|
154
|
+
" / ",
|
|
155
|
+
e.facts.sourceRevision,
|
|
156
|
+
"; invoice date",
|
|
157
|
+
" ",
|
|
158
|
+
e.facts.invoiceDate ?? "Unknown",
|
|
159
|
+
"."
|
|
160
|
+
] }),
|
|
161
|
+
/* @__PURE__ */ a("p", { children: [
|
|
162
|
+
"Recorded ",
|
|
163
|
+
e.recordedAt,
|
|
164
|
+
" by ",
|
|
165
|
+
e.createdBy,
|
|
166
|
+
", ",
|
|
167
|
+
t(e.actorProvenance),
|
|
168
|
+
"; on behalf of ",
|
|
169
|
+
e.onBehalfOf ?? "Not declared",
|
|
170
|
+
". Method ",
|
|
171
|
+
e.methodVersion,
|
|
172
|
+
"."
|
|
173
|
+
] }),
|
|
174
|
+
e.correctionReason && /* @__PURE__ */ a("p", { children: [
|
|
175
|
+
"Correction reason: ",
|
|
176
|
+
e.correctionReason,
|
|
177
|
+
"; predecessor ",
|
|
178
|
+
e.previousComparisonId,
|
|
179
|
+
"."
|
|
180
|
+
] }),
|
|
181
|
+
/* @__PURE__ */ a("details", { children: [/* @__PURE__ */ i("summary", {
|
|
182
|
+
className: "min-h-11 cursor-pointer font-medium",
|
|
183
|
+
children: "Original reported rows and exact evidence"
|
|
184
|
+
}), /* @__PURE__ */ a("div", {
|
|
185
|
+
className: "space-y-3",
|
|
186
|
+
children: [e.facts.rows.map((e) => /* @__PURE__ */ a("article", {
|
|
187
|
+
className: "rounded border p-3",
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ a("h3", { children: [
|
|
190
|
+
e.description,
|
|
191
|
+
" (",
|
|
192
|
+
e.id,
|
|
193
|
+
")"
|
|
194
|
+
] }),
|
|
195
|
+
/* @__PURE__ */ a("p", { children: [
|
|
196
|
+
"Mapping ",
|
|
197
|
+
e.estimateLineId ?? "Unmatched",
|
|
198
|
+
"; amount",
|
|
199
|
+
" ",
|
|
200
|
+
n(e.amountMinor, e.currency),
|
|
201
|
+
"; payer ",
|
|
202
|
+
e.payerLabel ?? "Unknown",
|
|
203
|
+
" (",
|
|
204
|
+
e.payerReference ?? "Unknown reference",
|
|
205
|
+
")."
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ a("p", { children: [
|
|
208
|
+
"Quantity ",
|
|
209
|
+
e.quantity ?? "Unknown",
|
|
210
|
+
" ",
|
|
211
|
+
e.unit ?? "unknown unit",
|
|
212
|
+
"; supplied rate",
|
|
213
|
+
" ",
|
|
214
|
+
e.unitRateMajor ?? "Unknown",
|
|
215
|
+
". Invoice amount was not recalculated."
|
|
216
|
+
] }),
|
|
217
|
+
e.zeroReason && /* @__PURE__ */ a("p", { children: ["Zero reason: ", e.zeroReason] })
|
|
218
|
+
]
|
|
219
|
+
}, e.id)), e.evidence.map((e) => /* @__PURE__ */ a("p", {
|
|
220
|
+
className: "break-all",
|
|
221
|
+
children: [
|
|
222
|
+
"File ",
|
|
223
|
+
e.fileId,
|
|
224
|
+
", exact version ",
|
|
225
|
+
e.versionId,
|
|
226
|
+
"; SHA256 ",
|
|
227
|
+
e.sha256Hash,
|
|
228
|
+
"; checked",
|
|
229
|
+
" ",
|
|
230
|
+
e.checkedAt,
|
|
231
|
+
". Point-in-time eligibility only."
|
|
232
|
+
]
|
|
233
|
+
}, e.versionId))]
|
|
234
|
+
})] }),
|
|
235
|
+
/* @__PURE__ */ i(o, { value: e })
|
|
236
|
+
]
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
//#endregion
|
|
240
|
+
export { s as InvoiceHistoryRecord, o as InvoiceResults };
|