@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,236 @@
|
|
|
1
|
+
import { ClipboardList as e } from "../node_modules/lucide-react/dist/esm/icons/clipboard-list.js";
|
|
2
|
+
import { useMoveTheWheels as t } from "../providers/MoveTheWheelsProvider.js";
|
|
3
|
+
import { Button as n } from "../components/ui.js";
|
|
4
|
+
import { PageLayout as r } from "../components/PageLayout.js";
|
|
5
|
+
import { useConditionApi as i, useConditionQuery as a } from "../hooks/useContainerCondition.js";
|
|
6
|
+
import { PinnedSelect as o, ReusePager as s, ReuseState as c, reuseCard as l } from "../components/ReuseControls.js";
|
|
7
|
+
import { useEmptyReuseAction as u } from "../hooks/useEmptyReuseAction.js";
|
|
8
|
+
import { inputForStockDraft as d, stockContextLabel as f, stockContextMatches as p, stockDraftPin as m } from "../utils/stockBindingForm.js";
|
|
9
|
+
import { StockAssessmentDraft as h } from "../components/stock-binding/StockAssessmentDraft.js";
|
|
10
|
+
import { StockAssessmentHistory as g } from "../components/stock-binding/StockAssessmentHistory.js";
|
|
11
|
+
import { RecordStockBindingDocument as _, StockBindingContextDocument as v, StockBindingExactDocument as ee, StockBindingHistoryDocument as y, StockBindingInventoryDocument as b } from "../src/generated/stock-binding-operations.js";
|
|
12
|
+
import { useRef as x, useState as S } from "react";
|
|
13
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
|
+
//#region src/movethewheels/pages/StockBindingPage.tsx
|
|
15
|
+
function E() {
|
|
16
|
+
let { workspaceId: n, tenantId: i, currentUser: a, apiGatewayUrl: o } = t();
|
|
17
|
+
return /* @__PURE__ */ w(r, {
|
|
18
|
+
title: "Inventory source assessments",
|
|
19
|
+
subtitle: "Recorded units, item labels and lot facts.",
|
|
20
|
+
icon: /* @__PURE__ */ w(e, { "aria-hidden": "true" }),
|
|
21
|
+
children: /* @__PURE__ */ w(D, {}, `${n}:${i}:${a?.id}:${o}`)
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function D() {
|
|
25
|
+
let [e, t] = S(0), [r, E] = S(0), [D, O] = S(null), [k, A] = S(null), [j, M] = S(!1), [N, P] = S(null), [F, I] = S(null), [L, R] = S(!1), z = x(!1), [B, V] = S(null), H = i(), U = u(), W = a(b, { pagination: {
|
|
26
|
+
limit: 25,
|
|
27
|
+
offset: e
|
|
28
|
+
} }, U.revision), G = a(v, D ? { id: D.id } : null, U.revision), K = a(y, D ? {
|
|
29
|
+
inventoryItemId: D.id,
|
|
30
|
+
pagination: {
|
|
31
|
+
limit: 1,
|
|
32
|
+
offset: 0
|
|
33
|
+
}
|
|
34
|
+
} : null, U.revision), q = a(y, D ? {
|
|
35
|
+
inventoryItemId: D.id,
|
|
36
|
+
pagination: {
|
|
37
|
+
limit: 25,
|
|
38
|
+
offset: r
|
|
39
|
+
}
|
|
40
|
+
} : null, U.revision), J = a(ee, D && F ? {
|
|
41
|
+
inventoryItemId: D.id,
|
|
42
|
+
id: F
|
|
43
|
+
} : null, U.revision), Y = G.data?.inventoryItem, X = K.data?.mtwStockBindingAssessmentPage.items[0] ?? null, Z = !!Y && !!K.data && (!K.data.mtwStockBindingAssessmentPage.total || !!X), Q = U.busy || L, te = !!k && !!G.data && !!K.data && !p(k, Y, X), $ = W.data?.inventoryItems.map((e) => ({
|
|
44
|
+
id: e.id,
|
|
45
|
+
label: f(e)
|
|
46
|
+
})) ?? [];
|
|
47
|
+
D && !$.some((e) => e.id === D.id) && $.unshift({
|
|
48
|
+
...D,
|
|
49
|
+
label: `${D.label} — selected outside this page`
|
|
50
|
+
});
|
|
51
|
+
let ne = W.data ? {
|
|
52
|
+
total: W.data.inventoryItemsCount,
|
|
53
|
+
limit: 25,
|
|
54
|
+
offset: e,
|
|
55
|
+
hasMore: e + W.data.inventoryItems.length < W.data.inventoryItemsCount,
|
|
56
|
+
nextOffset: e + 25
|
|
57
|
+
} : void 0, re = async (e) => {
|
|
58
|
+
if (z.current) return;
|
|
59
|
+
if (!k || U.uncertain) throw Error("Review a new draft context or resolve the original uncertain request first.");
|
|
60
|
+
let t = k;
|
|
61
|
+
z.current = !0, R(!0), V(null);
|
|
62
|
+
try {
|
|
63
|
+
let n = await H(v, { id: t.inventoryItemId }), r = (await H(y, {
|
|
64
|
+
inventoryItemId: t.inventoryItemId,
|
|
65
|
+
pagination: {
|
|
66
|
+
limit: 1,
|
|
67
|
+
offset: 0
|
|
68
|
+
}
|
|
69
|
+
})).mtwStockBindingAssessmentPage;
|
|
70
|
+
if (r.total > 0 && !r.items[0]) throw Error("Last recorded assessment is unavailable.");
|
|
71
|
+
let i = r.items[0] ?? null;
|
|
72
|
+
p(t, n.inventoryItem, i) || M(!0);
|
|
73
|
+
let a = d(e, t, n.inventoryItem, i), o = await U.run(_, a, "Reported facts recorded.");
|
|
74
|
+
o && (P(o.recordMtwStockBindingAssessment), I(null), E(0), A(null));
|
|
75
|
+
} catch (e) {
|
|
76
|
+
throw V(e instanceof Error ? e.message : "Unable to verify the captured inventory context."), e;
|
|
77
|
+
} finally {
|
|
78
|
+
z.current = !1, R(!1);
|
|
79
|
+
}
|
|
80
|
+
}, ie = () => {
|
|
81
|
+
if (!(!Z || !Y)) try {
|
|
82
|
+
A({
|
|
83
|
+
...m(Y, X),
|
|
84
|
+
generation: crypto.randomUUID()
|
|
85
|
+
}), M(!1), V(null);
|
|
86
|
+
} catch (e) {
|
|
87
|
+
V(e instanceof Error ? e.message : "Current context is unavailable.");
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return /* @__PURE__ */ T("div", {
|
|
91
|
+
className: "min-w-0 space-y-6 break-words",
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ w("p", {
|
|
94
|
+
className: "rounded border p-4 text-sm",
|
|
95
|
+
children: "Record the units, labels and lot facts reported for this stock line. Review any missing facts before planning a pick. This page records source history; picking remains a separate workflow."
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ T("section", {
|
|
98
|
+
className: l,
|
|
99
|
+
"aria-label": "Choose current inventory context",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ w("h2", {
|
|
102
|
+
className: "text-lg font-semibold",
|
|
103
|
+
children: "Inventory line and current owners"
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ w(o, {
|
|
106
|
+
label: "Warehouse / cargo SKU / bin",
|
|
107
|
+
value: D?.id ?? "",
|
|
108
|
+
disabled: Q || U.uncertain,
|
|
109
|
+
options: $,
|
|
110
|
+
onChange: (e) => {
|
|
111
|
+
let t = W.data?.inventoryItems.find((t) => t.id === e);
|
|
112
|
+
O(t ? {
|
|
113
|
+
id: t.id,
|
|
114
|
+
label: f(t)
|
|
115
|
+
} : null), A(null), M(!1), P(null), I(null), E(0), V(null), U.discardAttempt();
|
|
116
|
+
}
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ w(c, { ...W }),
|
|
119
|
+
/* @__PURE__ */ w(s, {
|
|
120
|
+
page: ne,
|
|
121
|
+
offset: e,
|
|
122
|
+
onChange: t,
|
|
123
|
+
busy: Q || W.loading
|
|
124
|
+
}),
|
|
125
|
+
/* @__PURE__ */ w(c, { ...G }),
|
|
126
|
+
/* @__PURE__ */ w(c, { ...K }),
|
|
127
|
+
Y && /* @__PURE__ */ T("div", {
|
|
128
|
+
className: "space-y-2",
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ T("p", { children: [
|
|
131
|
+
f(Y),
|
|
132
|
+
". Warehouse status ",
|
|
133
|
+
Y.warehouse?.status ?? "UNKNOWN",
|
|
134
|
+
"; bin status",
|
|
135
|
+
" ",
|
|
136
|
+
Y.locationId === null ? "Unbinned" : Y.location?.status ?? "Unavailable",
|
|
137
|
+
"."
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ T("p", { children: [
|
|
140
|
+
"Current balance: on hand ",
|
|
141
|
+
Y.onHand,
|
|
142
|
+
", available ",
|
|
143
|
+
Y.available,
|
|
144
|
+
", allocated",
|
|
145
|
+
" ",
|
|
146
|
+
Y.allocated,
|
|
147
|
+
", damaged ",
|
|
148
|
+
Y.damaged,
|
|
149
|
+
"."
|
|
150
|
+
] }),
|
|
151
|
+
/* @__PURE__ */ T("p", { children: [
|
|
152
|
+
"Last recorded assessment",
|
|
153
|
+
" ",
|
|
154
|
+
X ? `version ${X.version}, effective ${X.effectiveAt}` : "none",
|
|
155
|
+
". Future effective dates stay in recorded order."
|
|
156
|
+
] })
|
|
157
|
+
]
|
|
158
|
+
}),
|
|
159
|
+
D && !Y && !G.loading && /* @__PURE__ */ w("p", { children: "This stock line is unavailable for new facts. You can still read its recorded history." }),
|
|
160
|
+
/* @__PURE__ */ w(n, {
|
|
161
|
+
type: "button",
|
|
162
|
+
variant: "outline",
|
|
163
|
+
disabled: Q,
|
|
164
|
+
onClick: () => {
|
|
165
|
+
M(!1), V(null), U.refresh();
|
|
166
|
+
},
|
|
167
|
+
children: "Refresh current context and history"
|
|
168
|
+
})
|
|
169
|
+
]
|
|
170
|
+
}),
|
|
171
|
+
D && /* @__PURE__ */ T(C, { children: [
|
|
172
|
+
/* @__PURE__ */ w(h, {
|
|
173
|
+
pin: k,
|
|
174
|
+
mismatch: j || te,
|
|
175
|
+
uncertain: U.uncertain,
|
|
176
|
+
startDisabled: Q || U.uncertain || j || G.loading || K.loading || !Z,
|
|
177
|
+
formDisabled: Q || U.uncertain || G.loading || K.loading || !Z,
|
|
178
|
+
onStart: ie,
|
|
179
|
+
onSubmit: re
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ w(g, {
|
|
182
|
+
current: G.loading || G.error ? null : Y,
|
|
183
|
+
query: q,
|
|
184
|
+
offset: r,
|
|
185
|
+
onPage: E,
|
|
186
|
+
busy: Q,
|
|
187
|
+
selected: F ? J.data?.mtwStockBindingAssessment ?? null : N,
|
|
188
|
+
onSelect: (e) => {
|
|
189
|
+
P(null), I(e.id);
|
|
190
|
+
}
|
|
191
|
+
}),
|
|
192
|
+
F && /* @__PURE__ */ w(c, { ...J })
|
|
193
|
+
] }),
|
|
194
|
+
B && /* @__PURE__ */ w("p", {
|
|
195
|
+
role: "alert",
|
|
196
|
+
children: B
|
|
197
|
+
}),
|
|
198
|
+
U.error && /* @__PURE__ */ w("p", {
|
|
199
|
+
role: "alert",
|
|
200
|
+
children: U.error
|
|
201
|
+
}),
|
|
202
|
+
U.notice && /* @__PURE__ */ w("p", {
|
|
203
|
+
role: "status",
|
|
204
|
+
children: U.notice
|
|
205
|
+
}),
|
|
206
|
+
U.uncertain && /* @__PURE__ */ T("div", {
|
|
207
|
+
className: "space-y-3 rounded border p-4",
|
|
208
|
+
children: [
|
|
209
|
+
/* @__PURE__ */ w("p", { children: "Check refreshed history first. Retry sends the same submitted facts for the original stock line. This retry is available until you leave or reload this page." }),
|
|
210
|
+
/* @__PURE__ */ w(n, {
|
|
211
|
+
type: "button",
|
|
212
|
+
variant: "outline",
|
|
213
|
+
disabled: Q,
|
|
214
|
+
onClick: U.refresh,
|
|
215
|
+
children: "Refresh assessment history"
|
|
216
|
+
}),
|
|
217
|
+
/* @__PURE__ */ w(n, {
|
|
218
|
+
type: "button",
|
|
219
|
+
disabled: Q,
|
|
220
|
+
onClick: U.retryOriginal,
|
|
221
|
+
children: "Retry original request"
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ w(n, {
|
|
224
|
+
type: "button",
|
|
225
|
+
variant: "outline",
|
|
226
|
+
disabled: Q,
|
|
227
|
+
onClick: U.discardAttempt,
|
|
228
|
+
children: "Discard retry after checking history"
|
|
229
|
+
})
|
|
230
|
+
]
|
|
231
|
+
})
|
|
232
|
+
]
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
//#endregion
|
|
236
|
+
export { E as default };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { ClipboardList as e } from "../node_modules/lucide-react/dist/esm/icons/clipboard-list.js";
|
|
2
|
+
import { useMoveTheWheels as t } from "../providers/MoveTheWheelsProvider.js";
|
|
3
|
+
import { Button as n, Input as r } from "../components/ui.js";
|
|
4
|
+
import { PageLayout as i } from "../components/PageLayout.js";
|
|
5
|
+
import { useConditionQuery as a } from "../hooks/useContainerCondition.js";
|
|
6
|
+
import { PinnedSelect as o, ReusePager as s, ReuseState as c, reuseCard as l } from "../components/ReuseControls.js";
|
|
7
|
+
import { useEmptyReuseAction as u } from "../hooks/useEmptyReuseAction.js";
|
|
8
|
+
import { StockIssueForm as d } from "../components/stock-observation/StockIssueForm.js";
|
|
9
|
+
import { ObservationInventoryDocument as f, RecordStockIssueDocument as p } from "../src/generated/stock-observation-operations.js";
|
|
10
|
+
import { StockIssueReadPanel as m } from "../components/stock-observation/StockIssueReadPanel.js";
|
|
11
|
+
import { useState as h } from "react";
|
|
12
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
13
|
+
//#region src/movethewheels/pages/StockObservationsPage.tsx
|
|
14
|
+
function v() {
|
|
15
|
+
let { workspaceId: n, tenantId: r, currentUser: a, apiGatewayUrl: o } = t();
|
|
16
|
+
return /* @__PURE__ */ _(i, {
|
|
17
|
+
title: "Reported stock issues",
|
|
18
|
+
subtitle: "Record an unresolved operational observation.",
|
|
19
|
+
icon: /* @__PURE__ */ g(e, { "aria-hidden": "true" }),
|
|
20
|
+
children: [/* @__PURE__ */ g("p", {
|
|
21
|
+
className: "mb-4 text-sm",
|
|
22
|
+
children: "Changing workspace or user clears this draft. Check recorded history before starting again."
|
|
23
|
+
}), /* @__PURE__ */ g(y, {}, `${n}:${r}:${a?.id}:${o}`)]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function y() {
|
|
27
|
+
let e = u(), [t, i] = h(0), [v, y] = h(null), [b, x] = h(""), [S, C] = h(0), w = a(f, { pagination: {
|
|
28
|
+
limit: 25,
|
|
29
|
+
offset: t
|
|
30
|
+
} }, e.revision), T = e.busy || e.uncertain, E = w.data?.inventoryItems.map((e) => ({
|
|
31
|
+
id: e.id,
|
|
32
|
+
label: `${e.cargoItem?.name ?? "Item name not recorded"} · ${e.cargoItem?.sku ?? "SKU not recorded"} · ${e.warehouse?.name ?? "Warehouse not recorded"} · ${e.location?.locationCode ?? "No bin"} · line ${e.id}`
|
|
33
|
+
})) ?? [];
|
|
34
|
+
v && !E.some((e) => e.id === v.id) && E.unshift(v);
|
|
35
|
+
let D = (e) => {
|
|
36
|
+
if (T) return;
|
|
37
|
+
let t = E.find((t) => t.id === e);
|
|
38
|
+
y(e ? t ?? {
|
|
39
|
+
id: e,
|
|
40
|
+
label: `Known inventory line ${e}`
|
|
41
|
+
} : null), C((e) => e + 1);
|
|
42
|
+
}, O = async (t) => {
|
|
43
|
+
!v || t.inventoryItemId !== v.id || T || await e.run(p, { ...t }, "Unresolved issue recorded.") && C((e) => e + 1);
|
|
44
|
+
}, k = w.data ? {
|
|
45
|
+
total: w.data.inventoryItemsCount,
|
|
46
|
+
limit: 25,
|
|
47
|
+
offset: t,
|
|
48
|
+
hasMore: t + w.data.inventoryItems.length < w.data.inventoryItemsCount,
|
|
49
|
+
nextOffset: t + 25
|
|
50
|
+
} : void 0;
|
|
51
|
+
return /* @__PURE__ */ _("div", {
|
|
52
|
+
className: "space-y-5",
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ _("div", {
|
|
55
|
+
className: l,
|
|
56
|
+
children: [
|
|
57
|
+
/* @__PURE__ */ g("p", { children: "Reports do not change stock quantities or authorize picking. Unknown fields can remain blank, including while evidence services are unavailable." }),
|
|
58
|
+
/* @__PURE__ */ g(c, {
|
|
59
|
+
loading: w.loading,
|
|
60
|
+
error: w.error
|
|
61
|
+
}),
|
|
62
|
+
/* @__PURE__ */ g(o, {
|
|
63
|
+
label: "Inventory line",
|
|
64
|
+
value: v?.id ?? "",
|
|
65
|
+
options: E,
|
|
66
|
+
onChange: D,
|
|
67
|
+
disabled: T
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ g(s, {
|
|
70
|
+
page: k,
|
|
71
|
+
offset: t,
|
|
72
|
+
onChange: i,
|
|
73
|
+
busy: T
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ _("details", { children: [
|
|
76
|
+
/* @__PURE__ */ g("summary", { children: "Use a known inventory line reference" }),
|
|
77
|
+
/* @__PURE__ */ g("p", {
|
|
78
|
+
className: "text-sm",
|
|
79
|
+
children: "For an off-page or previously retired line, use its exact reference. This is not an archive browser."
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ _("label", { children: ["Exact inventory line reference", /* @__PURE__ */ g(r, {
|
|
82
|
+
value: b,
|
|
83
|
+
maxLength: 255,
|
|
84
|
+
disabled: T,
|
|
85
|
+
onChange: (e) => x(e.target.value)
|
|
86
|
+
})] }),
|
|
87
|
+
/* @__PURE__ */ g(n, {
|
|
88
|
+
type: "button",
|
|
89
|
+
variant: "outline",
|
|
90
|
+
disabled: T || !b.trim(),
|
|
91
|
+
onClick: () => D(b.trim()),
|
|
92
|
+
children: "Select known line"
|
|
93
|
+
})
|
|
94
|
+
] }),
|
|
95
|
+
v && /* @__PURE__ */ _("div", {
|
|
96
|
+
className: "text-sm space-y-1",
|
|
97
|
+
children: [/* @__PURE__ */ _("p", {
|
|
98
|
+
className: "break-words",
|
|
99
|
+
children: ["Selected: ", v.label]
|
|
100
|
+
}), /* @__PURE__ */ _("p", {
|
|
101
|
+
className: "break-all",
|
|
102
|
+
children: ["Exact inventory line reference: ", v.id]
|
|
103
|
+
})]
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
}),
|
|
107
|
+
v && /* @__PURE__ */ _("section", {
|
|
108
|
+
className: "space-y-4 rounded-xl border bg-bg-surface p-5",
|
|
109
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
110
|
+
className: "text-lg font-semibold",
|
|
111
|
+
children: "Report an issue"
|
|
112
|
+
}), /* @__PURE__ */ g(d, {
|
|
113
|
+
inventoryItemId: v.id,
|
|
114
|
+
disabled: T,
|
|
115
|
+
onSubmit: O
|
|
116
|
+
}, `${v.id}:${S}`)]
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ _("div", {
|
|
119
|
+
className: l,
|
|
120
|
+
children: [
|
|
121
|
+
e.error && /* @__PURE__ */ g("p", {
|
|
122
|
+
role: "alert",
|
|
123
|
+
children: e.error
|
|
124
|
+
}),
|
|
125
|
+
e.notice && /* @__PURE__ */ g("p", {
|
|
126
|
+
role: "status",
|
|
127
|
+
children: e.notice
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ g(n, {
|
|
130
|
+
type: "button",
|
|
131
|
+
variant: "outline",
|
|
132
|
+
disabled: e.busy,
|
|
133
|
+
onClick: e.refresh,
|
|
134
|
+
children: "Refresh history"
|
|
135
|
+
}),
|
|
136
|
+
e.uncertain && /* @__PURE__ */ _("div", {
|
|
137
|
+
className: "space-y-3",
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ g("p", { children: "The save result is uncertain. Check history, then retry the original request or explicitly abandon it before starting a different report." }),
|
|
140
|
+
/* @__PURE__ */ g(n, {
|
|
141
|
+
type: "button",
|
|
142
|
+
disabled: e.busy,
|
|
143
|
+
onClick: () => void e.retryOriginal(),
|
|
144
|
+
children: "Retry original request"
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ g(n, {
|
|
147
|
+
type: "button",
|
|
148
|
+
variant: "outline",
|
|
149
|
+
disabled: e.busy,
|
|
150
|
+
onClick: () => {
|
|
151
|
+
e.discardAttempt(), C((e) => e + 1);
|
|
152
|
+
},
|
|
153
|
+
children: "Abandon original request"
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
}),
|
|
159
|
+
v && /* @__PURE__ */ g(m, {
|
|
160
|
+
inventoryItemId: v.id,
|
|
161
|
+
revision: e.revision,
|
|
162
|
+
busy: e.busy
|
|
163
|
+
}, `${v.id}:${S}`)
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
export { v as default };
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Gauge as e } from "../node_modules/lucide-react/dist/esm/icons/gauge.js";
|
|
2
|
+
import { useMoveTheWheels as t } from "../providers/MoveTheWheelsProvider.js";
|
|
3
|
+
import { Button as n } from "../components/ui.js";
|
|
4
|
+
import { PageLayout as r } from "../components/PageLayout.js";
|
|
5
|
+
import { useConditionApi as i, useConditionQuery as a } from "../hooks/useContainerCondition.js";
|
|
6
|
+
import { PinnedSelect as o, ReusePager as s, ReuseState as c, reuseCard as l } from "../components/ReuseControls.js";
|
|
7
|
+
import { useEmptyReuseAction as u } from "../hooks/useEmptyReuseAction.js";
|
|
8
|
+
import { TripReportForm as d } from "../components/trip-utilization/TripReportForm.js";
|
|
9
|
+
import { TripReportHistory as f } from "../components/trip-utilization/TripReportHistory.js";
|
|
10
|
+
import { inputForTripDraft as p, tripContextStillMatches as m, tripRouteStillMatches as h } from "../utils/tripDraftContext.js";
|
|
11
|
+
import { RecordUtilizationReportDocument as g, UtilizationCurrentRouteDocument as _, UtilizationCurrentVehicleDocument as v, UtilizationReportsDocument as y, UtilizationRoutesDocument as b } from "../src/generated/trip-utilization-operations.js";
|
|
12
|
+
import { useRef as x, useState as S } from "react";
|
|
13
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
|
+
//#region src/movethewheels/pages/TripUtilizationPage.tsx
|
|
15
|
+
function E() {
|
|
16
|
+
let { workspaceId: n, tenantId: i, currentUser: a, apiGatewayUrl: o } = t();
|
|
17
|
+
return /* @__PURE__ */ w(r, {
|
|
18
|
+
title: "Reported trip utilization",
|
|
19
|
+
subtitle: "Measured or estimated segment facts, separate ratios and immutable source history.",
|
|
20
|
+
icon: /* @__PURE__ */ w(e, { "aria-hidden": "true" }),
|
|
21
|
+
children: /* @__PURE__ */ w(D, {}, `${n}:${i}:${a?.id}:${o}`)
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function D() {
|
|
25
|
+
let [e, t] = S(0), [r, E] = S(0), [D, O] = S(null), [k, A] = S(null), [j, M] = S(!1), [N, P] = S(null), F = x(!1), [I, L] = S(!1), [R, z] = S(null), B = u(), V = i(), H = a(b, { pagination: {
|
|
26
|
+
limit: 25,
|
|
27
|
+
offset: e
|
|
28
|
+
} }, B.revision), U = a(_, D ? { id: D.id } : null, B.revision), W = U.data?.route, G = a(y, D ? {
|
|
29
|
+
routeId: D.id,
|
|
30
|
+
pagination: {
|
|
31
|
+
limit: 25,
|
|
32
|
+
offset: r
|
|
33
|
+
}
|
|
34
|
+
} : null, B.revision), K = B.busy || I, q = H.data ? {
|
|
35
|
+
total: H.data.routesCount,
|
|
36
|
+
limit: 25,
|
|
37
|
+
offset: e,
|
|
38
|
+
hasMore: e + H.data.routes.length < H.data.routesCount,
|
|
39
|
+
nextOffset: e + 25
|
|
40
|
+
} : void 0, J = H.data?.routes.map((e) => ({
|
|
41
|
+
id: e.id,
|
|
42
|
+
label: `${e.name} — ${e.status} — ${e.vehicle?.vehicleNumber ?? "No assigned vehicle"}`
|
|
43
|
+
})) ?? [];
|
|
44
|
+
D && !J.some((e) => e.id === D.id) && J.unshift({
|
|
45
|
+
id: D.id,
|
|
46
|
+
label: `${W?.name ?? D.label} — selected outside this page`
|
|
47
|
+
});
|
|
48
|
+
let Y = !!k && !!U.data && !m(k, W, W?.vehicle), X = async (e) => {
|
|
49
|
+
if (F.current) return;
|
|
50
|
+
if (!k) throw Error("Review the displayed route and assigned vehicle before starting a report.");
|
|
51
|
+
let t = k;
|
|
52
|
+
F.current = !0, L(!0), z(null);
|
|
53
|
+
try {
|
|
54
|
+
let n = (await V(_, { id: t.routeId })).route;
|
|
55
|
+
if (!h(t, n)) throw M(!0), Error("The route or assigned vehicle changed since this draft began. Refresh context and review it before starting a new report. No measurements were rebound.");
|
|
56
|
+
let r = await V(v, { id: t.vehicleId });
|
|
57
|
+
m(t, n, r.vehicle) || M(!0);
|
|
58
|
+
let i = p(e, t, n, r.vehicle), a = await B.run(g, i, "Immutable operator report recorded; assignments and operational state unchanged.");
|
|
59
|
+
a && (P(a.recordMtwTripUtilizationReport), E(0));
|
|
60
|
+
} catch (e) {
|
|
61
|
+
throw z(e instanceof Error ? e.message : "Unable to verify the captured report context."), e;
|
|
62
|
+
} finally {
|
|
63
|
+
F.current = !1, L(!1);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ T("div", {
|
|
67
|
+
className: "min-w-0 space-y-6 break-words",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ w("p", {
|
|
70
|
+
className: "rounded border p-4 text-sm",
|
|
71
|
+
children: "These are operator-reported interval facts. COMPLETE coverage and measured/source labels are declarations, not independently certified whole-trip measurements. Ratios do not establish axle/road legality, physical packing, dispatch feasibility, fuel consumption or savings. This page does not assign work or start a route."
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ T("section", {
|
|
74
|
+
className: l,
|
|
75
|
+
"aria-label": "Choose route and current assigned vehicle",
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ w("h2", {
|
|
78
|
+
className: "text-lg font-semibold",
|
|
79
|
+
children: "Route and assigned vehicle"
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ w(o, {
|
|
82
|
+
label: "Route",
|
|
83
|
+
value: D?.id ?? "",
|
|
84
|
+
disabled: K || B.uncertain,
|
|
85
|
+
options: J,
|
|
86
|
+
onChange: (e) => {
|
|
87
|
+
let t = H.data?.routes.find((t) => t.id === e);
|
|
88
|
+
O(t ? {
|
|
89
|
+
id: t.id,
|
|
90
|
+
label: t.name
|
|
91
|
+
} : null), A(null), M(!1), P(null), E(0), z(null), B.discardAttempt();
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ w(c, { ...H }),
|
|
95
|
+
/* @__PURE__ */ w(s, {
|
|
96
|
+
page: q,
|
|
97
|
+
offset: e,
|
|
98
|
+
onChange: t,
|
|
99
|
+
busy: K || H.loading
|
|
100
|
+
}),
|
|
101
|
+
D && /* @__PURE__ */ T("p", { children: [
|
|
102
|
+
"Selected route ",
|
|
103
|
+
W?.name ?? D.label,
|
|
104
|
+
".",
|
|
105
|
+
" ",
|
|
106
|
+
W ? `Current status ${W.status}; revision ${W.updatedAt}.` : "Current record not loaded; new report blocked."
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ w(c, { ...U }),
|
|
109
|
+
W && /* @__PURE__ */ T("p", { children: [
|
|
110
|
+
"Currently assigned vehicle:",
|
|
111
|
+
" ",
|
|
112
|
+
W.vehicle ? `${W.vehicle.vehicleNumber}${W.vehicle.licensePlate ? ` (${W.vehicle.licensePlate})` : ""} — ${W.vehicle.type} — ${W.vehicle.status}; revision ${W.vehicle.updatedAt}` : "unavailable / unassigned",
|
|
113
|
+
". Assignment changes belong to the existing route workflow."
|
|
114
|
+
] }),
|
|
115
|
+
/* @__PURE__ */ w(n, {
|
|
116
|
+
type: "button",
|
|
117
|
+
variant: "outline",
|
|
118
|
+
disabled: K,
|
|
119
|
+
onClick: () => {
|
|
120
|
+
M(!1), z(null), B.refresh();
|
|
121
|
+
},
|
|
122
|
+
children: "Refresh current context and history"
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
}),
|
|
126
|
+
D && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("section", {
|
|
127
|
+
className: "space-y-4 rounded-xl border bg-bg-surface p-5",
|
|
128
|
+
"aria-label": "Record reported utilization",
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ w("h2", {
|
|
131
|
+
className: "text-lg font-semibold",
|
|
132
|
+
children: "Record interval facts"
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ w("p", {
|
|
135
|
+
className: "text-sm",
|
|
136
|
+
children: "Start a report only after reviewing the displayed route and assigned vehicle. The draft retains those identities and revisions. Fresh reads verify them; they do not substitute a new vehicle or retag entered measurements."
|
|
137
|
+
}),
|
|
138
|
+
k && /* @__PURE__ */ T("p", { children: [
|
|
139
|
+
"Draft context: ",
|
|
140
|
+
k.routeName,
|
|
141
|
+
" / ",
|
|
142
|
+
k.vehicleNumber,
|
|
143
|
+
"; route revision ",
|
|
144
|
+
k.routeUpdatedAt,
|
|
145
|
+
"; vehicle revision",
|
|
146
|
+
" ",
|
|
147
|
+
k.vehicleUpdatedAt,
|
|
148
|
+
"."
|
|
149
|
+
] }),
|
|
150
|
+
(j || Y) && /* @__PURE__ */ w("p", {
|
|
151
|
+
role: "alert",
|
|
152
|
+
children: "The draft context changed. Unsaved measurement fields are cleared. Refresh and review the current context before starting a replacement report. An uncertain original request remains separate."
|
|
153
|
+
}),
|
|
154
|
+
B.uncertain && /* @__PURE__ */ w("p", { children: "Resolve the uncertain original request or explicitly abandon it after inspecting history before starting another draft." }),
|
|
155
|
+
/* @__PURE__ */ w(n, {
|
|
156
|
+
type: "button",
|
|
157
|
+
variant: "outline",
|
|
158
|
+
disabled: K || B.uncertain || j || U.loading || !W?.vehicle || W.vehicleId !== W.vehicle.id,
|
|
159
|
+
onClick: () => {
|
|
160
|
+
!W?.vehicle || W.vehicleId !== W.vehicle.id || (A({
|
|
161
|
+
routeId: W.id,
|
|
162
|
+
routeUpdatedAt: W.updatedAt,
|
|
163
|
+
vehicleId: W.vehicle.id,
|
|
164
|
+
vehicleUpdatedAt: W.vehicle.updatedAt,
|
|
165
|
+
routeName: W.name,
|
|
166
|
+
vehicleNumber: W.vehicle.vehicleNumber,
|
|
167
|
+
generation: crypto.randomUUID()
|
|
168
|
+
}), M(!1), z(null));
|
|
169
|
+
},
|
|
170
|
+
children: "Review current context and start a new report"
|
|
171
|
+
}),
|
|
172
|
+
k && !j && !Y && /* @__PURE__ */ w(d, {
|
|
173
|
+
busy: K || B.uncertain || U.loading || !W?.vehicleId || !W.vehicle,
|
|
174
|
+
onSubmit: X
|
|
175
|
+
}, `${k.generation}:${k.routeId}:${k.routeUpdatedAt}:${k.vehicleId}:${k.vehicleUpdatedAt}`)
|
|
176
|
+
]
|
|
177
|
+
}), /* @__PURE__ */ w(f, {
|
|
178
|
+
query: G,
|
|
179
|
+
offset: r,
|
|
180
|
+
onPage: E,
|
|
181
|
+
selected: N,
|
|
182
|
+
onSelect: P,
|
|
183
|
+
busy: K
|
|
184
|
+
})] }),
|
|
185
|
+
R && /* @__PURE__ */ w("p", {
|
|
186
|
+
role: "alert",
|
|
187
|
+
children: R
|
|
188
|
+
}),
|
|
189
|
+
B.error && /* @__PURE__ */ w("p", {
|
|
190
|
+
role: "alert",
|
|
191
|
+
children: B.error
|
|
192
|
+
}),
|
|
193
|
+
B.notice && /* @__PURE__ */ w("p", {
|
|
194
|
+
role: "status",
|
|
195
|
+
children: B.notice
|
|
196
|
+
}),
|
|
197
|
+
B.uncertain && /* @__PURE__ */ T("div", {
|
|
198
|
+
className: "space-y-3 rounded border p-4",
|
|
199
|
+
children: [
|
|
200
|
+
/* @__PURE__ */ w("p", { children: "Result may be uncertain. Inspect refreshed history first. Retry original request sends the original submitted body, route/vehicle revisions and key, ignoring edited form fields. A new submitted semantic payload starts a new key. Attempts are not retained after a browser reload." }),
|
|
201
|
+
/* @__PURE__ */ w(n, {
|
|
202
|
+
type: "button",
|
|
203
|
+
variant: "outline",
|
|
204
|
+
disabled: K,
|
|
205
|
+
onClick: B.refresh,
|
|
206
|
+
children: "Refresh report history"
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ w(n, {
|
|
209
|
+
type: "button",
|
|
210
|
+
disabled: K,
|
|
211
|
+
onClick: B.retryOriginal,
|
|
212
|
+
children: "Retry original request"
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ w(n, {
|
|
215
|
+
type: "button",
|
|
216
|
+
variant: "outline",
|
|
217
|
+
disabled: K,
|
|
218
|
+
onClick: B.discardAttempt,
|
|
219
|
+
children: "Abandon retry after inspecting history"
|
|
220
|
+
})
|
|
221
|
+
]
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
227
|
+
export { E as default };
|