@burdenoff/microfe-movethewheels 2026.1016.1 → 2026.1016.3

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 (200) hide show
  1. package/dist/components/freight-cost/FreightCommercialEditor.js +217 -0
  2. package/dist/components/freight-cost/FreightCommercialFactEditor.js +217 -0
  3. package/dist/components/freight-cost/FreightCommercialHistory.js +115 -0
  4. package/dist/components/freight-cost/FreightDraftForm.js +106 -91
  5. package/dist/components/freight-cost/FreightHistory.js +42 -40
  6. package/dist/dev/main.d.ts +0 -1
  7. package/dist/generated/freight-cost-operations.d.ts +959 -0
  8. package/dist/hooks/useFreightRecoveryAction.js +20 -20
  9. package/dist/index.d.ts +2 -4
  10. package/dist/movethewheels/MoveTheWheelsRoot.d.ts +0 -1
  11. package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +1 -1
  12. package/dist/movethewheels/components/AssignmentSuggestions.d.ts +1 -2
  13. package/dist/movethewheels/components/CarbonFootprintPanel.d.ts +1 -1
  14. package/dist/movethewheels/components/ContainerEvidencePicker.d.ts +1 -2
  15. package/dist/movethewheels/components/CustomerPicker.d.ts +1 -2
  16. package/dist/movethewheels/components/DataTable.d.ts +1 -2
  17. package/dist/movethewheels/components/DocumentsCard.d.ts +1 -2
  18. package/dist/movethewheels/components/EntityCombobox.d.ts +1 -1
  19. package/dist/movethewheels/components/FleetAlertsPanel.d.ts +1 -2
  20. package/dist/movethewheels/components/FormError.d.ts +1 -1
  21. package/dist/movethewheels/components/FreeTimeAgreementForm.d.ts +1 -2
  22. package/dist/movethewheels/components/GlassPanel.d.ts +1 -2
  23. package/dist/movethewheels/components/MetricCard.d.ts +3 -4
  24. package/dist/movethewheels/components/Notice.d.ts +1 -1
  25. package/dist/movethewheels/components/OrderItemRow.d.ts +1 -2
  26. package/dist/movethewheels/components/PageLayout.d.ts +5 -6
  27. package/dist/movethewheels/components/ProofOfDeliveryCard.d.ts +1 -1
  28. package/dist/movethewheels/components/ReturnInstructionForm.d.ts +1 -2
  29. package/dist/movethewheels/components/ReuseControls.d.ts +4 -5
  30. package/dist/movethewheels/components/ReusePermissionForm.d.ts +1 -2
  31. package/dist/movethewheels/components/ReuseProposalForm.d.ts +1 -2
  32. package/dist/movethewheels/components/ReuseSourceFields.d.ts +1 -2
  33. package/dist/movethewheels/components/ShippingQuoteResults.d.ts +1 -2
  34. package/dist/movethewheels/components/StatusBadge.d.ts +5 -6
  35. package/dist/movethewheels/components/StockActionDialogs.d.ts +3 -3
  36. package/dist/movethewheels/components/UpcomingDemandPanel.d.ts +1 -2
  37. package/dist/movethewheels/components/VehicleServiceCard.d.ts +1 -2
  38. package/dist/movethewheels/components/charts/ChartShell.d.ts +2 -3
  39. package/dist/movethewheels/components/charts/Sparkline.d.ts +1 -1
  40. package/dist/movethewheels/components/charts/StatusDonut.d.ts +1 -1
  41. package/dist/movethewheels/components/charts/TrendChart.d.ts +1 -1
  42. package/dist/movethewheels/components/charts/VolumeBar.d.ts +1 -1
  43. package/dist/movethewheels/components/consolidation/ConsolidationHistory.d.ts +3 -4
  44. package/dist/movethewheels/components/consolidation/ConsolidationLotEditor.d.ts +1 -2
  45. package/dist/movethewheels/components/consolidation/ConsolidationManifestWorkbench.d.ts +1 -2
  46. package/dist/movethewheels/components/consolidation/ConsolidationPlanForm.d.ts +1 -2
  47. package/dist/movethewheels/components/consolidation/ConsolidationPlanWorkbench.d.ts +1 -2
  48. package/dist/movethewheels/components/consolidation/ConsolidationReportForm.d.ts +1 -2
  49. package/dist/movethewheels/components/consolidation/ConsolidationReportsWorkbench.d.ts +1 -2
  50. package/dist/movethewheels/components/consolidation/ConsolidationSummary.d.ts +1 -2
  51. package/dist/movethewheels/components/consolidation/OriginalConsolidationHistory.d.ts +1 -2
  52. package/dist/movethewheels/components/freight-cost/FreightCommercialEditor.d.ts +8 -0
  53. package/dist/movethewheels/components/freight-cost/FreightCommercialFactEditor.d.ts +8 -0
  54. package/dist/movethewheels/components/freight-cost/FreightCommercialHistory.d.ts +4 -0
  55. package/dist/movethewheels/components/freight-cost/FreightDraftForm.d.ts +5 -4
  56. package/dist/movethewheels/components/freight-cost/FreightFields.d.ts +3 -4
  57. package/dist/movethewheels/components/freight-cost/FreightFxEditor.d.ts +1 -2
  58. package/dist/movethewheels/components/freight-cost/FreightHistory.d.ts +3 -4
  59. package/dist/movethewheels/components/freight-cost/FreightLineEditor.d.ts +1 -2
  60. package/dist/movethewheels/components/freight-cost/FreightScopeEditor.d.ts +1 -2
  61. package/dist/movethewheels/components/freight-cost/FreightTotals.d.ts +1 -2
  62. package/dist/movethewheels/components/logistics-procedure/ProcedureDecisionForm.d.ts +2 -3
  63. package/dist/movethewheels/components/logistics-procedure/ProcedureFields.d.ts +3 -4
  64. package/dist/movethewheels/components/logistics-procedure/ProcedureHistory.d.ts +1 -2
  65. package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyForm.d.ts +1 -2
  66. package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.d.ts +1 -2
  67. package/dist/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.d.ts +1 -2
  68. package/dist/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.d.ts +1 -2
  69. package/dist/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.d.ts +1 -2
  70. package/dist/movethewheels/components/maps/LogisticsMap.d.ts +1 -2
  71. package/dist/movethewheels/components/maps/MapCanvas.d.ts +1 -2
  72. package/dist/movethewheels/components/maps/RouteMap.d.ts +1 -1
  73. package/dist/movethewheels/components/maps/TrackingMap.d.ts +1 -1
  74. package/dist/movethewheels/components/maps/leaflet-setup.d.ts +0 -1
  75. package/dist/movethewheels/components/pending-pick/PendingPickDraft.d.ts +1 -2
  76. package/dist/movethewheels/components/pending-pick/PendingPickHistory.d.ts +1 -1
  77. package/dist/movethewheels/components/pending-pick/PickCapture.d.ts +1 -2
  78. package/dist/movethewheels/components/pending-pick/PickLineSelection.d.ts +1 -2
  79. package/dist/movethewheels/components/pending-pick/PickReviewPanel.d.ts +1 -2
  80. package/dist/movethewheels/components/stock-binding/StockAssessmentDraft.d.ts +1 -2
  81. package/dist/movethewheels/components/stock-binding/StockAssessmentHistory.d.ts +1 -2
  82. package/dist/movethewheels/components/stock-binding/StockAssessmentSummary.d.ts +1 -2
  83. package/dist/movethewheels/components/stock-binding/StockFactForm.d.ts +1 -2
  84. package/dist/movethewheels/components/stock-observation/StockIssueForm.d.ts +1 -2
  85. package/dist/movethewheels/components/stock-observation/StockIssueHistory.d.ts +1 -2
  86. package/dist/movethewheels/components/stock-observation/StockIssueReadPanel.d.ts +1 -1
  87. package/dist/movethewheels/components/trip-utilization/TripReportForm.d.ts +1 -2
  88. package/dist/movethewheels/components/trip-utilization/TripReportHistory.d.ts +1 -2
  89. package/dist/movethewheels/components/trip-utilization/TripReportSummary.d.ts +1 -2
  90. package/dist/movethewheels/components/trip-utilization/TripSegmentFields.d.ts +1 -2
  91. package/dist/movethewheels/hooks/useAnalytics.d.ts +0 -1
  92. package/dist/movethewheels/hooks/useConsolidationAction.d.ts +0 -1
  93. package/dist/movethewheels/hooks/useContainerCondition.d.ts +0 -1
  94. package/dist/movethewheels/hooks/useContainerLifecycle.d.ts +0 -1
  95. package/dist/movethewheels/hooks/useCustomers.d.ts +0 -1
  96. package/dist/movethewheels/hooks/useEmptyReuseAction.d.ts +0 -1
  97. package/dist/movethewheels/hooks/useEpod.d.ts +0 -1
  98. package/dist/movethewheels/hooks/useFleet.d.ts +0 -1
  99. package/dist/movethewheels/hooks/useFreightRecoveryAction.d.ts +0 -1
  100. package/dist/movethewheels/hooks/useInventory.d.ts +0 -1
  101. package/dist/movethewheels/hooks/useOrders.d.ts +0 -1
  102. package/dist/movethewheels/hooks/useProcedureAction.d.ts +0 -1
  103. package/dist/movethewheels/hooks/useProcedureSelection.d.ts +0 -1
  104. package/dist/movethewheels/hooks/useReuseRecoveryAction.d.ts +0 -1
  105. package/dist/movethewheels/hooks/useRoutes.d.ts +0 -1
  106. package/dist/movethewheels/hooks/useShipmentStatusAuthority.d.ts +0 -1
  107. package/dist/movethewheels/hooks/useTracking.d.ts +0 -1
  108. package/dist/movethewheels/hooks/useTrackingEventQuality.d.ts +0 -1
  109. package/dist/movethewheels/pages/AIAssistantPage.d.ts +1 -1
  110. package/dist/movethewheels/pages/AnalyticsPage.d.ts +1 -1
  111. package/dist/movethewheels/pages/ConsolidationPage.d.ts +1 -1
  112. package/dist/movethewheels/pages/ContainerConditionPage.d.ts +1 -1
  113. package/dist/movethewheels/pages/ContainersPage.d.ts +1 -1
  114. package/dist/movethewheels/pages/CreateOrderPage.d.ts +1 -1
  115. package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +1 -1
  116. package/dist/movethewheels/pages/CustomersPage.d.ts +1 -1
  117. package/dist/movethewheels/pages/DashboardPage.d.ts +1 -1
  118. package/dist/movethewheels/pages/DeliveryCapturePage.d.ts +1 -1
  119. package/dist/movethewheels/pages/DriverDetailsPage.d.ts +1 -1
  120. package/dist/movethewheels/pages/DriversPage.d.ts +1 -1
  121. package/dist/movethewheels/pages/EmptyReusePage.d.ts +1 -1
  122. package/dist/movethewheels/pages/FinancePage.d.ts +1 -1
  123. package/dist/movethewheels/pages/FleetPage.d.ts +1 -1
  124. package/dist/movethewheels/pages/FreeTimePage.d.ts +1 -1
  125. package/dist/movethewheels/pages/FreightEstimatePage.d.ts +1 -1
  126. package/dist/movethewheels/pages/ImportExportPage.d.ts +1 -1
  127. package/dist/movethewheels/pages/InventoryPage.d.ts +1 -1
  128. package/dist/movethewheels/pages/LiveTrackingPage.d.ts +1 -1
  129. package/dist/movethewheels/pages/LogisticsProceduresPage.d.ts +1 -1
  130. package/dist/movethewheels/pages/MarketplacePage.d.ts +1 -1
  131. package/dist/movethewheels/pages/MultiModalShipmentPage.d.ts +1 -1
  132. package/dist/movethewheels/pages/OrderDetailsPage.d.ts +1 -1
  133. package/dist/movethewheels/pages/OrdersListPage.d.ts +1 -1
  134. package/dist/movethewheels/pages/PendingPickPage.d.ts +1 -1
  135. package/dist/movethewheels/pages/ProductDetailsPage.d.ts +1 -1
  136. package/dist/movethewheels/pages/ProductsPage.d.ts +1 -1
  137. package/dist/movethewheels/pages/ReportsPage.d.ts +1 -1
  138. package/dist/movethewheels/pages/RouteDetailsPage.d.ts +1 -1
  139. package/dist/movethewheels/pages/RoutesPage.d.ts +1 -1
  140. package/dist/movethewheels/pages/SettingsPage.d.ts +1 -1
  141. package/dist/movethewheels/pages/ShipmentStatusAuthorityPage.d.ts +1 -1
  142. package/dist/movethewheels/pages/ShippingRatesPage.d.ts +1 -1
  143. package/dist/movethewheels/pages/StockBindingPage.d.ts +1 -1
  144. package/dist/movethewheels/pages/StockObservationsPage.d.ts +1 -1
  145. package/dist/movethewheels/pages/TrackingEventQualityPage.d.ts +1 -1
  146. package/dist/movethewheels/pages/TrackingPage.d.ts +1 -1
  147. package/dist/movethewheels/pages/TripUtilizationPage.d.ts +1 -1
  148. package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +1 -1
  149. package/dist/movethewheels/pages/VehiclesPage.d.ts +1 -1
  150. package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +1 -1
  151. package/dist/movethewheels/pages/WarehousesPage.d.ts +1 -1
  152. package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +0 -1
  153. package/dist/movethewheels/store/movethewheelsStore.d.ts +0 -1
  154. package/dist/movethewheels/types/index.d.ts +0 -1
  155. package/dist/movethewheels/utils/cn.d.ts +0 -1
  156. package/dist/movethewheels/utils/consolidationHistoryTarget.d.ts +0 -1
  157. package/dist/movethewheels/utils/consolidationInput.d.ts +0 -1
  158. package/dist/movethewheels/utils/consolidationLot.d.ts +0 -1
  159. package/dist/movethewheels/utils/consolidationPins.d.ts +0 -1
  160. package/dist/movethewheels/utils/consolidationRecovery.d.ts +0 -1
  161. package/dist/movethewheels/utils/consolidationReportHead.d.ts +0 -1
  162. package/dist/movethewheels/utils/formatters.d.ts +0 -1
  163. package/dist/movethewheels/utils/freightCommercial.d.ts +44 -0
  164. package/dist/movethewheels/utils/freightDraft.d.ts +0 -1
  165. package/dist/movethewheels/utils/freightRecovery.d.ts +0 -1
  166. package/dist/movethewheels/utils/mapMarkers.d.ts +0 -1
  167. package/dist/movethewheels/utils/orderValidation.d.ts +0 -1
  168. package/dist/movethewheels/utils/pendingPickDraft.d.ts +0 -1
  169. package/dist/movethewheels/utils/pickReviewAcknowledgement.d.ts +0 -1
  170. package/dist/movethewheels/utils/procedureInput.d.ts +0 -1
  171. package/dist/movethewheels/utils/procedureRecovery.d.ts +0 -1
  172. package/dist/movethewheels/utils/reuseForm.d.ts +0 -1
  173. package/dist/movethewheels/utils/reuseRecovery.d.ts +0 -1
  174. package/dist/movethewheels/utils/stockBindingForm.d.ts +0 -1
  175. package/dist/movethewheels/utils/stockObservationForm.d.ts +0 -1
  176. package/dist/movethewheels/utils/tripDraftContext.d.ts +0 -1
  177. package/dist/movethewheels/utils/tripUtilizationForm.d.ts +0 -1
  178. package/dist/pages/FreightEstimatePage.js +96 -92
  179. package/dist/services/createSandboxAssistantTransport.d.ts +2 -1
  180. package/dist/src/generated/freight-cost-operations.js +495 -6
  181. package/dist/stories/EntityCombobox.stories.d.ts +1 -2
  182. package/dist/stories/MetricCard.stories.d.ts +0 -1
  183. package/dist/stories/Notice.stories.d.ts +0 -1
  184. package/dist/stories/StatusBadge.stories.d.ts +0 -1
  185. package/dist/utils/freightAcknowledgement.js +6 -5
  186. package/dist/utils/freightCommercial.js +194 -0
  187. package/dist/utils/freightRecovery.js +22 -22
  188. package/package.json +6 -5
  189. package/src/generated/freight-cost-operations.ts +831 -1
  190. package/src/movethewheels/components/freight-cost/FreightCommercialEditor.tsx +236 -0
  191. package/src/movethewheels/components/freight-cost/FreightCommercialFactEditor.tsx +258 -0
  192. package/src/movethewheels/components/freight-cost/FreightCommercialHistory.tsx +90 -0
  193. package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +33 -4
  194. package/src/movethewheels/components/freight-cost/FreightHistory.tsx +4 -2
  195. package/src/movethewheels/hooks/useFreightRecoveryAction.ts +2 -1
  196. package/src/movethewheels/pages/FreightEstimatePage.tsx +14 -7
  197. package/src/movethewheels/utils/freightAcknowledgement.ts +3 -1
  198. package/src/movethewheels/utils/freightCommercial.ts +388 -0
  199. package/src/movethewheels/utils/freightRecovery.ts +6 -2
  200. package/src/operations/freight-cost/commercial.graphql +483 -0
@@ -3,144 +3,147 @@ import { Button as t } from "../components/ui.js";
3
3
  import { PageLayout as n } from "../components/PageLayout.js";
4
4
  import { useConditionApi as r, useConditionQuery as i } from "../hooks/useContainerCondition.js";
5
5
  import { PinnedSelect as a, ReusePager as o, ReuseState as s, reuseCard as c } from "../components/ReuseControls.js";
6
- import { FreightText as l } from "../components/freight-cost/FreightFields.js";
7
- import { freightPinMatches as u, freightSaveInput as d } from "../utils/freightDraft.js";
8
- import { FreightDraftForm as ee } from "../components/freight-cost/FreightDraftForm.js";
9
- import { FreightHistory as f } from "../components/freight-cost/FreightHistory.js";
10
- import { FreightHistoryDocument as p, FreightShipmentDocument as m, FreightShipmentsDocument as h, FreightVersionDocument as g, PreviewFreightCostsDocument as _, SaveFreightCostsDocument as v } from "../src/generated/freight-cost-operations.js";
6
+ import { FreightCommercialVersionDocument as l, FreightHistoryDocument as u, FreightShipmentDocument as d, FreightShipmentsDocument as f, PreviewFreightCostsDocument as ee, SaveFreightCommercialCostsDocument as p, SaveFreightCostsDocument as m } from "../src/generated/freight-cost-operations.js";
7
+ import { FreightText as h } from "../components/freight-cost/FreightFields.js";
8
+ import { freightPinMatches as g, freightSaveInput as _ } from "../utils/freightDraft.js";
9
+ import { FreightDraftForm as v } from "../components/freight-cost/FreightDraftForm.js";
10
+ import { FreightHistory as te } from "../components/freight-cost/FreightHistory.js";
11
11
  import { useFreightRecoveryAction as y } from "../hooks/useFreightRecoveryAction.js";
12
- import { useEffect as te, useRef as b, useState as x } from "react";
13
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
12
+ import { useEffect as b, useRef as x, useState as S } from "react";
13
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
14
14
  //#region src/movethewheels/pages/FreightEstimatePage.tsx
15
- function T() {
15
+ function E() {
16
16
  let t = y();
17
- return /* @__PURE__ */ C(n, {
17
+ return /* @__PURE__ */ w(n, {
18
18
  title: "Freight cost estimates",
19
19
  subtitle: "Dated source costs, visible unknowns and immutable versions.",
20
- icon: /* @__PURE__ */ C(e, { "aria-hidden": "true" }),
21
- children: /* @__PURE__ */ C(E, { actions: t }, t.contextKey)
20
+ icon: /* @__PURE__ */ w(e, { "aria-hidden": "true" }),
21
+ children: /* @__PURE__ */ w(D, { actions: t }, t.contextKey)
22
22
  });
23
23
  }
24
- function E({ actions: e }) {
25
- let n = r(), [y, T] = x(0), [E, D] = x(0), [O, k] = x(null), [A, j] = x(""), [M, N] = x(null), [P, F] = x(null), [I, L] = x(!1), [R, z] = x(!1), [B, V] = x(null), H = b(!0), U = b(!1);
26
- te(() => (H.current = !0, () => {
24
+ function D({ actions: e }) {
25
+ let n = r(), [y, E] = S(0), [D, O] = S(0), [k, A] = S(null), [j, M] = S(""), [N, P] = S(null), [F, I] = S(null), [ne, L] = S(!1), [R, z] = S(!1), [B, V] = S(null), H = x(!0), U = x(!1);
26
+ b(() => (H.current = !0, () => {
27
27
  H.current = !1;
28
28
  }), []);
29
- let W = i(h, { pagination: {
29
+ let W = i(f, { pagination: {
30
30
  limit: 25,
31
31
  offset: y
32
- } }, e.revision), G = i(m, O ? { id: O.id } : null, e.revision), K = i(p, O && A.trim() ? {
33
- shipmentId: O.id,
34
- estimateReference: A.trim(),
32
+ } }, e.revision), G = i(d, k ? { id: k.id } : null, e.revision), K = i(u, k && j.trim() ? {
33
+ shipmentId: k.id,
34
+ estimateReference: j.trim(),
35
35
  pagination: {
36
36
  limit: 1,
37
37
  offset: 0
38
38
  }
39
- } : null, e.revision), q = e.uncertain ? e.originalHistoryTarget : O ? {
40
- shipmentId: O.id,
39
+ } : null, e.revision), q = e.uncertain ? e.originalHistoryTarget : k ? {
40
+ shipmentId: k.id,
41
41
  estimateReference: void 0
42
- } : null, J = i(p, q ? {
42
+ } : null, J = i(u, q ? {
43
43
  shipmentId: q.shipmentId,
44
44
  estimateReference: q.estimateReference,
45
45
  pagination: {
46
46
  limit: 10,
47
- offset: E
47
+ offset: D
48
48
  }
49
- } : null, e.revision), Y = i(g, q && M ? {
49
+ } : null, e.revision), Y = i(l, q && N ? {
50
50
  shipmentId: q.shipmentId,
51
- id: M
52
- } : null, e.revision), X = K.data?.mtwFreightEstimatePage.items[0] ?? null, Z = !!P && !!G.data && !!K.data && !u(P, G.data.shipment, X), Q = e.busy || I || e.uncertain, $ = W.data?.shipments.map((e) => ({
51
+ id: N
52
+ } : null, e.revision), X = K.data?.mtwFreightEstimatePage.items[0] ?? null, Z = !!F && !!G.data && !!K.data && !g(F, G.data.shipment, X), Q = e.busy || ne || e.uncertain, $ = W.data?.shipments.map((e) => ({
53
53
  id: e.id,
54
54
  label: `${e.shipmentNumber} — ${e.primaryMode} — ${e.status}`
55
55
  })) ?? [];
56
- O && !$.some((e) => e.id === O.id) && $.unshift({
57
- id: O.id,
58
- label: `${O.label} — selected outside this page`
56
+ k && !$.some((e) => e.id === k.id) && $.unshift({
57
+ id: k.id,
58
+ label: `${k.label} — selected outside this page`
59
59
  });
60
- let ne = async (t, r) => {
60
+ let re = async (t, r, i) => {
61
61
  if (U.current || Q) return;
62
- if (!P) throw Error("Review the shipment and current cost history first.");
62
+ if (!F) throw Error("Review the shipment and current cost history first.");
63
63
  U.current = !0, L(!0), V(null);
64
- let i = P;
64
+ let a = F;
65
65
  try {
66
- let a = await n(m, { id: i.shipmentId }), o = await n(p, {
67
- shipmentId: i.shipmentId,
68
- estimateReference: i.estimateReference,
66
+ let o = await n(d, { id: a.shipmentId }), s = await n(u, {
67
+ shipmentId: a.shipmentId,
68
+ estimateReference: a.estimateReference,
69
69
  pagination: {
70
70
  limit: 1,
71
71
  offset: 0
72
72
  }
73
73
  });
74
74
  if (!H.current) throw Error("The current workspace changed. Nothing was sent.");
75
- let s = o.mtwFreightEstimatePage.items[0] ?? null;
76
- u(i, a.shipment, s) || z(!0);
77
- let c = d(i, a.shipment, s, t, r.map(({ fileId: e, versionId: t }) => ({
75
+ let c = s.mtwFreightEstimatePage.items[0] ?? null;
76
+ g(a, o.shipment, c) || z(!0);
77
+ let l = _(a, o.shipment, c, t, r.map(({ fileId: e, versionId: t }) => ({
78
78
  fileId: e,
79
79
  versionId: t
80
- }))), l = await e.run(v, c, "Sourced cost version recorded.");
81
- l && H.current && (N(l.saveMtwFreightEstimate.id), F(null), D(0));
80
+ }))), f = await e.run(i ? p : m, i ? {
81
+ ...l,
82
+ commercialCapture: i
83
+ } : l, "Sourced cost version recorded.");
84
+ f && H.current && (P(f.saveMtwFreightEstimate.id), I(null), O(0));
82
85
  } finally {
83
86
  H.current && L(!1), U.current = !1;
84
87
  }
85
- }, re = W.data ? {
88
+ }, ie = W.data ? {
86
89
  total: W.data.shipmentsCount,
87
90
  limit: 25,
88
91
  offset: y,
89
92
  hasMore: y + W.data.shipments.length < W.data.shipmentsCount,
90
93
  nextOffset: y + 25
91
94
  } : void 0;
92
- return /* @__PURE__ */ w("div", {
95
+ return /* @__PURE__ */ T("div", {
93
96
  className: "min-w-0 space-y-6 break-words",
94
97
  children: [
95
- /* @__PURE__ */ C("p", {
98
+ /* @__PURE__ */ w("p", {
96
99
  className: "rounded border p-4 text-sm",
97
100
  children: "Record the costs stated by your source. Missing facts are not zero. Saving does not book freight, accept a quote or settle an invoice."
98
101
  }),
99
- /* @__PURE__ */ w("section", {
102
+ /* @__PURE__ */ T("section", {
100
103
  className: c,
101
104
  children: [
102
- /* @__PURE__ */ C("h2", {
105
+ /* @__PURE__ */ w("h2", {
103
106
  className: "text-lg font-semibold",
104
107
  children: "Shipment and cost sheet"
105
108
  }),
106
- /* @__PURE__ */ C(a, {
109
+ /* @__PURE__ */ w(a, {
107
110
  label: "Shipment",
108
- value: O?.id ?? "",
111
+ value: k?.id ?? "",
109
112
  options: $,
110
113
  disabled: Q,
111
114
  onChange: (e) => {
112
115
  let t = $.find((t) => t.id === e);
113
- k(t ? {
116
+ A(t ? {
114
117
  id: t.id,
115
118
  label: t.label
116
- } : null), F(null), N(null), D(0), z(!1);
119
+ } : null), I(null), P(null), O(0), z(!1);
117
120
  }
118
121
  }),
119
- /* @__PURE__ */ C(s, {
122
+ /* @__PURE__ */ w(s, {
120
123
  loading: W.loading,
121
124
  error: W.error
122
125
  }),
123
- /* @__PURE__ */ C(o, {
124
- page: re,
126
+ /* @__PURE__ */ w(o, {
127
+ page: ie,
125
128
  busy: W.loading || Q,
126
129
  offset: y,
127
- onChange: T
130
+ onChange: E
128
131
  }),
129
- /* @__PURE__ */ C(l, {
132
+ /* @__PURE__ */ w(h, {
130
133
  label: "Cost sheet reference",
131
- value: A,
132
- disabled: Q || P !== null,
133
- onChange: j
134
+ value: j,
135
+ disabled: Q || F !== null,
136
+ onChange: M
134
137
  }),
135
- /* @__PURE__ */ C(s, {
138
+ /* @__PURE__ */ w(s, {
136
139
  loading: G.loading,
137
140
  error: G.error
138
141
  }),
139
- /* @__PURE__ */ C(s, {
142
+ /* @__PURE__ */ w(s, {
140
143
  loading: K.loading,
141
144
  error: K.error
142
145
  }),
143
- G.data?.shipment && /* @__PURE__ */ w("p", { children: [
146
+ G.data?.shipment && /* @__PURE__ */ T("p", { children: [
144
147
  G.data.shipment.shipmentNumber,
145
148
  " — ",
146
149
  G.data.shipment.primaryMode,
@@ -149,23 +152,23 @@ function E({ actions: e }) {
149
152
  X ? `latest sheet version ${X.version}` : "no version in the loaded sheet",
150
153
  "."
151
154
  ] }),
152
- /* @__PURE__ */ w("div", {
155
+ /* @__PURE__ */ T("div", {
153
156
  className: "flex flex-wrap gap-3",
154
- children: [/* @__PURE__ */ C(t, {
157
+ children: [/* @__PURE__ */ w(t, {
155
158
  type: "button",
156
159
  variant: "outline",
157
160
  disabled: Q,
158
161
  onClick: e.refresh,
159
162
  children: "Refresh current records"
160
- }), /* @__PURE__ */ C(t, {
163
+ }), /* @__PURE__ */ w(t, {
161
164
  type: "button",
162
- disabled: Q || G.loading || K.loading || !!G.error || !!K.error || !G.data?.shipment || !K.data || !A.trim(),
165
+ disabled: Q || G.loading || K.loading || !!G.error || !!K.error || !G.data?.shipment || !K.data || !j.trim(),
163
166
  onClick: () => {
164
167
  let e = G.data?.shipment;
165
- e && K.data && (F({
168
+ e && K.data && (I({
166
169
  shipmentId: e.id,
167
170
  shipmentUpdatedAt: e.updatedAt,
168
- estimateReference: A.trim(),
171
+ estimateReference: j.trim(),
169
172
  previousId: X?.id ?? null,
170
173
  version: X?.version ?? 0,
171
174
  generation: crypto.randomUUID()
@@ -176,42 +179,43 @@ function E({ actions: e }) {
176
179
  })
177
180
  ]
178
181
  }),
179
- (Z || R) && /* @__PURE__ */ C("p", {
182
+ (Z || R) && /* @__PURE__ */ w("p", {
180
183
  role: "alert",
181
184
  children: "The shipment or cost history changed. Review the current records and explicitly start a new draft; entered facts were not rebound."
182
185
  }),
183
- P && !Z && !R && /* @__PURE__ */ C(ee, {
186
+ F && !Z && !R && /* @__PURE__ */ w(v, {
187
+ shipmentId: F.shipmentId,
184
188
  disabled: Q || G.loading || K.loading || !!G.error || !!K.error,
185
- onPreview: async (e) => (await n(_, { input: e })).previewMtwFreightTotal,
186
- onSave: ne
187
- }, P.generation),
188
- B && /* @__PURE__ */ C("p", {
189
+ onPreview: async (e) => (await n(ee, { input: e })).previewMtwFreightTotal,
190
+ onSave: re
191
+ }, F.generation),
192
+ B && /* @__PURE__ */ w("p", {
189
193
  role: "alert",
190
194
  children: B
191
195
  }),
192
- e.error && /* @__PURE__ */ C("p", {
196
+ e.error && /* @__PURE__ */ w("p", {
193
197
  role: "alert",
194
198
  children: e.error
195
199
  }),
196
- e.notice && /* @__PURE__ */ C("p", {
200
+ e.notice && /* @__PURE__ */ w("p", {
197
201
  role: "status",
198
202
  children: e.notice
199
203
  }),
200
- e.uncertain && /* @__PURE__ */ w("section", {
204
+ e.uncertain && /* @__PURE__ */ T("section", {
201
205
  className: "space-y-4 rounded-xl border bg-bg-surface p-5",
202
206
  children: [
203
- /* @__PURE__ */ C("h2", {
207
+ /* @__PURE__ */ w("h2", {
204
208
  className: "font-semibold",
205
209
  children: "Resolve the original save"
206
210
  }),
207
- /* @__PURE__ */ C("p", { children: "The server may already have recorded it. Check history first. Return to the original account, organization, workspace and project before retrying." }),
208
- /* @__PURE__ */ C(t, {
211
+ /* @__PURE__ */ w("p", { children: "The server may already have recorded it. Check history first. Return to the original account, organization, workspace and project before retrying." }),
212
+ /* @__PURE__ */ w(t, {
209
213
  type: "button",
210
214
  disabled: !e.canRetry || e.busy,
211
215
  onClick: () => void e.retryOriginal(),
212
216
  children: "Retry original request"
213
217
  }),
214
- /* @__PURE__ */ C(t, {
218
+ /* @__PURE__ */ w(t, {
215
219
  type: "button",
216
220
  variant: "outline",
217
221
  disabled: e.busy,
@@ -222,38 +226,38 @@ function E({ actions: e }) {
222
226
  })
223
227
  ]
224
228
  }),
225
- e.uncertain && !e.originalHistoryTarget && /* @__PURE__ */ C("p", {
229
+ e.uncertain && !e.originalHistoryTarget && /* @__PURE__ */ w("p", {
226
230
  role: "status",
227
231
  children: "Original history is unavailable in this context. Return to the original account, organization, workspace and project. A malformed saved request cannot supply a history target."
228
232
  }),
229
- q && /* @__PURE__ */ w("section", {
233
+ q && /* @__PURE__ */ T("section", {
230
234
  className: "space-y-4 rounded-xl border bg-bg-surface p-5",
231
235
  children: [
232
- /* @__PURE__ */ C("h2", {
236
+ /* @__PURE__ */ w("h2", {
233
237
  className: "text-lg font-semibold",
234
238
  children: e.uncertain ? "Original request cost history" : "Immutable cost history"
235
239
  }),
236
- e.uncertain && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("p", { children: [
240
+ e.uncertain && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("p", { children: [
237
241
  "Shipment ",
238
242
  q.shipmentId,
239
243
  "; sheet ",
240
244
  q.estimateReference,
241
245
  ". Reading these records does not confirm the original request key or clear recovery."
242
- ] }), /* @__PURE__ */ C(t, {
246
+ ] }), /* @__PURE__ */ w(t, {
243
247
  type: "button",
244
248
  variant: "outline",
245
249
  disabled: e.busy,
246
250
  onClick: e.refresh,
247
251
  children: "Refresh original history"
248
252
  })] }),
249
- /* @__PURE__ */ C(s, {
253
+ /* @__PURE__ */ w(s, {
250
254
  loading: J.loading,
251
255
  error: J.error
252
256
  }),
253
- J.data?.mtwFreightEstimatePage.items.map((e) => /* @__PURE__ */ w(t, {
257
+ J.data?.mtwFreightEstimatePage.items.map((e) => /* @__PURE__ */ T(t, {
254
258
  type: "button",
255
259
  variant: "outline",
256
- onClick: () => N(e.id),
260
+ onClick: () => P(e.id),
257
261
  children: [
258
262
  e.facts.title,
259
263
  " / ",
@@ -265,20 +269,20 @@ function E({ actions: e }) {
265
269
  new Date(e.recordedAt).toLocaleString()
266
270
  ]
267
271
  }, e.id)),
268
- /* @__PURE__ */ C(o, {
272
+ /* @__PURE__ */ w(o, {
269
273
  page: J.data?.mtwFreightEstimatePage,
270
274
  busy: J.loading,
271
- offset: E,
272
- onChange: D
275
+ offset: D,
276
+ onChange: O
273
277
  })
274
278
  ]
275
279
  }),
276
- q && M && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(s, {
280
+ q && N && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(s, {
277
281
  loading: Y.loading,
278
282
  error: Y.error
279
- }), Y.data && /* @__PURE__ */ C(f, { record: Y.data.mtwFreightEstimateVersion })] })
283
+ }), Y.data && /* @__PURE__ */ w(te, { record: Y.data.mtwFreightEstimateVersion })] })
280
284
  ]
281
285
  });
282
286
  }
283
287
  //#endregion
284
- export { T as default };
288
+ export { E as default };
@@ -1 +1,2 @@
1
- export * from '../movethewheels/services/createSandboxAssistantTransport'
1
+ export * from '../movethewheels/services/createSandboxAssistantTransport.js'
2
+ export {}