@burdenoff/microfe-movethewheels 2026.930.5 → 2026.1010.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) 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/useMultiModalShipments.js +1 -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/LogisticsProceduresPage.js +100 -0
  223. package/dist/pages/PendingPickPage.js +155 -0
  224. package/dist/pages/StockBindingPage.js +236 -0
  225. package/dist/pages/StockObservationsPage.js +168 -0
  226. package/dist/pages/TripUtilizationPage.js +227 -0
  227. package/dist/src/generated/consolidation-operations.js +505 -0
  228. package/dist/src/generated/container-condition-operations.js +208 -0
  229. package/dist/src/generated/container-operations.js +101 -0
  230. package/dist/src/generated/empty-reuse-operations.js +749 -0
  231. package/dist/src/generated/free-time-operations.js +235 -0
  232. package/dist/src/generated/freight-cost-operations.js +325 -0
  233. package/dist/src/generated/logistics-procedure-operations.js +362 -0
  234. package/dist/src/generated/pending-pick-operations.js +1128 -0
  235. package/dist/src/generated/stock-binding-operations.js +175 -0
  236. package/dist/src/generated/stock-observation-operations.js +93 -0
  237. package/dist/src/generated/trip-utilization-operations.js +140 -0
  238. package/dist/src/generated/wspace-operations.js +708 -0
  239. package/dist/utils/consolidationHistoryTarget.js +27 -0
  240. package/dist/utils/consolidationInput.js +21 -0
  241. package/dist/utils/consolidationLot.js +29 -0
  242. package/dist/utils/consolidationPins.js +13 -0
  243. package/dist/utils/consolidationRecovery.js +40 -0
  244. package/dist/utils/consolidationReportHead.js +18 -0
  245. package/dist/utils/freeTimeDate.js +26 -0
  246. package/dist/utils/freightAcknowledgement.js +8 -0
  247. package/dist/utils/freightDraft.js +125 -0
  248. package/dist/utils/freightRecovery.js +36 -0
  249. package/dist/utils/graphqlClient.js +28 -28
  250. package/dist/utils/pendingPickDraft.js +46 -0
  251. package/dist/utils/procedureInput.js +43 -0
  252. package/dist/utils/procedureRecovery.js +42 -0
  253. package/dist/utils/reuseAttempt.js +20 -0
  254. package/dist/utils/reuseForm.js +25 -0
  255. package/dist/utils/reuseRecovery.js +71 -0
  256. package/dist/utils/stockBindingForm.js +142 -0
  257. package/dist/utils/stockBindingLabels.js +23 -0
  258. package/dist/utils/stockObservationForm.js +55 -0
  259. package/dist/utils/tripDraftContext.js +19 -0
  260. package/dist/utils/tripUtilizationForm.js +60 -0
  261. package/package.json +20 -5
  262. package/src/generated/consolidation-operations.ts +1138 -0
  263. package/src/generated/container-condition-operations.ts +771 -0
  264. package/src/generated/container-operations.ts +376 -0
  265. package/src/generated/empty-reuse-operations.ts +1648 -0
  266. package/src/generated/free-time-operations.ts +814 -0
  267. package/src/generated/freight-cost-operations.ts +753 -0
  268. package/src/generated/logistics-procedure-operations.ts +1047 -0
  269. package/src/generated/pending-pick-operations.ts +1508 -0
  270. package/src/generated/stock-binding-operations.ts +631 -0
  271. package/src/generated/stock-observation-operations.ts +373 -0
  272. package/src/generated/trip-utilization-operations.ts +500 -0
  273. package/src/generated/wspace-operations.ts +116 -0
  274. package/src/movethewheels/MoveTheWheelsRoot.tsx +79 -0
  275. package/src/movethewheels/MoveTheWheelsRoutes.tsx +22 -0
  276. package/src/movethewheels/components/ContainerEvidencePicker.tsx +146 -0
  277. package/src/movethewheels/components/FreeTimeAgreementForm.tsx +483 -0
  278. package/src/movethewheels/components/ReturnInstructionForm.tsx +102 -0
  279. package/src/movethewheels/components/ReuseControls.tsx +138 -0
  280. package/src/movethewheels/components/ReusePermissionForm.tsx +123 -0
  281. package/src/movethewheels/components/ReuseProposalForm.tsx +484 -0
  282. package/src/movethewheels/components/ReuseSourceFields.tsx +80 -0
  283. package/src/movethewheels/components/consolidation/ConsolidationHistory.tsx +159 -0
  284. package/src/movethewheels/components/consolidation/ConsolidationLotEditor.tsx +144 -0
  285. package/src/movethewheels/components/consolidation/ConsolidationManifestWorkbench.tsx +168 -0
  286. package/src/movethewheels/components/consolidation/ConsolidationPlanForm.tsx +185 -0
  287. package/src/movethewheels/components/consolidation/ConsolidationPlanWorkbench.tsx +395 -0
  288. package/src/movethewheels/components/consolidation/ConsolidationReportForm.tsx +124 -0
  289. package/src/movethewheels/components/consolidation/ConsolidationReportsWorkbench.tsx +233 -0
  290. package/src/movethewheels/components/consolidation/ConsolidationSummary.tsx +84 -0
  291. package/src/movethewheels/components/consolidation/OriginalConsolidationHistory.tsx +133 -0
  292. package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +224 -0
  293. package/src/movethewheels/components/freight-cost/FreightFields.tsx +91 -0
  294. package/src/movethewheels/components/freight-cost/FreightFxEditor.tsx +98 -0
  295. package/src/movethewheels/components/freight-cost/FreightHistory.tsx +91 -0
  296. package/src/movethewheels/components/freight-cost/FreightLineEditor.tsx +192 -0
  297. package/src/movethewheels/components/freight-cost/FreightScopeEditor.tsx +64 -0
  298. package/src/movethewheels/components/freight-cost/FreightTotals.tsx +68 -0
  299. package/src/movethewheels/components/logistics-procedure/ProcedureDecisionForm.tsx +204 -0
  300. package/src/movethewheels/components/logistics-procedure/ProcedureFields.tsx +43 -0
  301. package/src/movethewheels/components/logistics-procedure/ProcedureHistory.tsx +102 -0
  302. package/src/movethewheels/components/logistics-procedure/ProcedurePolicyForm.tsx +226 -0
  303. package/src/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.tsx +174 -0
  304. package/src/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.tsx +278 -0
  305. package/src/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.tsx +292 -0
  306. package/src/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.tsx +111 -0
  307. package/src/movethewheels/components/pending-pick/PendingPickDraft.tsx +82 -0
  308. package/src/movethewheels/components/pending-pick/PendingPickHistory.tsx +93 -0
  309. package/src/movethewheels/components/pending-pick/PickCapture.tsx +70 -0
  310. package/src/movethewheels/components/pending-pick/PickLineSelection.tsx +130 -0
  311. package/src/movethewheels/components/stock-binding/StockAssessmentDraft.tsx +52 -0
  312. package/src/movethewheels/components/stock-binding/StockAssessmentHistory.tsx +56 -0
  313. package/src/movethewheels/components/stock-binding/StockAssessmentSummary.tsx +108 -0
  314. package/src/movethewheels/components/stock-binding/StockFactForm.tsx +186 -0
  315. package/src/movethewheels/components/stock-observation/StockIssueForm.tsx +103 -0
  316. package/src/movethewheels/components/stock-observation/StockIssueHistory.tsx +96 -0
  317. package/src/movethewheels/components/stock-observation/StockIssueReadPanel.tsx +72 -0
  318. package/src/movethewheels/components/trip-utilization/TripReportForm.tsx +116 -0
  319. package/src/movethewheels/components/trip-utilization/TripReportHistory.tsx +51 -0
  320. package/src/movethewheels/components/trip-utilization/TripReportSummary.tsx +127 -0
  321. package/src/movethewheels/components/trip-utilization/TripSegmentFields.tsx +118 -0
  322. package/src/movethewheels/hooks/useConsolidationAction.ts +196 -0
  323. package/src/movethewheels/hooks/useContainerCondition.ts +129 -0
  324. package/src/movethewheels/hooks/useContainerLifecycle.ts +291 -0
  325. package/src/movethewheels/hooks/useEmptyReuseAction.ts +72 -0
  326. package/src/movethewheels/hooks/useFreightRecoveryAction.ts +201 -0
  327. package/src/movethewheels/hooks/useMultiModalShipments.ts +2 -1
  328. package/src/movethewheels/hooks/useProcedureAction.ts +196 -0
  329. package/src/movethewheels/hooks/useProcedureSelection.ts +75 -0
  330. package/src/movethewheels/hooks/useReuseRecoveryAction.ts +192 -0
  331. package/src/movethewheels/pages/ConsolidationPage.tsx +70 -0
  332. package/src/movethewheels/pages/ContainerConditionPage.tsx +959 -0
  333. package/src/movethewheels/pages/ContainersPage.tsx +490 -0
  334. package/src/movethewheels/pages/EmptyReusePage.tsx +823 -0
  335. package/src/movethewheels/pages/FreeTimePage.tsx +720 -0
  336. package/src/movethewheels/pages/FreightEstimatePage.tsx +353 -0
  337. package/src/movethewheels/pages/LogisticsProceduresPage.tsx +86 -0
  338. package/src/movethewheels/pages/PendingPickPage.tsx +226 -0
  339. package/src/movethewheels/pages/StockBindingPage.tsx +299 -0
  340. package/src/movethewheels/pages/StockObservationsPage.tsx +181 -0
  341. package/src/movethewheels/pages/TripUtilizationPage.tsx +315 -0
  342. package/src/movethewheels/utils/consolidationHistoryTarget.ts +39 -0
  343. package/src/movethewheels/utils/consolidationInput.ts +70 -0
  344. package/src/movethewheels/utils/consolidationLot.ts +24 -0
  345. package/src/movethewheels/utils/consolidationPins.ts +52 -0
  346. package/src/movethewheels/utils/consolidationRecovery.ts +88 -0
  347. package/src/movethewheels/utils/consolidationReportHead.ts +29 -0
  348. package/src/movethewheels/utils/freeTimeDate.ts +31 -0
  349. package/src/movethewheels/utils/freightAcknowledgement.ts +31 -0
  350. package/src/movethewheels/utils/freightDraft.ts +170 -0
  351. package/src/movethewheels/utils/freightRecovery.ts +79 -0
  352. package/src/movethewheels/utils/graphqlClient.ts +14 -5
  353. package/src/movethewheels/utils/pendingPickDraft.ts +61 -0
  354. package/src/movethewheels/utils/procedureInput.ts +98 -0
  355. package/src/movethewheels/utils/procedureRecovery.ts +92 -0
  356. package/src/movethewheels/utils/reuseAttempt.ts +29 -0
  357. package/src/movethewheels/utils/reuseForm.ts +30 -0
  358. package/src/movethewheels/utils/reuseRecovery.ts +151 -0
  359. package/src/movethewheels/utils/stockBindingForm.ts +209 -0
  360. package/src/movethewheels/utils/stockBindingLabels.ts +41 -0
  361. package/src/movethewheels/utils/stockObservationForm.ts +73 -0
  362. package/src/movethewheels/utils/tripDraftContext.ts +61 -0
  363. package/src/movethewheels/utils/tripUtilizationForm.ts +105 -0
  364. package/src/operations/condition/container-condition.graphql +41 -0
  365. package/src/operations/consolidation/consolidation.graphql +490 -0
  366. package/src/operations/container/container-lifecycle.graphql +80 -0
  367. package/src/operations/empty-reuse/empty-reuse.graphql +737 -0
  368. package/src/operations/free-time/free-time.graphql +47 -0
  369. package/src/operations/freight-cost/freight.graphql +6 -0
  370. package/src/operations/logistics-procedure/procedure.graphql +15 -0
  371. package/src/operations/pending-pick/pending-pick.graphql +1122 -0
  372. package/src/operations/stock-binding/stock-binding.graphql +160 -0
  373. package/src/operations/stock-observation/stock-observation.graphql +20 -0
  374. package/src/operations/trip-utilization/trip-utilization.graphql +126 -0
  375. package/src/operations/wspace/container-evidence.graphql +6 -0
@@ -0,0 +1,455 @@
1
+ import { Button as e } from "./ui.js";
2
+ import { useConditionQuery as t } from "../hooks/useContainerCondition.js";
3
+ import { PinnedSelect as n, ReuseField as r, ReusePager as i, ReuseState as a } from "./ReuseControls.js";
4
+ import { ContainerEvidencePicker as ee } from "./ContainerEvidencePicker.js";
5
+ import { EQUIPMENT_TYPES as o } from "../hooks/useContainerLifecycle.js";
6
+ import { freeTimeIso as s } from "../utils/freeTimeDate.js";
7
+ import { readReuseSource as c, reuseInteger as l, reuseText as u } from "../utils/reuseForm.js";
8
+ import { ReuseSourceFields as d } from "./ReuseSourceFields.js";
9
+ import { ReuseEventsDocument as te, ReuseInspectionsDocument as ne, ReuseQualificationsDocument as re, ReuseRouteDocument as ie } from "../src/generated/empty-reuse-operations.js";
10
+ import { useState as f } from "react";
11
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
12
+ //#region src/movethewheels/components/ReuseProposalForm.tsx
13
+ var g = [
14
+ "DRY",
15
+ "REEFER",
16
+ "FOOD_GRADE",
17
+ "PEST",
18
+ "DANGEROUS"
19
+ ];
20
+ function _({ cycleId: _, containerId: ae, instruction: v, initial: y, busy: b, onSubmit: oe }) {
21
+ let [x, S] = f(0), [C, se] = f(0), [w, T] = f(0), [E, D] = f(y?.emptyEventId ?? ""), [O, k] = f(y?.inspectionId ?? ""), [A, j] = f(y?.assessment.conditionQualificationId ?? ""), [M, ce] = f(y?.transportRouteId ?? ""), [le, N] = f(0), [P, F] = f(y?.transportRouteId ?? ""), [I, L] = f(y?.requiredEquipmentType ?? "DRY_20"), [R, z] = f(y?.cargoCategory ?? "DRY"), [B, V] = f(!!y?.assessment.timing), [H, U] = f(!!y?.assessment.routeBinding), [W, ue] = f(() => y?.evidence.map((e) => ({
22
+ fileId: e.fileId,
23
+ versionId: e.versionId,
24
+ label: `Pinned evidence version ${e.versionId}`
25
+ })) ?? []), [G, K] = f(null), q = t(te, {
26
+ cycleId: _,
27
+ pagination: {
28
+ limit: 25,
29
+ offset: x
30
+ }
31
+ }), J = t(ne, {
32
+ containerId: ae,
33
+ pagination: {
34
+ limit: 25,
35
+ offset: C
36
+ }
37
+ }), Y = t(re, { pagination: {
38
+ limit: 25,
39
+ offset: w
40
+ } }), X = t(ie, P ? { id: P } : null, le), Z = X.data?.route, Q = Array.isArray(Z?.waypoints) ? Z.waypoints : null, $ = y?.assessment.timing;
41
+ return /* @__PURE__ */ m("form", {
42
+ className: "space-y-5",
43
+ onSubmit: async (e) => {
44
+ e.preventDefault(), K(null);
45
+ try {
46
+ let t = new FormData(e.currentTarget);
47
+ if (!E || !O || !Z || M.trim() !== P) throw Error("Select pinned empty event, inspection and a loaded current route.");
48
+ if (!W.length) throw Error("Choose exact proposal evidence.");
49
+ let n = u(t, "proposalReference");
50
+ if (y && n !== y.proposalReference) throw Error("Keep the same proposal reference when recording a revision; choose a new draft for a new reference.");
51
+ let r = {
52
+ instructionId: v.id,
53
+ proposalReference: n,
54
+ expectedProposalRevision: y?.revision ?? 0,
55
+ emptyEventId: E,
56
+ inspectionId: O,
57
+ transportRouteId: Z.id,
58
+ transportRouteUpdatedAt: Z.updatedAt,
59
+ exportBookingReference: u(t, "exportBookingReference"),
60
+ exporterReference: u(t, "exporterReference"),
61
+ handoffLocationReference: u(t, "handoffLocationReference"),
62
+ handoffFrom: s(u(t, "handoffFrom")),
63
+ handoffUntil: s(u(t, "handoffUntil")),
64
+ requiredEquipmentType: I,
65
+ cargoCategory: R,
66
+ conditionQualificationId: A || void 0,
67
+ evidence: W.map(({ fileId: e, versionId: t }) => ({
68
+ fileId: e,
69
+ versionId: t
70
+ })),
71
+ sources: {
72
+ booking: c(t, "booking", W),
73
+ roadAccess: c(t, "roadAccess", W),
74
+ conditionSuitability: c(t, "conditionSuitability", W),
75
+ retainedReturnPlan: c(t, "retainedReturnPlan", W)
76
+ }
77
+ };
78
+ if (B && (r.timing = {
79
+ departureAt: s(u(t, "departureAt")),
80
+ maxTravelSeconds: l(t, "maxTravelSeconds"),
81
+ maxWaitSeconds: l(t, "maxWaitSeconds"),
82
+ siteOpenAt: s(u(t, "siteOpenAt")),
83
+ siteCloseAt: s(u(t, "siteCloseAt")),
84
+ maxFullReuseAndReturnSeconds: l(t, "maxFullReuseAndReturnSeconds"),
85
+ plannedReturnFrom: s(u(t, "plannedReturnFrom")),
86
+ plannedReturnUntil: s(u(t, "plannedReturnUntil")),
87
+ siteWaitingLocationReference: u(t, "siteWaitingLocationReference") || void 0,
88
+ returnWaitingLocationReference: u(t, "returnWaitingLocationReference") || void 0
89
+ }), H) {
90
+ let e = l(t, "handoffWaypointIndex"), n = l(t, "returnWaypointIndex");
91
+ if (!Q || e >= n || n >= Q.length) throw Error("Choose ordered handoff then return waypoint indexes within the loaded route.");
92
+ r.routeBinding = {
93
+ handoffWaypointIndex: e,
94
+ returnWaypointIndex: n
95
+ };
96
+ }
97
+ await oe(r);
98
+ } catch (e) {
99
+ K(e instanceof Error ? e.message : "Invalid proposal.");
100
+ }
101
+ },
102
+ children: /* @__PURE__ */ h("fieldset", {
103
+ disabled: b,
104
+ className: "space-y-5",
105
+ children: [
106
+ /* @__PURE__ */ h("p", {
107
+ className: "text-sm",
108
+ children: [
109
+ y ? `Revision of ${y.proposalReference}, selected revision${y.revision}.` : "New immutable planning draft.",
110
+ " ",
111
+ "Current return instruction v",
112
+ v.version,
113
+ ": ",
114
+ v.locationReference,
115
+ ",",
116
+ " ",
117
+ v.returnFrom,
118
+ "–",
119
+ v.returnUntil,
120
+ ". New revisions do not inherit permission or allocation. Blank source, timing, route binding and qualification remain UNKNOWN."
121
+ ]
122
+ }),
123
+ /* @__PURE__ */ h("div", {
124
+ className: "grid gap-3 md:grid-cols-2",
125
+ children: [
126
+ /* @__PURE__ */ m(r, {
127
+ label: "Proposal reference",
128
+ name: "proposalReference",
129
+ value: y?.proposalReference,
130
+ maxLength: 120
131
+ }),
132
+ /* @__PURE__ */ m(r, {
133
+ label: "Exact export booking reference",
134
+ name: "exportBookingReference",
135
+ value: y?.exportBookingReference
136
+ }),
137
+ /* @__PURE__ */ m(r, {
138
+ label: "Export recipient reference",
139
+ name: "exporterReference",
140
+ value: y?.exporterReference
141
+ }),
142
+ /* @__PURE__ */ m(r, {
143
+ label: "Handoff location reference",
144
+ name: "handoffLocationReference",
145
+ value: y?.handoffLocationReference
146
+ }),
147
+ /* @__PURE__ */ m(r, {
148
+ label: "Handoff from (ISO with timezone)",
149
+ name: "handoffFrom",
150
+ value: y?.handoffFrom
151
+ }),
152
+ /* @__PURE__ */ m(r, {
153
+ label: "Handoff until (ISO with timezone)",
154
+ name: "handoffUntil",
155
+ value: y?.handoffUntil
156
+ }),
157
+ /* @__PURE__ */ m(n, {
158
+ label: "Required equipment",
159
+ value: I,
160
+ onChange: (e) => {
161
+ let t = o.find((t) => t === e);
162
+ t && L(t);
163
+ },
164
+ options: o.map((e) => ({
165
+ id: e,
166
+ label: e
167
+ }))
168
+ }),
169
+ /* @__PURE__ */ m(n, {
170
+ label: "Cargo category",
171
+ value: R,
172
+ onChange: (e) => {
173
+ let t = g.find((t) => t === e);
174
+ t && z(t);
175
+ },
176
+ options: g.map((e) => ({
177
+ id: e,
178
+ label: e
179
+ }))
180
+ })
181
+ ]
182
+ }),
183
+ /* @__PURE__ */ h("section", {
184
+ className: "space-y-3",
185
+ "aria-label": "Actual empty observation",
186
+ children: [
187
+ /* @__PURE__ */ m(n, {
188
+ label: "Actual empty observation",
189
+ value: E,
190
+ onChange: D,
191
+ options: q.data?.mtwContainerEventPage.items.filter((e) => e.kind === "ACTUAL" && e.eventType === "EMPTY_READY").map((e) => ({
192
+ id: e.id,
193
+ label: `${e.occurredAt} — ${e.sourceReference ?? e.source} — ${e.id}`
194
+ })) ?? []
195
+ }),
196
+ /* @__PURE__ */ m(a, { ...q }),
197
+ /* @__PURE__ */ m(i, {
198
+ page: q.data?.mtwContainerEventPage,
199
+ offset: x,
200
+ onChange: S,
201
+ busy: b || q.loading
202
+ }),
203
+ /* @__PURE__ */ m("p", {
204
+ className: "text-sm",
205
+ children: "Planned or estimated events cannot establish actual availability; later events can supersede an earlier empty observation."
206
+ })
207
+ ]
208
+ }),
209
+ /* @__PURE__ */ h("section", {
210
+ className: "space-y-3",
211
+ "aria-label": "Pinned condition inspection",
212
+ children: [
213
+ /* @__PURE__ */ m(n, {
214
+ label: "Condition inspection",
215
+ value: O,
216
+ onChange: k,
217
+ options: J.data?.mtwContainerInspectionPage.items.map((e) => ({
218
+ id: e.id,
219
+ label: `${e.inspectedAt} — ${e.cargoCategory} — ${e.suitability} — inspector ${e.inspectorActorId} — ${e.id}`
220
+ })) ?? []
221
+ }),
222
+ /* @__PURE__ */ m(a, { ...J }),
223
+ /* @__PURE__ */ m(i, {
224
+ page: J.data?.mtwContainerInspectionPage,
225
+ offset: C,
226
+ onChange: se,
227
+ busy: b || J.loading
228
+ })
229
+ ]
230
+ }),
231
+ /* @__PURE__ */ h("section", {
232
+ className: "space-y-3",
233
+ "aria-label": "Condition examination qualification",
234
+ children: [
235
+ /* @__PURE__ */ m(n, {
236
+ label: "Condition qualification",
237
+ value: A,
238
+ onChange: j,
239
+ required: !1,
240
+ options: Y.data?.mtwContainerQualificationPage.items.map((e) => ({
241
+ id: e.id,
242
+ label: `${e.issuerName} — ${e.credentialReference} — ${e.status} — subject ${e.subjectActorId} — scopes ${e.scopes.join(", ")} — ${e.validFrom}–${e.validUntil}`
243
+ })) ?? []
244
+ }),
245
+ /* @__PURE__ */ m(a, { ...Y }),
246
+ /* @__PURE__ */ m(i, {
247
+ page: Y.data?.mtwContainerQualificationPage,
248
+ offset: w,
249
+ onChange: T,
250
+ busy: b || Y.loading
251
+ }),
252
+ /* @__PURE__ */ m("p", {
253
+ className: "text-sm",
254
+ children: "A recorded human review is not software certification. The server checks the exact qualification, scope, validity and latest condition."
255
+ })
256
+ ]
257
+ }),
258
+ /* @__PURE__ */ h("section", {
259
+ className: "space-y-3 rounded-lg border p-4",
260
+ "aria-label": "Transport route binding",
261
+ children: [
262
+ /* @__PURE__ */ h("label", {
263
+ className: "block",
264
+ children: ["Same-workspace route ID", /* @__PURE__ */ m("input", {
265
+ className: "mt-1 w-full rounded border p-2",
266
+ value: M,
267
+ onChange: (e) => ce(e.target.value),
268
+ required: !0
269
+ })]
270
+ }),
271
+ /* @__PURE__ */ m(e, {
272
+ type: "button",
273
+ variant: "outline",
274
+ disabled: !M.trim() || X.loading,
275
+ onClick: () => {
276
+ F(M.trim()), N((e) => e + 1);
277
+ },
278
+ children: "Load route revision"
279
+ }),
280
+ /* @__PURE__ */ m(a, { ...X }),
281
+ Z && /* @__PURE__ */ h(p, { children: [
282
+ /* @__PURE__ */ h("p", { children: [
283
+ Z.name,
284
+ " — ",
285
+ Z.status,
286
+ ". Pinned updatedAt: ",
287
+ Z.updatedAt
288
+ ] }),
289
+ /* @__PURE__ */ m("p", {
290
+ className: "text-sm",
291
+ children: "Ordered waypoint indexes start at0. Complete route content is fingerprinted by the server."
292
+ }),
293
+ Q ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("pre", {
294
+ className: "max-h-48 overflow-auto whitespace-pre-wrap break-all text-xs",
295
+ children: JSON.stringify(Q.slice(0, 50), null, 2)
296
+ }), Q.length > 50 && /* @__PURE__ */ h("p", { children: [
297
+ "Preview shows first50 of ",
298
+ Q.length,
299
+ " waypoints; confirm selected indexes in the source route."
300
+ ] })] }) : /* @__PURE__ */ m("p", { children: "Route waypoints unavailable; binding remains unresolved." })
301
+ ] }),
302
+ /* @__PURE__ */ h("label", {
303
+ className: "block",
304
+ children: [
305
+ /* @__PURE__ */ m("input", {
306
+ type: "checkbox",
307
+ checked: H,
308
+ onChange: (e) => U(e.target.checked)
309
+ }),
310
+ " ",
311
+ "Pin ordered handoff and return waypoints (otherwise UNKNOWN)"
312
+ ]
313
+ }),
314
+ H && /* @__PURE__ */ h("div", {
315
+ className: "grid gap-3 md:grid-cols-2",
316
+ children: [/* @__PURE__ */ m(r, {
317
+ label: "Handoff waypoint index",
318
+ name: "handoffWaypointIndex",
319
+ type: "number",
320
+ value: String(y?.assessment.routeBinding?.handoffWaypointIndex ?? "")
321
+ }), /* @__PURE__ */ m(r, {
322
+ label: "Return waypoint index",
323
+ name: "returnWaypointIndex",
324
+ type: "number",
325
+ value: String(y?.assessment.routeBinding?.returnWaypointIndex ?? "")
326
+ })]
327
+ })
328
+ ]
329
+ }),
330
+ /* @__PURE__ */ h("section", {
331
+ className: "space-y-3 rounded-lg border p-4",
332
+ "aria-label": "Reuse and return timing",
333
+ children: [
334
+ /* @__PURE__ */ h("label", { children: [
335
+ /* @__PURE__ */ m("input", {
336
+ type: "checkbox",
337
+ checked: B,
338
+ onChange: (e) => V(e.target.checked)
339
+ }),
340
+ " ",
341
+ "Record bounded full-leg timing (otherwise UNKNOWN)"
342
+ ] }),
343
+ /* @__PURE__ */ m("p", {
344
+ className: "text-sm",
345
+ children: "The full bound starts at departure and includes travel, loading/unloading, every post-arrival wait and the return leg. Pre-arrival en-route delay is a separate arrival bound. Site or return waiting needs the corresponding sourced location."
346
+ }),
347
+ B && /* @__PURE__ */ h("div", {
348
+ className: "grid gap-3 md:grid-cols-2",
349
+ children: [
350
+ /* @__PURE__ */ m(r, {
351
+ label: "Departure (ISO with timezone)",
352
+ name: "departureAt",
353
+ value: $?.departureAt
354
+ }),
355
+ /* @__PURE__ */ m(r, {
356
+ label: "Maximum travel seconds",
357
+ name: "maxTravelSeconds",
358
+ type: "number",
359
+ value: String($?.maxTravelSeconds ?? "")
360
+ }),
361
+ /* @__PURE__ */ m(r, {
362
+ label: "Maximum en-route delay/wait before arrival (seconds)",
363
+ name: "maxWaitSeconds",
364
+ type: "number",
365
+ value: String($?.maxWaitSeconds ?? "")
366
+ }),
367
+ /* @__PURE__ */ m(r, {
368
+ label: "Site opens (ISO with timezone)",
369
+ name: "siteOpenAt",
370
+ value: $?.siteOpenAt
371
+ }),
372
+ /* @__PURE__ */ m(r, {
373
+ label: "Site closes (ISO with timezone)",
374
+ name: "siteCloseAt",
375
+ value: $?.siteCloseAt
376
+ }),
377
+ /* @__PURE__ */ m(r, {
378
+ label: "Maximum full departure-to-return duration (seconds)",
379
+ name: "maxFullReuseAndReturnSeconds",
380
+ type: "number",
381
+ value: String($?.maxFullReuseAndReturnSeconds ?? "")
382
+ }),
383
+ /* @__PURE__ */ m(r, {
384
+ label: "Site waiting location reference",
385
+ name: "siteWaitingLocationReference",
386
+ required: !1,
387
+ value: $?.siteWaitingLocationReference ?? ""
388
+ }),
389
+ /* @__PURE__ */ m(r, {
390
+ label: "Return waiting location reference",
391
+ name: "returnWaitingLocationReference",
392
+ required: !1,
393
+ value: $?.returnWaitingLocationReference ?? ""
394
+ }),
395
+ /* @__PURE__ */ m(r, {
396
+ label: "Planned return from (ISO with timezone)",
397
+ name: "plannedReturnFrom",
398
+ value: $?.plannedReturnFrom
399
+ }),
400
+ /* @__PURE__ */ m(r, {
401
+ label: "Planned return until (ISO with timezone)",
402
+ name: "plannedReturnUntil",
403
+ value: $?.plannedReturnUntil
404
+ })
405
+ ]
406
+ }),
407
+ /* @__PURE__ */ m("p", {
408
+ className: "text-sm",
409
+ children: "Covers travel, site waiting, reuse work and return; waiting locations need purpose-specific road-access evidence. Does not calculate or stop commercial clocks."
410
+ })
411
+ ]
412
+ }),
413
+ /* @__PURE__ */ m(ee, {
414
+ value: W,
415
+ onChange: ue
416
+ }),
417
+ /* @__PURE__ */ m(d, {
418
+ name: "booking",
419
+ label: "Export booking",
420
+ evidence: W,
421
+ initial: y?.assessment.sources.booking
422
+ }),
423
+ /* @__PURE__ */ m(d, {
424
+ name: "roadAccess",
425
+ label: "Road and site access",
426
+ evidence: W,
427
+ initial: y?.assessment.sources.roadAccess
428
+ }),
429
+ /* @__PURE__ */ m(d, {
430
+ name: "conditionSuitability",
431
+ label: "Condition and cargo suitability",
432
+ evidence: W,
433
+ initial: y?.assessment.sources.conditionSuitability
434
+ }),
435
+ /* @__PURE__ */ m(d, {
436
+ name: "retainedReturnPlan",
437
+ label: "Retained return obligation",
438
+ evidence: W,
439
+ initial: y?.assessment.sources.retainedReturnPlan
440
+ }),
441
+ G && /* @__PURE__ */ m("p", {
442
+ role: "alert",
443
+ children: G
444
+ }),
445
+ /* @__PURE__ */ m(e, {
446
+ type: "submit",
447
+ disabled: b || X.loading || !Z || M.trim() !== P,
448
+ children: "Record planning revision"
449
+ })
450
+ ]
451
+ })
452
+ });
453
+ }
454
+ //#endregion
455
+ export { _ as ReuseProposalForm };
@@ -0,0 +1,78 @@
1
+ import { ReuseField as e } from "./ReuseControls.js";
2
+ import { useState as t } from "react";
3
+ import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ //#region src/movethewheels/components/ReuseSourceFields.tsx
5
+ function a({ name: a, label: o, evidence: s, initial: c }) {
6
+ let [l, u] = t(!!c);
7
+ return /* @__PURE__ */ i("fieldset", {
8
+ className: "space-y-3 rounded-lg border p-4",
9
+ children: [
10
+ /* @__PURE__ */ i("legend", { children: [o, " source"] }),
11
+ /* @__PURE__ */ r("label", { children: /* @__PURE__ */ i("select", {
12
+ name: `${a}.recorded`,
13
+ value: l ? "yes" : "",
14
+ onChange: (e) => u(e.target.value === "yes"),
15
+ children: [/* @__PURE__ */ r("option", {
16
+ value: "",
17
+ children: "UNKNOWN: no purpose-specific source"
18
+ }), /* @__PURE__ */ r("option", {
19
+ value: "yes",
20
+ children: "Record source attestation for this purpose"
21
+ })]
22
+ }) }),
23
+ l && /* @__PURE__ */ i(n, { children: [
24
+ /* @__PURE__ */ r("p", {
25
+ className: "text-sm",
26
+ children: "Binding is limited to this exact proposal and source purpose. Recording a source is not external approval or certification."
27
+ }),
28
+ /* @__PURE__ */ i("div", {
29
+ className: "grid gap-3 md:grid-cols-2",
30
+ children: [
31
+ /* @__PURE__ */ r(e, {
32
+ label: `${o} source reference`,
33
+ name: `${a}.reference`,
34
+ value: c?.sourceReference
35
+ }),
36
+ /* @__PURE__ */ r(e, {
37
+ label: `${o} source revision`,
38
+ name: `${a}.revision`,
39
+ value: c?.sourceRevision
40
+ }),
41
+ /* @__PURE__ */ r(e, {
42
+ label: `${o} observed at (ISO with timezone)`,
43
+ name: `${a}.observed`,
44
+ value: c?.observedAt
45
+ }),
46
+ /* @__PURE__ */ r(e, {
47
+ label: `${o} valid from (ISO with timezone)`,
48
+ name: `${a}.from`,
49
+ value: c?.validFrom
50
+ }),
51
+ /* @__PURE__ */ r(e, {
52
+ label: `${o} valid until (ISO with timezone)`,
53
+ name: `${a}.until`,
54
+ value: c?.validUntil
55
+ })
56
+ ]
57
+ }),
58
+ /* @__PURE__ */ r("p", { children: "Select exact versions from this proposal’s evidence for this purpose." }),
59
+ !s.length && /* @__PURE__ */ r("p", { children: "No proposal evidence selected." }),
60
+ s.map((e) => /* @__PURE__ */ i("label", {
61
+ className: "block text-sm",
62
+ children: [
63
+ /* @__PURE__ */ r("input", {
64
+ type: "checkbox",
65
+ name: `${a}.evidence`,
66
+ value: e.versionId,
67
+ defaultChecked: c?.evidence.some((t) => t.versionId === e.versionId)
68
+ }),
69
+ " ",
70
+ e.label
71
+ ]
72
+ }, e.versionId))
73
+ ] })
74
+ ]
75
+ });
76
+ }
77
+ //#endregion
78
+ export { a as ReuseSourceFields };