@burdenoff/microfe-movethewheels 2026.930.5 → 2026.1010.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/useMultiModalShipments.js +1 -1
- 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 +20 -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/useMultiModalShipments.ts +2 -1
- 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,105 @@
|
|
|
1
|
+
import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
|
|
2
|
+
import { executeGraphQL as t } from "../utils/graphqlClient.js";
|
|
3
|
+
import { useCallback as n, useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
4
|
+
import { print as s } from "graphql";
|
|
5
|
+
//#region src/movethewheels/hooks/useContainerCondition.ts
|
|
6
|
+
function c(r = "RETRY_TRANSIENT") {
|
|
7
|
+
let { apiGatewayUrl: a, authToken: o, workspaceToken: c, workspaceId: l, tenantId: u, currentUser: d } = e(), f = i(() => ({
|
|
8
|
+
apiGatewayUrl: a,
|
|
9
|
+
authToken: o,
|
|
10
|
+
workspaceToken: c,
|
|
11
|
+
workspaceId: l,
|
|
12
|
+
tenantId: u,
|
|
13
|
+
actorId: d?.id
|
|
14
|
+
}), [
|
|
15
|
+
a,
|
|
16
|
+
o,
|
|
17
|
+
c,
|
|
18
|
+
l,
|
|
19
|
+
u,
|
|
20
|
+
d?.id
|
|
21
|
+
]);
|
|
22
|
+
return n((e, n) => t(f, s(e), n, r), [f, r]);
|
|
23
|
+
}
|
|
24
|
+
function l(e, t, n = 0) {
|
|
25
|
+
let i = c(), a = JSON.stringify(t), [s, l] = o(null);
|
|
26
|
+
r(() => {
|
|
27
|
+
let t = !0, r = {
|
|
28
|
+
request: i,
|
|
29
|
+
variablesKey: a,
|
|
30
|
+
revision: n
|
|
31
|
+
};
|
|
32
|
+
if (l({
|
|
33
|
+
...r,
|
|
34
|
+
data: null,
|
|
35
|
+
error: null,
|
|
36
|
+
loading: a !== "null"
|
|
37
|
+
}), a !== "null") return i(e, JSON.parse(a)).then((e) => {
|
|
38
|
+
t && l({
|
|
39
|
+
...r,
|
|
40
|
+
data: e,
|
|
41
|
+
error: null,
|
|
42
|
+
loading: !1
|
|
43
|
+
});
|
|
44
|
+
}).catch((e) => {
|
|
45
|
+
t && l({
|
|
46
|
+
...r,
|
|
47
|
+
data: null,
|
|
48
|
+
error: e instanceof Error ? e.message : "Unable to load these records.",
|
|
49
|
+
loading: !1
|
|
50
|
+
});
|
|
51
|
+
}), () => {
|
|
52
|
+
t = !1;
|
|
53
|
+
};
|
|
54
|
+
}, [
|
|
55
|
+
e,
|
|
56
|
+
a,
|
|
57
|
+
i,
|
|
58
|
+
n
|
|
59
|
+
]);
|
|
60
|
+
let u = s?.request === i && s.variablesKey === a && s.revision === n;
|
|
61
|
+
return {
|
|
62
|
+
data: u ? s.data : null,
|
|
63
|
+
error: u ? s.error : null,
|
|
64
|
+
loading: u ? s.loading : a !== "null"
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function u() {
|
|
68
|
+
let e = c(), t = a(/* @__PURE__ */ new Map()), [n, r] = o(!1), [i, l] = o(!1), [u, d] = o(null), [f, p] = o(null), [m, h] = o(0), g = async (n, i, a) => {
|
|
69
|
+
let o = Object.fromEntries(Object.entries(i).filter(([e]) => e !== "expectedVersion")), c = JSON.stringify({
|
|
70
|
+
operation: s(n),
|
|
71
|
+
input: o
|
|
72
|
+
}), u = t.current.get(c) ?? {
|
|
73
|
+
key: crypto.randomUUID(),
|
|
74
|
+
input: i
|
|
75
|
+
};
|
|
76
|
+
t.current.set(c, u), l(!0), d(null), p(null);
|
|
77
|
+
try {
|
|
78
|
+
let i = await e(n, { input: {
|
|
79
|
+
...u.input,
|
|
80
|
+
idempotencyKey: u.key
|
|
81
|
+
} });
|
|
82
|
+
return t.current.delete(c), r(t.current.size > 0), h((e) => e + 1), p(a), i;
|
|
83
|
+
} catch (e) {
|
|
84
|
+
return r(!0), d(e instanceof Error ? e.message : "Unable to save this record."), null;
|
|
85
|
+
} finally {
|
|
86
|
+
l(!1);
|
|
87
|
+
}
|
|
88
|
+
}, _ = () => {
|
|
89
|
+
d(null), p(null);
|
|
90
|
+
};
|
|
91
|
+
return {
|
|
92
|
+
run: g,
|
|
93
|
+
busy: i,
|
|
94
|
+
error: u,
|
|
95
|
+
notice: f,
|
|
96
|
+
revision: m,
|
|
97
|
+
resetFeedback: _,
|
|
98
|
+
hasPendingAttempt: n,
|
|
99
|
+
discardAttempt: () => {
|
|
100
|
+
t.current.clear(), r(!1), _();
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
export { u as useConditionAction, c as useConditionApi, l as useConditionQuery };
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
|
|
2
|
+
import { executeGraphQL as t } from "../utils/graphqlClient.js";
|
|
3
|
+
import { CloseContainerCycleDocument as n, ContainerCyclesDocument as r, ContainerEventsDocument as i, ContainerRegistryDocument as a, OpenContainerCycleDocument as ee, RecordContainerEventDocument as te, RegisterContainerDocument as ne } from "../src/generated/container-operations.js";
|
|
4
|
+
import { useCallback as re, useEffect as o, useMemo as s, useRef as ie, useState as c } from "react";
|
|
5
|
+
import { print as l } from "graphql";
|
|
6
|
+
//#region src/movethewheels/hooks/useContainerLifecycle.ts
|
|
7
|
+
var u = [
|
|
8
|
+
"DRY_20",
|
|
9
|
+
"DRY_40",
|
|
10
|
+
"HIGH_CUBE_40",
|
|
11
|
+
"REEFER_20",
|
|
12
|
+
"REEFER_40",
|
|
13
|
+
"OPEN_TOP",
|
|
14
|
+
"FLAT_RACK",
|
|
15
|
+
"TANK",
|
|
16
|
+
"OTHER"
|
|
17
|
+
], d = [
|
|
18
|
+
"GATE_OUT",
|
|
19
|
+
"LOADED",
|
|
20
|
+
"DISCHARGED",
|
|
21
|
+
"AVAILABLE_FOR_PICKUP",
|
|
22
|
+
"GATE_IN",
|
|
23
|
+
"DELIVERED",
|
|
24
|
+
"EMPTY_READY",
|
|
25
|
+
"RETURN_REQUESTED",
|
|
26
|
+
"EMPTY_RETURNED",
|
|
27
|
+
"RETURN_ACCEPTED",
|
|
28
|
+
"POSITION_UPDATE"
|
|
29
|
+
], f = 25;
|
|
30
|
+
function p(e) {
|
|
31
|
+
return e instanceof Error ? e.message : "The operation could not be completed.";
|
|
32
|
+
}
|
|
33
|
+
function m() {
|
|
34
|
+
let { apiGatewayUrl: u, authToken: d, workspaceToken: m, workspaceId: h, tenantId: g, currentUser: _ } = e(), v = s(() => ({
|
|
35
|
+
apiGatewayUrl: u,
|
|
36
|
+
authToken: d,
|
|
37
|
+
workspaceToken: m,
|
|
38
|
+
workspaceId: h,
|
|
39
|
+
tenantId: g,
|
|
40
|
+
actorId: _?.id
|
|
41
|
+
}), [
|
|
42
|
+
u,
|
|
43
|
+
d,
|
|
44
|
+
m,
|
|
45
|
+
h,
|
|
46
|
+
g,
|
|
47
|
+
_?.id
|
|
48
|
+
]), [ae, y] = c([]), [b, x] = c([]), [oe, S] = c([]), [se, C] = c(!1), [w, T] = c(!1), [ce, E] = c(!1), [D, O] = c(""), [k, A] = c(""), [j, M] = c(0), [N, P] = c(0), [F, I] = c(0), [L, R] = c(0), [z, B] = c(!1), [V, H] = c(!1), [U, W] = c(!1), [le, G] = c(null), [ue, K] = c(null), [q, J] = c(null);
|
|
49
|
+
o(() => {
|
|
50
|
+
let e = !1;
|
|
51
|
+
return B(!0), G(null), y([]), C(!1), t(v, l(a), { pagination: {
|
|
52
|
+
limit: f,
|
|
53
|
+
offset: j * f
|
|
54
|
+
} }).then((t) => {
|
|
55
|
+
e || (y(t.mtwContainerPage.items), C(t.mtwContainerPage.hasMore));
|
|
56
|
+
}).catch((t) => {
|
|
57
|
+
e || G(p(t));
|
|
58
|
+
}).finally(() => {
|
|
59
|
+
e || B(!1);
|
|
60
|
+
}), () => {
|
|
61
|
+
e = !0;
|
|
62
|
+
};
|
|
63
|
+
}, [
|
|
64
|
+
v,
|
|
65
|
+
j,
|
|
66
|
+
L
|
|
67
|
+
]), o(() => {
|
|
68
|
+
O(""), A(""), M(0), P(0), I(0);
|
|
69
|
+
}, [v]), o(() => {
|
|
70
|
+
let e = !1;
|
|
71
|
+
if (x([]), T(!1), K(null), !D) {
|
|
72
|
+
H(!1);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
return H(!0), t(v, l(r), {
|
|
76
|
+
containerId: D,
|
|
77
|
+
pagination: {
|
|
78
|
+
limit: f,
|
|
79
|
+
offset: N * f
|
|
80
|
+
}
|
|
81
|
+
}).then((t) => {
|
|
82
|
+
e || (x(t.mtwContainerCyclePage.items), T(t.mtwContainerCyclePage.hasMore));
|
|
83
|
+
}).catch((t) => {
|
|
84
|
+
e || K(p(t));
|
|
85
|
+
}).finally(() => {
|
|
86
|
+
e || H(!1);
|
|
87
|
+
}), () => {
|
|
88
|
+
e = !0;
|
|
89
|
+
};
|
|
90
|
+
}, [
|
|
91
|
+
v,
|
|
92
|
+
D,
|
|
93
|
+
N,
|
|
94
|
+
L
|
|
95
|
+
]), o(() => {
|
|
96
|
+
let e = !1;
|
|
97
|
+
if (S([]), E(!1), J(null), !k) {
|
|
98
|
+
W(!1);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
return W(!0), t(v, l(i), {
|
|
102
|
+
cycleId: k,
|
|
103
|
+
pagination: {
|
|
104
|
+
limit: f,
|
|
105
|
+
offset: F * f
|
|
106
|
+
}
|
|
107
|
+
}).then((t) => {
|
|
108
|
+
e || (S(t.mtwContainerEventPage.items), E(t.mtwContainerEventPage.hasMore));
|
|
109
|
+
}).catch((t) => {
|
|
110
|
+
e || J(p(t));
|
|
111
|
+
}).finally(() => {
|
|
112
|
+
e || W(!1);
|
|
113
|
+
}), () => {
|
|
114
|
+
e = !0;
|
|
115
|
+
};
|
|
116
|
+
}, [
|
|
117
|
+
v,
|
|
118
|
+
k,
|
|
119
|
+
F,
|
|
120
|
+
L
|
|
121
|
+
]);
|
|
122
|
+
let Y = re(() => R((e) => e + 1), []), X = ie(/* @__PURE__ */ new Map()), Z = (e, t) => {
|
|
123
|
+
let n = JSON.stringify(t), r = X.current.get(e);
|
|
124
|
+
if (r?.fingerprint === n) return r.key;
|
|
125
|
+
let i = crypto.randomUUID();
|
|
126
|
+
return X.current.set(e, {
|
|
127
|
+
fingerprint: n,
|
|
128
|
+
key: i
|
|
129
|
+
}), i;
|
|
130
|
+
}, Q = (e) => {
|
|
131
|
+
O(e), A(""), P(0), I(0);
|
|
132
|
+
}, $ = (e) => {
|
|
133
|
+
A(e), I(0);
|
|
134
|
+
};
|
|
135
|
+
return {
|
|
136
|
+
containers: ae,
|
|
137
|
+
cycles: b,
|
|
138
|
+
events: oe,
|
|
139
|
+
containerId: D,
|
|
140
|
+
cycleId: k,
|
|
141
|
+
loading: z,
|
|
142
|
+
cyclesLoading: V,
|
|
143
|
+
eventsLoading: U,
|
|
144
|
+
error: le,
|
|
145
|
+
cycleError: ue,
|
|
146
|
+
eventError: q,
|
|
147
|
+
page: j,
|
|
148
|
+
setPage: M,
|
|
149
|
+
cyclePage: N,
|
|
150
|
+
setCyclePage: P,
|
|
151
|
+
eventPage: F,
|
|
152
|
+
setEventPage: I,
|
|
153
|
+
hasMore: se,
|
|
154
|
+
hasMoreCycles: w,
|
|
155
|
+
hasMoreEvents: ce,
|
|
156
|
+
selectContainer: Q,
|
|
157
|
+
selectCycle: $,
|
|
158
|
+
refresh: Y,
|
|
159
|
+
register: async (e) => {
|
|
160
|
+
let n = await t(v, l(ne), { input: {
|
|
161
|
+
...e,
|
|
162
|
+
idempotencyKey: Z("register", e)
|
|
163
|
+
} });
|
|
164
|
+
X.current.delete("register"), M(0), Y(), Q(n.registerMtwContainer.id);
|
|
165
|
+
},
|
|
166
|
+
openCycle: async (e) => {
|
|
167
|
+
let n = await t(v, l(ee), { input: {
|
|
168
|
+
...e,
|
|
169
|
+
idempotencyKey: Z("open", e)
|
|
170
|
+
} });
|
|
171
|
+
X.current.delete("open"), P(0), Y(), $(n.openMtwContainerCycle.id);
|
|
172
|
+
},
|
|
173
|
+
recordEvent: async (e) => {
|
|
174
|
+
await t(v, l(te), { input: {
|
|
175
|
+
...e,
|
|
176
|
+
idempotencyKey: Z("record", e)
|
|
177
|
+
} }), X.current.delete("record"), I(0), Y();
|
|
178
|
+
},
|
|
179
|
+
closeCycle: async (e) => {
|
|
180
|
+
let r = {
|
|
181
|
+
cycleId: e.id,
|
|
182
|
+
expectedVersion: e.version
|
|
183
|
+
};
|
|
184
|
+
await t(v, l(n), { input: {
|
|
185
|
+
...r,
|
|
186
|
+
idempotencyKey: Z("close", r)
|
|
187
|
+
} }), X.current.delete("close"), Y();
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
export { d as CONTAINER_EVENT_TYPES, u as EQUIPMENT_TYPES, m as useContainerLifecycle };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useConditionApi as e } from "./useContainerCondition.js";
|
|
2
|
+
import { reuseAttempt as t } from "../utils/reuseAttempt.js";
|
|
3
|
+
import { useRef as n, useState as r } from "react";
|
|
4
|
+
import { print as i } from "graphql";
|
|
5
|
+
//#region src/movethewheels/hooks/useEmptyReuseAction.ts
|
|
6
|
+
function a() {
|
|
7
|
+
let a = e(), o = n(null), s = n(!1), [c, l] = r(!1), [u, d] = r(null), [f, p] = r(null), [m, h] = r(!1), [g, _] = r(0), v = async (e, n, r) => {
|
|
8
|
+
if (s.current) return null;
|
|
9
|
+
let c = t(o.current, i(e), n, () => crypto.randomUUID()), u = o.current === c ? o.current : {
|
|
10
|
+
...c,
|
|
11
|
+
document: e,
|
|
12
|
+
success: r
|
|
13
|
+
};
|
|
14
|
+
o.current = u, s.current = !0, l(!0), d(null), p(null);
|
|
15
|
+
try {
|
|
16
|
+
let t = await a(e, { input: {
|
|
17
|
+
...u.input,
|
|
18
|
+
idempotencyKey: u.key
|
|
19
|
+
} });
|
|
20
|
+
return o.current = null, h(!1), _((e) => e + 1), p(r), t;
|
|
21
|
+
} catch (e) {
|
|
22
|
+
return h(!0), d(e instanceof Error ? e.message : "Unable to save. Refresh history before retrying."), null;
|
|
23
|
+
} finally {
|
|
24
|
+
s.current = !1, l(!1);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
run: v,
|
|
29
|
+
retryOriginal: async () => {
|
|
30
|
+
let e = o.current;
|
|
31
|
+
e && await v(e.document, e.input, e.success);
|
|
32
|
+
},
|
|
33
|
+
busy: c,
|
|
34
|
+
error: u,
|
|
35
|
+
notice: f,
|
|
36
|
+
uncertain: m,
|
|
37
|
+
revision: g,
|
|
38
|
+
refresh: () => _((e) => e + 1),
|
|
39
|
+
discardAttempt: () => {
|
|
40
|
+
o.current = null, h(!1), d(null), p(null);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { a as useEmptyReuseAction };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
|
|
2
|
+
import { useConditionApi as t } from "./useContainerCondition.js";
|
|
3
|
+
import { reuseRecoveryContextKey as n, reuseRecoveryScope as r, sameReuseRecoveryScope as i } from "../utils/reuseRecovery.js";
|
|
4
|
+
import { matchesFreightAcknowledgement as a } from "../utils/freightAcknowledgement.js";
|
|
5
|
+
import { SaveFreightCostsDocument as o } from "../src/generated/freight-cost-operations.js";
|
|
6
|
+
import { FREIGHT_RECOVERY_STORAGE as s, decodeFreightRecovery as c, encodeFreightRecovery as l } from "../utils/freightRecovery.js";
|
|
7
|
+
import { useRef as u, useState as d } from "react";
|
|
8
|
+
import { print as f } from "graphql";
|
|
9
|
+
//#region src/movethewheels/hooks/useFreightRecoveryAction.ts
|
|
10
|
+
var p = [o];
|
|
11
|
+
function m() {
|
|
12
|
+
try {
|
|
13
|
+
let e = sessionStorage.getItem(s), t = c(e);
|
|
14
|
+
return {
|
|
15
|
+
attempt: t,
|
|
16
|
+
blocked: e !== null && t === null
|
|
17
|
+
};
|
|
18
|
+
} catch {
|
|
19
|
+
return {
|
|
20
|
+
attempt: null,
|
|
21
|
+
blocked: !0
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function h() {
|
|
26
|
+
let o = t("SINGLE_ATTEMPT"), h = e(), g = r(h.currentUser?.id, h.workspaceId, h.tenantId, h.apiGatewayUrl, h.workspaceToken), [_] = d(m), [v, y] = d(_.attempt), [b, x] = d(_.blocked), S = u(v), C = u(!1), [w, T] = d(!1), E = n(g), [D, O] = d({
|
|
27
|
+
scopeKey: E,
|
|
28
|
+
error: null,
|
|
29
|
+
notice: null
|
|
30
|
+
}), k = (e) => O({
|
|
31
|
+
scopeKey: E,
|
|
32
|
+
error: e,
|
|
33
|
+
notice: null
|
|
34
|
+
}), A = (e) => O({
|
|
35
|
+
scopeKey: E,
|
|
36
|
+
error: null,
|
|
37
|
+
notice: e
|
|
38
|
+
}), [j, M] = d(0), N = (e, t) => {
|
|
39
|
+
if (e) sessionStorage.setItem(s, l(e));
|
|
40
|
+
else {
|
|
41
|
+
let e = c(sessionStorage.getItem(s));
|
|
42
|
+
(!t || e?.key === t.key && i(e.scope, t.scope)) && sessionStorage.removeItem(s);
|
|
43
|
+
}
|
|
44
|
+
S.current = e, y(e), x(!1);
|
|
45
|
+
}, P = async (e) => {
|
|
46
|
+
if (C.current) return null;
|
|
47
|
+
if (!i(e.scope, g)) return k("Return to the original account, organization, workspace and project before retrying."), null;
|
|
48
|
+
let t = p.find((t) => f(t) === e.operation);
|
|
49
|
+
if (!t) return k("The saved operation changed. Check history before abandoning this attempt."), null;
|
|
50
|
+
C.current = !0, T(!0), k(null), A(null);
|
|
51
|
+
try {
|
|
52
|
+
let n = await o(t, { input: {
|
|
53
|
+
...e.input,
|
|
54
|
+
idempotencyKey: e.key
|
|
55
|
+
} });
|
|
56
|
+
if (!a(n, e.input)) throw Error("The save reply could not be confirmed. Keep the original request and check history.");
|
|
57
|
+
return N(null, e), M((e) => e + 1), A(e.success), n;
|
|
58
|
+
} catch (e) {
|
|
59
|
+
return k(e instanceof Error ? e.message : "Unable to save. Check history before retrying."), null;
|
|
60
|
+
} finally {
|
|
61
|
+
C.current = !1, T(!1);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return {
|
|
65
|
+
run: async (e, t, n) => {
|
|
66
|
+
if (C.current || S.current || b) return k("Resolve the original request before starting another."), null;
|
|
67
|
+
if (!g) return k("Wait for the current account and workspace session."), null;
|
|
68
|
+
let r = f(e);
|
|
69
|
+
if (!p.some((e) => f(e) === r)) return k("Unsupported freight operation."), null;
|
|
70
|
+
try {
|
|
71
|
+
if (sessionStorage.getItem("movethewheels.freight.unresolved.v1") !== null) return k("A saved request is unresolved. Reload this page and check history before starting another."), null;
|
|
72
|
+
} catch {
|
|
73
|
+
return k("This browser cannot retain the request safely. Nothing was sent."), null;
|
|
74
|
+
}
|
|
75
|
+
let i = {
|
|
76
|
+
version: 1,
|
|
77
|
+
scope: g,
|
|
78
|
+
operation: r,
|
|
79
|
+
input: structuredClone(t),
|
|
80
|
+
key: crypto.randomUUID(),
|
|
81
|
+
success: n
|
|
82
|
+
};
|
|
83
|
+
try {
|
|
84
|
+
N(i);
|
|
85
|
+
} catch {
|
|
86
|
+
return k("This browser cannot retain the request safely. Nothing was sent."), null;
|
|
87
|
+
}
|
|
88
|
+
return P(i);
|
|
89
|
+
},
|
|
90
|
+
retryOriginal: async () => {
|
|
91
|
+
S.current && await P(S.current);
|
|
92
|
+
},
|
|
93
|
+
discardAttempt: () => {
|
|
94
|
+
if (!C.current) try {
|
|
95
|
+
N(null), k(null), A(null);
|
|
96
|
+
} catch {
|
|
97
|
+
k("Unable to clear the saved attempt. Nothing was sent.");
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
refresh: () => M((e) => e + 1),
|
|
101
|
+
busy: w,
|
|
102
|
+
error: D.scopeKey === E ? D.error : null,
|
|
103
|
+
notice: D.scopeKey === E ? D.notice : null,
|
|
104
|
+
revision: j,
|
|
105
|
+
uncertain: v !== null || b,
|
|
106
|
+
recoveryInvalid: b,
|
|
107
|
+
canRetry: v !== null && i(v.scope, g),
|
|
108
|
+
originalContext: v?.scope ?? null,
|
|
109
|
+
originalHistoryTarget: v && i(v.scope, g) && typeof v.input.shipmentId == "string" && v.input.shipmentId.trim().length > 0 && v.input.shipmentId.length <= 200 && typeof v.input.estimateReference == "string" && v.input.estimateReference.trim().length > 0 && v.input.estimateReference.length <= 200 ? {
|
|
110
|
+
shipmentId: v.input.shipmentId,
|
|
111
|
+
estimateReference: v.input.estimateReference
|
|
112
|
+
} : null,
|
|
113
|
+
contextKey: E
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { h as useFreightRecoveryAction };
|
|
@@ -140,7 +140,7 @@ function h(e = {}) {
|
|
|
140
140
|
origin: e.origin,
|
|
141
141
|
destination: e.destination,
|
|
142
142
|
legs: e.legs.map(u)
|
|
143
|
-
} })).planMultiModalShipment);
|
|
143
|
+
} }, "SINGLE_ATTEMPT")).planMultiModalShipment);
|
|
144
144
|
return _((e) => [n, ...e]), y((e) => e + 1), n;
|
|
145
145
|
}, [h])
|
|
146
146
|
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
|
|
2
|
+
import { useConditionApi as t } from "./useContainerCondition.js";
|
|
3
|
+
import { reuseRecoveryContextKey as n, reuseRecoveryScope as r, sameReuseRecoveryScope as i } from "../utils/reuseRecovery.js";
|
|
4
|
+
import { procedureAcknowledgement as a } from "../utils/procedureInput.js";
|
|
5
|
+
import { PublishProcedureDocument as o, RecordProcedureDeviationDocument as s, RecordProcedureStepDocument as c, RevokeProcedureDeviationDocument as l, StartProcedureDocument as u } from "../src/generated/logistics-procedure-operations.js";
|
|
6
|
+
import { PROCEDURE_RECOVERY_STORAGE as d, decodeProcedureRecovery as f, encodeProcedureRecovery as p } from "../utils/procedureRecovery.js";
|
|
7
|
+
import { useRef as m, useState as h } from "react";
|
|
8
|
+
import { print as g } from "graphql";
|
|
9
|
+
//#region src/movethewheels/hooks/useProcedureAction.ts
|
|
10
|
+
var _ = [
|
|
11
|
+
o,
|
|
12
|
+
u,
|
|
13
|
+
c,
|
|
14
|
+
s,
|
|
15
|
+
l
|
|
16
|
+
];
|
|
17
|
+
function v() {
|
|
18
|
+
try {
|
|
19
|
+
let e = sessionStorage.getItem(d), t = f(e);
|
|
20
|
+
return {
|
|
21
|
+
attempt: t,
|
|
22
|
+
blocked: e !== null && t === null
|
|
23
|
+
};
|
|
24
|
+
} catch {
|
|
25
|
+
return {
|
|
26
|
+
attempt: null,
|
|
27
|
+
blocked: !0
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function y() {
|
|
32
|
+
let o = t("SINGLE_ATTEMPT"), s = e(), c = r(s.currentUser?.id, s.workspaceId, s.tenantId, s.apiGatewayUrl, s.workspaceToken), [l] = h(v), [u, y] = h(l.attempt), [b, x] = h(l.blocked), S = m(u), C = m(!1), [w, T] = h(!1), E = n(c), [D, O] = h({
|
|
33
|
+
scopeKey: E,
|
|
34
|
+
error: null,
|
|
35
|
+
notice: null
|
|
36
|
+
}), k = (e) => O({
|
|
37
|
+
scopeKey: E,
|
|
38
|
+
error: e,
|
|
39
|
+
notice: null
|
|
40
|
+
}), A = (e) => O({
|
|
41
|
+
scopeKey: E,
|
|
42
|
+
error: null,
|
|
43
|
+
notice: e
|
|
44
|
+
}), [j, M] = h(0), N = (e, t) => {
|
|
45
|
+
if (e) sessionStorage.setItem(d, p(e));
|
|
46
|
+
else {
|
|
47
|
+
let e = f(sessionStorage.getItem(d));
|
|
48
|
+
(!t || e?.key === t.key && i(e.scope, t.scope)) && sessionStorage.removeItem(d);
|
|
49
|
+
}
|
|
50
|
+
S.current = e, y(e), x(!1);
|
|
51
|
+
}, P = async (e) => {
|
|
52
|
+
if (C.current) return null;
|
|
53
|
+
if (!i(e.scope, c)) return k("Return to the original account, organization, workspace and project before retrying."), null;
|
|
54
|
+
let t = _.find((t) => g(t) === e.operation);
|
|
55
|
+
if (!t) return k("The saved operation changed. Check history before abandoning this attempt."), null;
|
|
56
|
+
C.current = !0, T(!0), k(null), A(null);
|
|
57
|
+
try {
|
|
58
|
+
let n = await o(t, { input: {
|
|
59
|
+
...e.input,
|
|
60
|
+
idempotencyKey: e.key
|
|
61
|
+
} });
|
|
62
|
+
if (!a(n, e.input, e.scope.actorId)) throw Error("The save reply could not be confirmed. Keep the original request and check history.");
|
|
63
|
+
return N(null, e), M((e) => e + 1), A(e.success), n;
|
|
64
|
+
} catch (e) {
|
|
65
|
+
return k(e instanceof Error ? e.message : "Unable to save. Check history before retrying."), null;
|
|
66
|
+
} finally {
|
|
67
|
+
C.current = !1, T(!1);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
return {
|
|
71
|
+
run: async (e, t, n) => {
|
|
72
|
+
if (C.current || S.current || b) return k("Resolve the original request before starting another."), null;
|
|
73
|
+
if (!c) return k("Wait for the current account and workspace session."), null;
|
|
74
|
+
let r = g(e);
|
|
75
|
+
if (!_.some((e) => g(e) === r)) return k("Unsupported procedure operation."), null;
|
|
76
|
+
try {
|
|
77
|
+
if (sessionStorage.getItem("movethewheels.procedure.unresolved.v1") !== null) return k("A saved request is unresolved. Reload this page and check history before starting another."), null;
|
|
78
|
+
} catch {
|
|
79
|
+
return k("This browser cannot retain the request safely. Nothing was sent."), null;
|
|
80
|
+
}
|
|
81
|
+
let i = {
|
|
82
|
+
version: 1,
|
|
83
|
+
scope: c,
|
|
84
|
+
operation: r,
|
|
85
|
+
input: structuredClone(t),
|
|
86
|
+
key: crypto.randomUUID(),
|
|
87
|
+
success: n
|
|
88
|
+
};
|
|
89
|
+
try {
|
|
90
|
+
N(i);
|
|
91
|
+
} catch {
|
|
92
|
+
return k("This browser cannot retain the request safely. Nothing was sent."), null;
|
|
93
|
+
}
|
|
94
|
+
return P(i);
|
|
95
|
+
},
|
|
96
|
+
retryOriginal: async () => {
|
|
97
|
+
S.current && await P(S.current);
|
|
98
|
+
},
|
|
99
|
+
discardAttempt: () => {
|
|
100
|
+
if (!C.current) try {
|
|
101
|
+
N(null), k(null), A(null);
|
|
102
|
+
} catch {
|
|
103
|
+
k("Unable to clear the saved attempt. Nothing was sent.");
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
refresh: () => M((e) => e + 1),
|
|
107
|
+
busy: w,
|
|
108
|
+
error: D.scopeKey === E ? D.error : null,
|
|
109
|
+
notice: D.scopeKey === E ? D.notice : null,
|
|
110
|
+
revision: j,
|
|
111
|
+
uncertain: u !== null || b,
|
|
112
|
+
recoveryInvalid: b,
|
|
113
|
+
canRetry: u !== null && i(u.scope, c),
|
|
114
|
+
originalContext: u?.scope ?? null,
|
|
115
|
+
contextKey: E
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export { y as useProcedureAction };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { useConditionQuery as e } from "./useContainerCondition.js";
|
|
2
|
+
import { ProcedureContainersDocument as t, ProcedureCyclesDocument as n, ProcedureProposalsDocument as r } from "../src/generated/logistics-procedure-operations.js";
|
|
3
|
+
import { useState as i } from "react";
|
|
4
|
+
//#region src/movethewheels/hooks/useProcedureSelection.ts
|
|
5
|
+
function a(a) {
|
|
6
|
+
let [o, s] = i(""), [c, l] = i(""), [u, d] = i(""), [f, p] = i(0), [m, h] = i(0), [g, _] = i(0), v = e(t, { pagination: {
|
|
7
|
+
limit: 25,
|
|
8
|
+
offset: f
|
|
9
|
+
} }, a), y = e(n, o ? {
|
|
10
|
+
containerId: o,
|
|
11
|
+
pagination: {
|
|
12
|
+
limit: 25,
|
|
13
|
+
offset: m
|
|
14
|
+
}
|
|
15
|
+
} : null, a), b = e(r, c ? {
|
|
16
|
+
cycleId: c,
|
|
17
|
+
pagination: {
|
|
18
|
+
limit: 25,
|
|
19
|
+
offset: g
|
|
20
|
+
}
|
|
21
|
+
} : null, a);
|
|
22
|
+
return {
|
|
23
|
+
containerId: o,
|
|
24
|
+
cycleId: c,
|
|
25
|
+
proposalId: u,
|
|
26
|
+
containerOffset: f,
|
|
27
|
+
cycleOffset: m,
|
|
28
|
+
proposalOffset: g,
|
|
29
|
+
containers: v,
|
|
30
|
+
cycles: y,
|
|
31
|
+
proposals: b,
|
|
32
|
+
cycle: y.data?.mtwContainerCyclePage.items.find((e) => e.id === c) ?? null,
|
|
33
|
+
proposal: b.data?.mtwReuseProposalPage.items.find((e) => e.id === u) ?? null,
|
|
34
|
+
selectContainer: (e) => {
|
|
35
|
+
s(e), l(""), d(""), h(0), _(0);
|
|
36
|
+
},
|
|
37
|
+
selectCycle: (e) => {
|
|
38
|
+
l(e), d(""), _(0);
|
|
39
|
+
},
|
|
40
|
+
selectProposal: d,
|
|
41
|
+
pageContainers: (e) => {
|
|
42
|
+
p(e), s(""), l(""), d("");
|
|
43
|
+
},
|
|
44
|
+
pageCycles: (e) => {
|
|
45
|
+
h(e), l(""), d("");
|
|
46
|
+
},
|
|
47
|
+
pageProposals: (e) => {
|
|
48
|
+
_(e), d("");
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { a as useProcedureSelection };
|