@burdenoff/microfe-movethewheels 2026.930.5 → 2026.1010.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MoveTheWheelsRoot.js +177 -102
- package/dist/MoveTheWheelsRoutes.js +55 -11
- package/dist/_virtual/_rolldown/runtime.js +1 -1
- package/dist/components/ContainerEvidencePicker.js +143 -0
- package/dist/components/FreeTimeAgreementForm.js +496 -0
- package/dist/components/ReturnInstructionForm.js +108 -0
- package/dist/components/ReuseControls.js +91 -0
- package/dist/components/ReusePermissionForm.js +114 -0
- package/dist/components/ReuseProposalForm.js +455 -0
- package/dist/components/ReuseSourceFields.js +78 -0
- package/dist/components/consolidation/ConsolidationHistory.js +244 -0
- package/dist/components/consolidation/ConsolidationLotEditor.js +133 -0
- package/dist/components/consolidation/ConsolidationManifestWorkbench.js +143 -0
- package/dist/components/consolidation/ConsolidationPlanForm.js +172 -0
- package/dist/components/consolidation/ConsolidationPlanWorkbench.js +321 -0
- package/dist/components/consolidation/ConsolidationReportForm.js +94 -0
- package/dist/components/consolidation/ConsolidationReportsWorkbench.js +195 -0
- package/dist/components/consolidation/ConsolidationSummary.js +76 -0
- package/dist/components/consolidation/OriginalConsolidationHistory.js +112 -0
- package/dist/components/freight-cost/FreightDraftForm.js +213 -0
- package/dist/components/freight-cost/FreightFields.js +70 -0
- package/dist/components/freight-cost/FreightFxEditor.js +90 -0
- package/dist/components/freight-cost/FreightHistory.js +164 -0
- package/dist/components/freight-cost/FreightLineEditor.js +191 -0
- package/dist/components/freight-cost/FreightScopeEditor.js +72 -0
- package/dist/components/freight-cost/FreightTotals.js +66 -0
- package/dist/components/logistics-procedure/ProcedureDecisionForm.js +197 -0
- package/dist/components/logistics-procedure/ProcedureFields.js +31 -0
- package/dist/components/logistics-procedure/ProcedureHistory.js +177 -0
- package/dist/components/logistics-procedure/ProcedurePolicyForm.js +227 -0
- package/dist/components/logistics-procedure/ProcedurePolicyWorkbench.js +155 -0
- package/dist/components/logistics-procedure/ProcedureReviewWorkbench.js +221 -0
- package/dist/components/logistics-procedure/ProcedureRunWorkbench.js +190 -0
- package/dist/components/logistics-procedure/ProcedureSubjectPicker.js +130 -0
- package/dist/components/pending-pick/PendingPickDraft.js +84 -0
- package/dist/components/pending-pick/PendingPickHistory.js +113 -0
- package/dist/components/pending-pick/PickCapture.js +166 -0
- package/dist/components/pending-pick/PickLineSelection.js +111 -0
- package/dist/components/stock-binding/StockAssessmentDraft.js +48 -0
- package/dist/components/stock-binding/StockAssessmentHistory.js +61 -0
- package/dist/components/stock-binding/StockAssessmentSummary.js +199 -0
- package/dist/components/stock-binding/StockFactForm.js +232 -0
- package/dist/components/stock-observation/StockIssueForm.js +148 -0
- package/dist/components/stock-observation/StockIssueHistory.js +116 -0
- package/dist/components/stock-observation/StockIssueReadPanel.js +70 -0
- package/dist/components/trip-utilization/TripReportForm.js +118 -0
- package/dist/components/trip-utilization/TripReportHistory.js +54 -0
- package/dist/components/trip-utilization/TripReportSummary.js +216 -0
- package/dist/components/trip-utilization/TripSegmentFields.js +166 -0
- package/dist/generated/consolidation-operations.d.ts +1060 -0
- package/dist/generated/container-condition-operations.d.ts +868 -0
- package/dist/generated/container-operations.d.ts +356 -0
- package/dist/generated/empty-reuse-operations.d.ts +1578 -0
- package/dist/generated/free-time-operations.d.ts +938 -0
- package/dist/generated/freight-cost-operations.d.ts +716 -0
- package/dist/generated/logistics-procedure-operations.d.ts +938 -0
- package/dist/generated/pending-pick-operations.d.ts +1969 -0
- package/dist/generated/stock-binding-operations.d.ts +930 -0
- package/dist/generated/stock-observation-operations.d.ts +476 -0
- package/dist/generated/trip-utilization-operations.d.ts +651 -0
- package/dist/generated/wspace-operations.d.ts +143 -50
- package/dist/hooks/useConsolidationAction.js +119 -0
- package/dist/hooks/useContainerCondition.js +105 -0
- package/dist/hooks/useContainerLifecycle.js +192 -0
- package/dist/hooks/useEmptyReuseAction.js +45 -0
- package/dist/hooks/useFreightRecoveryAction.js +117 -0
- package/dist/hooks/useProcedureAction.js +119 -0
- package/dist/hooks/useProcedureSelection.js +53 -0
- package/dist/hooks/useReuseRecoveryAction.js +116 -0
- package/dist/movethewheels/components/ContainerEvidencePicker.d.ts +10 -0
- package/dist/movethewheels/components/FreeTimeAgreementForm.d.ts +14 -0
- package/dist/movethewheels/components/ReturnInstructionForm.d.ts +8 -0
- package/dist/movethewheels/components/ReuseControls.d.ts +42 -0
- package/dist/movethewheels/components/ReusePermissionForm.d.ts +9 -0
- package/dist/movethewheels/components/ReuseProposalForm.d.ts +11 -0
- package/dist/movethewheels/components/ReuseSourceFields.d.ts +9 -0
- package/dist/movethewheels/components/consolidation/ConsolidationHistory.d.ts +13 -0
- package/dist/movethewheels/components/consolidation/ConsolidationLotEditor.d.ts +6 -0
- package/dist/movethewheels/components/consolidation/ConsolidationManifestWorkbench.d.ts +8 -0
- package/dist/movethewheels/components/consolidation/ConsolidationPlanForm.d.ts +8 -0
- package/dist/movethewheels/components/consolidation/ConsolidationPlanWorkbench.d.ts +5 -0
- package/dist/movethewheels/components/consolidation/ConsolidationReportForm.d.ts +9 -0
- package/dist/movethewheels/components/consolidation/ConsolidationReportsWorkbench.d.ts +7 -0
- package/dist/movethewheels/components/consolidation/ConsolidationSummary.d.ts +6 -0
- package/dist/movethewheels/components/consolidation/OriginalConsolidationHistory.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightDraftForm.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightFields.d.ts +23 -0
- package/dist/movethewheels/components/freight-cost/FreightFxEditor.d.ts +6 -0
- package/dist/movethewheels/components/freight-cost/FreightHistory.d.ts +5 -0
- package/dist/movethewheels/components/freight-cost/FreightLineEditor.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightScopeEditor.d.ts +6 -0
- package/dist/movethewheels/components/freight-cost/FreightTotals.d.ts +6 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureDecisionForm.d.ts +20 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureFields.d.ts +17 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureHistory.d.ts +7 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyForm.d.ts +10 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.d.ts +5 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.d.ts +5 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.d.ts +6 -0
- package/dist/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.d.ts +7 -0
- package/dist/movethewheels/components/pending-pick/PendingPickDraft.d.ts +16 -0
- package/dist/movethewheels/components/pending-pick/PendingPickHistory.d.ts +5 -0
- package/dist/movethewheels/components/pending-pick/PickCapture.d.ts +6 -0
- package/dist/movethewheels/components/pending-pick/PickLineSelection.d.ts +17 -0
- package/dist/movethewheels/components/stock-binding/StockAssessmentDraft.d.ts +13 -0
- package/dist/movethewheels/components/stock-binding/StockAssessmentHistory.d.ts +18 -0
- package/dist/movethewheels/components/stock-binding/StockAssessmentSummary.d.ts +9 -0
- package/dist/movethewheels/components/stock-binding/StockFactForm.d.ts +6 -0
- package/dist/movethewheels/components/stock-observation/StockIssueForm.d.ts +7 -0
- package/dist/movethewheels/components/stock-observation/StockIssueHistory.d.ts +7 -0
- package/dist/movethewheels/components/stock-observation/StockIssueReadPanel.d.ts +5 -0
- package/dist/movethewheels/components/trip-utilization/TripReportForm.d.ts +6 -0
- package/dist/movethewheels/components/trip-utilization/TripReportHistory.d.ts +14 -0
- package/dist/movethewheels/components/trip-utilization/TripReportSummary.d.ts +5 -0
- package/dist/movethewheels/components/trip-utilization/TripSegmentFields.d.ts +9 -0
- package/dist/movethewheels/hooks/useConsolidationAction.d.ts +19 -0
- package/dist/movethewheels/hooks/useContainerCondition.d.ts +21 -0
- package/dist/movethewheels/hooks/useContainerLifecycle.d.ts +40 -0
- package/dist/movethewheels/hooks/useEmptyReuseAction.d.ts +14 -0
- package/dist/movethewheels/hooks/useFreightRecoveryAction.d.ts +23 -0
- package/dist/movethewheels/hooks/useProcedureAction.d.ts +18 -0
- package/dist/movethewheels/hooks/useProcedureSelection.d.ts +51 -0
- package/dist/movethewheels/hooks/useReuseRecoveryAction.d.ts +18 -0
- package/dist/movethewheels/pages/ConsolidationPage.d.ts +1 -0
- package/dist/movethewheels/pages/ContainerConditionPage.d.ts +1 -0
- package/dist/movethewheels/pages/ContainersPage.d.ts +2 -0
- package/dist/movethewheels/pages/EmptyReusePage.d.ts +1 -0
- package/dist/movethewheels/pages/FreeTimePage.d.ts +1 -0
- package/dist/movethewheels/pages/FreightEstimatePage.d.ts +1 -0
- package/dist/movethewheels/pages/LogisticsProceduresPage.d.ts +1 -0
- package/dist/movethewheels/pages/PendingPickPage.d.ts +1 -0
- package/dist/movethewheels/pages/StockBindingPage.d.ts +1 -0
- package/dist/movethewheels/pages/StockObservationsPage.d.ts +1 -0
- package/dist/movethewheels/pages/TripUtilizationPage.d.ts +1 -0
- package/dist/movethewheels/utils/consolidationHistoryTarget.d.ts +12 -0
- package/dist/movethewheels/utils/consolidationInput.d.ts +15 -0
- package/dist/movethewheels/utils/consolidationLot.d.ts +3 -0
- package/dist/movethewheels/utils/consolidationPins.d.ts +20 -0
- package/dist/movethewheels/utils/consolidationRecovery.d.ts +5 -0
- package/dist/movethewheels/utils/consolidationReportHead.d.ts +5 -0
- package/dist/movethewheels/utils/freeTimeDate.d.ts +1 -0
- package/dist/movethewheels/utils/freightAcknowledgement.d.ts +2 -0
- package/dist/movethewheels/utils/freightDraft.d.ts +36 -0
- package/dist/movethewheels/utils/freightRecovery.d.ts +5 -0
- package/dist/movethewheels/utils/graphqlClient.d.ts +2 -1
- package/dist/movethewheels/utils/pendingPickDraft.d.ts +8 -0
- package/dist/movethewheels/utils/procedureInput.d.ts +18 -0
- package/dist/movethewheels/utils/procedureRecovery.d.ts +5 -0
- package/dist/movethewheels/utils/reuseAttempt.d.ts +7 -0
- package/dist/movethewheels/utils/reuseForm.d.ts +6 -0
- package/dist/movethewheels/utils/reuseRecovery.d.ts +26 -0
- package/dist/movethewheels/utils/stockBindingForm.d.ts +23 -0
- package/dist/movethewheels/utils/stockBindingLabels.d.ts +10 -0
- package/dist/movethewheels/utils/stockObservationForm.d.ts +5 -0
- package/dist/movethewheels/utils/tripDraftContext.d.ts +25 -0
- package/dist/movethewheels/utils/tripUtilizationForm.d.ts +6 -0
- package/dist/node_modules/@react-leaflet/core/lib/component.js +5 -5
- package/dist/node_modules/fast-equals/dist/es/index.js +87 -74
- package/dist/node_modules/leaflet/dist/leaflet-src.js +8 -5
- package/dist/node_modules/lodash/_Stack.js +2 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/clipboard-list.js +35 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/repeat-2.js +22 -0
- package/dist/node_modules/react-leaflet/lib/MapContainer.js +3 -3
- package/dist/node_modules/react-smooth/es6/Animate.js +2 -2
- package/dist/node_modules/recharts/es6/cartesian/Area.js +13 -13
- package/dist/node_modules/recharts/es6/cartesian/Bar.js +9 -9
- package/dist/node_modules/recharts/es6/cartesian/Brush.js +12 -12
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +7 -7
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +13 -13
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +4 -4
- package/dist/node_modules/recharts/es6/cartesian/Line.js +10 -10
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +4 -4
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js +3 -3
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +1 -1
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +22 -22
- package/dist/node_modules/recharts/es6/component/Cursor.js +1 -1
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +11 -11
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +6 -6
- package/dist/node_modules/recharts/es6/component/Label.js +14 -14
- package/dist/node_modules/recharts/es6/component/LabelList.js +6 -6
- package/dist/node_modules/recharts/es6/component/Legend.js +5 -5
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +3 -3
- package/dist/node_modules/recharts/es6/component/Text.js +2 -2
- package/dist/node_modules/recharts/es6/component/Tooltip.js +3 -3
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +2 -2
- package/dist/node_modules/recharts/es6/container/Layer.js +2 -2
- package/dist/node_modules/recharts/es6/container/Surface.js +2 -2
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +2 -2
- package/dist/node_modules/recharts/es6/polar/Pie.js +13 -13
- package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js +8 -8
- package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js +6 -6
- package/dist/node_modules/recharts/es6/shape/Cross.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Curve.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Dot.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Polygon.js +4 -4
- package/dist/node_modules/recharts/es6/shape/Rectangle.js +4 -4
- package/dist/node_modules/recharts/es6/shape/Sector.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Symbols.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js +4 -4
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +9 -9
- package/dist/node_modules/recharts/es6/util/BarUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/PolarUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +2 -2
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +1 -1
- package/dist/node_modules/recharts/es6/util/types.js +1 -1
- package/dist/node_modules/{react-is → recharts/node_modules/react-is}/cjs/react-is.development.js +2 -2
- package/dist/node_modules/{react-is → recharts/node_modules/react-is}/cjs/react-is.production.min.js +2 -2
- package/dist/node_modules/{react-is → recharts/node_modules/react-is}/index.js +2 -2
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +97 -18
- package/dist/node_modules/zustand/esm/middleware.js +2 -2
- package/dist/pages/ConsolidationPage.js +76 -0
- package/dist/pages/ContainerConditionPage.js +972 -0
- package/dist/pages/ContainersPage.js +522 -0
- package/dist/pages/EmptyReusePage.js +777 -0
- package/dist/pages/FreeTimePage.js +657 -0
- package/dist/pages/FreightEstimatePage.js +284 -0
- package/dist/pages/LogisticsProceduresPage.js +100 -0
- package/dist/pages/PendingPickPage.js +155 -0
- package/dist/pages/StockBindingPage.js +236 -0
- package/dist/pages/StockObservationsPage.js +168 -0
- package/dist/pages/TripUtilizationPage.js +227 -0
- package/dist/src/generated/consolidation-operations.js +505 -0
- package/dist/src/generated/container-condition-operations.js +208 -0
- package/dist/src/generated/container-operations.js +101 -0
- package/dist/src/generated/empty-reuse-operations.js +749 -0
- package/dist/src/generated/free-time-operations.js +235 -0
- package/dist/src/generated/freight-cost-operations.js +325 -0
- package/dist/src/generated/logistics-procedure-operations.js +362 -0
- package/dist/src/generated/pending-pick-operations.js +1128 -0
- package/dist/src/generated/stock-binding-operations.js +175 -0
- package/dist/src/generated/stock-observation-operations.js +93 -0
- package/dist/src/generated/trip-utilization-operations.js +140 -0
- package/dist/src/generated/wspace-operations.js +708 -0
- package/dist/utils/consolidationHistoryTarget.js +27 -0
- package/dist/utils/consolidationInput.js +21 -0
- package/dist/utils/consolidationLot.js +29 -0
- package/dist/utils/consolidationPins.js +13 -0
- package/dist/utils/consolidationRecovery.js +40 -0
- package/dist/utils/consolidationReportHead.js +18 -0
- package/dist/utils/freeTimeDate.js +26 -0
- package/dist/utils/freightAcknowledgement.js +8 -0
- package/dist/utils/freightDraft.js +125 -0
- package/dist/utils/freightRecovery.js +36 -0
- package/dist/utils/graphqlClient.js +28 -28
- package/dist/utils/pendingPickDraft.js +46 -0
- package/dist/utils/procedureInput.js +43 -0
- package/dist/utils/procedureRecovery.js +42 -0
- package/dist/utils/reuseAttempt.js +20 -0
- package/dist/utils/reuseForm.js +25 -0
- package/dist/utils/reuseRecovery.js +71 -0
- package/dist/utils/stockBindingForm.js +142 -0
- package/dist/utils/stockBindingLabels.js +23 -0
- package/dist/utils/stockObservationForm.js +55 -0
- package/dist/utils/tripDraftContext.js +19 -0
- package/dist/utils/tripUtilizationForm.js +60 -0
- package/package.json +19 -5
- package/src/generated/consolidation-operations.ts +1138 -0
- package/src/generated/container-condition-operations.ts +771 -0
- package/src/generated/container-operations.ts +376 -0
- package/src/generated/empty-reuse-operations.ts +1648 -0
- package/src/generated/free-time-operations.ts +814 -0
- package/src/generated/freight-cost-operations.ts +753 -0
- package/src/generated/logistics-procedure-operations.ts +1047 -0
- package/src/generated/pending-pick-operations.ts +1508 -0
- package/src/generated/stock-binding-operations.ts +631 -0
- package/src/generated/stock-observation-operations.ts +373 -0
- package/src/generated/trip-utilization-operations.ts +500 -0
- package/src/generated/wspace-operations.ts +116 -0
- package/src/movethewheels/MoveTheWheelsRoot.tsx +79 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +22 -0
- package/src/movethewheels/components/ContainerEvidencePicker.tsx +146 -0
- package/src/movethewheels/components/FreeTimeAgreementForm.tsx +483 -0
- package/src/movethewheels/components/ReturnInstructionForm.tsx +102 -0
- package/src/movethewheels/components/ReuseControls.tsx +138 -0
- package/src/movethewheels/components/ReusePermissionForm.tsx +123 -0
- package/src/movethewheels/components/ReuseProposalForm.tsx +484 -0
- package/src/movethewheels/components/ReuseSourceFields.tsx +80 -0
- package/src/movethewheels/components/consolidation/ConsolidationHistory.tsx +159 -0
- package/src/movethewheels/components/consolidation/ConsolidationLotEditor.tsx +144 -0
- package/src/movethewheels/components/consolidation/ConsolidationManifestWorkbench.tsx +168 -0
- package/src/movethewheels/components/consolidation/ConsolidationPlanForm.tsx +185 -0
- package/src/movethewheels/components/consolidation/ConsolidationPlanWorkbench.tsx +395 -0
- package/src/movethewheels/components/consolidation/ConsolidationReportForm.tsx +124 -0
- package/src/movethewheels/components/consolidation/ConsolidationReportsWorkbench.tsx +233 -0
- package/src/movethewheels/components/consolidation/ConsolidationSummary.tsx +84 -0
- package/src/movethewheels/components/consolidation/OriginalConsolidationHistory.tsx +133 -0
- package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +224 -0
- package/src/movethewheels/components/freight-cost/FreightFields.tsx +91 -0
- package/src/movethewheels/components/freight-cost/FreightFxEditor.tsx +98 -0
- package/src/movethewheels/components/freight-cost/FreightHistory.tsx +91 -0
- package/src/movethewheels/components/freight-cost/FreightLineEditor.tsx +192 -0
- package/src/movethewheels/components/freight-cost/FreightScopeEditor.tsx +64 -0
- package/src/movethewheels/components/freight-cost/FreightTotals.tsx +68 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureDecisionForm.tsx +204 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureFields.tsx +43 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureHistory.tsx +102 -0
- package/src/movethewheels/components/logistics-procedure/ProcedurePolicyForm.tsx +226 -0
- package/src/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.tsx +174 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.tsx +278 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.tsx +292 -0
- package/src/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.tsx +111 -0
- package/src/movethewheels/components/pending-pick/PendingPickDraft.tsx +82 -0
- package/src/movethewheels/components/pending-pick/PendingPickHistory.tsx +93 -0
- package/src/movethewheels/components/pending-pick/PickCapture.tsx +70 -0
- package/src/movethewheels/components/pending-pick/PickLineSelection.tsx +130 -0
- package/src/movethewheels/components/stock-binding/StockAssessmentDraft.tsx +52 -0
- package/src/movethewheels/components/stock-binding/StockAssessmentHistory.tsx +56 -0
- package/src/movethewheels/components/stock-binding/StockAssessmentSummary.tsx +108 -0
- package/src/movethewheels/components/stock-binding/StockFactForm.tsx +186 -0
- package/src/movethewheels/components/stock-observation/StockIssueForm.tsx +103 -0
- package/src/movethewheels/components/stock-observation/StockIssueHistory.tsx +96 -0
- package/src/movethewheels/components/stock-observation/StockIssueReadPanel.tsx +72 -0
- package/src/movethewheels/components/trip-utilization/TripReportForm.tsx +116 -0
- package/src/movethewheels/components/trip-utilization/TripReportHistory.tsx +51 -0
- package/src/movethewheels/components/trip-utilization/TripReportSummary.tsx +127 -0
- package/src/movethewheels/components/trip-utilization/TripSegmentFields.tsx +118 -0
- package/src/movethewheels/hooks/useConsolidationAction.ts +196 -0
- package/src/movethewheels/hooks/useContainerCondition.ts +129 -0
- package/src/movethewheels/hooks/useContainerLifecycle.ts +291 -0
- package/src/movethewheels/hooks/useEmptyReuseAction.ts +72 -0
- package/src/movethewheels/hooks/useFreightRecoveryAction.ts +201 -0
- package/src/movethewheels/hooks/useProcedureAction.ts +196 -0
- package/src/movethewheels/hooks/useProcedureSelection.ts +75 -0
- package/src/movethewheels/hooks/useReuseRecoveryAction.ts +192 -0
- package/src/movethewheels/pages/ConsolidationPage.tsx +70 -0
- package/src/movethewheels/pages/ContainerConditionPage.tsx +959 -0
- package/src/movethewheels/pages/ContainersPage.tsx +490 -0
- package/src/movethewheels/pages/EmptyReusePage.tsx +823 -0
- package/src/movethewheels/pages/FreeTimePage.tsx +720 -0
- package/src/movethewheels/pages/FreightEstimatePage.tsx +353 -0
- package/src/movethewheels/pages/LogisticsProceduresPage.tsx +86 -0
- package/src/movethewheels/pages/PendingPickPage.tsx +226 -0
- package/src/movethewheels/pages/StockBindingPage.tsx +299 -0
- package/src/movethewheels/pages/StockObservationsPage.tsx +181 -0
- package/src/movethewheels/pages/TripUtilizationPage.tsx +315 -0
- package/src/movethewheels/utils/consolidationHistoryTarget.ts +39 -0
- package/src/movethewheels/utils/consolidationInput.ts +70 -0
- package/src/movethewheels/utils/consolidationLot.ts +24 -0
- package/src/movethewheels/utils/consolidationPins.ts +52 -0
- package/src/movethewheels/utils/consolidationRecovery.ts +88 -0
- package/src/movethewheels/utils/consolidationReportHead.ts +29 -0
- package/src/movethewheels/utils/freeTimeDate.ts +31 -0
- package/src/movethewheels/utils/freightAcknowledgement.ts +31 -0
- package/src/movethewheels/utils/freightDraft.ts +170 -0
- package/src/movethewheels/utils/freightRecovery.ts +79 -0
- package/src/movethewheels/utils/graphqlClient.ts +14 -5
- package/src/movethewheels/utils/pendingPickDraft.ts +61 -0
- package/src/movethewheels/utils/procedureInput.ts +98 -0
- package/src/movethewheels/utils/procedureRecovery.ts +92 -0
- package/src/movethewheels/utils/reuseAttempt.ts +29 -0
- package/src/movethewheels/utils/reuseForm.ts +30 -0
- package/src/movethewheels/utils/reuseRecovery.ts +151 -0
- package/src/movethewheels/utils/stockBindingForm.ts +209 -0
- package/src/movethewheels/utils/stockBindingLabels.ts +41 -0
- package/src/movethewheels/utils/stockObservationForm.ts +73 -0
- package/src/movethewheels/utils/tripDraftContext.ts +61 -0
- package/src/movethewheels/utils/tripUtilizationForm.ts +105 -0
- package/src/operations/condition/container-condition.graphql +41 -0
- package/src/operations/consolidation/consolidation.graphql +490 -0
- package/src/operations/container/container-lifecycle.graphql +80 -0
- package/src/operations/empty-reuse/empty-reuse.graphql +737 -0
- package/src/operations/free-time/free-time.graphql +47 -0
- package/src/operations/freight-cost/freight.graphql +6 -0
- package/src/operations/logistics-procedure/procedure.graphql +15 -0
- package/src/operations/pending-pick/pending-pick.graphql +1122 -0
- package/src/operations/stock-binding/stock-binding.graphql +160 -0
- package/src/operations/stock-observation/stock-observation.graphql +20 -0
- package/src/operations/trip-utilization/trip-utilization.graphql +126 -0
- package/src/operations/wspace/container-evidence.graphql +6 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
ProcedurePolicyHistoryDocument,
|
|
4
|
+
PublishProcedureDocument,
|
|
5
|
+
type ProcedurePolicyHistoryQuery,
|
|
6
|
+
} from '../../../generated/logistics-procedure-operations';
|
|
7
|
+
import { useConditionApi, useConditionQuery } from '../../hooks/useContainerCondition';
|
|
8
|
+
import type { useProcedureAction } from '../../hooks/useProcedureAction';
|
|
9
|
+
import { ProcedurePolicyForm } from './ProcedurePolicyForm';
|
|
10
|
+
import { ProcedureField, ProcedureTime } from './ProcedureFields';
|
|
11
|
+
import { chainMatches } from '../../utils/procedureInput';
|
|
12
|
+
import { ReuseState, ReusePager, reuseCard } from '../ReuseControls';
|
|
13
|
+
import { Button } from '../ui';
|
|
14
|
+
type Policy = ProcedurePolicyHistoryQuery['mtwProcedureVersionPage']['items'][number];
|
|
15
|
+
export function ProcedurePolicyWorkbench({
|
|
16
|
+
actions,
|
|
17
|
+
}: {
|
|
18
|
+
actions: ReturnType<typeof useProcedureAction>;
|
|
19
|
+
}) {
|
|
20
|
+
const active = useRef(true);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
active.current = true;
|
|
23
|
+
return () => {
|
|
24
|
+
active.current = false;
|
|
25
|
+
};
|
|
26
|
+
}, []);
|
|
27
|
+
const request = useConditionApi(),
|
|
28
|
+
[reference, setReference] = useState(''),
|
|
29
|
+
[offset, setOffset] = useState(0),
|
|
30
|
+
[draft, setDraft] = useState<{
|
|
31
|
+
reference: string;
|
|
32
|
+
previous: Policy | null;
|
|
33
|
+
generation: string;
|
|
34
|
+
} | null>(null),
|
|
35
|
+
[checking, setChecking] = useState(false),
|
|
36
|
+
[error, setError] = useState<string | null>(null);
|
|
37
|
+
const latest = useConditionQuery<ProcedurePolicyHistoryQuery>(
|
|
38
|
+
ProcedurePolicyHistoryDocument,
|
|
39
|
+
reference.trim() ? { reference: reference.trim(), pagination: { limit: 1, offset: 0 } } : null,
|
|
40
|
+
actions.revision
|
|
41
|
+
);
|
|
42
|
+
const history = useConditionQuery<ProcedurePolicyHistoryQuery>(
|
|
43
|
+
ProcedurePolicyHistoryDocument,
|
|
44
|
+
reference.trim() ? { reference: reference.trim(), pagination: { limit: 10, offset } } : null,
|
|
45
|
+
actions.revision
|
|
46
|
+
);
|
|
47
|
+
const newest = latest.data?.mtwProcedureVersionPage.items[0] ?? null,
|
|
48
|
+
paused = actions.busy || actions.uncertain || checking;
|
|
49
|
+
const changed = !!draft && !!latest.data && !chainMatches(draft.previous, newest);
|
|
50
|
+
const save = async (input: Record<string, unknown>) => {
|
|
51
|
+
if (!draft || paused) throw new Error('Review the latest recorded policy first.');
|
|
52
|
+
setChecking(true);
|
|
53
|
+
try {
|
|
54
|
+
const fresh = await request<ProcedurePolicyHistoryQuery>(ProcedurePolicyHistoryDocument, {
|
|
55
|
+
reference: draft.reference,
|
|
56
|
+
pagination: { limit: 1, offset: 0 },
|
|
57
|
+
});
|
|
58
|
+
if (!active.current) throw new Error('Context changed. Nothing was sent.');
|
|
59
|
+
if (!chainMatches(draft.previous, fresh.mtwProcedureVersionPage.items[0] ?? null))
|
|
60
|
+
throw new Error('Policy history changed. Refresh, review it and start a new form.');
|
|
61
|
+
const result = await actions.run(
|
|
62
|
+
PublishProcedureDocument,
|
|
63
|
+
input,
|
|
64
|
+
'Procedure version recorded.'
|
|
65
|
+
);
|
|
66
|
+
if (result) {
|
|
67
|
+
setDraft(null);
|
|
68
|
+
setOffset(0);
|
|
69
|
+
}
|
|
70
|
+
} finally {
|
|
71
|
+
setChecking(false);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return (
|
|
75
|
+
<section className={reuseCard}>
|
|
76
|
+
<h2 className="text-lg font-semibold">Sourced procedure versions</h2>
|
|
77
|
+
<p>
|
|
78
|
+
Publishing requires canonical reviewer permissions. Same-reference applicability is
|
|
79
|
+
immutable; use a new reference for a changed scope.
|
|
80
|
+
</p>
|
|
81
|
+
<ProcedureField
|
|
82
|
+
label="Procedure reference"
|
|
83
|
+
value={reference}
|
|
84
|
+
maxLength={120}
|
|
85
|
+
onChange={(value) => {
|
|
86
|
+
if (!paused) {
|
|
87
|
+
setReference(value);
|
|
88
|
+
setDraft(null);
|
|
89
|
+
setOffset(0);
|
|
90
|
+
}
|
|
91
|
+
}}
|
|
92
|
+
/>
|
|
93
|
+
<ReuseState loading={latest.loading} error={latest.error} />
|
|
94
|
+
<Button
|
|
95
|
+
type="button"
|
|
96
|
+
disabled={paused || !latest.data || !reference.trim()}
|
|
97
|
+
onClick={() => {
|
|
98
|
+
setDraft({
|
|
99
|
+
reference: reference.trim(),
|
|
100
|
+
previous: newest,
|
|
101
|
+
generation: crypto.randomUUID(),
|
|
102
|
+
});
|
|
103
|
+
setError(null);
|
|
104
|
+
}}
|
|
105
|
+
>
|
|
106
|
+
Review predecessor and open form
|
|
107
|
+
</Button>
|
|
108
|
+
{draft && (
|
|
109
|
+
<>
|
|
110
|
+
<p>
|
|
111
|
+
Opening another form discards unsent fields; original uncertain requests remain
|
|
112
|
+
separately retained.
|
|
113
|
+
</p>
|
|
114
|
+
{changed && (
|
|
115
|
+
<p role="alert">Policy history changed. Review a fresh predecessor before recording.</p>
|
|
116
|
+
)}
|
|
117
|
+
<ProcedurePolicyForm
|
|
118
|
+
key={draft.generation}
|
|
119
|
+
reference={draft.reference}
|
|
120
|
+
previous={draft.previous}
|
|
121
|
+
busy={paused || changed || latest.loading || !!latest.error}
|
|
122
|
+
onSave={async (input) => {
|
|
123
|
+
try {
|
|
124
|
+
await save(input);
|
|
125
|
+
} catch (f) {
|
|
126
|
+
setError(f instanceof Error ? f.message : 'Unable to record policy.');
|
|
127
|
+
throw f;
|
|
128
|
+
}
|
|
129
|
+
}}
|
|
130
|
+
/>
|
|
131
|
+
</>
|
|
132
|
+
)}
|
|
133
|
+
{error && <p role="alert">{error}</p>}
|
|
134
|
+
<ReuseState loading={history.loading} error={history.error} />
|
|
135
|
+
{history.data?.mtwProcedureVersionPage.items.map((row) => (
|
|
136
|
+
<article className="rounded-lg border p-3" key={row.id}>
|
|
137
|
+
<h3>
|
|
138
|
+
{row.title} · v{row.version} · {row.kind.toLowerCase()}
|
|
139
|
+
</h3>
|
|
140
|
+
<p>
|
|
141
|
+
From <ProcedureTime value={row.effectiveAt} /> until{' '}
|
|
142
|
+
<ProcedureTime value={row.validUntil} />
|
|
143
|
+
</p>
|
|
144
|
+
<p>
|
|
145
|
+
{row.scope.declaredLaneReference} · {row.scope.declaredJurisdictions.join(', ')}
|
|
146
|
+
</p>
|
|
147
|
+
<details>
|
|
148
|
+
<summary>Scope, source and exact reference</summary>
|
|
149
|
+
<dl className="break-all">
|
|
150
|
+
{Object.entries(row.scope)
|
|
151
|
+
.filter(([key]) => key !== '__typename')
|
|
152
|
+
.map(([key, value]) => (
|
|
153
|
+
<div key={key}>
|
|
154
|
+
<dt>{key}</dt>
|
|
155
|
+
<dd>{Array.isArray(value) ? value.join(', ') : String(value)}</dd>
|
|
156
|
+
</div>
|
|
157
|
+
))}
|
|
158
|
+
</dl>
|
|
159
|
+
<p className="break-all">
|
|
160
|
+
{row.id}; predecessor {row.previousVersionId ?? 'None'}
|
|
161
|
+
</p>
|
|
162
|
+
<p>{row.reason}</p>
|
|
163
|
+
</details>
|
|
164
|
+
</article>
|
|
165
|
+
))}
|
|
166
|
+
<ReusePager
|
|
167
|
+
offset={offset}
|
|
168
|
+
page={history.data?.mtwProcedureVersionPage}
|
|
169
|
+
onChange={setOffset}
|
|
170
|
+
busy={paused || history.loading}
|
|
171
|
+
/>
|
|
172
|
+
</section>
|
|
173
|
+
);
|
|
174
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
ProcedureApplicableDocument,
|
|
4
|
+
ProcedureCyclesDocument,
|
|
5
|
+
ProcedureProposalsDocument,
|
|
6
|
+
ProcedureRunsDocument,
|
|
7
|
+
StartProcedureDocument,
|
|
8
|
+
type ProcedureApplicableQuery,
|
|
9
|
+
type ProcedureCyclesQuery,
|
|
10
|
+
type ProcedureProposalsQuery,
|
|
11
|
+
type ProcedureRunsQuery,
|
|
12
|
+
} from '../../../generated/logistics-procedure-operations';
|
|
13
|
+
import { useConditionApi, useConditionQuery } from '../../hooks/useContainerCondition';
|
|
14
|
+
import { useProcedureSelection } from '../../hooks/useProcedureSelection';
|
|
15
|
+
import type { useProcedureAction } from '../../hooks/useProcedureAction';
|
|
16
|
+
import { object } from '../../utils/procedureInput';
|
|
17
|
+
import { ProcedureSubjectPicker } from './ProcedureSubjectPicker';
|
|
18
|
+
import { ProcedureRunWorkbench } from './ProcedureRunWorkbench';
|
|
19
|
+
import { ProcedureField } from './ProcedureFields';
|
|
20
|
+
import { ReuseState, ReusePager, reuseCard, reuseSelect } from '../ReuseControls';
|
|
21
|
+
import { Button } from '../ui';
|
|
22
|
+
interface StartPin {
|
|
23
|
+
containerId: string;
|
|
24
|
+
cycleId: string;
|
|
25
|
+
proposalId: string;
|
|
26
|
+
procedureVersionId: string;
|
|
27
|
+
expectedCycleVersion: number;
|
|
28
|
+
expectedProposalRevision: number;
|
|
29
|
+
cycleOffset: number;
|
|
30
|
+
proposalOffset: number;
|
|
31
|
+
}
|
|
32
|
+
export function ProcedureReviewWorkbench({
|
|
33
|
+
actions,
|
|
34
|
+
}: {
|
|
35
|
+
actions: ReturnType<typeof useProcedureAction>;
|
|
36
|
+
}) {
|
|
37
|
+
const selection = useProcedureSelection(actions.revision),
|
|
38
|
+
request = useConditionApi(),
|
|
39
|
+
[policyId, setPolicy] = useState(''),
|
|
40
|
+
[draft, setDraft] = useState<StartPin | null>(null),
|
|
41
|
+
[checking, setChecking] = useState(false),
|
|
42
|
+
[error, setError] = useState<string | null>(null),
|
|
43
|
+
[runId, setRun] = useState(''),
|
|
44
|
+
[runOffset, setRunOffset] = useState(0);
|
|
45
|
+
const active = useRef(true);
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
active.current = true;
|
|
48
|
+
return () => {
|
|
49
|
+
active.current = false;
|
|
50
|
+
};
|
|
51
|
+
}, []);
|
|
52
|
+
const applicability = useConditionQuery<ProcedureApplicableQuery>(
|
|
53
|
+
ProcedureApplicableDocument,
|
|
54
|
+
selection.proposalId ? { proposalId: selection.proposalId } : null,
|
|
55
|
+
actions.revision
|
|
56
|
+
);
|
|
57
|
+
const runs = useConditionQuery<ProcedureRunsQuery>(
|
|
58
|
+
ProcedureRunsDocument,
|
|
59
|
+
selection.proposalId
|
|
60
|
+
? { proposalId: selection.proposalId, pagination: { limit: 10, offset: runOffset } }
|
|
61
|
+
: null,
|
|
62
|
+
actions.revision
|
|
63
|
+
);
|
|
64
|
+
const paused = actions.busy || actions.uncertain || checking;
|
|
65
|
+
const policy = applicability.data?.mtwApplicableProcedures.policies.find(
|
|
66
|
+
(row) => row.version.id === policyId
|
|
67
|
+
);
|
|
68
|
+
const changed =
|
|
69
|
+
!!draft &&
|
|
70
|
+
(draft.proposalId !== selection.proposal?.id ||
|
|
71
|
+
draft.expectedProposalRevision !== selection.proposal.revision ||
|
|
72
|
+
draft.cycleId !== selection.cycle?.id ||
|
|
73
|
+
draft.expectedCycleVersion !== selection.cycle.version ||
|
|
74
|
+
!applicability.data?.mtwApplicableProcedures.policies.some(
|
|
75
|
+
(row) =>
|
|
76
|
+
row.version.id === draft.procedureVersionId && row.status === 'APPLICABLE_RECORDED_POLICY'
|
|
77
|
+
));
|
|
78
|
+
const reset = () => {
|
|
79
|
+
setDraft(null);
|
|
80
|
+
setRun('');
|
|
81
|
+
setRunOffset(0);
|
|
82
|
+
setPolicy('');
|
|
83
|
+
setError(null);
|
|
84
|
+
};
|
|
85
|
+
const start = async () => {
|
|
86
|
+
if (!draft || paused) return;
|
|
87
|
+
setChecking(true);
|
|
88
|
+
setError(null);
|
|
89
|
+
const pin = draft;
|
|
90
|
+
try {
|
|
91
|
+
const [freshCycles, freshProposals, freshPolicy] = await Promise.all([
|
|
92
|
+
request<ProcedureCyclesQuery>(ProcedureCyclesDocument, {
|
|
93
|
+
containerId: pin.containerId,
|
|
94
|
+
pagination: { limit: 25, offset: pin.cycleOffset },
|
|
95
|
+
}),
|
|
96
|
+
request<ProcedureProposalsQuery>(ProcedureProposalsDocument, {
|
|
97
|
+
cycleId: pin.cycleId,
|
|
98
|
+
pagination: { limit: 25, offset: pin.proposalOffset },
|
|
99
|
+
}),
|
|
100
|
+
request<ProcedureApplicableQuery>(ProcedureApplicableDocument, {
|
|
101
|
+
proposalId: pin.proposalId,
|
|
102
|
+
}),
|
|
103
|
+
]);
|
|
104
|
+
if (!active.current) throw new Error('Workspace context changed. Nothing was sent.');
|
|
105
|
+
if (
|
|
106
|
+
freshCycles.mtwContainerCyclePage.items.find((row) => row.id === pin.cycleId)?.version !==
|
|
107
|
+
pin.expectedCycleVersion ||
|
|
108
|
+
freshProposals.mtwReuseProposalPage.items.find((row) => row.id === pin.proposalId)
|
|
109
|
+
?.revision !== pin.expectedProposalRevision ||
|
|
110
|
+
!freshPolicy.mtwApplicableProcedures.policies.some(
|
|
111
|
+
(row) =>
|
|
112
|
+
row.version.id === pin.procedureVersionId && row.status === 'APPLICABLE_RECORDED_POLICY'
|
|
113
|
+
)
|
|
114
|
+
)
|
|
115
|
+
throw new Error('Proposal, cycle or policy changed. Refresh and review again.');
|
|
116
|
+
const result = await actions.run(
|
|
117
|
+
StartProcedureDocument,
|
|
118
|
+
{
|
|
119
|
+
proposalId: pin.proposalId,
|
|
120
|
+
procedureVersionId: pin.procedureVersionId,
|
|
121
|
+
expectedCycleVersion: pin.expectedCycleVersion,
|
|
122
|
+
expectedProposalRevision: pin.expectedProposalRevision,
|
|
123
|
+
},
|
|
124
|
+
'Checklist run recorded. No reservation was authorized.'
|
|
125
|
+
);
|
|
126
|
+
if (
|
|
127
|
+
result &&
|
|
128
|
+
active.current &&
|
|
129
|
+
object(result.startMtwProcedureExecution) &&
|
|
130
|
+
typeof result.startMtwProcedureExecution.id === 'string'
|
|
131
|
+
) {
|
|
132
|
+
setRun(result.startMtwProcedureExecution.id);
|
|
133
|
+
setDraft(null);
|
|
134
|
+
setRunOffset(0);
|
|
135
|
+
}
|
|
136
|
+
} catch (failure) {
|
|
137
|
+
if (active.current)
|
|
138
|
+
setError(failure instanceof Error ? failure.message : 'Unable to record checklist run.');
|
|
139
|
+
} finally {
|
|
140
|
+
if (active.current) setChecking(false);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
return (
|
|
144
|
+
<div className="space-y-5">
|
|
145
|
+
<section className={reuseCard}>
|
|
146
|
+
<ProcedureSubjectPicker selection={selection} busy={paused} onChange={reset} />
|
|
147
|
+
<ReuseState loading={applicability.loading} error={applicability.error} />
|
|
148
|
+
{selection.proposal && (
|
|
149
|
+
<>
|
|
150
|
+
<p>
|
|
151
|
+
{selection.proposal.exportBookingReference} · exporter{' '}
|
|
152
|
+
{selection.proposal.exporterReference} · {selection.proposal.handoffLocationReference}
|
|
153
|
+
</p>
|
|
154
|
+
<p>
|
|
155
|
+
Displayed proposal revision {selection.proposal.revision}; cycle version{' '}
|
|
156
|
+
{selection.cycle?.version ?? 'Unknown'}.
|
|
157
|
+
</p>
|
|
158
|
+
<label className="block">
|
|
159
|
+
Applicable recorded procedure
|
|
160
|
+
<select
|
|
161
|
+
className={reuseSelect}
|
|
162
|
+
disabled={paused}
|
|
163
|
+
value={policyId}
|
|
164
|
+
onChange={(event) => {
|
|
165
|
+
setPolicy(event.target.value);
|
|
166
|
+
setDraft(null);
|
|
167
|
+
}}
|
|
168
|
+
>
|
|
169
|
+
<option value="">Choose a sourced procedure</option>
|
|
170
|
+
{applicability.data?.mtwApplicableProcedures.policies.map((row) => (
|
|
171
|
+
<option
|
|
172
|
+
key={row.version.id}
|
|
173
|
+
value={row.version.id}
|
|
174
|
+
disabled={row.status !== 'APPLICABLE_RECORDED_POLICY'}
|
|
175
|
+
>
|
|
176
|
+
{row.version.title} · v{row.version.version} ·{' '}
|
|
177
|
+
{row.status === 'APPLICABLE_RECORDED_POLICY'
|
|
178
|
+
? 'Applicable record'
|
|
179
|
+
: row.status.toLowerCase()}
|
|
180
|
+
</option>
|
|
181
|
+
))}
|
|
182
|
+
</select>
|
|
183
|
+
</label>
|
|
184
|
+
{applicability.data &&
|
|
185
|
+
applicability.data.mtwApplicableProcedures.policies.length === 0 && (
|
|
186
|
+
<p>No exact-scope procedure is recorded. This does not establish an exemption.</p>
|
|
187
|
+
)}
|
|
188
|
+
<Button
|
|
189
|
+
type="button"
|
|
190
|
+
disabled={
|
|
191
|
+
paused ||
|
|
192
|
+
!policy ||
|
|
193
|
+
policy.status !== 'APPLICABLE_RECORDED_POLICY' ||
|
|
194
|
+
!selection.cycle ||
|
|
195
|
+
selection.cycle.status !== 'OPEN' ||
|
|
196
|
+
selection.cycles.loading ||
|
|
197
|
+
selection.proposals.loading ||
|
|
198
|
+
applicability.loading
|
|
199
|
+
}
|
|
200
|
+
onClick={() => {
|
|
201
|
+
if (selection.cycle && selection.proposal && policy)
|
|
202
|
+
setDraft({
|
|
203
|
+
containerId: selection.containerId,
|
|
204
|
+
cycleId: selection.cycle.id,
|
|
205
|
+
proposalId: selection.proposal.id,
|
|
206
|
+
procedureVersionId: policy.version.id,
|
|
207
|
+
expectedCycleVersion: selection.cycle.version,
|
|
208
|
+
expectedProposalRevision: selection.proposal.revision,
|
|
209
|
+
cycleOffset: selection.cycleOffset,
|
|
210
|
+
proposalOffset: selection.proposalOffset,
|
|
211
|
+
});
|
|
212
|
+
}}
|
|
213
|
+
>
|
|
214
|
+
Review exact proposal and policy
|
|
215
|
+
</Button>
|
|
216
|
+
{draft && (
|
|
217
|
+
<>
|
|
218
|
+
<p>
|
|
219
|
+
Captured revisions: proposal {draft.expectedProposalRevision}, cycle{' '}
|
|
220
|
+
{draft.expectedCycleVersion}. The server rechecks these when recording.
|
|
221
|
+
</p>
|
|
222
|
+
{changed && <p role="alert">Displayed facts changed. Review them again.</p>}
|
|
223
|
+
<Button
|
|
224
|
+
type="button"
|
|
225
|
+
disabled={
|
|
226
|
+
paused ||
|
|
227
|
+
changed ||
|
|
228
|
+
selection.cycles.loading ||
|
|
229
|
+
selection.proposals.loading ||
|
|
230
|
+
applicability.loading
|
|
231
|
+
}
|
|
232
|
+
onClick={() => void start()}
|
|
233
|
+
>
|
|
234
|
+
Record checklist run
|
|
235
|
+
</Button>
|
|
236
|
+
</>
|
|
237
|
+
)}
|
|
238
|
+
</>
|
|
239
|
+
)}
|
|
240
|
+
{error && <p role="alert">{error}</p>}
|
|
241
|
+
</section>
|
|
242
|
+
<section className={reuseCard}>
|
|
243
|
+
<h2 className="text-lg font-semibold">Recorded runs</h2>
|
|
244
|
+
<ReuseState loading={runs.loading} error={runs.error} />
|
|
245
|
+
{runs.data?.mtwProcedureExecutionPage.items.map((row) => (
|
|
246
|
+
<Button
|
|
247
|
+
type="button"
|
|
248
|
+
variant="outline"
|
|
249
|
+
key={row.id}
|
|
250
|
+
disabled={paused}
|
|
251
|
+
onClick={() => setRun(row.id)}
|
|
252
|
+
>
|
|
253
|
+
Open {new Date(row.recordedAt).toLocaleString()} ·{' '}
|
|
254
|
+
<span className="break-all">{row.id}</span>
|
|
255
|
+
</Button>
|
|
256
|
+
))}
|
|
257
|
+
<ReusePager
|
|
258
|
+
offset={runOffset}
|
|
259
|
+
page={runs.data?.mtwProcedureExecutionPage}
|
|
260
|
+
onChange={setRunOffset}
|
|
261
|
+
busy={paused || runs.loading}
|
|
262
|
+
/>
|
|
263
|
+
<ProcedureField
|
|
264
|
+
label="Known run reference (exact scoped history)"
|
|
265
|
+
value={runId}
|
|
266
|
+
onChange={(value) => {
|
|
267
|
+
if (!paused) setRun(value);
|
|
268
|
+
}}
|
|
269
|
+
required={false}
|
|
270
|
+
/>
|
|
271
|
+
<p className="text-sm">
|
|
272
|
+
A known reference opens captured history; this is not an archive search.
|
|
273
|
+
</p>
|
|
274
|
+
</section>
|
|
275
|
+
{runId && <ProcedureRunWorkbench key={runId} id={runId} actions={actions} />}
|
|
276
|
+
</div>
|
|
277
|
+
);
|
|
278
|
+
}
|