@burdenoff/microfe-movethewheels 2026.930.4 → 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 (377) 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/useInventory.js +12 -1
  68. package/dist/hooks/useProcedureAction.js +119 -0
  69. package/dist/hooks/useProcedureSelection.js +53 -0
  70. package/dist/hooks/useReuseRecoveryAction.js +116 -0
  71. package/dist/movethewheels/components/ContainerEvidencePicker.d.ts +10 -0
  72. package/dist/movethewheels/components/FreeTimeAgreementForm.d.ts +14 -0
  73. package/dist/movethewheels/components/ReturnInstructionForm.d.ts +8 -0
  74. package/dist/movethewheels/components/ReuseControls.d.ts +42 -0
  75. package/dist/movethewheels/components/ReusePermissionForm.d.ts +9 -0
  76. package/dist/movethewheels/components/ReuseProposalForm.d.ts +11 -0
  77. package/dist/movethewheels/components/ReuseSourceFields.d.ts +9 -0
  78. package/dist/movethewheels/components/consolidation/ConsolidationHistory.d.ts +13 -0
  79. package/dist/movethewheels/components/consolidation/ConsolidationLotEditor.d.ts +6 -0
  80. package/dist/movethewheels/components/consolidation/ConsolidationManifestWorkbench.d.ts +8 -0
  81. package/dist/movethewheels/components/consolidation/ConsolidationPlanForm.d.ts +8 -0
  82. package/dist/movethewheels/components/consolidation/ConsolidationPlanWorkbench.d.ts +5 -0
  83. package/dist/movethewheels/components/consolidation/ConsolidationReportForm.d.ts +9 -0
  84. package/dist/movethewheels/components/consolidation/ConsolidationReportsWorkbench.d.ts +7 -0
  85. package/dist/movethewheels/components/consolidation/ConsolidationSummary.d.ts +6 -0
  86. package/dist/movethewheels/components/consolidation/OriginalConsolidationHistory.d.ts +8 -0
  87. package/dist/movethewheels/components/freight-cost/FreightDraftForm.d.ts +8 -0
  88. package/dist/movethewheels/components/freight-cost/FreightFields.d.ts +23 -0
  89. package/dist/movethewheels/components/freight-cost/FreightFxEditor.d.ts +6 -0
  90. package/dist/movethewheels/components/freight-cost/FreightHistory.d.ts +5 -0
  91. package/dist/movethewheels/components/freight-cost/FreightLineEditor.d.ts +8 -0
  92. package/dist/movethewheels/components/freight-cost/FreightScopeEditor.d.ts +6 -0
  93. package/dist/movethewheels/components/freight-cost/FreightTotals.d.ts +6 -0
  94. package/dist/movethewheels/components/logistics-procedure/ProcedureDecisionForm.d.ts +20 -0
  95. package/dist/movethewheels/components/logistics-procedure/ProcedureFields.d.ts +17 -0
  96. package/dist/movethewheels/components/logistics-procedure/ProcedureHistory.d.ts +7 -0
  97. package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyForm.d.ts +10 -0
  98. package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.d.ts +5 -0
  99. package/dist/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.d.ts +5 -0
  100. package/dist/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.d.ts +6 -0
  101. package/dist/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.d.ts +7 -0
  102. package/dist/movethewheels/components/pending-pick/PendingPickDraft.d.ts +16 -0
  103. package/dist/movethewheels/components/pending-pick/PendingPickHistory.d.ts +5 -0
  104. package/dist/movethewheels/components/pending-pick/PickCapture.d.ts +6 -0
  105. package/dist/movethewheels/components/pending-pick/PickLineSelection.d.ts +17 -0
  106. package/dist/movethewheels/components/stock-binding/StockAssessmentDraft.d.ts +13 -0
  107. package/dist/movethewheels/components/stock-binding/StockAssessmentHistory.d.ts +18 -0
  108. package/dist/movethewheels/components/stock-binding/StockAssessmentSummary.d.ts +9 -0
  109. package/dist/movethewheels/components/stock-binding/StockFactForm.d.ts +6 -0
  110. package/dist/movethewheels/components/stock-observation/StockIssueForm.d.ts +7 -0
  111. package/dist/movethewheels/components/stock-observation/StockIssueHistory.d.ts +7 -0
  112. package/dist/movethewheels/components/stock-observation/StockIssueReadPanel.d.ts +5 -0
  113. package/dist/movethewheels/components/trip-utilization/TripReportForm.d.ts +6 -0
  114. package/dist/movethewheels/components/trip-utilization/TripReportHistory.d.ts +14 -0
  115. package/dist/movethewheels/components/trip-utilization/TripReportSummary.d.ts +5 -0
  116. package/dist/movethewheels/components/trip-utilization/TripSegmentFields.d.ts +9 -0
  117. package/dist/movethewheels/hooks/useConsolidationAction.d.ts +19 -0
  118. package/dist/movethewheels/hooks/useContainerCondition.d.ts +21 -0
  119. package/dist/movethewheels/hooks/useContainerLifecycle.d.ts +40 -0
  120. package/dist/movethewheels/hooks/useEmptyReuseAction.d.ts +14 -0
  121. package/dist/movethewheels/hooks/useFreightRecoveryAction.d.ts +23 -0
  122. package/dist/movethewheels/hooks/useProcedureAction.d.ts +18 -0
  123. package/dist/movethewheels/hooks/useProcedureSelection.d.ts +51 -0
  124. package/dist/movethewheels/hooks/useReuseRecoveryAction.d.ts +18 -0
  125. package/dist/movethewheels/pages/ConsolidationPage.d.ts +1 -0
  126. package/dist/movethewheels/pages/ContainerConditionPage.d.ts +1 -0
  127. package/dist/movethewheels/pages/ContainersPage.d.ts +2 -0
  128. package/dist/movethewheels/pages/EmptyReusePage.d.ts +1 -0
  129. package/dist/movethewheels/pages/FreeTimePage.d.ts +1 -0
  130. package/dist/movethewheels/pages/FreightEstimatePage.d.ts +1 -0
  131. package/dist/movethewheels/pages/LogisticsProceduresPage.d.ts +1 -0
  132. package/dist/movethewheels/pages/PendingPickPage.d.ts +1 -0
  133. package/dist/movethewheels/pages/StockBindingPage.d.ts +1 -0
  134. package/dist/movethewheels/pages/StockObservationsPage.d.ts +1 -0
  135. package/dist/movethewheels/pages/TripUtilizationPage.d.ts +1 -0
  136. package/dist/movethewheels/utils/consolidationHistoryTarget.d.ts +12 -0
  137. package/dist/movethewheels/utils/consolidationInput.d.ts +15 -0
  138. package/dist/movethewheels/utils/consolidationLot.d.ts +3 -0
  139. package/dist/movethewheels/utils/consolidationPins.d.ts +20 -0
  140. package/dist/movethewheels/utils/consolidationRecovery.d.ts +5 -0
  141. package/dist/movethewheels/utils/consolidationReportHead.d.ts +5 -0
  142. package/dist/movethewheels/utils/freeTimeDate.d.ts +1 -0
  143. package/dist/movethewheels/utils/freightAcknowledgement.d.ts +2 -0
  144. package/dist/movethewheels/utils/freightDraft.d.ts +36 -0
  145. package/dist/movethewheels/utils/freightRecovery.d.ts +5 -0
  146. package/dist/movethewheels/utils/graphqlClient.d.ts +2 -1
  147. package/dist/movethewheels/utils/pendingPickDraft.d.ts +8 -0
  148. package/dist/movethewheels/utils/procedureInput.d.ts +18 -0
  149. package/dist/movethewheels/utils/procedureRecovery.d.ts +5 -0
  150. package/dist/movethewheels/utils/reuseAttempt.d.ts +7 -0
  151. package/dist/movethewheels/utils/reuseForm.d.ts +6 -0
  152. package/dist/movethewheels/utils/reuseRecovery.d.ts +26 -0
  153. package/dist/movethewheels/utils/stockBindingForm.d.ts +23 -0
  154. package/dist/movethewheels/utils/stockBindingLabels.d.ts +10 -0
  155. package/dist/movethewheels/utils/stockObservationForm.d.ts +5 -0
  156. package/dist/movethewheels/utils/tripDraftContext.d.ts +25 -0
  157. package/dist/movethewheels/utils/tripUtilizationForm.d.ts +6 -0
  158. package/dist/node_modules/@react-leaflet/core/lib/component.js +5 -5
  159. package/dist/node_modules/fast-equals/dist/es/index.js +87 -74
  160. package/dist/node_modules/leaflet/dist/leaflet-src.js +8 -5
  161. package/dist/node_modules/lodash/_Stack.js +2 -1
  162. package/dist/node_modules/lucide-react/dist/esm/icons/clipboard-list.js +35 -0
  163. package/dist/node_modules/lucide-react/dist/esm/icons/repeat-2.js +22 -0
  164. package/dist/node_modules/react-leaflet/lib/MapContainer.js +3 -3
  165. package/dist/node_modules/react-smooth/es6/Animate.js +2 -2
  166. package/dist/node_modules/recharts/es6/cartesian/Area.js +13 -13
  167. package/dist/node_modules/recharts/es6/cartesian/Bar.js +9 -9
  168. package/dist/node_modules/recharts/es6/cartesian/Brush.js +12 -12
  169. package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +7 -7
  170. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +13 -13
  171. package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +4 -4
  172. package/dist/node_modules/recharts/es6/cartesian/Line.js +10 -10
  173. package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +3 -3
  174. package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +3 -3
  175. package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +4 -4
  176. package/dist/node_modules/recharts/es6/cartesian/XAxis.js +3 -3
  177. package/dist/node_modules/recharts/es6/cartesian/YAxis.js +3 -3
  178. package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +1 -1
  179. package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +22 -22
  180. package/dist/node_modules/recharts/es6/component/Cursor.js +1 -1
  181. package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +11 -11
  182. package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +6 -6
  183. package/dist/node_modules/recharts/es6/component/Label.js +14 -14
  184. package/dist/node_modules/recharts/es6/component/LabelList.js +6 -6
  185. package/dist/node_modules/recharts/es6/component/Legend.js +5 -5
  186. package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +3 -3
  187. package/dist/node_modules/recharts/es6/component/Text.js +2 -2
  188. package/dist/node_modules/recharts/es6/component/Tooltip.js +3 -3
  189. package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +2 -2
  190. package/dist/node_modules/recharts/es6/container/Layer.js +2 -2
  191. package/dist/node_modules/recharts/es6/container/Surface.js +2 -2
  192. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +2 -2
  193. package/dist/node_modules/recharts/es6/polar/Pie.js +13 -13
  194. package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js +8 -8
  195. package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js +6 -6
  196. package/dist/node_modules/recharts/es6/shape/Cross.js +1 -1
  197. package/dist/node_modules/recharts/es6/shape/Curve.js +1 -1
  198. package/dist/node_modules/recharts/es6/shape/Dot.js +1 -1
  199. package/dist/node_modules/recharts/es6/shape/Polygon.js +4 -4
  200. package/dist/node_modules/recharts/es6/shape/Rectangle.js +4 -4
  201. package/dist/node_modules/recharts/es6/shape/Sector.js +1 -1
  202. package/dist/node_modules/recharts/es6/shape/Symbols.js +1 -1
  203. package/dist/node_modules/recharts/es6/shape/Trapezoid.js +4 -4
  204. package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +9 -9
  205. package/dist/node_modules/recharts/es6/util/BarUtils.js +1 -1
  206. package/dist/node_modules/recharts/es6/util/CartesianUtils.js +1 -1
  207. package/dist/node_modules/recharts/es6/util/PolarUtils.js +1 -1
  208. package/dist/node_modules/recharts/es6/util/ReactUtils.js +2 -2
  209. package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +1 -1
  210. package/dist/node_modules/recharts/es6/util/types.js +1 -1
  211. package/dist/node_modules/{react-is → recharts/node_modules/react-is}/cjs/react-is.development.js +2 -2
  212. package/dist/node_modules/{react-is → recharts/node_modules/react-is}/cjs/react-is.production.min.js +2 -2
  213. package/dist/node_modules/{react-is → recharts/node_modules/react-is}/index.js +2 -2
  214. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +97 -18
  215. package/dist/node_modules/zustand/esm/middleware.js +2 -2
  216. package/dist/pages/ConsolidationPage.js +76 -0
  217. package/dist/pages/ContainerConditionPage.js +972 -0
  218. package/dist/pages/ContainersPage.js +522 -0
  219. package/dist/pages/EmptyReusePage.js +777 -0
  220. package/dist/pages/FreeTimePage.js +657 -0
  221. package/dist/pages/FreightEstimatePage.js +284 -0
  222. package/dist/pages/InventoryPage.js +77 -73
  223. package/dist/pages/LogisticsProceduresPage.js +100 -0
  224. package/dist/pages/PendingPickPage.js +155 -0
  225. package/dist/pages/StockBindingPage.js +236 -0
  226. package/dist/pages/StockObservationsPage.js +168 -0
  227. package/dist/pages/TripUtilizationPage.js +227 -0
  228. package/dist/src/generated/consolidation-operations.js +505 -0
  229. package/dist/src/generated/container-condition-operations.js +208 -0
  230. package/dist/src/generated/container-operations.js +101 -0
  231. package/dist/src/generated/empty-reuse-operations.js +749 -0
  232. package/dist/src/generated/free-time-operations.js +235 -0
  233. package/dist/src/generated/freight-cost-operations.js +325 -0
  234. package/dist/src/generated/logistics-procedure-operations.js +362 -0
  235. package/dist/src/generated/pending-pick-operations.js +1128 -0
  236. package/dist/src/generated/stock-binding-operations.js +175 -0
  237. package/dist/src/generated/stock-observation-operations.js +93 -0
  238. package/dist/src/generated/trip-utilization-operations.js +140 -0
  239. package/dist/src/generated/wspace-operations.js +708 -0
  240. package/dist/utils/consolidationHistoryTarget.js +27 -0
  241. package/dist/utils/consolidationInput.js +21 -0
  242. package/dist/utils/consolidationLot.js +29 -0
  243. package/dist/utils/consolidationPins.js +13 -0
  244. package/dist/utils/consolidationRecovery.js +40 -0
  245. package/dist/utils/consolidationReportHead.js +18 -0
  246. package/dist/utils/freeTimeDate.js +26 -0
  247. package/dist/utils/freightAcknowledgement.js +8 -0
  248. package/dist/utils/freightDraft.js +125 -0
  249. package/dist/utils/freightRecovery.js +36 -0
  250. package/dist/utils/graphqlClient.js +28 -28
  251. package/dist/utils/pendingPickDraft.js +46 -0
  252. package/dist/utils/procedureInput.js +43 -0
  253. package/dist/utils/procedureRecovery.js +42 -0
  254. package/dist/utils/reuseAttempt.js +20 -0
  255. package/dist/utils/reuseForm.js +25 -0
  256. package/dist/utils/reuseRecovery.js +71 -0
  257. package/dist/utils/stockBindingForm.js +142 -0
  258. package/dist/utils/stockBindingLabels.js +23 -0
  259. package/dist/utils/stockObservationForm.js +55 -0
  260. package/dist/utils/tripDraftContext.js +19 -0
  261. package/dist/utils/tripUtilizationForm.js +60 -0
  262. package/package.json +19 -5
  263. package/src/generated/consolidation-operations.ts +1138 -0
  264. package/src/generated/container-condition-operations.ts +771 -0
  265. package/src/generated/container-operations.ts +376 -0
  266. package/src/generated/empty-reuse-operations.ts +1648 -0
  267. package/src/generated/free-time-operations.ts +814 -0
  268. package/src/generated/freight-cost-operations.ts +753 -0
  269. package/src/generated/logistics-procedure-operations.ts +1047 -0
  270. package/src/generated/pending-pick-operations.ts +1508 -0
  271. package/src/generated/stock-binding-operations.ts +631 -0
  272. package/src/generated/stock-observation-operations.ts +373 -0
  273. package/src/generated/trip-utilization-operations.ts +500 -0
  274. package/src/generated/wspace-operations.ts +116 -0
  275. package/src/movethewheels/MoveTheWheelsRoot.tsx +79 -0
  276. package/src/movethewheels/MoveTheWheelsRoutes.tsx +22 -0
  277. package/src/movethewheels/components/ContainerEvidencePicker.tsx +146 -0
  278. package/src/movethewheels/components/FreeTimeAgreementForm.tsx +483 -0
  279. package/src/movethewheels/components/ReturnInstructionForm.tsx +102 -0
  280. package/src/movethewheels/components/ReuseControls.tsx +138 -0
  281. package/src/movethewheels/components/ReusePermissionForm.tsx +123 -0
  282. package/src/movethewheels/components/ReuseProposalForm.tsx +484 -0
  283. package/src/movethewheels/components/ReuseSourceFields.tsx +80 -0
  284. package/src/movethewheels/components/consolidation/ConsolidationHistory.tsx +159 -0
  285. package/src/movethewheels/components/consolidation/ConsolidationLotEditor.tsx +144 -0
  286. package/src/movethewheels/components/consolidation/ConsolidationManifestWorkbench.tsx +168 -0
  287. package/src/movethewheels/components/consolidation/ConsolidationPlanForm.tsx +185 -0
  288. package/src/movethewheels/components/consolidation/ConsolidationPlanWorkbench.tsx +395 -0
  289. package/src/movethewheels/components/consolidation/ConsolidationReportForm.tsx +124 -0
  290. package/src/movethewheels/components/consolidation/ConsolidationReportsWorkbench.tsx +233 -0
  291. package/src/movethewheels/components/consolidation/ConsolidationSummary.tsx +84 -0
  292. package/src/movethewheels/components/consolidation/OriginalConsolidationHistory.tsx +133 -0
  293. package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +224 -0
  294. package/src/movethewheels/components/freight-cost/FreightFields.tsx +91 -0
  295. package/src/movethewheels/components/freight-cost/FreightFxEditor.tsx +98 -0
  296. package/src/movethewheels/components/freight-cost/FreightHistory.tsx +91 -0
  297. package/src/movethewheels/components/freight-cost/FreightLineEditor.tsx +192 -0
  298. package/src/movethewheels/components/freight-cost/FreightScopeEditor.tsx +64 -0
  299. package/src/movethewheels/components/freight-cost/FreightTotals.tsx +68 -0
  300. package/src/movethewheels/components/logistics-procedure/ProcedureDecisionForm.tsx +204 -0
  301. package/src/movethewheels/components/logistics-procedure/ProcedureFields.tsx +43 -0
  302. package/src/movethewheels/components/logistics-procedure/ProcedureHistory.tsx +102 -0
  303. package/src/movethewheels/components/logistics-procedure/ProcedurePolicyForm.tsx +226 -0
  304. package/src/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.tsx +174 -0
  305. package/src/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.tsx +278 -0
  306. package/src/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.tsx +292 -0
  307. package/src/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.tsx +111 -0
  308. package/src/movethewheels/components/pending-pick/PendingPickDraft.tsx +82 -0
  309. package/src/movethewheels/components/pending-pick/PendingPickHistory.tsx +93 -0
  310. package/src/movethewheels/components/pending-pick/PickCapture.tsx +70 -0
  311. package/src/movethewheels/components/pending-pick/PickLineSelection.tsx +130 -0
  312. package/src/movethewheels/components/stock-binding/StockAssessmentDraft.tsx +52 -0
  313. package/src/movethewheels/components/stock-binding/StockAssessmentHistory.tsx +56 -0
  314. package/src/movethewheels/components/stock-binding/StockAssessmentSummary.tsx +108 -0
  315. package/src/movethewheels/components/stock-binding/StockFactForm.tsx +186 -0
  316. package/src/movethewheels/components/stock-observation/StockIssueForm.tsx +103 -0
  317. package/src/movethewheels/components/stock-observation/StockIssueHistory.tsx +96 -0
  318. package/src/movethewheels/components/stock-observation/StockIssueReadPanel.tsx +72 -0
  319. package/src/movethewheels/components/trip-utilization/TripReportForm.tsx +116 -0
  320. package/src/movethewheels/components/trip-utilization/TripReportHistory.tsx +51 -0
  321. package/src/movethewheels/components/trip-utilization/TripReportSummary.tsx +127 -0
  322. package/src/movethewheels/components/trip-utilization/TripSegmentFields.tsx +118 -0
  323. package/src/movethewheels/hooks/useConsolidationAction.ts +196 -0
  324. package/src/movethewheels/hooks/useContainerCondition.ts +129 -0
  325. package/src/movethewheels/hooks/useContainerLifecycle.ts +291 -0
  326. package/src/movethewheels/hooks/useEmptyReuseAction.ts +72 -0
  327. package/src/movethewheels/hooks/useFreightRecoveryAction.ts +201 -0
  328. package/src/movethewheels/hooks/useInventory.ts +2 -20
  329. package/src/movethewheels/hooks/useProcedureAction.ts +196 -0
  330. package/src/movethewheels/hooks/useProcedureSelection.ts +75 -0
  331. package/src/movethewheels/hooks/useReuseRecoveryAction.ts +192 -0
  332. package/src/movethewheels/pages/ConsolidationPage.tsx +70 -0
  333. package/src/movethewheels/pages/ContainerConditionPage.tsx +959 -0
  334. package/src/movethewheels/pages/ContainersPage.tsx +490 -0
  335. package/src/movethewheels/pages/EmptyReusePage.tsx +823 -0
  336. package/src/movethewheels/pages/FreeTimePage.tsx +720 -0
  337. package/src/movethewheels/pages/FreightEstimatePage.tsx +353 -0
  338. package/src/movethewheels/pages/InventoryPage.tsx +16 -2
  339. package/src/movethewheels/pages/LogisticsProceduresPage.tsx +86 -0
  340. package/src/movethewheels/pages/PendingPickPage.tsx +226 -0
  341. package/src/movethewheels/pages/StockBindingPage.tsx +299 -0
  342. package/src/movethewheels/pages/StockObservationsPage.tsx +181 -0
  343. package/src/movethewheels/pages/TripUtilizationPage.tsx +315 -0
  344. package/src/movethewheels/utils/consolidationHistoryTarget.ts +39 -0
  345. package/src/movethewheels/utils/consolidationInput.ts +70 -0
  346. package/src/movethewheels/utils/consolidationLot.ts +24 -0
  347. package/src/movethewheels/utils/consolidationPins.ts +52 -0
  348. package/src/movethewheels/utils/consolidationRecovery.ts +88 -0
  349. package/src/movethewheels/utils/consolidationReportHead.ts +29 -0
  350. package/src/movethewheels/utils/freeTimeDate.ts +31 -0
  351. package/src/movethewheels/utils/freightAcknowledgement.ts +31 -0
  352. package/src/movethewheels/utils/freightDraft.ts +170 -0
  353. package/src/movethewheels/utils/freightRecovery.ts +79 -0
  354. package/src/movethewheels/utils/graphqlClient.ts +14 -5
  355. package/src/movethewheels/utils/pendingPickDraft.ts +61 -0
  356. package/src/movethewheels/utils/procedureInput.ts +98 -0
  357. package/src/movethewheels/utils/procedureRecovery.ts +92 -0
  358. package/src/movethewheels/utils/reuseAttempt.ts +29 -0
  359. package/src/movethewheels/utils/reuseForm.ts +30 -0
  360. package/src/movethewheels/utils/reuseRecovery.ts +151 -0
  361. package/src/movethewheels/utils/stockBindingForm.ts +209 -0
  362. package/src/movethewheels/utils/stockBindingLabels.ts +41 -0
  363. package/src/movethewheels/utils/stockObservationForm.ts +73 -0
  364. package/src/movethewheels/utils/tripDraftContext.ts +61 -0
  365. package/src/movethewheels/utils/tripUtilizationForm.ts +105 -0
  366. package/src/operations/condition/container-condition.graphql +41 -0
  367. package/src/operations/consolidation/consolidation.graphql +490 -0
  368. package/src/operations/container/container-lifecycle.graphql +80 -0
  369. package/src/operations/empty-reuse/empty-reuse.graphql +737 -0
  370. package/src/operations/free-time/free-time.graphql +47 -0
  371. package/src/operations/freight-cost/freight.graphql +6 -0
  372. package/src/operations/logistics-procedure/procedure.graphql +15 -0
  373. package/src/operations/pending-pick/pending-pick.graphql +1122 -0
  374. package/src/operations/stock-binding/stock-binding.graphql +160 -0
  375. package/src/operations/stock-observation/stock-observation.graphql +20 -0
  376. package/src/operations/trip-utilization/trip-utilization.graphql +126 -0
  377. package/src/operations/wspace/container-evidence.graphql +6 -0
@@ -0,0 +1,777 @@
1
+ import { Repeat2 as e } from "../node_modules/lucide-react/dist/esm/icons/repeat-2.js";
2
+ import { Button as t } from "../components/ui.js";
3
+ import { PageLayout as n } from "../components/PageLayout.js";
4
+ import { useConditionQuery as r } from "../hooks/useContainerCondition.js";
5
+ import { PinnedSelect as i, ReuseField as ee, ReusePager as a, ReuseState as o, reuseCard as te } from "../components/ReuseControls.js";
6
+ import { reuseText as ne } from "../utils/reuseForm.js";
7
+ import { ReturnInstructionForm as re } from "../components/ReturnInstructionForm.js";
8
+ import { AcceptReuseReservationDocument as ie, BoundReturnInstructionDocument as ae, RecordReturnInstructionDocument as oe, RecordReuseApprovalDocument as se, RecordReuseProposalDocument as ce, ReturnInstructionsDocument as le, ReuseApprovalsDocument as ue, ReuseContainersDocument as de, ReuseCyclesDocument as fe, ReuseEligibilityDocument as pe, ReuseProposalsDocument as me, ReuseReservationTransitionsDocument as he, ReuseReservationsDocument as s, TerminateReuseReservationDocument as ge } from "../src/generated/empty-reuse-operations.js";
9
+ import { ReuseProposalForm as _e } from "../components/ReuseProposalForm.js";
10
+ import { ReusePermissionForm as ve } from "../components/ReusePermissionForm.js";
11
+ import { useReuseRecoveryAction as ye } from "../hooks/useReuseRecoveryAction.js";
12
+ import { useState as c } from "react";
13
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
14
+ //#region src/movethewheels/pages/EmptyReusePage.tsx
15
+ var f = (e) => ({
16
+ limit: 25,
17
+ offset: e
18
+ });
19
+ function p({ evidence: e }) {
20
+ return /* @__PURE__ */ d("details", { children: [/* @__PURE__ */ d("summary", { children: [
21
+ "Exact evidence versions (",
22
+ e.length,
23
+ ")"
24
+ ] }), /* @__PURE__ */ u("ul", {
25
+ className: "space-y-2 text-xs",
26
+ children: e.map((e) => /* @__PURE__ */ d("li", {
27
+ className: "break-all",
28
+ children: [
29
+ "File ",
30
+ e.fileId,
31
+ "; version ",
32
+ e.versionId,
33
+ "; SHA256 ",
34
+ e.sha256Hash,
35
+ "; checked",
36
+ " ",
37
+ e.checkedAt
38
+ ]
39
+ }, e.versionId))
40
+ })] });
41
+ }
42
+ function be({ row: e }) {
43
+ return /* @__PURE__ */ d("details", {
44
+ className: "space-y-2 text-sm",
45
+ children: [
46
+ /* @__PURE__ */ u("summary", { children: "Inspect immutable planning revision" }),
47
+ /* @__PURE__ */ d("p", { children: [
48
+ "Actual event ",
49
+ e.emptyEventId,
50
+ "; condition ",
51
+ e.inspectionId,
52
+ "; instruction",
53
+ " ",
54
+ e.instructionId,
55
+ "; route ",
56
+ e.transportRouteId,
57
+ ", updated ",
58
+ e.transportRouteUpdatedAt,
59
+ "."
60
+ ] }),
61
+ /* @__PURE__ */ d("p", { children: [
62
+ "Export booking ",
63
+ e.exportBookingReference,
64
+ "; recipient ",
65
+ e.exporterReference,
66
+ "; handoff",
67
+ " ",
68
+ e.handoffLocationReference,
69
+ ": ",
70
+ e.handoffFrom,
71
+ "–",
72
+ e.handoffUntil,
73
+ ". Equipment",
74
+ " ",
75
+ e.requiredEquipmentType,
76
+ "; cargo ",
77
+ e.cargoCategory,
78
+ "."
79
+ ] }),
80
+ /* @__PURE__ */ d("p", { children: [
81
+ "Proposal scope fingerprint:",
82
+ " ",
83
+ /* @__PURE__ */ u("span", {
84
+ className: "break-all",
85
+ children: e.assessment.scopeFingerprint
86
+ }),
87
+ ". Qualification",
88
+ " ",
89
+ e.assessment.conditionQualificationId ?? "UNKNOWN",
90
+ ", version",
91
+ " ",
92
+ e.assessment.conditionQualificationVersion ?? "UNKNOWN",
93
+ "."
94
+ ] }),
95
+ Object.entries(e.assessment.sources).filter(([e]) => e !== "__typename").map(([e, t]) => /* @__PURE__ */ d("div", {
96
+ className: "rounded border p-3",
97
+ children: [/* @__PURE__ */ u("strong", { children: e }), t && typeof t == "object" && "sourceReference" in t ? /* @__PURE__ */ d(l, { children: [
98
+ /* @__PURE__ */ d("p", { children: [
99
+ t.purpose,
100
+ ": ",
101
+ t.sourceReference,
102
+ ", revision ",
103
+ t.sourceRevision,
104
+ "; observed ",
105
+ t.observedAt,
106
+ "; valid ",
107
+ t.validFrom,
108
+ "–",
109
+ t.validUntil,
110
+ "; recorded ",
111
+ t.recordedAt,
112
+ " by ",
113
+ t.recordedByActorId,
114
+ "."
115
+ ] }),
116
+ /* @__PURE__ */ d("p", {
117
+ className: "break-all",
118
+ children: ["Purpose scope: ", t.scopeFingerprint]
119
+ }),
120
+ /* @__PURE__ */ u(p, { evidence: t.evidence })
121
+ ] }) : /* @__PURE__ */ u("p", { children: "UNKNOWN: no purpose-specific source" })]
122
+ }, e)),
123
+ /* @__PURE__ */ d("p", { children: [
124
+ "Timing",
125
+ " ",
126
+ e.assessment.timing ? `departure ${e.assessment.timing.departureAt}, travel ≤${e.assessment.timing.maxTravelSeconds}s, wait ≤${e.assessment.timing.maxWaitSeconds}s, full leg ≤${e.assessment.timing.maxFullReuseAndReturnSeconds}s; return ${e.assessment.timing.plannedReturnFrom}–${e.assessment.timing.plannedReturnUntil}` : "UNKNOWN",
127
+ ". Route binding",
128
+ " ",
129
+ e.assessment.routeBinding ? `waypoints ${e.assessment.routeBinding.handoffWaypointIndex} → ${e.assessment.routeBinding.returnWaypointIndex}` : "UNKNOWN",
130
+ "."
131
+ ] }),
132
+ /* @__PURE__ */ u(p, { evidence: e.evidence })
133
+ ]
134
+ });
135
+ }
136
+ function m() {
137
+ let t = ye();
138
+ return /* @__PURE__ */ u(n, {
139
+ title: "Empty return and reuse planning",
140
+ subtitle: "Sourced obligations, planning revisions and separate dispatch-review reservations.",
141
+ icon: /* @__PURE__ */ u(e, { "aria-hidden": "true" }),
142
+ children: /* @__PURE__ */ u(h, { mutations: t }, t.contextKey)
143
+ });
144
+ }
145
+ function h({ mutations: e }) {
146
+ let [n, ye] = c(null), [m, h] = c(null), [g, xe] = c(0), [_, Se] = c(0), [v, Ce] = c(0), [we, Te] = c(0), [Ee, y] = c(0), [b, x] = c(0), [S, De] = c(null), [C, w] = c(null), [T, E] = c(null), [D, O] = c(null), [k, A] = c(0), [j, M] = c(0), [N, P] = c("instruction"), [Oe, F] = c(0), [ke, I] = c(null), L = m?.row.id ?? "", R = r(de, { pagination: f(g) }, e.revision), z = r(fe, n ? {
147
+ containerId: n.id,
148
+ pagination: f(_)
149
+ } : null, e.revision), Ae = r(fe, n && m && m.offset !== _ ? {
150
+ containerId: n.id,
151
+ pagination: f(m.offset)
152
+ } : null, e.revision), B = (m?.offset === _ ? z.data : Ae.data)?.mtwContainerCyclePage.items.find((e) => e.id === L), V = r(le, L ? {
153
+ cycleId: L,
154
+ pagination: f(v)
155
+ } : null, e.revision), H = r(le, L && v !== 0 ? {
156
+ cycleId: L,
157
+ pagination: {
158
+ limit: 1,
159
+ offset: 0
160
+ }
161
+ } : null, e.revision), U = (v === 0 ? V.data : H.data)?.mtwEmptyReturnInstructionPage.items[0], je = r(ae, C ? { id: C.instructionId } : null, e.revision), Me = je.data?.mtwEmptyReturnInstruction, W = r(me, L ? {
162
+ cycleId: L,
163
+ pagination: f(we)
164
+ } : null, e.revision), G = r(ue, C ? {
165
+ proposalId: C.id,
166
+ pagination: f(Ee)
167
+ } : null, e.revision), K = r(s, L ? {
168
+ cycleId: L,
169
+ pagination: f(b)
170
+ } : null, e.revision), Ne = r(s, D && k !== b ? {
171
+ cycleId: L,
172
+ pagination: f(k)
173
+ } : null, e.revision), q = (k === b ? K.data : Ne.data)?.mtwReuseReservationPage.items.find((e) => e.id === D?.id), J = r(he, D ? {
174
+ reservationId: D.id,
175
+ pagination: f(j)
176
+ } : null, e.revision), Y = r(pe, C && Oe ? {
177
+ proposalId: C.id,
178
+ approvalId: T?.id
179
+ } : null, e.revision + Oe), X = Y.data?.mtwReuseEligibility, Pe = () => {
180
+ De(null), w(null), E(null), O(null), M(0), A(0), Ce(0), Te(0), y(0), x(0), F(0), I(null), P("instruction");
181
+ }, Fe = (e) => {
182
+ w(e), E(null), y(0), F(0), P("revise"), I(null);
183
+ }, Z = () => {
184
+ if (e.uncertain) throw Error("Resolve the original request before starting another.");
185
+ if (!B || B.status !== "OPEN") throw Error("Refresh and select a current open usage cycle.");
186
+ return B;
187
+ }, Q = G.data?.mtwEquipmentReuseApprovalPage.items ?? [], $ = T && !Q.some((e) => e.id === T.id) ? [T, ...Q] : Q;
188
+ return /* @__PURE__ */ d("div", {
189
+ className: "space-y-6",
190
+ children: [
191
+ /* @__PURE__ */ u("p", {
192
+ className: "rounded-lg border p-4 text-sm",
193
+ children: "Planning only. A sourced grant does not reserve equipment. Readiness is a point-in-time server review of named constraints; a separate reservation rechecks current records. No street-turn execution, depot-return event, cargo completion or free-time clock stop is recorded here."
194
+ }),
195
+ /* @__PURE__ */ d("section", {
196
+ className: te,
197
+ "aria-label": "Choose equipment and usage cycle",
198
+ children: [
199
+ /* @__PURE__ */ u(i, {
200
+ label: "Physical container",
201
+ value: n?.id ?? "",
202
+ disabled: e.busy,
203
+ onChange: (e) => {
204
+ ye(R.data?.mtwContainerPage.items.find((t) => t.id === e) ?? null), h(null), Se(0), Pe();
205
+ },
206
+ options: R.data?.mtwContainerPage.items.map((e) => ({
207
+ id: e.id,
208
+ label: `${e.containerNumber} — ${e.equipmentType} — ${e.ownerName ?? "Owner unrecorded"}`
209
+ })) ?? []
210
+ }),
211
+ /* @__PURE__ */ u(o, { ...R }),
212
+ /* @__PURE__ */ u(a, {
213
+ page: R.data?.mtwContainerPage,
214
+ offset: g,
215
+ onChange: xe,
216
+ busy: R.loading || e.busy
217
+ }),
218
+ /* @__PURE__ */ u(i, {
219
+ label: "Usage cycle",
220
+ value: L,
221
+ disabled: !n || e.busy,
222
+ onChange: (e) => {
223
+ let t = z.data?.mtwContainerCyclePage.items.find((t) => t.id === e);
224
+ h(t ? {
225
+ row: t,
226
+ offset: _
227
+ } : null), Pe();
228
+ },
229
+ options: z.data?.mtwContainerCyclePage.items.map((e) => ({
230
+ id: e.id,
231
+ label: `${e.bookingReference ?? e.id} — ${e.status} — v${e.version}`
232
+ })) ?? []
233
+ }),
234
+ /* @__PURE__ */ u(o, { ...z }),
235
+ /* @__PURE__ */ u(o, { ...Ae }),
236
+ /* @__PURE__ */ u(a, {
237
+ page: z.data?.mtwContainerCyclePage,
238
+ offset: _,
239
+ onChange: Se,
240
+ busy: z.loading || e.busy
241
+ }),
242
+ m && /* @__PURE__ */ d("p", { children: [
243
+ "Selected cycle ",
244
+ L,
245
+ ":",
246
+ " ",
247
+ B ? `${B.status}, current version ${B.version}` : "Current revision unavailable; writes blocked until refresh."
248
+ ] }),
249
+ /* @__PURE__ */ u(t, {
250
+ type: "button",
251
+ variant: "outline",
252
+ disabled: e.busy || e.uncertain,
253
+ onClick: () => {
254
+ e.refresh(), I(null);
255
+ },
256
+ children: "Refresh current records"
257
+ })
258
+ ]
259
+ }),
260
+ L && /* @__PURE__ */ d(l, { children: [
261
+ /* @__PURE__ */ d("section", {
262
+ className: "space-y-4 rounded-xl border bg-bg-surface p-5",
263
+ "aria-label": "Return instruction history",
264
+ children: [
265
+ /* @__PURE__ */ u("h2", {
266
+ className: "text-lg font-semibold",
267
+ children: "Sourced return instructions"
268
+ }),
269
+ /* @__PURE__ */ d("p", { children: [
270
+ "Current instruction",
271
+ " ",
272
+ U ? `v${U.version}: ${U.locationReference}` : "not loaded / not recorded",
273
+ ". Earlier versions remain immutable."
274
+ ] }),
275
+ /* @__PURE__ */ u(o, { ...V }),
276
+ /* @__PURE__ */ u(o, { ...H }),
277
+ V.data?.mtwEmptyReturnInstructionPage.items.map((n) => /* @__PURE__ */ d("article", {
278
+ className: "space-y-2 rounded border p-3 text-sm",
279
+ children: [
280
+ /* @__PURE__ */ d("p", { children: [
281
+ "v",
282
+ n.version,
283
+ " — ",
284
+ n.ownerReference,
285
+ " — booking ",
286
+ n.bookingReference,
287
+ "; depot",
288
+ " ",
289
+ n.depotReference,
290
+ ", location ",
291
+ n.locationReference,
292
+ "."
293
+ ] }),
294
+ /* @__PURE__ */ d("p", { children: [
295
+ n.returnFrom,
296
+ "–",
297
+ n.returnUntil,
298
+ "; effective ",
299
+ n.effectiveAt,
300
+ "; recorded",
301
+ " ",
302
+ n.recordedAt,
303
+ "."
304
+ ] }),
305
+ /* @__PURE__ */ d("p", { children: [
306
+ "Instruction id ",
307
+ n.id,
308
+ "; source ",
309
+ n.sourceReference,
310
+ "; reason ",
311
+ n.changeReason,
312
+ "; supersedes ",
313
+ n.supersedesInstructionId ?? "none",
314
+ "."
315
+ ] }),
316
+ /* @__PURE__ */ u(p, { evidence: n.evidence }),
317
+ /* @__PURE__ */ d(t, {
318
+ type: "button",
319
+ variant: "outline",
320
+ disabled: e.busy || e.uncertain,
321
+ onClick: () => De(n),
322
+ children: ["Inspect/select instruction v", n.version]
323
+ })
324
+ ]
325
+ }, n.id)),
326
+ /* @__PURE__ */ u(a, {
327
+ page: V.data?.mtwEmptyReturnInstructionPage,
328
+ offset: v,
329
+ onChange: Ce,
330
+ busy: V.loading || e.busy
331
+ }),
332
+ S && /* @__PURE__ */ d("p", {
333
+ className: "break-words",
334
+ children: [
335
+ "Pinned history selection: v",
336
+ S.version,
337
+ ", ",
338
+ S.locationReference,
339
+ "; id",
340
+ S.id,
341
+ ". Drafts use the separately loaded current instruction."
342
+ ]
343
+ })
344
+ ]
345
+ }),
346
+ /* @__PURE__ */ d("section", {
347
+ className: "space-y-4 rounded-xl border bg-bg-surface p-5",
348
+ "aria-label": "Planning proposal history",
349
+ children: [
350
+ /* @__PURE__ */ u("h2", {
351
+ className: "text-lg font-semibold",
352
+ children: "Immutable planning revisions"
353
+ }),
354
+ /* @__PURE__ */ u(o, { ...W }),
355
+ W.data?.mtwReuseProposalPage.items.map((n) => /* @__PURE__ */ d("article", {
356
+ className: "space-y-3 rounded border p-3",
357
+ children: [
358
+ /* @__PURE__ */ d("p", { children: [
359
+ n.proposalReference,
360
+ " — revision",
361
+ n.revision,
362
+ ", recorded ",
363
+ n.recordedAt
364
+ ] }),
365
+ /* @__PURE__ */ u(be, { row: n }),
366
+ /* @__PURE__ */ d(t, {
367
+ type: "button",
368
+ variant: "outline",
369
+ disabled: e.busy || e.uncertain,
370
+ onClick: () => Fe(n),
371
+ children: ["Select revision", n.revision]
372
+ })
373
+ ]
374
+ }, n.id)),
375
+ /* @__PURE__ */ u(a, {
376
+ page: W.data?.mtwReuseProposalPage,
377
+ offset: we,
378
+ onChange: Te,
379
+ busy: W.loading || e.busy
380
+ }),
381
+ C && /* @__PURE__ */ d("div", {
382
+ className: "rounded border p-3",
383
+ children: [/* @__PURE__ */ d("p", { children: [
384
+ "Pinned selection ",
385
+ C.proposalReference,
386
+ ", revision",
387
+ C.revision,
388
+ ", id",
389
+ C.id,
390
+ "."
391
+ ] }), /* @__PURE__ */ u(be, { row: C })]
392
+ })
393
+ ]
394
+ }),
395
+ /* @__PURE__ */ d("section", {
396
+ className: "space-y-4 rounded-xl border bg-bg-surface p-5",
397
+ "aria-label": "Record planning evidence",
398
+ children: [
399
+ /* @__PURE__ */ u("h2", {
400
+ className: "text-lg font-semibold",
401
+ children: "Record planning evidence"
402
+ }),
403
+ /* @__PURE__ */ u(i, {
404
+ label: "Planning action",
405
+ value: N,
406
+ disabled: e.busy || e.uncertain,
407
+ onChange: (e) => {
408
+ let t = [
409
+ "instruction",
410
+ "draft",
411
+ "revise",
412
+ "permission"
413
+ ].find((t) => t === e);
414
+ t && (P(t), I(null));
415
+ },
416
+ options: [
417
+ {
418
+ id: "instruction",
419
+ label: "Record/amend current return instruction"
420
+ },
421
+ {
422
+ id: "draft",
423
+ label: "Record a new proposal reference"
424
+ },
425
+ {
426
+ id: "revise",
427
+ label: "Revise selected proposal reference"
428
+ },
429
+ {
430
+ id: "permission",
431
+ label: "Record external permission/rejection/revocation"
432
+ }
433
+ ]
434
+ }),
435
+ N === "instruction" && /* @__PURE__ */ u(re, {
436
+ current: U,
437
+ busy: e.busy || e.uncertain || !B || V.loading || H.loading,
438
+ onSubmit: async (t) => {
439
+ let n = Z();
440
+ await e.run(oe, {
441
+ ...t,
442
+ cycleId: L,
443
+ expectedCycleVersion: n.version,
444
+ currentInstructionId: U?.id
445
+ }, "Immutable sourced instruction recorded.");
446
+ }
447
+ }, `instruction:${L}:${U?.id}`),
448
+ (N === "draft" || N === "revise") && (U && n && (N === "draft" || C) ? /* @__PURE__ */ u(_e, {
449
+ cycleId: L,
450
+ containerId: n.id,
451
+ instruction: U,
452
+ initial: N === "revise" ? C ?? void 0 : void 0,
453
+ busy: e.busy || e.uncertain || !B,
454
+ onSubmit: async (t) => {
455
+ let n = Z(), r = await e.run(ce, {
456
+ ...t,
457
+ cycleId: L,
458
+ expectedCycleVersion: n.version
459
+ }, "Immutable proposal revision recorded; permission and reservation remain separate.");
460
+ r && Fe(r.recordMtwReuseProposal);
461
+ }
462
+ }, `${N}:${L}:${U.id}:${N === "revise" ? C?.id : "new"}`) : /* @__PURE__ */ u("p", { children: "Load current return instruction and, for revision, choose an immutable proposal." })),
463
+ N === "permission" && /* @__PURE__ */ u(o, { ...je }),
464
+ N === "permission" && (C && Me ? /* @__PURE__ */ u(ve, {
465
+ approvals: $,
466
+ ownerReference: Me.ownerReference,
467
+ busy: e.busy || e.uncertain || !B,
468
+ onSubmit: async (t) => {
469
+ let n = Z(), r = await e.run(se, {
470
+ ...t,
471
+ proposalId: C.id,
472
+ expectedCycleVersion: n.version
473
+ }, "Sourced external decision recorded; no reservation created.");
474
+ r && (E(r.recordMtwEquipmentReuseApproval.kind === "APPROVED" ? r.recordMtwEquipmentReuseApproval : null), F(0));
475
+ }
476
+ }, `permission:${C.id}`) : /* @__PURE__ */ d("p", { children: [
477
+ "Select an exact proposal revision. Its immutable instruction must load successfully: ",
478
+ C?.instructionId ?? "no proposal selected",
479
+ ". The bound owner must be read from that instruction, independently of the latest instruction."
480
+ ] }))
481
+ ]
482
+ }),
483
+ C && /* @__PURE__ */ d("section", {
484
+ className: "space-y-4 rounded-xl border bg-bg-surface p-5",
485
+ "aria-label": "Permission history and server eligibility",
486
+ children: [
487
+ /* @__PURE__ */ u("h2", {
488
+ className: "text-lg font-semibold",
489
+ children: "External permission and server review"
490
+ }),
491
+ /* @__PURE__ */ u(o, { ...G }),
492
+ Q.map((e) => /* @__PURE__ */ d("article", {
493
+ className: "space-y-2 rounded border p-3 text-sm",
494
+ children: [
495
+ /* @__PURE__ */ d("p", { children: [
496
+ e.kind,
497
+ " — ",
498
+ e.counterpartyReference,
499
+ "; source ",
500
+ e.sourceReference,
501
+ ";",
502
+ " ",
503
+ e.validFrom ?? "No validity start",
504
+ "–",
505
+ e.validUntil ?? "No validity end",
506
+ "."
507
+ ] }),
508
+ /* @__PURE__ */ d("p", { children: [
509
+ e.note,
510
+ "; recorded ",
511
+ e.recordedAt,
512
+ "; targeted grant ",
513
+ e.approvalId ?? "none",
514
+ "."
515
+ ] }),
516
+ /* @__PURE__ */ u(p, { evidence: e.evidence })
517
+ ]
518
+ }, e.id)),
519
+ /* @__PURE__ */ u(a, {
520
+ page: G.data?.mtwEquipmentReuseApprovalPage,
521
+ offset: Ee,
522
+ onChange: y,
523
+ busy: G.loading || e.busy
524
+ }),
525
+ /* @__PURE__ */ u(i, {
526
+ label: "Exact grant for eligibility and reservation",
527
+ required: !1,
528
+ value: T?.id ?? "",
529
+ disabled: e.busy || e.uncertain,
530
+ onChange: (e) => {
531
+ E($.find((t) => t.id === e) ?? null), F(0);
532
+ },
533
+ options: $.filter((e) => e.kind === "APPROVED").map((e) => ({
534
+ id: e.id,
535
+ label: `${e.counterpartyReference} — ${e.sourceReference} — ${e.validUntil}`
536
+ }))
537
+ }),
538
+ /* @__PURE__ */ u(t, {
539
+ type: "button",
540
+ variant: "outline",
541
+ disabled: e.busy || e.uncertain || Y.loading,
542
+ onClick: () => F((e) => e + 1),
543
+ children: "Review server eligibility"
544
+ }),
545
+ /* @__PURE__ */ u(o, { ...Y }),
546
+ X && /* @__PURE__ */ d(l, { children: [
547
+ /* @__PURE__ */ d("p", { children: [
548
+ X.status === "BLOCKED" ? "Blocked" : "Ready for separate dispatch review",
549
+ " ",
550
+ "— evaluated ",
551
+ X.evaluatedAt,
552
+ "."
553
+ ] }),
554
+ /* @__PURE__ */ u("ul", {
555
+ className: "space-y-2",
556
+ children: X.blockers.map((e) => /* @__PURE__ */ d("li", {
557
+ className: "rounded border p-3",
558
+ children: [/* @__PURE__ */ d("strong", { children: [
559
+ e.certainty,
560
+ ": ",
561
+ e.code
562
+ ] }), /* @__PURE__ */ u("p", { children: e.reason })]
563
+ }, e.code))
564
+ }),
565
+ /* @__PURE__ */ u("p", {
566
+ className: "text-sm",
567
+ children: "This result is not allocation authority. Acceptance rechecks latest proposal revision, cycle, instruction, evidence and constraints under a container lock."
568
+ }),
569
+ /* @__PURE__ */ u(t, {
570
+ type: "button",
571
+ disabled: e.busy || e.uncertain || Y.loading || X.status !== "READY_FOR_DISPATCH_REVIEW" || !T || !B,
572
+ onClick: async () => {
573
+ I(null);
574
+ try {
575
+ let t = Z();
576
+ if (!T) throw Error("Select exact sourced grant.");
577
+ let n = await e.run(ie, {
578
+ proposalId: C.id,
579
+ approvalId: T.id,
580
+ expectedCycleVersion: t.version,
581
+ expectedProposalRevision: C.revision
582
+ }, "Planning reservation accepted; equipment has not moved.");
583
+ n && (O(n.acceptMtwReuseReservation), x(0), A(0), M(0));
584
+ } catch (e) {
585
+ I(e instanceof Error ? e.message : "Unable to reserve.");
586
+ }
587
+ },
588
+ children: "Accept separate planning reservation"
589
+ })
590
+ ] })
591
+ ]
592
+ }),
593
+ /* @__PURE__ */ d("section", {
594
+ className: "space-y-4 rounded-xl border bg-bg-surface p-5",
595
+ "aria-label": "Planning reservation history",
596
+ children: [
597
+ /* @__PURE__ */ u("h2", {
598
+ className: "text-lg font-semibold",
599
+ children: "Planning reservations"
600
+ }),
601
+ /* @__PURE__ */ u(o, { ...K }),
602
+ K.data?.mtwReuseReservationPage.items.map((n) => /* @__PURE__ */ d("article", {
603
+ className: "space-y-2 rounded border p-3 text-sm",
604
+ children: [
605
+ /* @__PURE__ */ d("p", { children: [
606
+ n.status,
607
+ " — v",
608
+ n.version,
609
+ "; proposal ",
610
+ n.proposalId,
611
+ "; grant ",
612
+ n.approvalId,
613
+ "; handoff until ",
614
+ n.handoffUntil,
615
+ "."
616
+ ] }),
617
+ /* @__PURE__ */ d("p", { children: [
618
+ "Created ",
619
+ n.createdAt,
620
+ "; updated ",
621
+ n.updatedAt,
622
+ "."
623
+ ] }),
624
+ /* @__PURE__ */ u(t, {
625
+ type: "button",
626
+ variant: "outline",
627
+ disabled: e.busy || e.uncertain,
628
+ onClick: () => {
629
+ O(n), A(b), M(0);
630
+ },
631
+ children: "Inspect reservation"
632
+ })
633
+ ]
634
+ }, n.id)),
635
+ /* @__PURE__ */ u(a, {
636
+ page: K.data?.mtwReuseReservationPage,
637
+ offset: b,
638
+ onChange: x,
639
+ busy: K.loading || e.busy
640
+ }),
641
+ /* @__PURE__ */ u(o, { ...Ne }),
642
+ D && !q && /* @__PURE__ */ d("p", { children: [
643
+ "Selected reservation ",
644
+ D.id,
645
+ ". Current state unavailable; refresh its original history page before taking action."
646
+ ] }),
647
+ D && /* @__PURE__ */ d("div", {
648
+ className: "space-y-2",
649
+ children: [
650
+ /* @__PURE__ */ u("h3", {
651
+ className: "font-semibold",
652
+ children: "Recorded cancellation and expiry decisions"
653
+ }),
654
+ /* @__PURE__ */ u(o, { ...J }),
655
+ J.data?.mtwReuseReservationTransitionPage.items.map((e) => /* @__PURE__ */ d("article", {
656
+ className: "rounded border p-3",
657
+ children: [/* @__PURE__ */ d("p", { children: [
658
+ e.previousStatus,
659
+ " → ",
660
+ e.status,
661
+ "; ",
662
+ e.recordedAt,
663
+ "; recorded by",
664
+ " ",
665
+ e.createdBy,
666
+ "."
667
+ ] }), /* @__PURE__ */ u("p", { children: e.reason })]
668
+ }, e.id)),
669
+ /* @__PURE__ */ u(a, {
670
+ page: J.data?.mtwReuseReservationTransitionPage,
671
+ offset: j,
672
+ onChange: M,
673
+ busy: J.loading || e.busy
674
+ })
675
+ ]
676
+ }),
677
+ q && /* @__PURE__ */ d("div", {
678
+ className: "space-y-3 rounded border p-4",
679
+ children: [/* @__PURE__ */ d("p", { children: [
680
+ "Pinned reservation ",
681
+ q.id,
682
+ ": ",
683
+ q.status,
684
+ ", version",
685
+ q.version,
686
+ ". A terminal reservation does not record return acceptance or execution completion."
687
+ ] }), q.status === "ACTIVE" && /* @__PURE__ */ u("form", {
688
+ className: "space-y-3",
689
+ onSubmit: async (t) => {
690
+ t.preventDefault(), I(null);
691
+ try {
692
+ let n = new FormData(t.currentTarget), r = ne(n, "terminalStatus");
693
+ if (r !== "CANCELLED" && r !== "EXPIRED") throw Error("Choose cancellation or expiry.");
694
+ let i = await e.run(ge, {
695
+ reservationId: q.id,
696
+ expectedVersion: q.version,
697
+ status: r,
698
+ reason: ne(n, "reason")
699
+ }, "Terminal planning decision recorded; operational clocks unchanged.");
700
+ i && O(i.terminateMtwReuseReservation);
701
+ } catch (e) {
702
+ I(e instanceof Error ? e.message : "Unable to terminate.");
703
+ }
704
+ },
705
+ children: /* @__PURE__ */ d("fieldset", {
706
+ disabled: e.busy || e.uncertain,
707
+ className: "space-y-3",
708
+ children: [
709
+ /* @__PURE__ */ d("label", {
710
+ className: "block",
711
+ children: ["Terminal planning decision", /* @__PURE__ */ d("select", {
712
+ name: "terminalStatus",
713
+ className: "mt-1 w-full rounded border p-2",
714
+ children: [/* @__PURE__ */ u("option", {
715
+ value: "CANCELLED",
716
+ children: "Cancel"
717
+ }), /* @__PURE__ */ u("option", {
718
+ value: "EXPIRED",
719
+ children: "Record expiry (server checks deadline elapsed)"
720
+ })]
721
+ })]
722
+ }),
723
+ /* @__PURE__ */ u(ee, {
724
+ label: "Cancellation or expiry reason",
725
+ name: "reason",
726
+ maxLength: 2e3
727
+ }),
728
+ /* @__PURE__ */ u(t, {
729
+ type: "submit",
730
+ children: "Record terminal decision"
731
+ })
732
+ ]
733
+ })
734
+ })]
735
+ })
736
+ ]
737
+ })
738
+ ] }),
739
+ (ke || e.error) && /* @__PURE__ */ u("p", {
740
+ role: "alert",
741
+ children: ke ?? e.error
742
+ }),
743
+ e.notice && /* @__PURE__ */ u("p", {
744
+ role: "status",
745
+ children: e.notice
746
+ }),
747
+ e.uncertain && /* @__PURE__ */ d("div", {
748
+ className: "space-y-3 rounded border p-4",
749
+ children: [
750
+ /* @__PURE__ */ d("p", { children: [e.recoveryInvalid && "The saved request cannot be read safely. Check history before abandoning it. ", "Result may be uncertain. Refresh history before retrying. “Retry original request” reuses its original body, expected revisions and idempotency key; it does not use edited form fields. The saved request stays available when context changes. Return to its original account, workspace and project to retry. Resolve or explicitly abandon it before starting another request."] }),
751
+ /* @__PURE__ */ u(t, {
752
+ type: "button",
753
+ variant: "outline",
754
+ disabled: e.busy,
755
+ onClick: e.refresh,
756
+ children: "Refresh history after uncertain result"
757
+ }),
758
+ /* @__PURE__ */ u(t, {
759
+ type: "button",
760
+ disabled: e.busy || !e.canRetry,
761
+ onClick: e.retryOriginal,
762
+ children: "Retry original request"
763
+ }),
764
+ /* @__PURE__ */ u(t, {
765
+ type: "button",
766
+ variant: "outline",
767
+ disabled: e.busy,
768
+ onClick: e.discardAttempt,
769
+ children: "Abandon retry after checking history — the server may have saved it"
770
+ })
771
+ ]
772
+ })
773
+ ]
774
+ });
775
+ }
776
+ //#endregion
777
+ export { m as default };