@burdenoff/microfe-movethewheels 2026.930.5 → 2026.1010.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/dist/MoveTheWheelsRoot.js +177 -102
  2. package/dist/MoveTheWheelsRoutes.js +55 -11
  3. package/dist/_virtual/_rolldown/runtime.js +1 -1
  4. package/dist/components/ContainerEvidencePicker.js +143 -0
  5. package/dist/components/FreeTimeAgreementForm.js +496 -0
  6. package/dist/components/ReturnInstructionForm.js +108 -0
  7. package/dist/components/ReuseControls.js +91 -0
  8. package/dist/components/ReusePermissionForm.js +114 -0
  9. package/dist/components/ReuseProposalForm.js +455 -0
  10. package/dist/components/ReuseSourceFields.js +78 -0
  11. package/dist/components/consolidation/ConsolidationHistory.js +244 -0
  12. package/dist/components/consolidation/ConsolidationLotEditor.js +133 -0
  13. package/dist/components/consolidation/ConsolidationManifestWorkbench.js +143 -0
  14. package/dist/components/consolidation/ConsolidationPlanForm.js +172 -0
  15. package/dist/components/consolidation/ConsolidationPlanWorkbench.js +321 -0
  16. package/dist/components/consolidation/ConsolidationReportForm.js +94 -0
  17. package/dist/components/consolidation/ConsolidationReportsWorkbench.js +195 -0
  18. package/dist/components/consolidation/ConsolidationSummary.js +76 -0
  19. package/dist/components/consolidation/OriginalConsolidationHistory.js +112 -0
  20. package/dist/components/freight-cost/FreightDraftForm.js +213 -0
  21. package/dist/components/freight-cost/FreightFields.js +70 -0
  22. package/dist/components/freight-cost/FreightFxEditor.js +90 -0
  23. package/dist/components/freight-cost/FreightHistory.js +164 -0
  24. package/dist/components/freight-cost/FreightLineEditor.js +191 -0
  25. package/dist/components/freight-cost/FreightScopeEditor.js +72 -0
  26. package/dist/components/freight-cost/FreightTotals.js +66 -0
  27. package/dist/components/logistics-procedure/ProcedureDecisionForm.js +197 -0
  28. package/dist/components/logistics-procedure/ProcedureFields.js +31 -0
  29. package/dist/components/logistics-procedure/ProcedureHistory.js +177 -0
  30. package/dist/components/logistics-procedure/ProcedurePolicyForm.js +227 -0
  31. package/dist/components/logistics-procedure/ProcedurePolicyWorkbench.js +155 -0
  32. package/dist/components/logistics-procedure/ProcedureReviewWorkbench.js +221 -0
  33. package/dist/components/logistics-procedure/ProcedureRunWorkbench.js +190 -0
  34. package/dist/components/logistics-procedure/ProcedureSubjectPicker.js +130 -0
  35. package/dist/components/pending-pick/PendingPickDraft.js +84 -0
  36. package/dist/components/pending-pick/PendingPickHistory.js +113 -0
  37. package/dist/components/pending-pick/PickCapture.js +166 -0
  38. package/dist/components/pending-pick/PickLineSelection.js +111 -0
  39. package/dist/components/stock-binding/StockAssessmentDraft.js +48 -0
  40. package/dist/components/stock-binding/StockAssessmentHistory.js +61 -0
  41. package/dist/components/stock-binding/StockAssessmentSummary.js +199 -0
  42. package/dist/components/stock-binding/StockFactForm.js +232 -0
  43. package/dist/components/stock-observation/StockIssueForm.js +148 -0
  44. package/dist/components/stock-observation/StockIssueHistory.js +116 -0
  45. package/dist/components/stock-observation/StockIssueReadPanel.js +70 -0
  46. package/dist/components/trip-utilization/TripReportForm.js +118 -0
  47. package/dist/components/trip-utilization/TripReportHistory.js +54 -0
  48. package/dist/components/trip-utilization/TripReportSummary.js +216 -0
  49. package/dist/components/trip-utilization/TripSegmentFields.js +166 -0
  50. package/dist/generated/consolidation-operations.d.ts +1060 -0
  51. package/dist/generated/container-condition-operations.d.ts +868 -0
  52. package/dist/generated/container-operations.d.ts +356 -0
  53. package/dist/generated/empty-reuse-operations.d.ts +1578 -0
  54. package/dist/generated/free-time-operations.d.ts +938 -0
  55. package/dist/generated/freight-cost-operations.d.ts +716 -0
  56. package/dist/generated/logistics-procedure-operations.d.ts +938 -0
  57. package/dist/generated/pending-pick-operations.d.ts +1969 -0
  58. package/dist/generated/stock-binding-operations.d.ts +930 -0
  59. package/dist/generated/stock-observation-operations.d.ts +476 -0
  60. package/dist/generated/trip-utilization-operations.d.ts +651 -0
  61. package/dist/generated/wspace-operations.d.ts +143 -50
  62. package/dist/hooks/useConsolidationAction.js +119 -0
  63. package/dist/hooks/useContainerCondition.js +105 -0
  64. package/dist/hooks/useContainerLifecycle.js +192 -0
  65. package/dist/hooks/useEmptyReuseAction.js +45 -0
  66. package/dist/hooks/useFreightRecoveryAction.js +117 -0
  67. package/dist/hooks/useProcedureAction.js +119 -0
  68. package/dist/hooks/useProcedureSelection.js +53 -0
  69. package/dist/hooks/useReuseRecoveryAction.js +116 -0
  70. package/dist/movethewheels/components/ContainerEvidencePicker.d.ts +10 -0
  71. package/dist/movethewheels/components/FreeTimeAgreementForm.d.ts +14 -0
  72. package/dist/movethewheels/components/ReturnInstructionForm.d.ts +8 -0
  73. package/dist/movethewheels/components/ReuseControls.d.ts +42 -0
  74. package/dist/movethewheels/components/ReusePermissionForm.d.ts +9 -0
  75. package/dist/movethewheels/components/ReuseProposalForm.d.ts +11 -0
  76. package/dist/movethewheels/components/ReuseSourceFields.d.ts +9 -0
  77. package/dist/movethewheels/components/consolidation/ConsolidationHistory.d.ts +13 -0
  78. package/dist/movethewheels/components/consolidation/ConsolidationLotEditor.d.ts +6 -0
  79. package/dist/movethewheels/components/consolidation/ConsolidationManifestWorkbench.d.ts +8 -0
  80. package/dist/movethewheels/components/consolidation/ConsolidationPlanForm.d.ts +8 -0
  81. package/dist/movethewheels/components/consolidation/ConsolidationPlanWorkbench.d.ts +5 -0
  82. package/dist/movethewheels/components/consolidation/ConsolidationReportForm.d.ts +9 -0
  83. package/dist/movethewheels/components/consolidation/ConsolidationReportsWorkbench.d.ts +7 -0
  84. package/dist/movethewheels/components/consolidation/ConsolidationSummary.d.ts +6 -0
  85. package/dist/movethewheels/components/consolidation/OriginalConsolidationHistory.d.ts +8 -0
  86. package/dist/movethewheels/components/freight-cost/FreightDraftForm.d.ts +8 -0
  87. package/dist/movethewheels/components/freight-cost/FreightFields.d.ts +23 -0
  88. package/dist/movethewheels/components/freight-cost/FreightFxEditor.d.ts +6 -0
  89. package/dist/movethewheels/components/freight-cost/FreightHistory.d.ts +5 -0
  90. package/dist/movethewheels/components/freight-cost/FreightLineEditor.d.ts +8 -0
  91. package/dist/movethewheels/components/freight-cost/FreightScopeEditor.d.ts +6 -0
  92. package/dist/movethewheels/components/freight-cost/FreightTotals.d.ts +6 -0
  93. package/dist/movethewheels/components/logistics-procedure/ProcedureDecisionForm.d.ts +20 -0
  94. package/dist/movethewheels/components/logistics-procedure/ProcedureFields.d.ts +17 -0
  95. package/dist/movethewheels/components/logistics-procedure/ProcedureHistory.d.ts +7 -0
  96. package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyForm.d.ts +10 -0
  97. package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.d.ts +5 -0
  98. package/dist/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.d.ts +5 -0
  99. package/dist/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.d.ts +6 -0
  100. package/dist/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.d.ts +7 -0
  101. package/dist/movethewheels/components/pending-pick/PendingPickDraft.d.ts +16 -0
  102. package/dist/movethewheels/components/pending-pick/PendingPickHistory.d.ts +5 -0
  103. package/dist/movethewheels/components/pending-pick/PickCapture.d.ts +6 -0
  104. package/dist/movethewheels/components/pending-pick/PickLineSelection.d.ts +17 -0
  105. package/dist/movethewheels/components/stock-binding/StockAssessmentDraft.d.ts +13 -0
  106. package/dist/movethewheels/components/stock-binding/StockAssessmentHistory.d.ts +18 -0
  107. package/dist/movethewheels/components/stock-binding/StockAssessmentSummary.d.ts +9 -0
  108. package/dist/movethewheels/components/stock-binding/StockFactForm.d.ts +6 -0
  109. package/dist/movethewheels/components/stock-observation/StockIssueForm.d.ts +7 -0
  110. package/dist/movethewheels/components/stock-observation/StockIssueHistory.d.ts +7 -0
  111. package/dist/movethewheels/components/stock-observation/StockIssueReadPanel.d.ts +5 -0
  112. package/dist/movethewheels/components/trip-utilization/TripReportForm.d.ts +6 -0
  113. package/dist/movethewheels/components/trip-utilization/TripReportHistory.d.ts +14 -0
  114. package/dist/movethewheels/components/trip-utilization/TripReportSummary.d.ts +5 -0
  115. package/dist/movethewheels/components/trip-utilization/TripSegmentFields.d.ts +9 -0
  116. package/dist/movethewheels/hooks/useConsolidationAction.d.ts +19 -0
  117. package/dist/movethewheels/hooks/useContainerCondition.d.ts +21 -0
  118. package/dist/movethewheels/hooks/useContainerLifecycle.d.ts +40 -0
  119. package/dist/movethewheels/hooks/useEmptyReuseAction.d.ts +14 -0
  120. package/dist/movethewheels/hooks/useFreightRecoveryAction.d.ts +23 -0
  121. package/dist/movethewheels/hooks/useProcedureAction.d.ts +18 -0
  122. package/dist/movethewheels/hooks/useProcedureSelection.d.ts +51 -0
  123. package/dist/movethewheels/hooks/useReuseRecoveryAction.d.ts +18 -0
  124. package/dist/movethewheels/pages/ConsolidationPage.d.ts +1 -0
  125. package/dist/movethewheels/pages/ContainerConditionPage.d.ts +1 -0
  126. package/dist/movethewheels/pages/ContainersPage.d.ts +2 -0
  127. package/dist/movethewheels/pages/EmptyReusePage.d.ts +1 -0
  128. package/dist/movethewheels/pages/FreeTimePage.d.ts +1 -0
  129. package/dist/movethewheels/pages/FreightEstimatePage.d.ts +1 -0
  130. package/dist/movethewheels/pages/LogisticsProceduresPage.d.ts +1 -0
  131. package/dist/movethewheels/pages/PendingPickPage.d.ts +1 -0
  132. package/dist/movethewheels/pages/StockBindingPage.d.ts +1 -0
  133. package/dist/movethewheels/pages/StockObservationsPage.d.ts +1 -0
  134. package/dist/movethewheels/pages/TripUtilizationPage.d.ts +1 -0
  135. package/dist/movethewheels/utils/consolidationHistoryTarget.d.ts +12 -0
  136. package/dist/movethewheels/utils/consolidationInput.d.ts +15 -0
  137. package/dist/movethewheels/utils/consolidationLot.d.ts +3 -0
  138. package/dist/movethewheels/utils/consolidationPins.d.ts +20 -0
  139. package/dist/movethewheels/utils/consolidationRecovery.d.ts +5 -0
  140. package/dist/movethewheels/utils/consolidationReportHead.d.ts +5 -0
  141. package/dist/movethewheels/utils/freeTimeDate.d.ts +1 -0
  142. package/dist/movethewheels/utils/freightAcknowledgement.d.ts +2 -0
  143. package/dist/movethewheels/utils/freightDraft.d.ts +36 -0
  144. package/dist/movethewheels/utils/freightRecovery.d.ts +5 -0
  145. package/dist/movethewheels/utils/graphqlClient.d.ts +2 -1
  146. package/dist/movethewheels/utils/pendingPickDraft.d.ts +8 -0
  147. package/dist/movethewheels/utils/procedureInput.d.ts +18 -0
  148. package/dist/movethewheels/utils/procedureRecovery.d.ts +5 -0
  149. package/dist/movethewheels/utils/reuseAttempt.d.ts +7 -0
  150. package/dist/movethewheels/utils/reuseForm.d.ts +6 -0
  151. package/dist/movethewheels/utils/reuseRecovery.d.ts +26 -0
  152. package/dist/movethewheels/utils/stockBindingForm.d.ts +23 -0
  153. package/dist/movethewheels/utils/stockBindingLabels.d.ts +10 -0
  154. package/dist/movethewheels/utils/stockObservationForm.d.ts +5 -0
  155. package/dist/movethewheels/utils/tripDraftContext.d.ts +25 -0
  156. package/dist/movethewheels/utils/tripUtilizationForm.d.ts +6 -0
  157. package/dist/node_modules/@react-leaflet/core/lib/component.js +5 -5
  158. package/dist/node_modules/fast-equals/dist/es/index.js +87 -74
  159. package/dist/node_modules/leaflet/dist/leaflet-src.js +8 -5
  160. package/dist/node_modules/lodash/_Stack.js +2 -1
  161. package/dist/node_modules/lucide-react/dist/esm/icons/clipboard-list.js +35 -0
  162. package/dist/node_modules/lucide-react/dist/esm/icons/repeat-2.js +22 -0
  163. package/dist/node_modules/react-leaflet/lib/MapContainer.js +3 -3
  164. package/dist/node_modules/react-smooth/es6/Animate.js +2 -2
  165. package/dist/node_modules/recharts/es6/cartesian/Area.js +13 -13
  166. package/dist/node_modules/recharts/es6/cartesian/Bar.js +9 -9
  167. package/dist/node_modules/recharts/es6/cartesian/Brush.js +12 -12
  168. package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +7 -7
  169. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +13 -13
  170. package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +4 -4
  171. package/dist/node_modules/recharts/es6/cartesian/Line.js +10 -10
  172. package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +3 -3
  173. package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +3 -3
  174. package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +4 -4
  175. package/dist/node_modules/recharts/es6/cartesian/XAxis.js +3 -3
  176. package/dist/node_modules/recharts/es6/cartesian/YAxis.js +3 -3
  177. package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +1 -1
  178. package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +22 -22
  179. package/dist/node_modules/recharts/es6/component/Cursor.js +1 -1
  180. package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +11 -11
  181. package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +6 -6
  182. package/dist/node_modules/recharts/es6/component/Label.js +14 -14
  183. package/dist/node_modules/recharts/es6/component/LabelList.js +6 -6
  184. package/dist/node_modules/recharts/es6/component/Legend.js +5 -5
  185. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +3 -3
  186. package/dist/node_modules/recharts/es6/component/Text.js +2 -2
  187. package/dist/node_modules/recharts/es6/component/Tooltip.js +3 -3
  188. package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +2 -2
  189. package/dist/node_modules/recharts/es6/container/Layer.js +2 -2
  190. package/dist/node_modules/recharts/es6/container/Surface.js +2 -2
  191. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +2 -2
  192. package/dist/node_modules/recharts/es6/polar/Pie.js +13 -13
  193. package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js +8 -8
  194. package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js +6 -6
  195. package/dist/node_modules/recharts/es6/shape/Cross.js +1 -1
  196. package/dist/node_modules/recharts/es6/shape/Curve.js +1 -1
  197. package/dist/node_modules/recharts/es6/shape/Dot.js +1 -1
  198. package/dist/node_modules/recharts/es6/shape/Polygon.js +4 -4
  199. package/dist/node_modules/recharts/es6/shape/Rectangle.js +4 -4
  200. package/dist/node_modules/recharts/es6/shape/Sector.js +1 -1
  201. package/dist/node_modules/recharts/es6/shape/Symbols.js +1 -1
  202. package/dist/node_modules/recharts/es6/shape/Trapezoid.js +4 -4
  203. package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +9 -9
  204. package/dist/node_modules/recharts/es6/util/BarUtils.js +1 -1
  205. package/dist/node_modules/recharts/es6/util/CartesianUtils.js +1 -1
  206. package/dist/node_modules/recharts/es6/util/PolarUtils.js +1 -1
  207. package/dist/node_modules/recharts/es6/util/ReactUtils.js +2 -2
  208. package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +1 -1
  209. package/dist/node_modules/recharts/es6/util/types.js +1 -1
  210. package/dist/node_modules/{react-is → recharts/node_modules/react-is}/cjs/react-is.development.js +2 -2
  211. package/dist/node_modules/{react-is → recharts/node_modules/react-is}/cjs/react-is.production.min.js +2 -2
  212. package/dist/node_modules/{react-is → recharts/node_modules/react-is}/index.js +2 -2
  213. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +97 -18
  214. package/dist/node_modules/zustand/esm/middleware.js +2 -2
  215. package/dist/pages/ConsolidationPage.js +76 -0
  216. package/dist/pages/ContainerConditionPage.js +972 -0
  217. package/dist/pages/ContainersPage.js +522 -0
  218. package/dist/pages/EmptyReusePage.js +777 -0
  219. package/dist/pages/FreeTimePage.js +657 -0
  220. package/dist/pages/FreightEstimatePage.js +284 -0
  221. package/dist/pages/LogisticsProceduresPage.js +100 -0
  222. package/dist/pages/PendingPickPage.js +155 -0
  223. package/dist/pages/StockBindingPage.js +236 -0
  224. package/dist/pages/StockObservationsPage.js +168 -0
  225. package/dist/pages/TripUtilizationPage.js +227 -0
  226. package/dist/src/generated/consolidation-operations.js +505 -0
  227. package/dist/src/generated/container-condition-operations.js +208 -0
  228. package/dist/src/generated/container-operations.js +101 -0
  229. package/dist/src/generated/empty-reuse-operations.js +749 -0
  230. package/dist/src/generated/free-time-operations.js +235 -0
  231. package/dist/src/generated/freight-cost-operations.js +325 -0
  232. package/dist/src/generated/logistics-procedure-operations.js +362 -0
  233. package/dist/src/generated/pending-pick-operations.js +1128 -0
  234. package/dist/src/generated/stock-binding-operations.js +175 -0
  235. package/dist/src/generated/stock-observation-operations.js +93 -0
  236. package/dist/src/generated/trip-utilization-operations.js +140 -0
  237. package/dist/src/generated/wspace-operations.js +708 -0
  238. package/dist/utils/consolidationHistoryTarget.js +27 -0
  239. package/dist/utils/consolidationInput.js +21 -0
  240. package/dist/utils/consolidationLot.js +29 -0
  241. package/dist/utils/consolidationPins.js +13 -0
  242. package/dist/utils/consolidationRecovery.js +40 -0
  243. package/dist/utils/consolidationReportHead.js +18 -0
  244. package/dist/utils/freeTimeDate.js +26 -0
  245. package/dist/utils/freightAcknowledgement.js +8 -0
  246. package/dist/utils/freightDraft.js +125 -0
  247. package/dist/utils/freightRecovery.js +36 -0
  248. package/dist/utils/graphqlClient.js +28 -28
  249. package/dist/utils/pendingPickDraft.js +46 -0
  250. package/dist/utils/procedureInput.js +43 -0
  251. package/dist/utils/procedureRecovery.js +42 -0
  252. package/dist/utils/reuseAttempt.js +20 -0
  253. package/dist/utils/reuseForm.js +25 -0
  254. package/dist/utils/reuseRecovery.js +71 -0
  255. package/dist/utils/stockBindingForm.js +142 -0
  256. package/dist/utils/stockBindingLabels.js +23 -0
  257. package/dist/utils/stockObservationForm.js +55 -0
  258. package/dist/utils/tripDraftContext.js +19 -0
  259. package/dist/utils/tripUtilizationForm.js +60 -0
  260. package/package.json +19 -5
  261. package/src/generated/consolidation-operations.ts +1138 -0
  262. package/src/generated/container-condition-operations.ts +771 -0
  263. package/src/generated/container-operations.ts +376 -0
  264. package/src/generated/empty-reuse-operations.ts +1648 -0
  265. package/src/generated/free-time-operations.ts +814 -0
  266. package/src/generated/freight-cost-operations.ts +753 -0
  267. package/src/generated/logistics-procedure-operations.ts +1047 -0
  268. package/src/generated/pending-pick-operations.ts +1508 -0
  269. package/src/generated/stock-binding-operations.ts +631 -0
  270. package/src/generated/stock-observation-operations.ts +373 -0
  271. package/src/generated/trip-utilization-operations.ts +500 -0
  272. package/src/generated/wspace-operations.ts +116 -0
  273. package/src/movethewheels/MoveTheWheelsRoot.tsx +79 -0
  274. package/src/movethewheels/MoveTheWheelsRoutes.tsx +22 -0
  275. package/src/movethewheels/components/ContainerEvidencePicker.tsx +146 -0
  276. package/src/movethewheels/components/FreeTimeAgreementForm.tsx +483 -0
  277. package/src/movethewheels/components/ReturnInstructionForm.tsx +102 -0
  278. package/src/movethewheels/components/ReuseControls.tsx +138 -0
  279. package/src/movethewheels/components/ReusePermissionForm.tsx +123 -0
  280. package/src/movethewheels/components/ReuseProposalForm.tsx +484 -0
  281. package/src/movethewheels/components/ReuseSourceFields.tsx +80 -0
  282. package/src/movethewheels/components/consolidation/ConsolidationHistory.tsx +159 -0
  283. package/src/movethewheels/components/consolidation/ConsolidationLotEditor.tsx +144 -0
  284. package/src/movethewheels/components/consolidation/ConsolidationManifestWorkbench.tsx +168 -0
  285. package/src/movethewheels/components/consolidation/ConsolidationPlanForm.tsx +185 -0
  286. package/src/movethewheels/components/consolidation/ConsolidationPlanWorkbench.tsx +395 -0
  287. package/src/movethewheels/components/consolidation/ConsolidationReportForm.tsx +124 -0
  288. package/src/movethewheels/components/consolidation/ConsolidationReportsWorkbench.tsx +233 -0
  289. package/src/movethewheels/components/consolidation/ConsolidationSummary.tsx +84 -0
  290. package/src/movethewheels/components/consolidation/OriginalConsolidationHistory.tsx +133 -0
  291. package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +224 -0
  292. package/src/movethewheels/components/freight-cost/FreightFields.tsx +91 -0
  293. package/src/movethewheels/components/freight-cost/FreightFxEditor.tsx +98 -0
  294. package/src/movethewheels/components/freight-cost/FreightHistory.tsx +91 -0
  295. package/src/movethewheels/components/freight-cost/FreightLineEditor.tsx +192 -0
  296. package/src/movethewheels/components/freight-cost/FreightScopeEditor.tsx +64 -0
  297. package/src/movethewheels/components/freight-cost/FreightTotals.tsx +68 -0
  298. package/src/movethewheels/components/logistics-procedure/ProcedureDecisionForm.tsx +204 -0
  299. package/src/movethewheels/components/logistics-procedure/ProcedureFields.tsx +43 -0
  300. package/src/movethewheels/components/logistics-procedure/ProcedureHistory.tsx +102 -0
  301. package/src/movethewheels/components/logistics-procedure/ProcedurePolicyForm.tsx +226 -0
  302. package/src/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.tsx +174 -0
  303. package/src/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.tsx +278 -0
  304. package/src/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.tsx +292 -0
  305. package/src/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.tsx +111 -0
  306. package/src/movethewheels/components/pending-pick/PendingPickDraft.tsx +82 -0
  307. package/src/movethewheels/components/pending-pick/PendingPickHistory.tsx +93 -0
  308. package/src/movethewheels/components/pending-pick/PickCapture.tsx +70 -0
  309. package/src/movethewheels/components/pending-pick/PickLineSelection.tsx +130 -0
  310. package/src/movethewheels/components/stock-binding/StockAssessmentDraft.tsx +52 -0
  311. package/src/movethewheels/components/stock-binding/StockAssessmentHistory.tsx +56 -0
  312. package/src/movethewheels/components/stock-binding/StockAssessmentSummary.tsx +108 -0
  313. package/src/movethewheels/components/stock-binding/StockFactForm.tsx +186 -0
  314. package/src/movethewheels/components/stock-observation/StockIssueForm.tsx +103 -0
  315. package/src/movethewheels/components/stock-observation/StockIssueHistory.tsx +96 -0
  316. package/src/movethewheels/components/stock-observation/StockIssueReadPanel.tsx +72 -0
  317. package/src/movethewheels/components/trip-utilization/TripReportForm.tsx +116 -0
  318. package/src/movethewheels/components/trip-utilization/TripReportHistory.tsx +51 -0
  319. package/src/movethewheels/components/trip-utilization/TripReportSummary.tsx +127 -0
  320. package/src/movethewheels/components/trip-utilization/TripSegmentFields.tsx +118 -0
  321. package/src/movethewheels/hooks/useConsolidationAction.ts +196 -0
  322. package/src/movethewheels/hooks/useContainerCondition.ts +129 -0
  323. package/src/movethewheels/hooks/useContainerLifecycle.ts +291 -0
  324. package/src/movethewheels/hooks/useEmptyReuseAction.ts +72 -0
  325. package/src/movethewheels/hooks/useFreightRecoveryAction.ts +201 -0
  326. package/src/movethewheels/hooks/useProcedureAction.ts +196 -0
  327. package/src/movethewheels/hooks/useProcedureSelection.ts +75 -0
  328. package/src/movethewheels/hooks/useReuseRecoveryAction.ts +192 -0
  329. package/src/movethewheels/pages/ConsolidationPage.tsx +70 -0
  330. package/src/movethewheels/pages/ContainerConditionPage.tsx +959 -0
  331. package/src/movethewheels/pages/ContainersPage.tsx +490 -0
  332. package/src/movethewheels/pages/EmptyReusePage.tsx +823 -0
  333. package/src/movethewheels/pages/FreeTimePage.tsx +720 -0
  334. package/src/movethewheels/pages/FreightEstimatePage.tsx +353 -0
  335. package/src/movethewheels/pages/LogisticsProceduresPage.tsx +86 -0
  336. package/src/movethewheels/pages/PendingPickPage.tsx +226 -0
  337. package/src/movethewheels/pages/StockBindingPage.tsx +299 -0
  338. package/src/movethewheels/pages/StockObservationsPage.tsx +181 -0
  339. package/src/movethewheels/pages/TripUtilizationPage.tsx +315 -0
  340. package/src/movethewheels/utils/consolidationHistoryTarget.ts +39 -0
  341. package/src/movethewheels/utils/consolidationInput.ts +70 -0
  342. package/src/movethewheels/utils/consolidationLot.ts +24 -0
  343. package/src/movethewheels/utils/consolidationPins.ts +52 -0
  344. package/src/movethewheels/utils/consolidationRecovery.ts +88 -0
  345. package/src/movethewheels/utils/consolidationReportHead.ts +29 -0
  346. package/src/movethewheels/utils/freeTimeDate.ts +31 -0
  347. package/src/movethewheels/utils/freightAcknowledgement.ts +31 -0
  348. package/src/movethewheels/utils/freightDraft.ts +170 -0
  349. package/src/movethewheels/utils/freightRecovery.ts +79 -0
  350. package/src/movethewheels/utils/graphqlClient.ts +14 -5
  351. package/src/movethewheels/utils/pendingPickDraft.ts +61 -0
  352. package/src/movethewheels/utils/procedureInput.ts +98 -0
  353. package/src/movethewheels/utils/procedureRecovery.ts +92 -0
  354. package/src/movethewheels/utils/reuseAttempt.ts +29 -0
  355. package/src/movethewheels/utils/reuseForm.ts +30 -0
  356. package/src/movethewheels/utils/reuseRecovery.ts +151 -0
  357. package/src/movethewheels/utils/stockBindingForm.ts +209 -0
  358. package/src/movethewheels/utils/stockBindingLabels.ts +41 -0
  359. package/src/movethewheels/utils/stockObservationForm.ts +73 -0
  360. package/src/movethewheels/utils/tripDraftContext.ts +61 -0
  361. package/src/movethewheels/utils/tripUtilizationForm.ts +105 -0
  362. package/src/operations/condition/container-condition.graphql +41 -0
  363. package/src/operations/consolidation/consolidation.graphql +490 -0
  364. package/src/operations/container/container-lifecycle.graphql +80 -0
  365. package/src/operations/empty-reuse/empty-reuse.graphql +737 -0
  366. package/src/operations/free-time/free-time.graphql +47 -0
  367. package/src/operations/freight-cost/freight.graphql +6 -0
  368. package/src/operations/logistics-procedure/procedure.graphql +15 -0
  369. package/src/operations/pending-pick/pending-pick.graphql +1122 -0
  370. package/src/operations/stock-binding/stock-binding.graphql +160 -0
  371. package/src/operations/stock-observation/stock-observation.graphql +20 -0
  372. package/src/operations/trip-utilization/trip-utilization.graphql +126 -0
  373. package/src/operations/wspace/container-evidence.graphql +6 -0
@@ -0,0 +1,244 @@
1
+ import { ProcedureTime as e } from "../logistics-procedure/ProcedureFields.js";
2
+ import { ConsolidationSummary as t } from "./ConsolidationSummary.js";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region src/movethewheels/components/consolidation/ConsolidationHistory.tsx
5
+ function i({ plan: t }) {
6
+ return /* @__PURE__ */ r("section", {
7
+ className: "space-y-3 rounded-lg border p-4",
8
+ children: [
9
+ /* @__PURE__ */ r("h3", { children: [
10
+ t.planReference,
11
+ " · version ",
12
+ t.version,
13
+ " · ",
14
+ t.facts.hubName
15
+ ] }),
16
+ /* @__PURE__ */ r("p", { children: [
17
+ "Effective ",
18
+ /* @__PURE__ */ n(e, { value: t.facts.effectiveAt }),
19
+ " · recorded",
20
+ " ",
21
+ /* @__PURE__ */ n(e, { value: t.recordedAt })
22
+ ] }),
23
+ /* @__PURE__ */ r("p", { children: [
24
+ "Captured shipment ",
25
+ t.sourceCapture.shipmentNumber,
26
+ "; booking",
27
+ " ",
28
+ t.sourceCapture.bookingReference ?? "Unknown"
29
+ ] }),
30
+ t.facts.lots.map((e) => /* @__PURE__ */ r("article", {
31
+ className: "break-words border-t pt-2",
32
+ children: [
33
+ /* @__PURE__ */ r("h4", { children: [
34
+ e.supplierReference,
35
+ " · ",
36
+ e.lotReference,
37
+ " · ",
38
+ e.consignmentReference
39
+ ] }),
40
+ /* @__PURE__ */ r("p", { children: [
41
+ "Planned ",
42
+ e.plannedQuantity ?? "Unknown",
43
+ " / available",
44
+ " ",
45
+ e.reportedAvailableQuantity ?? "Unknown",
46
+ " ",
47
+ e.unitReference ?? "(unit unknown)"
48
+ ] }),
49
+ /* @__PURE__ */ r("p", { children: [
50
+ "Basis: ",
51
+ e.quantityBasis.toLowerCase().replaceAll("_", " "),
52
+ "; unit revision",
53
+ " ",
54
+ e.unitRevision ?? "Unknown",
55
+ "; balance revision ",
56
+ e.balanceRevision ?? "Unknown"
57
+ ] }),
58
+ /* @__PURE__ */ r("p", { children: [
59
+ "Source ",
60
+ e.source.reference ?? "Unknown",
61
+ " / ",
62
+ e.source.revision ?? "Unknown"
63
+ ] })
64
+ ]
65
+ }, e.id)),
66
+ /* @__PURE__ */ r("details", { children: [
67
+ /* @__PURE__ */ n("summary", { children: "Captured source and audit references" }),
68
+ /* @__PURE__ */ r("p", {
69
+ className: "break-all",
70
+ children: [
71
+ t.id,
72
+ "; predecessor ",
73
+ t.previousVersionId ?? "None"
74
+ ]
75
+ }),
76
+ /* @__PURE__ */ r("p", { children: [
77
+ "Hub source ",
78
+ t.facts.hubSource.reference ?? "Unknown",
79
+ " /",
80
+ " ",
81
+ t.facts.hubSource.revision ?? "Unknown"
82
+ ] }),
83
+ /* @__PURE__ */ r("p", { children: [
84
+ "Context source ",
85
+ t.facts.contextSource.reference ?? "Unknown",
86
+ " /",
87
+ " ",
88
+ t.facts.contextSource.revision ?? "Unknown"
89
+ ] }),
90
+ /* @__PURE__ */ r("p", { children: [
91
+ "Mode ",
92
+ t.facts.mode ?? "Unknown",
93
+ "; carrier ",
94
+ t.facts.carrierReference ?? "Unknown",
95
+ "; declared booking ",
96
+ t.facts.bookingReference ?? "Unknown"
97
+ ] }),
98
+ /* @__PURE__ */ r("p", { children: [
99
+ "Cutoff ",
100
+ /* @__PURE__ */ n(e, { value: t.facts.cutoffAt }),
101
+ "; timezone ",
102
+ t.facts.timezone ?? "Unknown",
103
+ "; jurisdiction ",
104
+ t.facts.jurisdictionReference ?? "Unknown"
105
+ ] }),
106
+ /* @__PURE__ */ r("p", { children: [
107
+ "Recorded by ",
108
+ t.createdBy,
109
+ " · ",
110
+ t.actorProvenance,
111
+ "; on behalf of",
112
+ " ",
113
+ t.onBehalfOf ?? "Not supplied"
114
+ ] }),
115
+ t.evidence.map((t) => /* @__PURE__ */ r("p", {
116
+ className: "break-all",
117
+ children: [
118
+ t.fileId,
119
+ " / ",
120
+ t.versionId,
121
+ " · checked ",
122
+ /* @__PURE__ */ n(e, { value: t.checkedAt })
123
+ ]
124
+ }, JSON.stringify([t.fileId, t.versionId])))
125
+ ] })
126
+ ]
127
+ });
128
+ }
129
+ function a({ rows: t, labels: i }) {
130
+ return /* @__PURE__ */ r("section", {
131
+ className: "space-y-3",
132
+ children: [/* @__PURE__ */ n("h3", {
133
+ className: "font-semibold",
134
+ children: "Append-only report history"
135
+ }), t.map((t) => /* @__PURE__ */ r("article", {
136
+ className: "min-w-0 space-y-1 rounded-lg border p-3",
137
+ children: [
138
+ /* @__PURE__ */ r("h4", { children: [
139
+ i[t.lotId] ?? "Captured lot",
140
+ " ·",
141
+ " ",
142
+ t.kind === "ISSUE" ? "Unresolved reported issue" : t.kind === "RECEIPT_REPORT" ? "Receipt total" : "Stuffing total",
143
+ " ",
144
+ "· version ",
145
+ t.version
146
+ ] }),
147
+ /* @__PURE__ */ r("p", { children: [
148
+ t.kind === "ISSUE" ? t.issueReference : t.reportedQuantity ?? "Unknown quantity",
149
+ " ",
150
+ t.unitReference ?? "(unit unknown)"
151
+ ] }),
152
+ /* @__PURE__ */ n("p", {
153
+ className: "break-words",
154
+ children: t.reason
155
+ }),
156
+ /* @__PURE__ */ r("p", { children: [
157
+ "Observed ",
158
+ /* @__PURE__ */ n(e, { value: t.reportedObservedAt }),
159
+ " · recorded",
160
+ " ",
161
+ /* @__PURE__ */ n(e, { value: t.recordedAt }),
162
+ " · receipt sequence ",
163
+ t.receiptSequence
164
+ ] }),
165
+ /* @__PURE__ */ r("details", { children: [
166
+ /* @__PURE__ */ n("summary", { children: "Source and original attribution" }),
167
+ /* @__PURE__ */ r("p", { children: [
168
+ t.source.reference ?? "Unknown",
169
+ " / ",
170
+ t.source.revision ?? "Unknown"
171
+ ] }),
172
+ /* @__PURE__ */ r("p", {
173
+ className: "break-all",
174
+ children: [
175
+ t.id,
176
+ "; predecessor ",
177
+ t.previousVersionId ?? "None",
178
+ "; recorded by ",
179
+ t.createdBy,
180
+ " ·",
181
+ " ",
182
+ t.actorProvenance,
183
+ "; on behalf of ",
184
+ t.onBehalfOf ?? "Not supplied"
185
+ ]
186
+ }),
187
+ t.evidence.map((e) => /* @__PURE__ */ r("p", {
188
+ className: "break-all",
189
+ children: [
190
+ "Checked evidence ",
191
+ e.fileId,
192
+ " / ",
193
+ e.versionId
194
+ ]
195
+ }, JSON.stringify([e.fileId, e.versionId]))),
196
+ t.evidenceDeclarations.map((e) => /* @__PURE__ */ r("p", {
197
+ className: "break-all",
198
+ children: [
199
+ "Unverified declaration ",
200
+ e.fileId,
201
+ " / ",
202
+ e.versionId
203
+ ]
204
+ }, JSON.stringify([e.fileId, e.versionId])))
205
+ ] })
206
+ ]
207
+ }, t.id))]
208
+ });
209
+ }
210
+ function o({ manifest: i, labels: a }) {
211
+ return /* @__PURE__ */ r("section", {
212
+ className: "space-y-3 rounded-lg border p-4",
213
+ children: [
214
+ /* @__PURE__ */ r("h3", { children: ["Immutable manifest record · version ", i.version] }),
215
+ /* @__PURE__ */ r("p", { children: [
216
+ "Recorded ",
217
+ /* @__PURE__ */ n(e, { value: i.recordedAt }),
218
+ " · by ",
219
+ i.createdBy,
220
+ " ·",
221
+ " ",
222
+ i.actorProvenance
223
+ ] }),
224
+ /* @__PURE__ */ n(t, {
225
+ snapshot: i.snapshot,
226
+ labels: a
227
+ }),
228
+ /* @__PURE__ */ r("details", { children: [/* @__PURE__ */ n("summary", { children: "Exact historical references" }), /* @__PURE__ */ r("p", {
229
+ className: "break-all",
230
+ children: [
231
+ i.id,
232
+ "; predecessor ",
233
+ i.previousVersionId ?? "None",
234
+ "; plan ",
235
+ i.planId,
236
+ "; recorded on behalf of ",
237
+ i.onBehalfOf ?? "Not supplied"
238
+ ]
239
+ })] })
240
+ ]
241
+ });
242
+ }
243
+ //#endregion
244
+ export { o as ConsolidationManifestHistory, i as ConsolidationPlanHistory, a as ConsolidationReportHistory };
@@ -0,0 +1,133 @@
1
+ import { reuseSelect as e } from "../ReuseControls.js";
2
+ import { ProcedureField as t, ProcedureGroup as n } from "../logistics-procedure/ProcedureFields.js";
3
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ //#region src/movethewheels/components/consolidation/ConsolidationLotEditor.tsx
5
+ function a({ lot: a, onChange: o }) {
6
+ let s = (e, t) => o({
7
+ ...a,
8
+ [e]: t || null
9
+ });
10
+ return /* @__PURE__ */ i(n, {
11
+ title: "Supplier lot",
12
+ children: [
13
+ /* @__PURE__ */ r("div", {
14
+ className: "grid gap-3 sm:grid-cols-2",
15
+ children: [
16
+ "supplierReference",
17
+ "lotReference",
18
+ "consignmentReference",
19
+ "sourceRevision"
20
+ ].map((e) => /* @__PURE__ */ r(t, {
21
+ label: {
22
+ supplierReference: "Supplier reference",
23
+ lotReference: "Lot reference",
24
+ consignmentReference: "Consignment reference",
25
+ sourceRevision: "Lot source revision"
26
+ }[e],
27
+ value: a[e],
28
+ onChange: (t) => s(e, t)
29
+ }, e))
30
+ }),
31
+ /* @__PURE__ */ i("label", {
32
+ className: "block",
33
+ children: ["Quantity basis", /* @__PURE__ */ i("select", {
34
+ className: e,
35
+ value: a.quantityBasis,
36
+ onChange: (e) => o({
37
+ ...a,
38
+ quantityBasis: e.target.value === "SOURCE_DECLARATION" ? "SOURCE_DECLARATION" : e.target.value === "HUB_REPORT" ? "HUB_REPORT" : "UNKNOWN"
39
+ }),
40
+ children: [
41
+ /* @__PURE__ */ r("option", {
42
+ value: "UNKNOWN",
43
+ children: "Unknown"
44
+ }),
45
+ /* @__PURE__ */ r("option", {
46
+ value: "SOURCE_DECLARATION",
47
+ children: "Supplier declaration"
48
+ }),
49
+ /* @__PURE__ */ r("option", {
50
+ value: "HUB_REPORT",
51
+ children: "Reported at hub"
52
+ })
53
+ ]
54
+ })]
55
+ }),
56
+ /* @__PURE__ */ r("p", { children: "Blank quantities are unknown. Zero means an explicitly reported zero. No unit conversion is inferred." }),
57
+ /* @__PURE__ */ r("div", {
58
+ className: "grid gap-3 sm:grid-cols-2",
59
+ children: [
60
+ "unitReference",
61
+ "unitRevision",
62
+ "balanceRevision",
63
+ "plannedQuantity",
64
+ "reportedAvailableQuantity"
65
+ ].map((e) => /* @__PURE__ */ r(t, {
66
+ required: !1,
67
+ label: {
68
+ unitReference: "Reported count unit",
69
+ unitRevision: "Unit source revision",
70
+ balanceRevision: "Balance source revision",
71
+ plannedQuantity: "Planned quantity",
72
+ reportedAvailableQuantity: "Reported available quantity"
73
+ }[e],
74
+ value: a[e] ?? "",
75
+ onChange: (t) => s(e, t)
76
+ }, e))
77
+ }),
78
+ /* @__PURE__ */ i("div", {
79
+ className: "grid gap-3 sm:grid-cols-2",
80
+ children: [/* @__PURE__ */ r(t, {
81
+ required: !1,
82
+ label: "Quantity source reference",
83
+ value: a.source.reference ?? "",
84
+ onChange: (e) => o({
85
+ ...a,
86
+ source: {
87
+ ...a.source,
88
+ reference: e || null
89
+ }
90
+ })
91
+ }), /* @__PURE__ */ r(t, {
92
+ required: !1,
93
+ label: "Quantity source revision",
94
+ value: a.source.revision ?? "",
95
+ onChange: (e) => o({
96
+ ...a,
97
+ source: {
98
+ ...a.source,
99
+ revision: e || null
100
+ }
101
+ })
102
+ })]
103
+ }),
104
+ /* @__PURE__ */ i("details", { children: [/* @__PURE__ */ r("summary", { children: "Mass, volume and transport context" }), /* @__PURE__ */ r("div", {
105
+ className: "grid gap-3 sm:grid-cols-2",
106
+ children: [
107
+ "grossKg",
108
+ "cubeM3",
109
+ "originReference",
110
+ "destinationReference",
111
+ "importerReference",
112
+ "transportReference",
113
+ "documentReference"
114
+ ].map((e) => /* @__PURE__ */ r(t, {
115
+ required: !1,
116
+ label: {
117
+ grossKg: "Reported gross mass (kg)",
118
+ cubeM3: "Reported volume (m³)",
119
+ originReference: "Origin reference",
120
+ destinationReference: "Destination reference",
121
+ importerReference: "Importer reference",
122
+ transportReference: "Transport reference",
123
+ documentReference: "Document reference"
124
+ }[e],
125
+ value: a[e] ?? "",
126
+ onChange: (t) => s(e, t)
127
+ }, e))
128
+ })] })
129
+ ]
130
+ });
131
+ }
132
+ //#endregion
133
+ export { a as ConsolidationLotEditor };
@@ -0,0 +1,143 @@
1
+ import { Button as e } from "../ui.js";
2
+ import { useConditionApi as t, useConditionQuery as n } from "../../hooks/useContainerCondition.js";
3
+ import { ConsolidationManifestDocument as r, ConsolidationManifestsDocument as i, ConsolidationObservationsDocument as a, ConsolidationPreviewDocument as o, SaveConsolidationManifestDocument as s } from "../../src/generated/consolidation-operations.js";
4
+ import { ReusePager as c, ReuseState as l, reuseCard as u } from "../ReuseControls.js";
5
+ import { ConsolidationSummary as d } from "./ConsolidationSummary.js";
6
+ import { ConsolidationManifestHistory as f } from "./ConsolidationHistory.js";
7
+ import { assertConsolidationPredecessor as p } from "../../utils/consolidationPins.js";
8
+ import { useEffect as m, useRef as h, useState as g } from "react";
9
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
10
+ //#region src/movethewheels/components/consolidation/ConsolidationManifestWorkbench.tsx
11
+ function b({ plan: b, actions: x, labels: S }) {
12
+ let C = t(), w = h(!0);
13
+ m(() => (w.current = !0, () => {
14
+ w.current = !1;
15
+ }), []);
16
+ let [T, E] = g(null), [D, O] = g(!1), [k, A] = g(null), [j, M] = g(0), [N, P] = g(""), F = n(i, {
17
+ planId: b.id,
18
+ pagination: {
19
+ limit: 10,
20
+ offset: j
21
+ }
22
+ }, x.revision), I = n(r, N ? {
23
+ planId: b.id,
24
+ id: N
25
+ } : null, x.revision), L = D || x.busy || x.uncertain, R = async () => {
26
+ let [e, t] = await Promise.all([C(a, {
27
+ planId: b.id,
28
+ pagination: {
29
+ limit: 1,
30
+ offset: 0
31
+ }
32
+ }), C(i, {
33
+ planId: b.id,
34
+ pagination: {
35
+ limit: 1,
36
+ offset: 0
37
+ }
38
+ })]);
39
+ return {
40
+ sequence: e.mtwConsolidationObservationPage.items[0]?.receiptSequence ?? 0,
41
+ previous: t.mtwConsolidationManifestPage.items[0] ?? null
42
+ };
43
+ }, z = async () => {
44
+ if (!L) {
45
+ O(!0), A(null);
46
+ try {
47
+ let e = await R(), t = await C(o, {
48
+ planId: b.id,
49
+ expectedObservationSequence: e.sequence
50
+ });
51
+ w.current && E({
52
+ snapshot: t.previewMtwConsolidationManifest,
53
+ previous: e.previous
54
+ });
55
+ } catch (e) {
56
+ A(e instanceof Error ? e.message : "Unable to preview.");
57
+ } finally {
58
+ O(!1);
59
+ }
60
+ }
61
+ }, B = async () => {
62
+ if (!(!T || L)) {
63
+ O(!0), A(null);
64
+ try {
65
+ let e = await R();
66
+ if (!w.current) throw Error("Context changed. Nothing was sent.");
67
+ if (e.sequence !== T.snapshot.observationSequence) throw Error("New reports were received. Review a fresh preview before recording.");
68
+ p(T.previous, e.previous), await x.run(s, {
69
+ planId: b.id,
70
+ expectedObservationSequence: T.snapshot.observationSequence,
71
+ expectedPreviousVersionId: T.previous?.id ?? null,
72
+ expectedVersion: T.previous?.version ?? 0
73
+ }, "Immutable manifest record saved.") && (E(null), M(0));
74
+ } catch (e) {
75
+ A(e instanceof Error ? e.message : "Unable to record manifest.");
76
+ } finally {
77
+ O(!1);
78
+ }
79
+ }
80
+ };
81
+ return /* @__PURE__ */ y("section", {
82
+ className: u,
83
+ children: [
84
+ /* @__PURE__ */ v("h2", {
85
+ className: "text-lg font-semibold",
86
+ children: "Review and record a manifest"
87
+ }),
88
+ /* @__PURE__ */ v("p", { children: "Each record captures the reported quantities at one receipt sequence. Historical records retain their original reports and time; later corrections do not rewrite them." }),
89
+ /* @__PURE__ */ v(e, {
90
+ disabled: L,
91
+ variant: "outline",
92
+ onClick: () => void z(),
93
+ children: "Load current reconciliation preview"
94
+ }),
95
+ T && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(d, {
96
+ snapshot: T.snapshot,
97
+ labels: S
98
+ }), /* @__PURE__ */ v(e, {
99
+ disabled: L,
100
+ onClick: () => void B(),
101
+ children: "Record this manifest snapshot"
102
+ })] }),
103
+ k && /* @__PURE__ */ v("p", {
104
+ role: "alert",
105
+ children: k
106
+ }),
107
+ /* @__PURE__ */ v(l, {
108
+ loading: F.loading,
109
+ error: F.error
110
+ }),
111
+ /* @__PURE__ */ v("div", {
112
+ className: "flex flex-wrap gap-2",
113
+ children: F.data?.mtwConsolidationManifestPage.items.map((t) => /* @__PURE__ */ y(e, {
114
+ disabled: L,
115
+ variant: "outline",
116
+ onClick: () => P(t.id),
117
+ children: [
118
+ "Version ",
119
+ t.version,
120
+ " · receipt sequence ",
121
+ t.observationSequence
122
+ ]
123
+ }, t.id))
124
+ }),
125
+ /* @__PURE__ */ v(c, {
126
+ offset: j,
127
+ page: F.data?.mtwConsolidationManifestPage,
128
+ busy: L,
129
+ onChange: M
130
+ }),
131
+ /* @__PURE__ */ v(l, {
132
+ loading: I.loading,
133
+ error: I.error
134
+ }),
135
+ I.data && /* @__PURE__ */ v(f, {
136
+ manifest: I.data.mtwConsolidationManifest,
137
+ labels: S
138
+ })
139
+ ]
140
+ });
141
+ }
142
+ //#endregion
143
+ export { b as ConsolidationManifestWorkbench };
@@ -0,0 +1,172 @@
1
+ import { Button as e } from "../ui.js";
2
+ import { consolidationInstant as t, consolidationQuantity as n, nullableText as r } from "../../utils/consolidationInput.js";
3
+ import { ProcedureField as i, ProcedureGroup as a } from "../logistics-procedure/ProcedureFields.js";
4
+ import { ContainerEvidencePicker as o } from "../ContainerEvidencePicker.js";
5
+ import { ConsolidationLotEditor as s } from "./ConsolidationLotEditor.js";
6
+ import { emptyConsolidationLot as c } from "../../utils/consolidationLot.js";
7
+ import { useState as l } from "react";
8
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
9
+ //#region src/movethewheels/components/consolidation/ConsolidationPlanForm.tsx
10
+ function f({ pin: f, busy: p, onSave: m }) {
11
+ let [h, g] = l(""), [_, v] = l(""), [y, b] = l(""), [x, S] = l(""), [C, w] = l(""), [T, E] = l(() => [c()]), [D, O] = l([]), [k, A] = l(null), [j, M] = l({
12
+ mode: "",
13
+ carrierReference: "",
14
+ bookingReference: "",
15
+ cutoffAt: "",
16
+ timezone: "",
17
+ jurisdictionReference: "",
18
+ reference: "",
19
+ revision: ""
20
+ });
21
+ return /* @__PURE__ */ u("form", {
22
+ className: "space-y-4",
23
+ onSubmit: (e) => {
24
+ e.preventDefault(), !p && (A(null), (async () => {
25
+ if (D.length < 1 || D.length > 10) throw Error("Choose one to ten exact evidence versions.");
26
+ let e = T.map((e) => ({
27
+ ...e,
28
+ plannedQuantity: n(e.plannedQuantity ?? ""),
29
+ reportedAvailableQuantity: n(e.reportedAvailableQuantity ?? ""),
30
+ grossKg: n(e.grossKg ?? ""),
31
+ cubeM3: n(e.cubeM3 ?? "")
32
+ }));
33
+ await m({
34
+ ...f,
35
+ facts: {
36
+ hubName: h.trim(),
37
+ hubReference: _.trim(),
38
+ hubSource: {
39
+ reference: r(y),
40
+ revision: r(x)
41
+ },
42
+ effectiveAt: t(C),
43
+ lots: e,
44
+ mode: r(j.mode),
45
+ carrierReference: r(j.carrierReference),
46
+ bookingReference: r(j.bookingReference),
47
+ cutoffAt: j.cutoffAt ? t(j.cutoffAt) : null,
48
+ timezone: r(j.timezone),
49
+ jurisdictionReference: r(j.jurisdictionReference),
50
+ contextSource: {
51
+ reference: r(j.reference),
52
+ revision: r(j.revision)
53
+ }
54
+ },
55
+ evidence: D.map(({ fileId: e, versionId: t }) => ({
56
+ fileId: e,
57
+ versionId: t
58
+ }))
59
+ });
60
+ })().catch((e) => A(e instanceof Error ? e.message : "Unable to record plan.")));
61
+ },
62
+ children: /* @__PURE__ */ d("fieldset", {
63
+ disabled: p,
64
+ className: "space-y-4",
65
+ children: [
66
+ /* @__PURE__ */ d(a, {
67
+ title: "One named hub",
68
+ children: [
69
+ /* @__PURE__ */ u(i, {
70
+ label: "Hub name",
71
+ value: h,
72
+ onChange: g
73
+ }),
74
+ /* @__PURE__ */ u(i, {
75
+ label: "Hub reference",
76
+ value: _,
77
+ onChange: v
78
+ }),
79
+ /* @__PURE__ */ u(i, {
80
+ label: "Hub source reference",
81
+ value: y,
82
+ onChange: b
83
+ }),
84
+ /* @__PURE__ */ u(i, {
85
+ label: "Hub source revision",
86
+ value: x,
87
+ onChange: S
88
+ }),
89
+ /* @__PURE__ */ u(i, {
90
+ label: "Effective from (local time)",
91
+ type: "datetime-local",
92
+ value: C,
93
+ onChange: w
94
+ }),
95
+ /* @__PURE__ */ u("p", { children: "Times are saved as UTC. A future plan does not make its reports effective now." })
96
+ ]
97
+ }),
98
+ /* @__PURE__ */ u("p", { children: "A new plan version starts separate receipt and stuffing histories. Earlier reports remain attached to their original plan." }),
99
+ T.map((t, n) => /* @__PURE__ */ d("section", {
100
+ className: "space-y-2",
101
+ children: [/* @__PURE__ */ u(s, {
102
+ lot: t,
103
+ onChange: (e) => E((t) => t.map((t, r) => r === n ? e : t))
104
+ }), /* @__PURE__ */ d(e, {
105
+ type: "button",
106
+ variant: "outline",
107
+ disabled: T.length === 1,
108
+ onClick: () => E((e) => e.filter((e, t) => t !== n)),
109
+ children: ["Remove lot ", n + 1]
110
+ })]
111
+ }, t.id)),
112
+ /* @__PURE__ */ d(e, {
113
+ type: "button",
114
+ variant: "outline",
115
+ disabled: T.length >= 20,
116
+ onClick: () => E((e) => [...e, c()]),
117
+ children: [
118
+ "Add supplier lot (",
119
+ T.length,
120
+ "/20)"
121
+ ]
122
+ }),
123
+ /* @__PURE__ */ d("details", { children: [/* @__PURE__ */ u("summary", { children: "Lane, cutoff and document context" }), /* @__PURE__ */ u(a, {
124
+ title: "Declared context",
125
+ children: [
126
+ "mode",
127
+ "carrierReference",
128
+ "bookingReference",
129
+ "cutoffAt",
130
+ "timezone",
131
+ "jurisdictionReference",
132
+ "reference",
133
+ "revision"
134
+ ].map((e) => /* @__PURE__ */ u(i, {
135
+ required: !1,
136
+ label: {
137
+ mode: "Transport mode",
138
+ carrierReference: "Carrier reference",
139
+ bookingReference: "Booking reference",
140
+ cutoffAt: "Cutoff (local time)",
141
+ timezone: "Reported timezone",
142
+ jurisdictionReference: "Jurisdiction reference",
143
+ reference: "Context source reference",
144
+ revision: "Context source revision"
145
+ }[e],
146
+ type: e === "cutoffAt" ? "datetime-local" : "text",
147
+ value: j[e],
148
+ onChange: (t) => M((n) => ({
149
+ ...n,
150
+ [e]: t
151
+ }))
152
+ }, e))
153
+ })] }),
154
+ /* @__PURE__ */ u(o, {
155
+ value: D,
156
+ onChange: O,
157
+ description: "Choose exact readable Files versions supporting these declarations. This does not verify physical stock or approvals."
158
+ }),
159
+ k && /* @__PURE__ */ u("p", {
160
+ role: "alert",
161
+ children: k
162
+ }),
163
+ /* @__PURE__ */ u(e, {
164
+ type: "submit",
165
+ children: "Record plan version"
166
+ })
167
+ ]
168
+ })
169
+ });
170
+ }
171
+ //#endregion
172
+ export { f as ConsolidationPlanForm };