@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,321 @@
|
|
|
1
|
+
import { Button as e } from "../ui.js";
|
|
2
|
+
import { useConditionApi as t, useConditionQuery as n } from "../../hooks/useContainerCondition.js";
|
|
3
|
+
import { ConsolidationContainersDocument as r, ConsolidationCyclesDocument as i, ConsolidationPlanDocument as a, ConsolidationPlansDocument as o, ConsolidationShipmentDocument as s, ConsolidationShipmentsDocument as ee, SaveConsolidationPlanDocument as c } from "../../src/generated/consolidation-operations.js";
|
|
4
|
+
import { ReusePager as l, ReuseState as u, reuseCard as d, reuseSelect as f } from "../ReuseControls.js";
|
|
5
|
+
import { ProcedureField as te } from "../logistics-procedure/ProcedureFields.js";
|
|
6
|
+
import { ConsolidationPlanHistory as ne } from "./ConsolidationHistory.js";
|
|
7
|
+
import { ConsolidationPlanForm as re } from "./ConsolidationPlanForm.js";
|
|
8
|
+
import { assertConsolidationPredecessor as ie, matchesConsolidationContext as p, offPageConsolidationContainer as ae } from "../../utils/consolidationPins.js";
|
|
9
|
+
import { ConsolidationReportsWorkbench as oe } from "./ConsolidationReportsWorkbench.js";
|
|
10
|
+
import { useEffect as m, useRef as se, useState as h } from "react";
|
|
11
|
+
import { Fragment as ce, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
|
+
//#region src/movethewheels/components/consolidation/ConsolidationPlanWorkbench.tsx
|
|
13
|
+
function v({ actions: v }) {
|
|
14
|
+
let y = se(!0);
|
|
15
|
+
m(() => (y.current = !0, () => {
|
|
16
|
+
y.current = !1;
|
|
17
|
+
}), []);
|
|
18
|
+
let b = t(), [x, le] = h(""), [S, ue] = h(""), [C, w] = h(""), [T, de] = h(""), [E, D] = h(""), [O, k] = h(0), [A, fe] = h(0), [j, M] = h(0), [N, P] = h(0), [pe, F] = h(!1), [I, L] = h(null), [R, z] = h(null), [B, V] = h(null), H = n(ee, { pagination: {
|
|
19
|
+
limit: 25,
|
|
20
|
+
offset: O
|
|
21
|
+
} }, v.revision), U = n(s, x ? { id: x } : null, v.revision), W = n(r, { pagination: {
|
|
22
|
+
limit: 25,
|
|
23
|
+
offset: A
|
|
24
|
+
} }, v.revision), G = n(i, S ? {
|
|
25
|
+
containerId: S,
|
|
26
|
+
pagination: {
|
|
27
|
+
limit: 25,
|
|
28
|
+
offset: j
|
|
29
|
+
}
|
|
30
|
+
} : null, v.revision), K = n(o, x ? {
|
|
31
|
+
shipmentId: x,
|
|
32
|
+
pagination: {
|
|
33
|
+
limit: 5,
|
|
34
|
+
offset: N
|
|
35
|
+
}
|
|
36
|
+
} : null, v.revision), q = n(o, x && T.trim() ? {
|
|
37
|
+
shipmentId: x,
|
|
38
|
+
planReference: T.trim(),
|
|
39
|
+
pagination: {
|
|
40
|
+
limit: 1,
|
|
41
|
+
offset: 0
|
|
42
|
+
}
|
|
43
|
+
} : null, v.revision), J = n(a, x && E ? {
|
|
44
|
+
shipmentId: x,
|
|
45
|
+
id: E
|
|
46
|
+
} : null, v.revision), Y = G.data?.mtwContainerCyclePage.items.find((e) => e.id === C) ?? null, X = q.data?.mtwConsolidationPlanPage.items[0] ?? null, Z = pe || v.busy || v.uncertain, Q = ae(S, R, W.data?.mtwContainerPage.items ?? []), $ = !!B && !!U.data && !!G.data && !p(B.context, U.data.shipment, Y), me = () => {
|
|
47
|
+
V(null), D(""), P(0), L(null);
|
|
48
|
+
}, he = async (e) => {
|
|
49
|
+
if (!B || Z) throw Error("Review current sources before recording.");
|
|
50
|
+
F(!0);
|
|
51
|
+
try {
|
|
52
|
+
let t = await b(s, { id: B.context.shipmentId }), n = (await b(i, {
|
|
53
|
+
containerId: B.context.containerId,
|
|
54
|
+
pagination: {
|
|
55
|
+
limit: 25,
|
|
56
|
+
offset: j
|
|
57
|
+
}
|
|
58
|
+
})).mtwContainerCyclePage.items.find((e) => e.id === B.context.cycleId) ?? null, r = await b(o, {
|
|
59
|
+
shipmentId: B.pin.shipmentId,
|
|
60
|
+
planReference: B.pin.planReference,
|
|
61
|
+
pagination: {
|
|
62
|
+
limit: 1,
|
|
63
|
+
offset: 0
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
if (!y.current) throw Error("Context changed. Nothing was sent.");
|
|
67
|
+
if (!p(B.context, t.shipment, n)) throw Error("Shipment or cycle changed. Refresh and explicitly review a new form.");
|
|
68
|
+
ie(B.previous, r.mtwConsolidationPlanPage.items[0] ?? null);
|
|
69
|
+
let a = await v.run(c, { ...e }, "Plan version recorded.");
|
|
70
|
+
a && (V(null), D(String(a.saveMtwConsolidationPlan && typeof a.saveMtwConsolidationPlan == "object" && "id" in a.saveMtwConsolidationPlan ? a.saveMtwConsolidationPlan.id : "")));
|
|
71
|
+
} finally {
|
|
72
|
+
F(!1);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
return /* @__PURE__ */ _("div", {
|
|
76
|
+
className: "space-y-5",
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ _("section", {
|
|
79
|
+
className: d,
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ g("h2", {
|
|
82
|
+
className: "text-lg font-semibold",
|
|
83
|
+
children: "Choose a shipment and container cycle"
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ _("fieldset", {
|
|
86
|
+
disabled: Z,
|
|
87
|
+
className: "space-y-3",
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ _("label", {
|
|
90
|
+
className: "block",
|
|
91
|
+
children: ["Shipment", /* @__PURE__ */ _("select", {
|
|
92
|
+
className: f,
|
|
93
|
+
value: x,
|
|
94
|
+
onChange: (e) => {
|
|
95
|
+
le(e.target.value), w(""), me();
|
|
96
|
+
},
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ g("option", {
|
|
99
|
+
value: "",
|
|
100
|
+
children: "Choose a shipment"
|
|
101
|
+
}),
|
|
102
|
+
U.data?.shipment && !H.data?.shipments.some((e) => e.id === x) && /* @__PURE__ */ _("option", {
|
|
103
|
+
value: x,
|
|
104
|
+
children: [U.data.shipment.shipmentNumber, " · selected shipment"]
|
|
105
|
+
}),
|
|
106
|
+
H.data?.shipments.map((e) => /* @__PURE__ */ _("option", {
|
|
107
|
+
value: e.id,
|
|
108
|
+
children: [
|
|
109
|
+
e.shipmentNumber,
|
|
110
|
+
" · ",
|
|
111
|
+
e.status
|
|
112
|
+
]
|
|
113
|
+
}, e.id))
|
|
114
|
+
]
|
|
115
|
+
})]
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ g(u, {
|
|
118
|
+
loading: H.loading,
|
|
119
|
+
error: H.error
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ _("div", {
|
|
122
|
+
className: "flex flex-wrap gap-2",
|
|
123
|
+
children: [/* @__PURE__ */ g(e, {
|
|
124
|
+
variant: "outline",
|
|
125
|
+
disabled: O === 0,
|
|
126
|
+
onClick: () => k(Math.max(0, O - 25)),
|
|
127
|
+
children: "Previous shipments"
|
|
128
|
+
}), /* @__PURE__ */ g(e, {
|
|
129
|
+
variant: "outline",
|
|
130
|
+
disabled: !H.data || O + 25 >= H.data.shipmentsCount,
|
|
131
|
+
onClick: () => k(O + 25),
|
|
132
|
+
children: "More shipments"
|
|
133
|
+
})]
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ _("label", {
|
|
136
|
+
className: "block",
|
|
137
|
+
children: ["Container", /* @__PURE__ */ _("select", {
|
|
138
|
+
className: f,
|
|
139
|
+
value: S,
|
|
140
|
+
onChange: (e) => {
|
|
141
|
+
ue(e.target.value), z(W.data?.mtwContainerPage.items.find((t) => t.id === e.target.value) ?? null), w(""), M(0), V(null);
|
|
142
|
+
},
|
|
143
|
+
children: [
|
|
144
|
+
/* @__PURE__ */ g("option", {
|
|
145
|
+
value: "",
|
|
146
|
+
children: "Choose a container"
|
|
147
|
+
}),
|
|
148
|
+
Q && /* @__PURE__ */ _("option", {
|
|
149
|
+
value: Q.id,
|
|
150
|
+
children: [
|
|
151
|
+
Q.containerNumber,
|
|
152
|
+
" · ",
|
|
153
|
+
Q.equipmentType,
|
|
154
|
+
" · selected container"
|
|
155
|
+
]
|
|
156
|
+
}),
|
|
157
|
+
W.data?.mtwContainerPage.items.map((e) => /* @__PURE__ */ _("option", {
|
|
158
|
+
value: e.id,
|
|
159
|
+
children: [
|
|
160
|
+
e.containerNumber,
|
|
161
|
+
" · ",
|
|
162
|
+
e.equipmentType
|
|
163
|
+
]
|
|
164
|
+
}, e.id))
|
|
165
|
+
]
|
|
166
|
+
})]
|
|
167
|
+
}),
|
|
168
|
+
/* @__PURE__ */ g(u, {
|
|
169
|
+
loading: W.loading,
|
|
170
|
+
error: W.error
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ g(l, {
|
|
173
|
+
offset: A,
|
|
174
|
+
page: W.data?.mtwContainerPage,
|
|
175
|
+
busy: Z,
|
|
176
|
+
onChange: fe
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ _("label", {
|
|
179
|
+
className: "block",
|
|
180
|
+
children: ["Open cycle for this shipment", /* @__PURE__ */ _("select", {
|
|
181
|
+
className: f,
|
|
182
|
+
value: C,
|
|
183
|
+
onChange: (e) => {
|
|
184
|
+
w(e.target.value), V(null);
|
|
185
|
+
},
|
|
186
|
+
children: [/* @__PURE__ */ g("option", {
|
|
187
|
+
value: "",
|
|
188
|
+
children: "Choose an open cycle"
|
|
189
|
+
}), G.data?.mtwContainerCyclePage.items.filter((e) => e.shipmentId === x && e.status === "OPEN").map((e) => /* @__PURE__ */ _("option", {
|
|
190
|
+
value: e.id,
|
|
191
|
+
children: [
|
|
192
|
+
e.bookingReference ?? "No booking reference",
|
|
193
|
+
" · opened",
|
|
194
|
+
" ",
|
|
195
|
+
new Date(e.openedAt).toLocaleString()
|
|
196
|
+
]
|
|
197
|
+
}, e.id))]
|
|
198
|
+
})]
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ g(u, {
|
|
201
|
+
loading: G.loading,
|
|
202
|
+
error: G.error
|
|
203
|
+
}),
|
|
204
|
+
/* @__PURE__ */ g(l, {
|
|
205
|
+
offset: j,
|
|
206
|
+
page: G.data?.mtwContainerCyclePage,
|
|
207
|
+
busy: Z,
|
|
208
|
+
onChange: (e) => {
|
|
209
|
+
M(e), w(""), V(null);
|
|
210
|
+
}
|
|
211
|
+
}),
|
|
212
|
+
/* @__PURE__ */ g(te, {
|
|
213
|
+
label: "Plan reference",
|
|
214
|
+
value: T,
|
|
215
|
+
onChange: (e) => {
|
|
216
|
+
de(e), V(null);
|
|
217
|
+
},
|
|
218
|
+
maxLength: 120
|
|
219
|
+
}),
|
|
220
|
+
/* @__PURE__ */ g(u, {
|
|
221
|
+
loading: U.loading || q.loading,
|
|
222
|
+
error: U.error ?? q.error
|
|
223
|
+
}),
|
|
224
|
+
/* @__PURE__ */ g(e, {
|
|
225
|
+
disabled: !U.data?.shipment || !Y || !q.data || Z,
|
|
226
|
+
onClick: () => {
|
|
227
|
+
let e = U.data?.shipment;
|
|
228
|
+
!e || !Y || (V({
|
|
229
|
+
context: {
|
|
230
|
+
shipmentId: e.id,
|
|
231
|
+
shipmentUpdatedAt: e.updatedAt,
|
|
232
|
+
cycleId: Y.id,
|
|
233
|
+
cycleVersion: Y.version,
|
|
234
|
+
containerId: Y.containerId
|
|
235
|
+
},
|
|
236
|
+
previous: X,
|
|
237
|
+
generation: crypto.randomUUID(),
|
|
238
|
+
pin: {
|
|
239
|
+
shipmentId: e.id,
|
|
240
|
+
cycleId: Y.id,
|
|
241
|
+
planReference: T.trim(),
|
|
242
|
+
expectedShipmentUpdatedAt: e.updatedAt,
|
|
243
|
+
expectedCycleVersion: Y.version,
|
|
244
|
+
expectedPreviousVersionId: X?.id ?? null,
|
|
245
|
+
expectedVersion: X?.version ?? 0
|
|
246
|
+
}
|
|
247
|
+
}), L(null));
|
|
248
|
+
},
|
|
249
|
+
children: "Review sources and start a new plan"
|
|
250
|
+
})
|
|
251
|
+
]
|
|
252
|
+
}),
|
|
253
|
+
B && /* @__PURE__ */ _(ce, { children: [
|
|
254
|
+
/* @__PURE__ */ g("p", { children: "Unsent fields are reset when you explicitly start another plan." }),
|
|
255
|
+
$ && /* @__PURE__ */ g("p", {
|
|
256
|
+
role: "alert",
|
|
257
|
+
children: "Source context changed. Review it again before recording."
|
|
258
|
+
}),
|
|
259
|
+
/* @__PURE__ */ g(re, {
|
|
260
|
+
pin: B.pin,
|
|
261
|
+
busy: Z || $ || U.loading || G.loading || q.loading || !!U.error || !!G.error || !!q.error,
|
|
262
|
+
onSave: async (e) => {
|
|
263
|
+
try {
|
|
264
|
+
await he(e);
|
|
265
|
+
} catch (e) {
|
|
266
|
+
throw L(e instanceof Error ? e.message : "Unable to save."), e;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}, B.generation)
|
|
270
|
+
] }),
|
|
271
|
+
I && /* @__PURE__ */ g("p", {
|
|
272
|
+
role: "alert",
|
|
273
|
+
children: I
|
|
274
|
+
})
|
|
275
|
+
]
|
|
276
|
+
}),
|
|
277
|
+
/* @__PURE__ */ _("section", {
|
|
278
|
+
className: d,
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ g("h2", {
|
|
281
|
+
className: "text-lg font-semibold",
|
|
282
|
+
children: "Plan history"
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ g(u, {
|
|
285
|
+
loading: K.loading,
|
|
286
|
+
error: K.error
|
|
287
|
+
}),
|
|
288
|
+
K.data?.mtwConsolidationPlanPage.items.map((t) => /* @__PURE__ */ _(e, {
|
|
289
|
+
variant: E === t.id ? "default" : "outline",
|
|
290
|
+
disabled: Z,
|
|
291
|
+
onClick: () => D(t.id),
|
|
292
|
+
children: [
|
|
293
|
+
t.planReference,
|
|
294
|
+
" · version ",
|
|
295
|
+
t.version,
|
|
296
|
+
" · ",
|
|
297
|
+
t.facts.hubName
|
|
298
|
+
]
|
|
299
|
+
}, t.id)),
|
|
300
|
+
/* @__PURE__ */ g(l, {
|
|
301
|
+
offset: N,
|
|
302
|
+
page: K.data?.mtwConsolidationPlanPage,
|
|
303
|
+
busy: Z,
|
|
304
|
+
onChange: P
|
|
305
|
+
}),
|
|
306
|
+
/* @__PURE__ */ g(u, {
|
|
307
|
+
loading: J.loading,
|
|
308
|
+
error: J.error
|
|
309
|
+
}),
|
|
310
|
+
J.data && /* @__PURE__ */ g(ne, { plan: J.data.mtwConsolidationPlan })
|
|
311
|
+
]
|
|
312
|
+
}),
|
|
313
|
+
J.data && /* @__PURE__ */ g(oe, {
|
|
314
|
+
plan: J.data.mtwConsolidationPlan,
|
|
315
|
+
actions: v
|
|
316
|
+
}, J.data.mtwConsolidationPlan.id)
|
|
317
|
+
]
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
//#endregion
|
|
321
|
+
export { v as ConsolidationPlanWorkbench };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Button as e } from "../ui.js";
|
|
2
|
+
import { consolidationInstant as t, consolidationQuantity as n, nullableText as r } from "../../utils/consolidationInput.js";
|
|
3
|
+
import { ProcedureField as i } from "../logistics-procedure/ProcedureFields.js";
|
|
4
|
+
import { ContainerEvidencePicker as a } from "../ContainerEvidencePicker.js";
|
|
5
|
+
import { useState as o } from "react";
|
|
6
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
//#region src/movethewheels/components/consolidation/ConsolidationReportForm.tsx
|
|
8
|
+
function u({ pin: u, lot: d, busy: f, onSave: p }) {
|
|
9
|
+
let [m, h] = o(""), [g, _] = o(""), [v, y] = o(""), [b, x] = o(""), [S, C] = o(""), [w, T] = o([]), [E, D] = o(null), O = u.kind === "ISSUE";
|
|
10
|
+
return /* @__PURE__ */ c("form", {
|
|
11
|
+
className: "space-y-3",
|
|
12
|
+
onSubmit: (e) => {
|
|
13
|
+
e.preventDefault(), !f && (D(null), (async () => {
|
|
14
|
+
if (!O && (w.length < 1 || w.length > 10)) throw Error("Choose one to ten evidence versions for this cumulative report.");
|
|
15
|
+
await p({
|
|
16
|
+
...u,
|
|
17
|
+
reportedQuantity: O ? null : n(m),
|
|
18
|
+
reportedObservedAt: g ? t(g) : null,
|
|
19
|
+
reason: v.trim(),
|
|
20
|
+
source: {
|
|
21
|
+
reference: r(b),
|
|
22
|
+
revision: r(S)
|
|
23
|
+
},
|
|
24
|
+
evidence: w.map(({ fileId: e, versionId: t }) => ({
|
|
25
|
+
fileId: e,
|
|
26
|
+
versionId: t
|
|
27
|
+
}))
|
|
28
|
+
});
|
|
29
|
+
})().catch((e) => D(e instanceof Error ? e.message : "Unable to record report.")));
|
|
30
|
+
},
|
|
31
|
+
children: /* @__PURE__ */ l("fieldset", {
|
|
32
|
+
disabled: f,
|
|
33
|
+
className: "space-y-3",
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ l("p", { children: [
|
|
36
|
+
d.supplierReference,
|
|
37
|
+
" · ",
|
|
38
|
+
d.lotReference,
|
|
39
|
+
" · ",
|
|
40
|
+
d.unitReference ?? "Unknown unit",
|
|
41
|
+
" (",
|
|
42
|
+
d.unitRevision ?? "Unknown revision",
|
|
43
|
+
")"
|
|
44
|
+
] }),
|
|
45
|
+
O ? /* @__PURE__ */ c("p", { children: "This is an unresolved reported issue. It contributes no quantity and does not resolve earlier issues." }) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("p", { children: "Enter the new cumulative total, not an additional increment. It replaces the previous total for this lot and report kind. Blank means unknown." }), /* @__PURE__ */ c(i, {
|
|
46
|
+
required: !1,
|
|
47
|
+
label: "Reported cumulative quantity",
|
|
48
|
+
value: m,
|
|
49
|
+
onChange: h
|
|
50
|
+
})] }),
|
|
51
|
+
/* @__PURE__ */ c(i, {
|
|
52
|
+
label: "Reason / reported discrepancy",
|
|
53
|
+
value: v,
|
|
54
|
+
maxLength: 2e3,
|
|
55
|
+
onChange: y
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ c(i, {
|
|
58
|
+
label: "Observed at (local time, optional)",
|
|
59
|
+
type: "datetime-local",
|
|
60
|
+
required: !1,
|
|
61
|
+
value: g,
|
|
62
|
+
onChange: _
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ c(i, {
|
|
65
|
+
label: "Report source reference",
|
|
66
|
+
required: !1,
|
|
67
|
+
value: b,
|
|
68
|
+
onChange: x
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ c(i, {
|
|
71
|
+
label: "Report source revision",
|
|
72
|
+
required: !1,
|
|
73
|
+
value: S,
|
|
74
|
+
onChange: C
|
|
75
|
+
}),
|
|
76
|
+
O ? /* @__PURE__ */ c("p", { children: "Urgent issues can be recorded without Files access. This form submits no file declarations for issues." }) : /* @__PURE__ */ c(a, {
|
|
77
|
+
value: w,
|
|
78
|
+
onChange: T,
|
|
79
|
+
description: "Exact source evidence is checked when recording. A report remains an unverified operator declaration."
|
|
80
|
+
}),
|
|
81
|
+
E && /* @__PURE__ */ c("p", {
|
|
82
|
+
role: "alert",
|
|
83
|
+
children: E
|
|
84
|
+
}),
|
|
85
|
+
/* @__PURE__ */ l(e, {
|
|
86
|
+
type: "submit",
|
|
87
|
+
children: ["Record ", O ? "unresolved issue" : "replacement total"]
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { u as ConsolidationReportForm };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { Button as e } from "../ui.js";
|
|
2
|
+
import { useConditionApi as t, useConditionQuery as n } from "../../hooks/useContainerCondition.js";
|
|
3
|
+
import { ConsolidationObservationDocument as r, ConsolidationObservationsDocument as i, RecordConsolidationObservationDocument as a } from "../../src/generated/consolidation-operations.js";
|
|
4
|
+
import { ReusePager as o, ReuseState as s, reuseCard as c, reuseSelect as l } from "../ReuseControls.js";
|
|
5
|
+
import { ProcedureField as u } from "../logistics-procedure/ProcedureFields.js";
|
|
6
|
+
import { ConsolidationReportHistory as d } from "./ConsolidationHistory.js";
|
|
7
|
+
import { ConsolidationReportForm as f } from "./ConsolidationReportForm.js";
|
|
8
|
+
import { assertConsolidationPredecessor as p } from "../../utils/consolidationPins.js";
|
|
9
|
+
import { ConsolidationManifestWorkbench as m } from "./ConsolidationManifestWorkbench.js";
|
|
10
|
+
import { findConsolidationReportHead as h } from "../../utils/consolidationReportHead.js";
|
|
11
|
+
import { useEffect as g, useRef as _, useState as v } from "react";
|
|
12
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
13
|
+
//#region src/movethewheels/components/consolidation/ConsolidationReportsWorkbench.tsx
|
|
14
|
+
function S({ plan: S, actions: C }) {
|
|
15
|
+
let w = t(), T = _(!0);
|
|
16
|
+
g(() => (T.current = !0, () => {
|
|
17
|
+
T.current = !1;
|
|
18
|
+
}), []);
|
|
19
|
+
let [E, D] = v(""), [O, k] = v("RECEIPT_REPORT"), [A, j] = v(""), [M, N] = v(0), [P, F] = v(""), [I, L] = v(!1), [R, z] = v(null), [B, V] = v(null), H = n(i, {
|
|
20
|
+
planId: S.id,
|
|
21
|
+
pagination: {
|
|
22
|
+
limit: 10,
|
|
23
|
+
offset: M
|
|
24
|
+
}
|
|
25
|
+
}, C.revision), U = n(r, P ? {
|
|
26
|
+
planId: S.id,
|
|
27
|
+
id: P
|
|
28
|
+
} : null, C.revision), W = Object.fromEntries(S.facts.lots.map((e) => [e.id, `${e.supplierReference} · ${e.lotReference} · ${e.unitReference ?? "Unknown unit"}`])), G = S.facts.lots.find((e) => e.id === E), K = I || C.busy || C.uncertain, q = async () => {
|
|
29
|
+
if (!(!G || K)) {
|
|
30
|
+
L(!0), z(null);
|
|
31
|
+
try {
|
|
32
|
+
let e = O === "ISSUE" ? null : await h(w, S.id, G.id, O);
|
|
33
|
+
if (!T.current) return;
|
|
34
|
+
V({
|
|
35
|
+
head: e,
|
|
36
|
+
generation: crypto.randomUUID(),
|
|
37
|
+
pin: {
|
|
38
|
+
planId: S.id,
|
|
39
|
+
lotId: G.id,
|
|
40
|
+
kind: O,
|
|
41
|
+
issueReference: O === "ISSUE" ? A.trim() : null,
|
|
42
|
+
expectedPreviousVersionId: e?.id ?? null,
|
|
43
|
+
expectedVersion: e?.version ?? 0,
|
|
44
|
+
unitReference: G.unitReference ?? null,
|
|
45
|
+
unitRevision: G.unitRevision ?? null
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
} catch (e) {
|
|
49
|
+
z(e instanceof Error ? e.message : "Unable to review history.");
|
|
50
|
+
} finally {
|
|
51
|
+
L(!1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}, J = async (e) => {
|
|
55
|
+
if (!B || K) throw Error("Review the current report chain first.");
|
|
56
|
+
L(!0);
|
|
57
|
+
try {
|
|
58
|
+
let t = B.pin.kind === "ISSUE" ? null : await h(w, S.id, B.pin.lotId, B.pin.kind);
|
|
59
|
+
if (!T.current) throw Error("Context changed. Nothing was sent.");
|
|
60
|
+
p(B.head, t), await C.run(a, { ...e }, "Reported observation recorded.") && (V(null), N(0));
|
|
61
|
+
} finally {
|
|
62
|
+
L(!1);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
return /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("section", {
|
|
66
|
+
className: c,
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ b("h2", {
|
|
69
|
+
className: "text-lg font-semibold",
|
|
70
|
+
children: "Record a cumulative total or issue"
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ x("fieldset", {
|
|
73
|
+
disabled: K,
|
|
74
|
+
className: "space-y-3",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ x("label", {
|
|
77
|
+
className: "block",
|
|
78
|
+
children: ["Supplier lot", /* @__PURE__ */ x("select", {
|
|
79
|
+
className: l,
|
|
80
|
+
value: E,
|
|
81
|
+
onChange: (e) => {
|
|
82
|
+
D(e.target.value), V(null);
|
|
83
|
+
},
|
|
84
|
+
children: [/* @__PURE__ */ b("option", {
|
|
85
|
+
value: "",
|
|
86
|
+
children: "Choose a captured lot"
|
|
87
|
+
}), S.facts.lots.map((e) => /* @__PURE__ */ b("option", {
|
|
88
|
+
value: e.id,
|
|
89
|
+
children: W[e.id]
|
|
90
|
+
}, e.id))]
|
|
91
|
+
})]
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ x("label", {
|
|
94
|
+
className: "block",
|
|
95
|
+
children: ["Report kind", /* @__PURE__ */ x("select", {
|
|
96
|
+
className: l,
|
|
97
|
+
value: O,
|
|
98
|
+
onChange: (e) => {
|
|
99
|
+
k(e.target.value === "ISSUE" ? "ISSUE" : e.target.value === "STUFFING_REPORT" ? "STUFFING_REPORT" : "RECEIPT_REPORT"), V(null);
|
|
100
|
+
},
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ b("option", {
|
|
103
|
+
value: "RECEIPT_REPORT",
|
|
104
|
+
children: "Cumulative receipt total"
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ b("option", {
|
|
107
|
+
value: "STUFFING_REPORT",
|
|
108
|
+
children: "Cumulative stuffing total"
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ b("option", {
|
|
111
|
+
value: "ISSUE",
|
|
112
|
+
children: "Unresolved reported issue"
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
})]
|
|
116
|
+
}),
|
|
117
|
+
O === "ISSUE" && /* @__PURE__ */ b(u, {
|
|
118
|
+
label: "Unique issue reference",
|
|
119
|
+
value: A,
|
|
120
|
+
onChange: (e) => {
|
|
121
|
+
j(e), V(null);
|
|
122
|
+
}
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ b(e, {
|
|
125
|
+
disabled: !G || K || O === "ISSUE" && !A.trim(),
|
|
126
|
+
onClick: () => void q(),
|
|
127
|
+
children: "Review current total and open form"
|
|
128
|
+
})
|
|
129
|
+
]
|
|
130
|
+
}),
|
|
131
|
+
B && G && /* @__PURE__ */ b(f, {
|
|
132
|
+
pin: B.pin,
|
|
133
|
+
lot: G,
|
|
134
|
+
busy: K,
|
|
135
|
+
onSave: async (e) => {
|
|
136
|
+
try {
|
|
137
|
+
await J(e);
|
|
138
|
+
} catch (e) {
|
|
139
|
+
throw z(e instanceof Error ? e.message : "Unable to record report."), e;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}, B.generation),
|
|
143
|
+
" ",
|
|
144
|
+
R && /* @__PURE__ */ b("p", {
|
|
145
|
+
role: "alert",
|
|
146
|
+
children: R
|
|
147
|
+
}),
|
|
148
|
+
/* @__PURE__ */ b(s, {
|
|
149
|
+
loading: H.loading,
|
|
150
|
+
error: H.error
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ b("div", {
|
|
153
|
+
className: "flex flex-wrap gap-2",
|
|
154
|
+
children: H.data?.mtwConsolidationObservationPage.items.map((t) => /* @__PURE__ */ x(e, {
|
|
155
|
+
variant: "outline",
|
|
156
|
+
disabled: K,
|
|
157
|
+
onClick: () => F(t.id),
|
|
158
|
+
children: [
|
|
159
|
+
"View ",
|
|
160
|
+
W[t.lotId],
|
|
161
|
+
" · report ",
|
|
162
|
+
t.receiptSequence
|
|
163
|
+
]
|
|
164
|
+
}, t.id))
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ b(d, {
|
|
167
|
+
rows: H.data?.mtwConsolidationObservationPage.items ?? [],
|
|
168
|
+
labels: W
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ b(o, {
|
|
171
|
+
offset: M,
|
|
172
|
+
page: H.data?.mtwConsolidationObservationPage,
|
|
173
|
+
busy: K,
|
|
174
|
+
onChange: N
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ b(s, {
|
|
177
|
+
loading: U.loading,
|
|
178
|
+
error: U.error
|
|
179
|
+
}),
|
|
180
|
+
U.data && /* @__PURE__ */ b("section", {
|
|
181
|
+
"aria-label": "Selected exact report",
|
|
182
|
+
children: /* @__PURE__ */ b(d, {
|
|
183
|
+
rows: [U.data.mtwConsolidationObservation],
|
|
184
|
+
labels: W
|
|
185
|
+
})
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
}), /* @__PURE__ */ b(m, {
|
|
189
|
+
plan: S,
|
|
190
|
+
actions: C,
|
|
191
|
+
labels: W
|
|
192
|
+
})] });
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
export { S as ConsolidationReportsWorkbench };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
//#region src/movethewheels/components/consolidation/ConsolidationSummary.tsx
|
|
3
|
+
function n({ snapshot: n, labels: r }) {
|
|
4
|
+
return /* @__PURE__ */ t("section", {
|
|
5
|
+
className: "space-y-3",
|
|
6
|
+
children: [
|
|
7
|
+
/* @__PURE__ */ e("h3", {
|
|
8
|
+
className: "font-semibold",
|
|
9
|
+
children: "Reported reconciliation"
|
|
10
|
+
}),
|
|
11
|
+
/* @__PURE__ */ t("p", { children: [
|
|
12
|
+
"Receipt sequence ",
|
|
13
|
+
n.observationSequence,
|
|
14
|
+
" · ",
|
|
15
|
+
n.unresolvedIssueCount,
|
|
16
|
+
" unresolved reported issues"
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ e("p", { children: "These comparisons do not reserve goods, confirm stuffing, establish fit or authorize customs or carrier acceptance." }),
|
|
19
|
+
n.rows.map((n) => /* @__PURE__ */ t("article", {
|
|
20
|
+
className: "min-w-0 space-y-2 rounded-lg border p-3",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ e("h4", {
|
|
23
|
+
className: "break-words font-medium",
|
|
24
|
+
children: r[n.lotId] ?? "Captured lot"
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ e("dl", {
|
|
27
|
+
className: "grid gap-2 sm:grid-cols-2",
|
|
28
|
+
children: [
|
|
29
|
+
"plannedQuantity",
|
|
30
|
+
"reportedAvailableQuantity",
|
|
31
|
+
"receivedQuantity",
|
|
32
|
+
"stuffedQuantity",
|
|
33
|
+
"availabilityDeficit",
|
|
34
|
+
"receiptDeficit",
|
|
35
|
+
"receiptExcess",
|
|
36
|
+
"stuffingExcess",
|
|
37
|
+
"receivedMinusStuffed"
|
|
38
|
+
].map((r) => /* @__PURE__ */ t("div", { children: [/* @__PURE__ */ e("dt", { children: {
|
|
39
|
+
plannedQuantity: "Planned",
|
|
40
|
+
reportedAvailableQuantity: "Reported available",
|
|
41
|
+
receivedQuantity: "Cumulative received report",
|
|
42
|
+
stuffedQuantity: "Cumulative stuffing report",
|
|
43
|
+
availabilityDeficit: "Availability shortfall",
|
|
44
|
+
receiptDeficit: "Receipt shortfall",
|
|
45
|
+
receiptExcess: "Receipt excess",
|
|
46
|
+
stuffingExcess: "Stuffing excess",
|
|
47
|
+
receivedMinusStuffed: "Received minus stuffed"
|
|
48
|
+
}[r] }), /* @__PURE__ */ e("dd", { children: n[r] ?? "Unknown" })] }, r))
|
|
49
|
+
}),
|
|
50
|
+
n.unknownReasons.length > 0 && /* @__PURE__ */ t("p", { children: [
|
|
51
|
+
"Missing facts:",
|
|
52
|
+
" ",
|
|
53
|
+
n.unknownReasons.map((e) => e.toLowerCase().replaceAll("_", " ")).join("; ")
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ t("details", { children: [/* @__PURE__ */ e("summary", { children: "Exact report references" }), /* @__PURE__ */ t("p", {
|
|
56
|
+
className: "break-all",
|
|
57
|
+
children: [
|
|
58
|
+
"Receipt: ",
|
|
59
|
+
n.receiptObservationId ?? "None",
|
|
60
|
+
"; stuffing:",
|
|
61
|
+
" ",
|
|
62
|
+
n.stuffingObservationId ?? "None"
|
|
63
|
+
]
|
|
64
|
+
})] })
|
|
65
|
+
]
|
|
66
|
+
}, n.lotId)),
|
|
67
|
+
n.reviewReasons.length > 0 && /* @__PURE__ */ t("p", { children: [
|
|
68
|
+
"Review:",
|
|
69
|
+
" ",
|
|
70
|
+
n.reviewReasons.map((e) => e.toLowerCase().replaceAll("_", " ")).join("; ")
|
|
71
|
+
] })
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { n as ConsolidationSummary };
|