@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,292 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
ProcedureRunDocument,
|
|
4
|
+
ProcedureStepsDocument,
|
|
5
|
+
ProcedureDeviationsDocument,
|
|
6
|
+
RecordProcedureStepDocument,
|
|
7
|
+
RecordProcedureDeviationDocument,
|
|
8
|
+
RevokeProcedureDeviationDocument,
|
|
9
|
+
type ProcedureRunQuery,
|
|
10
|
+
type ProcedureStepsQuery,
|
|
11
|
+
type ProcedureDeviationsQuery,
|
|
12
|
+
type MtwProcedureStep,
|
|
13
|
+
} from '../../../generated/logistics-procedure-operations';
|
|
14
|
+
import type { useProcedureAction } from '../../hooks/useProcedureAction';
|
|
15
|
+
import { useConditionApi, useConditionQuery } from '../../hooks/useContainerCondition';
|
|
16
|
+
import { useMoveTheWheels } from '../../providers/MoveTheWheelsProvider';
|
|
17
|
+
import { procedureSteps, stepLabel, chainMatches } from '../../utils/procedureInput';
|
|
18
|
+
import { ReuseState, ReusePager, reuseCard, reuseSelect } from '../ReuseControls';
|
|
19
|
+
import { Button } from '../ui';
|
|
20
|
+
import { ProcedureHistory } from './ProcedureHistory';
|
|
21
|
+
import { ProcedureStepForm, ProcedureDeviationForm } from './ProcedureDecisionForm';
|
|
22
|
+
type Step = ProcedureStepsQuery['mtwProcedureStepPage']['items'][number];
|
|
23
|
+
type Deviation = ProcedureDeviationsQuery['mtwProcedureDeviationPage']['items'][number];
|
|
24
|
+
export function ProcedureRunWorkbench({
|
|
25
|
+
id,
|
|
26
|
+
actions,
|
|
27
|
+
}: {
|
|
28
|
+
id: string;
|
|
29
|
+
actions: ReturnType<typeof useProcedureAction>;
|
|
30
|
+
}) {
|
|
31
|
+
const request = useConditionApi(),
|
|
32
|
+
{ currentUser } = useMoveTheWheels(),
|
|
33
|
+
[stepsOffset, setStepsOffset] = useState(0),
|
|
34
|
+
[deviationOffset, setDeviationOffset] = useState(0),
|
|
35
|
+
[draft, setDraft] = useState<{
|
|
36
|
+
step: MtwProcedureStep;
|
|
37
|
+
previous: Step | null;
|
|
38
|
+
generation: string;
|
|
39
|
+
} | null>(null),
|
|
40
|
+
[review, setReview] = useState<{
|
|
41
|
+
issue: Step;
|
|
42
|
+
previous: Deviation | null;
|
|
43
|
+
generation: string;
|
|
44
|
+
} | null>(null),
|
|
45
|
+
[checking, setChecking] = useState(false),
|
|
46
|
+
[selectedStep, setSelectedStep] = useState<MtwProcedureStep>('RETURN_INSTRUCTION_REVIEW'),
|
|
47
|
+
[issueId, setIssue] = useState('');
|
|
48
|
+
const active = useRef(true);
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
active.current = true;
|
|
51
|
+
return () => {
|
|
52
|
+
active.current = false;
|
|
53
|
+
};
|
|
54
|
+
}, []);
|
|
55
|
+
const run = useConditionQuery<ProcedureRunQuery>(ProcedureRunDocument, { id }, actions.revision),
|
|
56
|
+
steps = useConditionQuery<ProcedureStepsQuery>(
|
|
57
|
+
ProcedureStepsDocument,
|
|
58
|
+
{ executionId: id, pagination: { limit: 100, offset: stepsOffset } },
|
|
59
|
+
actions.revision
|
|
60
|
+
),
|
|
61
|
+
deviations = useConditionQuery<ProcedureDeviationsQuery>(
|
|
62
|
+
ProcedureDeviationsDocument,
|
|
63
|
+
{ executionId: id, pagination: { limit: 100, offset: deviationOffset } },
|
|
64
|
+
actions.revision
|
|
65
|
+
);
|
|
66
|
+
const allSteps = steps.data?.mtwProcedureStepPage.items ?? [],
|
|
67
|
+
allDeviations = deviations.data?.mtwProcedureDeviationPage.items ?? [],
|
|
68
|
+
paused = actions.busy || actions.uncertain || checking;
|
|
69
|
+
const completeSteps =
|
|
70
|
+
!!steps.data && !steps.data.mtwProcedureStepPage.hasMore && stepsOffset === 0,
|
|
71
|
+
completeDeviations =
|
|
72
|
+
!!deviations.data &&
|
|
73
|
+
!deviations.data.mtwProcedureDeviationPage.hasMore &&
|
|
74
|
+
deviationOffset === 0;
|
|
75
|
+
const latestStep = (step: MtwProcedureStep) => allSteps.find((row) => row.step === step) ?? null;
|
|
76
|
+
const latestDeviation = (issue: string) =>
|
|
77
|
+
allDeviations.find((row) => row.stepDecisionId === issue) ?? null;
|
|
78
|
+
const changedStep =
|
|
79
|
+
!!draft && completeSteps && !chainMatches(draft.previous, latestStep(draft.step)),
|
|
80
|
+
changedReview =
|
|
81
|
+
!!review &&
|
|
82
|
+
completeDeviations &&
|
|
83
|
+
!chainMatches(review.previous, latestDeviation(review.issue.id));
|
|
84
|
+
const saveStep = async (input: Record<string, unknown>) => {
|
|
85
|
+
if (!draft || paused) throw new Error('Review the current step predecessor first.');
|
|
86
|
+
setChecking(true);
|
|
87
|
+
try {
|
|
88
|
+
const fresh = await request<ProcedureStepsQuery>(ProcedureStepsDocument, {
|
|
89
|
+
executionId: id,
|
|
90
|
+
pagination: { limit: 100, offset: 0 },
|
|
91
|
+
});
|
|
92
|
+
if (!active.current) throw new Error('Context changed. Nothing was sent.');
|
|
93
|
+
if (
|
|
94
|
+
fresh.mtwProcedureStepPage.hasMore ||
|
|
95
|
+
!chainMatches(
|
|
96
|
+
draft.previous,
|
|
97
|
+
fresh.mtwProcedureStepPage.items.find((row) => row.step === draft.step) ?? null
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
throw new Error(
|
|
101
|
+
'Step history changed or exceeds this bounded review. Refresh and review again.'
|
|
102
|
+
);
|
|
103
|
+
const result = await actions.run(
|
|
104
|
+
RecordProcedureStepDocument,
|
|
105
|
+
input,
|
|
106
|
+
'Checklist decision recorded.'
|
|
107
|
+
);
|
|
108
|
+
if (result && active.current) setDraft(null);
|
|
109
|
+
} finally {
|
|
110
|
+
if (active.current) setChecking(false);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const saveReview = async (input: Record<string, unknown>, revoke: boolean) => {
|
|
114
|
+
if (!review || paused)
|
|
115
|
+
throw new Error('Review the exact issue and deviation predecessor first.');
|
|
116
|
+
setChecking(true);
|
|
117
|
+
try {
|
|
118
|
+
const fresh = await request<ProcedureDeviationsQuery>(ProcedureDeviationsDocument, {
|
|
119
|
+
executionId: id,
|
|
120
|
+
pagination: { limit: 100, offset: 0 },
|
|
121
|
+
});
|
|
122
|
+
if (!active.current) throw new Error('Context changed. Nothing was sent.');
|
|
123
|
+
if (
|
|
124
|
+
fresh.mtwProcedureDeviationPage.hasMore ||
|
|
125
|
+
!chainMatches(
|
|
126
|
+
review.previous,
|
|
127
|
+
fresh.mtwProcedureDeviationPage.items.find(
|
|
128
|
+
(row) => row.stepDecisionId === review.issue.id
|
|
129
|
+
) ?? null
|
|
130
|
+
)
|
|
131
|
+
)
|
|
132
|
+
throw new Error('Deviation history changed or exceeds this bounded review.');
|
|
133
|
+
const result = await actions.run(
|
|
134
|
+
revoke ? RevokeProcedureDeviationDocument : RecordProcedureDeviationDocument,
|
|
135
|
+
input,
|
|
136
|
+
'Internal deviation review recorded.'
|
|
137
|
+
);
|
|
138
|
+
if (result && active.current) setReview(null);
|
|
139
|
+
} finally {
|
|
140
|
+
if (active.current) setChecking(false);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
return (
|
|
144
|
+
<section className={reuseCard}>
|
|
145
|
+
<ReuseState loading={run.loading} error={run.error} />
|
|
146
|
+
<ReuseState loading={steps.loading} error={steps.error} />
|
|
147
|
+
<ReuseState loading={deviations.loading} error={deviations.error} />
|
|
148
|
+
{run.data && (
|
|
149
|
+
<>
|
|
150
|
+
<ProcedureHistory
|
|
151
|
+
run={run.data.mtwProcedureExecution}
|
|
152
|
+
steps={allSteps}
|
|
153
|
+
deviations={allDeviations}
|
|
154
|
+
/>
|
|
155
|
+
<ReusePager
|
|
156
|
+
offset={stepsOffset}
|
|
157
|
+
page={steps.data?.mtwProcedureStepPage}
|
|
158
|
+
onChange={setStepsOffset}
|
|
159
|
+
busy={paused || steps.loading}
|
|
160
|
+
/>
|
|
161
|
+
<ReusePager
|
|
162
|
+
offset={deviationOffset}
|
|
163
|
+
page={deviations.data?.mtwProcedureDeviationPage}
|
|
164
|
+
onChange={setDeviationOffset}
|
|
165
|
+
busy={paused || deviations.loading}
|
|
166
|
+
/>
|
|
167
|
+
{(!completeSteps || !completeDeviations) && (
|
|
168
|
+
<p>
|
|
169
|
+
History is paged or exceeds 100 records. Recording is blocked here to avoid guessing a
|
|
170
|
+
chain predecessor.
|
|
171
|
+
</p>
|
|
172
|
+
)}
|
|
173
|
+
{currentUser?.id === run.data.mtwProcedureExecution.executorActorId && (
|
|
174
|
+
<>
|
|
175
|
+
<label className="block">
|
|
176
|
+
Checklist step
|
|
177
|
+
<select
|
|
178
|
+
className={reuseSelect}
|
|
179
|
+
disabled={paused}
|
|
180
|
+
value={selectedStep}
|
|
181
|
+
onChange={(event) => {
|
|
182
|
+
const step = procedureSteps.find((row) => row === event.target.value);
|
|
183
|
+
if (step) {
|
|
184
|
+
setSelectedStep(step);
|
|
185
|
+
setDraft(null);
|
|
186
|
+
}
|
|
187
|
+
}}
|
|
188
|
+
>
|
|
189
|
+
{procedureSteps.map((row) => (
|
|
190
|
+
<option key={row} value={row}>
|
|
191
|
+
{stepLabel[row]}
|
|
192
|
+
</option>
|
|
193
|
+
))}
|
|
194
|
+
</select>
|
|
195
|
+
</label>
|
|
196
|
+
<Button
|
|
197
|
+
type="button"
|
|
198
|
+
disabled={paused || !completeSteps || steps.loading}
|
|
199
|
+
onClick={() =>
|
|
200
|
+
setDraft({
|
|
201
|
+
step: selectedStep,
|
|
202
|
+
previous: latestStep(selectedStep),
|
|
203
|
+
generation: crypto.randomUUID(),
|
|
204
|
+
})
|
|
205
|
+
}
|
|
206
|
+
>
|
|
207
|
+
Review predecessor and open check
|
|
208
|
+
</Button>
|
|
209
|
+
</>
|
|
210
|
+
)}
|
|
211
|
+
{draft && (
|
|
212
|
+
<>
|
|
213
|
+
<p>
|
|
214
|
+
Opening another form discards unsent fields; refresh never replaces a retained
|
|
215
|
+
original request.
|
|
216
|
+
</p>
|
|
217
|
+
{changedStep && <p role="alert">Step history changed. Review a fresh predecessor.</p>}
|
|
218
|
+
<ProcedureStepForm
|
|
219
|
+
key={draft.generation}
|
|
220
|
+
executionId={id}
|
|
221
|
+
step={draft.step}
|
|
222
|
+
previous={draft.previous}
|
|
223
|
+
busy={paused || changedStep || !completeSteps || steps.loading}
|
|
224
|
+
onSave={saveStep}
|
|
225
|
+
/>
|
|
226
|
+
</>
|
|
227
|
+
)}
|
|
228
|
+
<label className="block">
|
|
229
|
+
Issue for an independent review
|
|
230
|
+
<select
|
|
231
|
+
className={reuseSelect}
|
|
232
|
+
disabled={paused}
|
|
233
|
+
value={issueId}
|
|
234
|
+
onChange={(event) => {
|
|
235
|
+
setIssue(event.target.value);
|
|
236
|
+
setReview(null);
|
|
237
|
+
}}
|
|
238
|
+
>
|
|
239
|
+
<option value="">Choose a reported issue</option>
|
|
240
|
+
{allSteps
|
|
241
|
+
.filter((row) => row.kind === 'ISSUE')
|
|
242
|
+
.map((row) => (
|
|
243
|
+
<option key={row.id} value={row.id}>
|
|
244
|
+
{stepLabel[row.step]} · version {row.version} · {row.id}
|
|
245
|
+
</option>
|
|
246
|
+
))}
|
|
247
|
+
</select>
|
|
248
|
+
</label>
|
|
249
|
+
<Button
|
|
250
|
+
type="button"
|
|
251
|
+
disabled={
|
|
252
|
+
paused ||
|
|
253
|
+
!issueId ||
|
|
254
|
+
!completeSteps ||
|
|
255
|
+
!completeDeviations ||
|
|
256
|
+
steps.loading ||
|
|
257
|
+
deviations.loading ||
|
|
258
|
+
currentUser?.id === run.data.mtwProcedureExecution.executorActorId
|
|
259
|
+
}
|
|
260
|
+
onClick={() => {
|
|
261
|
+
const issue = allSteps.find((row) => row.id === issueId && row.kind === 'ISSUE');
|
|
262
|
+
if (issue)
|
|
263
|
+
setReview({
|
|
264
|
+
issue,
|
|
265
|
+
previous: latestDeviation(issue.id),
|
|
266
|
+
generation: crypto.randomUUID(),
|
|
267
|
+
});
|
|
268
|
+
}}
|
|
269
|
+
>
|
|
270
|
+
Review issue and open deviation form
|
|
271
|
+
</Button>
|
|
272
|
+
{review && (
|
|
273
|
+
<>
|
|
274
|
+
{changedReview && (
|
|
275
|
+
<p role="alert">Deviation history changed. Review a fresh predecessor.</p>
|
|
276
|
+
)}
|
|
277
|
+
<ProcedureDeviationForm
|
|
278
|
+
key={review.generation}
|
|
279
|
+
executionId={id}
|
|
280
|
+
issue={review.issue}
|
|
281
|
+
previous={review.previous}
|
|
282
|
+
busy={paused || changedReview || !completeDeviations || deviations.loading}
|
|
283
|
+
onSave={(input) => saveReview(input, false)}
|
|
284
|
+
onRevoke={(input) => saveReview(input, true)}
|
|
285
|
+
/>
|
|
286
|
+
</>
|
|
287
|
+
)}
|
|
288
|
+
</>
|
|
289
|
+
)}
|
|
290
|
+
</section>
|
|
291
|
+
);
|
|
292
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { useProcedureSelection } from '../../hooks/useProcedureSelection';
|
|
2
|
+
import { ReusePager, ReuseState, reuseSelect } from '../ReuseControls';
|
|
3
|
+
export function ProcedureSubjectPicker({
|
|
4
|
+
selection: s,
|
|
5
|
+
busy,
|
|
6
|
+
onChange,
|
|
7
|
+
}: {
|
|
8
|
+
selection: ReturnType<typeof useProcedureSelection>;
|
|
9
|
+
busy: boolean;
|
|
10
|
+
onChange: () => void;
|
|
11
|
+
}) {
|
|
12
|
+
return (
|
|
13
|
+
<fieldset disabled={busy} className="space-y-4">
|
|
14
|
+
<legend className="font-semibold">Choose the recorded reuse proposal</legend>
|
|
15
|
+
<label className="block">
|
|
16
|
+
Container
|
|
17
|
+
<select
|
|
18
|
+
className={reuseSelect}
|
|
19
|
+
value={s.containerId}
|
|
20
|
+
onChange={(event) => {
|
|
21
|
+
s.selectContainer(event.target.value);
|
|
22
|
+
onChange();
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
25
|
+
<option value="">Select a container</option>
|
|
26
|
+
{s.containers.data?.mtwContainerPage.items.map((row) => (
|
|
27
|
+
<option key={row.id} value={row.id}>
|
|
28
|
+
{row.containerNumber} · {row.equipmentType}
|
|
29
|
+
</option>
|
|
30
|
+
))}
|
|
31
|
+
</select>
|
|
32
|
+
</label>
|
|
33
|
+
<ReuseState loading={s.containers.loading} error={s.containers.error} />
|
|
34
|
+
<ReusePager
|
|
35
|
+
offset={s.containerOffset}
|
|
36
|
+
page={s.containers.data?.mtwContainerPage}
|
|
37
|
+
busy={busy || s.containers.loading}
|
|
38
|
+
onChange={(offset) => {
|
|
39
|
+
s.pageContainers(offset);
|
|
40
|
+
onChange();
|
|
41
|
+
}}
|
|
42
|
+
/>
|
|
43
|
+
{s.containerId && (
|
|
44
|
+
<>
|
|
45
|
+
<label className="block">
|
|
46
|
+
Cycle
|
|
47
|
+
<select
|
|
48
|
+
className={reuseSelect}
|
|
49
|
+
value={s.cycleId}
|
|
50
|
+
onChange={(event) => {
|
|
51
|
+
s.selectCycle(event.target.value);
|
|
52
|
+
onChange();
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
<option value="">Select a cycle</option>
|
|
56
|
+
{s.cycles.data?.mtwContainerCyclePage.items.map((row) => (
|
|
57
|
+
<option key={row.id} value={row.id}>
|
|
58
|
+
{row.bookingReference ?? 'No booking reference'} ·{' '}
|
|
59
|
+
{new Date(row.openedAt).toLocaleString()} · {row.status} · {row.id}
|
|
60
|
+
</option>
|
|
61
|
+
))}
|
|
62
|
+
</select>
|
|
63
|
+
</label>
|
|
64
|
+
<ReuseState loading={s.cycles.loading} error={s.cycles.error} />
|
|
65
|
+
<ReusePager
|
|
66
|
+
offset={s.cycleOffset}
|
|
67
|
+
page={s.cycles.data?.mtwContainerCyclePage}
|
|
68
|
+
busy={busy || s.cycles.loading}
|
|
69
|
+
onChange={(offset) => {
|
|
70
|
+
s.pageCycles(offset);
|
|
71
|
+
onChange();
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
</>
|
|
75
|
+
)}
|
|
76
|
+
{s.cycleId && (
|
|
77
|
+
<>
|
|
78
|
+
<label className="block">
|
|
79
|
+
Proposal
|
|
80
|
+
<select
|
|
81
|
+
className={reuseSelect}
|
|
82
|
+
value={s.proposalId}
|
|
83
|
+
onChange={(event) => {
|
|
84
|
+
s.selectProposal(event.target.value);
|
|
85
|
+
onChange();
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
<option value="">Select a proposal</option>
|
|
89
|
+
{s.proposals.data?.mtwReuseProposalPage.items.map((row) => (
|
|
90
|
+
<option key={row.id} value={row.id}>
|
|
91
|
+
{row.proposalReference} · revision {row.revision} · {row.exportBookingReference} ·{' '}
|
|
92
|
+
{row.handoffLocationReference}
|
|
93
|
+
</option>
|
|
94
|
+
))}
|
|
95
|
+
</select>
|
|
96
|
+
</label>
|
|
97
|
+
<ReuseState loading={s.proposals.loading} error={s.proposals.error} />
|
|
98
|
+
<ReusePager
|
|
99
|
+
offset={s.proposalOffset}
|
|
100
|
+
page={s.proposals.data?.mtwReuseProposalPage}
|
|
101
|
+
busy={busy || s.proposals.loading}
|
|
102
|
+
onChange={(offset) => {
|
|
103
|
+
s.pageProposals(offset);
|
|
104
|
+
onChange();
|
|
105
|
+
}}
|
|
106
|
+
/>
|
|
107
|
+
</>
|
|
108
|
+
)}
|
|
109
|
+
</fieldset>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { PickPreparationQuery } from '../../../generated/pending-pick-operations';
|
|
2
|
+
import type { PendingPickInput } from '../../utils/pendingPickDraft';
|
|
3
|
+
import { Button, Input } from '../ui';
|
|
4
|
+
import { reuseCard } from '../ReuseControls';
|
|
5
|
+
import { PickCapture } from './PickCapture';
|
|
6
|
+
export function PendingPickDraft({
|
|
7
|
+
context,
|
|
8
|
+
locked,
|
|
9
|
+
loading,
|
|
10
|
+
count,
|
|
11
|
+
reason,
|
|
12
|
+
draft,
|
|
13
|
+
stale,
|
|
14
|
+
onCount,
|
|
15
|
+
onReason,
|
|
16
|
+
onReview,
|
|
17
|
+
onSave,
|
|
18
|
+
}: {
|
|
19
|
+
context: PickPreparationQuery['mtwPickPreparation'] | undefined;
|
|
20
|
+
locked: boolean;
|
|
21
|
+
loading: boolean;
|
|
22
|
+
count: string;
|
|
23
|
+
reason: string;
|
|
24
|
+
draft: PendingPickInput | null;
|
|
25
|
+
stale: boolean;
|
|
26
|
+
onCount: (value: string) => void;
|
|
27
|
+
onReason: (value: string) => void;
|
|
28
|
+
onReview: () => void;
|
|
29
|
+
onSave: () => void;
|
|
30
|
+
}) {
|
|
31
|
+
if (!context) return null;
|
|
32
|
+
return (
|
|
33
|
+
<>
|
|
34
|
+
<p className="text-sm">
|
|
35
|
+
Server review time {context.evaluatedAt}. Applicability is reported by the server.
|
|
36
|
+
</p>
|
|
37
|
+
<div className="grid gap-3 lg:grid-cols-2">
|
|
38
|
+
<PickCapture title="Source" line={context.source} />
|
|
39
|
+
<PickCapture title="Staging" line={context.destination} />
|
|
40
|
+
</div>
|
|
41
|
+
<section className={`${reuseCard} min-w-0 break-words`}>
|
|
42
|
+
<h2 className="font-semibold">Review a pending plan</h2>
|
|
43
|
+
<p>Count units remain as reported above. Missing or mismatched facts remain review gaps.</p>
|
|
44
|
+
<label className="block">
|
|
45
|
+
Requested whole count
|
|
46
|
+
<Input
|
|
47
|
+
value={count}
|
|
48
|
+
inputMode="numeric"
|
|
49
|
+
disabled={locked}
|
|
50
|
+
onChange={(e) => {
|
|
51
|
+
onCount(e.target.value);
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
54
|
+
</label>
|
|
55
|
+
<label className="block">
|
|
56
|
+
Reason
|
|
57
|
+
<Input
|
|
58
|
+
value={reason}
|
|
59
|
+
maxLength={1000}
|
|
60
|
+
disabled={locked}
|
|
61
|
+
onChange={(e) => {
|
|
62
|
+
onReason(e.target.value);
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
</label>
|
|
66
|
+
<Button type="button" variant="outline" disabled={locked || loading} onClick={onReview}>
|
|
67
|
+
Review this plan
|
|
68
|
+
</Button>
|
|
69
|
+
{draft && (
|
|
70
|
+
<p>
|
|
71
|
+
{draft.requestedQuantity} count · {draft.note}. Proposed executor is the current user;
|
|
72
|
+
recording requires a verified direct-human session.
|
|
73
|
+
</p>
|
|
74
|
+
)}
|
|
75
|
+
{stale && <p role="alert">Displayed source facts changed. Review this plan again.</p>}
|
|
76
|
+
<Button type="button" disabled={locked || !draft || stale || loading} onClick={onSave}>
|
|
77
|
+
Record pending plan
|
|
78
|
+
</Button>
|
|
79
|
+
</section>
|
|
80
|
+
</>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
ExactPendingPickDocument,
|
|
4
|
+
PendingPickHistoryDocument,
|
|
5
|
+
type ExactPendingPickQuery,
|
|
6
|
+
type PendingPickHistoryQuery,
|
|
7
|
+
type PendingPickTaskFragment,
|
|
8
|
+
} from '../../../generated/pending-pick-operations';
|
|
9
|
+
import { useConditionQuery } from '../../hooks/useContainerCondition';
|
|
10
|
+
import { Button, Input } from '../ui';
|
|
11
|
+
import { ReusePager, ReuseState, reuseCard } from '../ReuseControls';
|
|
12
|
+
import { PickCapture } from './PickCapture';
|
|
13
|
+
function TaskReceipt({ task }: { task: PendingPickTaskFragment }) {
|
|
14
|
+
return (
|
|
15
|
+
<article className={`${reuseCard} min-w-0 break-words`}>
|
|
16
|
+
<h3 className="font-semibold">Pending plan · needs review</h3>
|
|
17
|
+
<p className="break-all">Task {task.id}</p>
|
|
18
|
+
<p>
|
|
19
|
+
{task.requestedQuantity} reported count · {task.note}
|
|
20
|
+
</p>
|
|
21
|
+
<p>
|
|
22
|
+
Reserved {task.reservedQuantity}; staged {task.stagedQuantity}. No movement is recorded.
|
|
23
|
+
</p>
|
|
24
|
+
<p className="break-all">
|
|
25
|
+
Recorded {task.recordedAt}; creator and proposed executor {task.executorActorId}.
|
|
26
|
+
</p>
|
|
27
|
+
<details>
|
|
28
|
+
<summary>Captured source and staging context</summary>
|
|
29
|
+
<div className="mt-3 grid gap-3 lg:grid-cols-2">
|
|
30
|
+
<PickCapture title="Source" line={task.source} />
|
|
31
|
+
<PickCapture title="Staging" line={task.destination} />
|
|
32
|
+
</div>
|
|
33
|
+
</details>
|
|
34
|
+
</article>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export function PendingPickHistory({
|
|
38
|
+
revision,
|
|
39
|
+
sourceId,
|
|
40
|
+
destinationId,
|
|
41
|
+
}: {
|
|
42
|
+
revision: number;
|
|
43
|
+
sourceId: string;
|
|
44
|
+
destinationId: string;
|
|
45
|
+
}) {
|
|
46
|
+
const [offset, setOffset] = useState(0),
|
|
47
|
+
[knownId, setKnownId] = useState(''),
|
|
48
|
+
[exactId, setExactId] = useState('');
|
|
49
|
+
const history = useConditionQuery<PendingPickHistoryQuery>(
|
|
50
|
+
PendingPickHistoryDocument,
|
|
51
|
+
{
|
|
52
|
+
pagination: { limit: 10, offset },
|
|
53
|
+
sourceInventoryItemId: sourceId || null,
|
|
54
|
+
destinationInventoryItemId: destinationId || null,
|
|
55
|
+
},
|
|
56
|
+
revision
|
|
57
|
+
);
|
|
58
|
+
const exact = useConditionQuery<ExactPendingPickQuery>(
|
|
59
|
+
ExactPendingPickDocument,
|
|
60
|
+
exactId ? { id: exactId } : null,
|
|
61
|
+
revision
|
|
62
|
+
);
|
|
63
|
+
const page = history.data?.mtwPickTaskPage;
|
|
64
|
+
return (
|
|
65
|
+
<section className="space-y-3" aria-label="Pending plan history">
|
|
66
|
+
<h2 className="font-semibold">Recorded pending plans</h2>
|
|
67
|
+
<p className="text-sm">
|
|
68
|
+
History retains captured references after a line is retired. Use a known task ID; this is
|
|
69
|
+
not an archived stock-line browser.
|
|
70
|
+
</p>
|
|
71
|
+
<label className="block">
|
|
72
|
+
Known task ID
|
|
73
|
+
<Input value={knownId} maxLength={255} onChange={(e) => setKnownId(e.target.value)} />
|
|
74
|
+
</label>
|
|
75
|
+
<Button
|
|
76
|
+
type="button"
|
|
77
|
+
variant="outline"
|
|
78
|
+
disabled={!knownId.trim()}
|
|
79
|
+
onClick={() => setExactId(knownId.trim())}
|
|
80
|
+
>
|
|
81
|
+
Read exact task
|
|
82
|
+
</Button>
|
|
83
|
+
<ReuseState loading={exact.loading} error={exact.error} />
|
|
84
|
+
{exact.data && <TaskReceipt task={exact.data.mtwPickTask} />}
|
|
85
|
+
<ReuseState loading={history.loading} error={history.error} />
|
|
86
|
+
{page?.items.map((task) => (
|
|
87
|
+
<TaskReceipt key={task.id} task={task} />
|
|
88
|
+
))}
|
|
89
|
+
{page?.total === 0 && <p>No recorded pending plans in this filter.</p>}
|
|
90
|
+
<ReusePager page={page} offset={offset} onChange={setOffset} busy={history.loading} />
|
|
91
|
+
</section>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { PickLineFragment } from '../../../generated/pending-pick-operations';
|
|
2
|
+
import { reuseCard } from '../ReuseControls';
|
|
3
|
+
export function PickCapture({ line, title }: { line: PickLineFragment; title: string }) {
|
|
4
|
+
const applicable = line.applicableProfile;
|
|
5
|
+
return (
|
|
6
|
+
<section className={`${reuseCard} min-w-0 break-words`}>
|
|
7
|
+
<h3 className="font-semibold">
|
|
8
|
+
{title}: {line.cargoLabel}
|
|
9
|
+
</h3>
|
|
10
|
+
<p>
|
|
11
|
+
{line.warehouseLabel} · {line.binLabel}
|
|
12
|
+
</p>
|
|
13
|
+
<p className="break-all text-sm">Line {line.inventoryItemId}</p>
|
|
14
|
+
<p className="text-sm">
|
|
15
|
+
Reported counters: on hand {line.stock.onHand}, available {line.stock.available}, allocated{' '}
|
|
16
|
+
{line.stock.allocated}, damaged {line.stock.damaged}.
|
|
17
|
+
</p>
|
|
18
|
+
<p className="text-sm">
|
|
19
|
+
Composition revision {line.compositionEpoch}; reported issues {line.observationSequence}.
|
|
20
|
+
</p>
|
|
21
|
+
<p className="text-sm">
|
|
22
|
+
Needs review:{' '}
|
|
23
|
+
{line.reviewGaps.map((gap) => gap.toLowerCase().replaceAll('_', ' ')).join('; ')}
|
|
24
|
+
</p>
|
|
25
|
+
<details className="space-y-2 text-sm">
|
|
26
|
+
<summary>Source facts and exact review references</summary>
|
|
27
|
+
<p className="break-all">
|
|
28
|
+
Recorded profile {line.recordedProfile?.id ?? 'Missing'}; applicable profile{' '}
|
|
29
|
+
{applicable?.id ?? 'Missing'}.
|
|
30
|
+
</p>
|
|
31
|
+
<p>
|
|
32
|
+
Recorded effective time {line.recordedProfile?.effectiveAt ?? 'Unknown'}; applicable
|
|
33
|
+
effective time {applicable?.effectiveAt ?? 'Unknown'}.
|
|
34
|
+
</p>
|
|
35
|
+
<p className="break-all">
|
|
36
|
+
Count unit reference {applicable?.facts.countUnit?.reference ?? 'Unknown'}; revision{' '}
|
|
37
|
+
{applicable?.facts.countUnit?.revision ?? 'Unknown'}.
|
|
38
|
+
</p>
|
|
39
|
+
<p className="break-all">
|
|
40
|
+
Source {applicable?.facts.source.reference ?? 'Unknown'}; revision{' '}
|
|
41
|
+
{applicable?.facts.source.revision ?? 'Unknown'}.
|
|
42
|
+
</p>
|
|
43
|
+
<p>
|
|
44
|
+
Source validity {applicable?.facts.sourceValidity.from ?? 'Unknown'} until{' '}
|
|
45
|
+
{applicable?.facts.sourceValidity.until ?? 'Unknown'} (exclusive).
|
|
46
|
+
</p>
|
|
47
|
+
<p className="break-all">
|
|
48
|
+
Lot {applicable?.facts.lot?.reference ?? 'Unknown'}; disposition{' '}
|
|
49
|
+
{applicable?.facts.lot?.declaredDisposition ?? 'Unknown'}.
|
|
50
|
+
</p>
|
|
51
|
+
<p className="break-all">
|
|
52
|
+
Reported item scan {applicable?.facts.scanMapping?.reportedItemLabel ?? 'Unknown'}; bin
|
|
53
|
+
scan {applicable?.facts.scanMapping?.reportedBinLabel ?? 'Unknown'}.
|
|
54
|
+
</p>
|
|
55
|
+
<p>
|
|
56
|
+
Line revision {line.inventoryUpdatedAt}; cargo {line.cargoUpdatedAt}; warehouse{' '}
|
|
57
|
+
{line.warehouseUpdatedAt}; bin {line.locationUpdatedAt}.
|
|
58
|
+
</p>
|
|
59
|
+
<p className="break-all">
|
|
60
|
+
Cargo {line.cargoItemId}; warehouse {line.warehouseId}; bin {line.locationId}.
|
|
61
|
+
</p>
|
|
62
|
+
{line.unresolvedObservationIds.map((id) => (
|
|
63
|
+
<p key={id} className="break-all">
|
|
64
|
+
Unresolved issue {id}
|
|
65
|
+
</p>
|
|
66
|
+
))}
|
|
67
|
+
</details>
|
|
68
|
+
</section>
|
|
69
|
+
);
|
|
70
|
+
}
|