@burdenoff/microfe-movethewheels 2026.930.4 → 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/useInventory.js +12 -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/InventoryPage.js +77 -73
- 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/useInventory.ts +2 -20
- 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/InventoryPage.tsx +16 -2
- 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,522 @@
|
|
|
1
|
+
import { Boxes as e } from "../node_modules/lucide-react/dist/esm/icons/boxes.js";
|
|
2
|
+
import { RefreshCw as t } from "../node_modules/lucide-react/dist/esm/icons/refresh-cw.js";
|
|
3
|
+
import { useMoveTheWheels as n } from "../providers/MoveTheWheelsProvider.js";
|
|
4
|
+
import { Button as r, Input as i, Label as a } from "../components/ui.js";
|
|
5
|
+
import { PageLayout as o } from "../components/PageLayout.js";
|
|
6
|
+
import { CONTAINER_EVENT_TYPES as s, EQUIPMENT_TYPES as c, useContainerLifecycle as l } from "../hooks/useContainerLifecycle.js";
|
|
7
|
+
import { useState as u } from "react";
|
|
8
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
//#region src/movethewheels/pages/ContainersPage.tsx
|
|
10
|
+
function m(e) {
|
|
11
|
+
return e.replaceAll("_", " ");
|
|
12
|
+
}
|
|
13
|
+
function h(e) {
|
|
14
|
+
return new Date(e).toLocaleString();
|
|
15
|
+
}
|
|
16
|
+
var g = "w-full rounded-md border bg-bg-surface p-2 text-sm", _ = "rounded-xl border bg-bg-surface p-5 space-y-4";
|
|
17
|
+
function v() {
|
|
18
|
+
let { workspaceId: e, currentUser: t } = n();
|
|
19
|
+
return /* @__PURE__ */ f(y, {}, `${e ?? ""}:${t?.id ?? ""}`);
|
|
20
|
+
}
|
|
21
|
+
function y() {
|
|
22
|
+
let n = l(), [v, y] = u(""), [x, S] = u("DRY_20"), [C, w] = u(""), [T, E] = u(""), [D, O] = u(""), [k, A] = u(""), [j, M] = u("GATE_OUT"), [N, P] = u("ACTUAL"), [F, I] = u(""), [L, R] = u(""), [z, B] = u(""), [V, H] = u(""), [U, W] = u(""), [G, K] = u(!1), [q, J] = u(null), [Y, X] = u(null), Z = n.containers.find((e) => e.id === n.containerId), Q = n.cycles.find((e) => e.id === n.cycleId), $ = async (e, t) => {
|
|
23
|
+
K(!0), J(null), X(null);
|
|
24
|
+
try {
|
|
25
|
+
await e(), X(t);
|
|
26
|
+
} catch (e) {
|
|
27
|
+
J(e instanceof Error ? e.message : "Operation failed.");
|
|
28
|
+
} finally {
|
|
29
|
+
K(!1);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ p(o, {
|
|
33
|
+
title: "Containers",
|
|
34
|
+
subtitle: "Physical equipment, usage cycles and sourced movement history",
|
|
35
|
+
icon: /* @__PURE__ */ f(e, { size: 24 }),
|
|
36
|
+
headerActions: /* @__PURE__ */ p(r, {
|
|
37
|
+
variant: "outline",
|
|
38
|
+
onClick: n.refresh,
|
|
39
|
+
disabled: G,
|
|
40
|
+
children: [/* @__PURE__ */ f(t, {
|
|
41
|
+
size: 16,
|
|
42
|
+
className: "mr-2"
|
|
43
|
+
}), "Refresh"]
|
|
44
|
+
}),
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ f("p", {
|
|
47
|
+
className: "mb-5 text-sm text-text-secondary",
|
|
48
|
+
children: "Shipment delivery and equipment return are separate obligations. Close a cycle only after an actual empty return and recorded return acceptance."
|
|
49
|
+
}),
|
|
50
|
+
q && /* @__PURE__ */ f("p", {
|
|
51
|
+
role: "alert",
|
|
52
|
+
className: "mb-4 rounded-md border border-red-400 p-3",
|
|
53
|
+
children: q
|
|
54
|
+
}),
|
|
55
|
+
Y && /* @__PURE__ */ f("p", {
|
|
56
|
+
role: "status",
|
|
57
|
+
className: "mb-4 rounded-md border p-3",
|
|
58
|
+
children: Y
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ p("div", {
|
|
61
|
+
className: "grid gap-5 xl:grid-cols-3",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ p("section", {
|
|
64
|
+
className: _,
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ f("h2", {
|
|
67
|
+
className: "text-lg font-semibold",
|
|
68
|
+
children: "Equipment registry"
|
|
69
|
+
}),
|
|
70
|
+
n.loading && /* @__PURE__ */ f("p", {
|
|
71
|
+
role: "status",
|
|
72
|
+
children: "Loading containers…"
|
|
73
|
+
}),
|
|
74
|
+
n.error && /* @__PURE__ */ p("p", {
|
|
75
|
+
role: "alert",
|
|
76
|
+
children: [
|
|
77
|
+
n.error,
|
|
78
|
+
" ",
|
|
79
|
+
/* @__PURE__ */ f(r, {
|
|
80
|
+
variant: "outline",
|
|
81
|
+
onClick: n.refresh,
|
|
82
|
+
children: "Retry"
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
}),
|
|
86
|
+
!n.loading && !n.error && n.containers.length === 0 && /* @__PURE__ */ f("p", { children: "No containers on this page. Register equipment to start tracking its lifecycle." }),
|
|
87
|
+
/* @__PURE__ */ f("ul", {
|
|
88
|
+
className: "space-y-2",
|
|
89
|
+
children: n.containers.map((e) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ p("button", {
|
|
90
|
+
type: "button",
|
|
91
|
+
"aria-pressed": e.id === n.containerId,
|
|
92
|
+
disabled: G,
|
|
93
|
+
onClick: () => {
|
|
94
|
+
n.selectContainer(e.id), J(null), X(null);
|
|
95
|
+
},
|
|
96
|
+
className: `w-full rounded-md border p-3 text-left ${e.id === n.containerId ? "border-blue-500" : ""}`,
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ f("span", {
|
|
99
|
+
className: "font-semibold",
|
|
100
|
+
children: e.containerNumber
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ f("br", {}),
|
|
103
|
+
/* @__PURE__ */ p("span", {
|
|
104
|
+
className: "text-sm",
|
|
105
|
+
children: [
|
|
106
|
+
m(e.equipmentType),
|
|
107
|
+
" · ",
|
|
108
|
+
e.ownerName || "Owner not recorded"
|
|
109
|
+
]
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
}) }, e.id))
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ f(b, {
|
|
115
|
+
page: n.page,
|
|
116
|
+
more: n.hasMore,
|
|
117
|
+
disabled: n.loading || G,
|
|
118
|
+
onChange: (e) => {
|
|
119
|
+
n.selectContainer(""), n.setPage(e);
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ p("form", {
|
|
123
|
+
onSubmit: (e) => {
|
|
124
|
+
e.preventDefault(), $(async () => {
|
|
125
|
+
await n.register({
|
|
126
|
+
containerNumber: v.trim(),
|
|
127
|
+
equipmentType: x,
|
|
128
|
+
ownerName: C.trim() || void 0,
|
|
129
|
+
source: T.trim()
|
|
130
|
+
}), y("");
|
|
131
|
+
}, "Container registered. Record its usage cycle next.");
|
|
132
|
+
},
|
|
133
|
+
className: "space-y-3 border-t pt-4",
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ f("h3", {
|
|
136
|
+
className: "font-semibold",
|
|
137
|
+
children: "Register container"
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ f(a, {
|
|
140
|
+
htmlFor: "container-number",
|
|
141
|
+
children: "ISO container number"
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ f(i, {
|
|
144
|
+
id: "container-number",
|
|
145
|
+
value: v,
|
|
146
|
+
onChange: (e) => y(e.target.value),
|
|
147
|
+
required: !0,
|
|
148
|
+
maxLength: 20,
|
|
149
|
+
placeholder: "Four letters and seven digits"
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ f(a, {
|
|
152
|
+
htmlFor: "equipment-type",
|
|
153
|
+
children: "Physical equipment type"
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ f("select", {
|
|
156
|
+
id: "equipment-type",
|
|
157
|
+
className: g,
|
|
158
|
+
value: x,
|
|
159
|
+
onChange: (e) => S(c.find((t) => t === e.target.value) ?? "OTHER"),
|
|
160
|
+
children: c.map((e) => /* @__PURE__ */ f("option", {
|
|
161
|
+
value: e,
|
|
162
|
+
children: m(e)
|
|
163
|
+
}, e))
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ f(a, {
|
|
166
|
+
htmlFor: "container-owner",
|
|
167
|
+
children: "Owner (optional)"
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ f(i, {
|
|
170
|
+
id: "container-owner",
|
|
171
|
+
value: C,
|
|
172
|
+
onChange: (e) => w(e.target.value),
|
|
173
|
+
maxLength: 200
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ f(a, {
|
|
176
|
+
htmlFor: "container-source",
|
|
177
|
+
children: "Information source"
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ f(i, {
|
|
180
|
+
id: "container-source",
|
|
181
|
+
value: T,
|
|
182
|
+
onChange: (e) => E(e.target.value),
|
|
183
|
+
required: !0,
|
|
184
|
+
maxLength: 120,
|
|
185
|
+
placeholder: "Equipment release document or carrier portal"
|
|
186
|
+
}),
|
|
187
|
+
/* @__PURE__ */ f(r, {
|
|
188
|
+
type: "submit",
|
|
189
|
+
disabled: G || !v.trim() || !T.trim(),
|
|
190
|
+
children: "Register container"
|
|
191
|
+
})
|
|
192
|
+
]
|
|
193
|
+
})
|
|
194
|
+
]
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ p("section", {
|
|
197
|
+
className: _,
|
|
198
|
+
children: [
|
|
199
|
+
/* @__PURE__ */ f("h2", {
|
|
200
|
+
className: "text-lg font-semibold",
|
|
201
|
+
children: "Usage cycles"
|
|
202
|
+
}),
|
|
203
|
+
!n.containerId && /* @__PURE__ */ f("p", { children: "Select a container to view its cycles." }),
|
|
204
|
+
Z && /* @__PURE__ */ p("p", {
|
|
205
|
+
className: "text-sm",
|
|
206
|
+
children: [
|
|
207
|
+
Z.containerNumber,
|
|
208
|
+
" · Source: ",
|
|
209
|
+
Z.source
|
|
210
|
+
]
|
|
211
|
+
}),
|
|
212
|
+
n.cyclesLoading && /* @__PURE__ */ f("p", {
|
|
213
|
+
role: "status",
|
|
214
|
+
children: "Loading cycles…"
|
|
215
|
+
}),
|
|
216
|
+
n.cycleError && /* @__PURE__ */ f("p", {
|
|
217
|
+
role: "alert",
|
|
218
|
+
children: n.cycleError
|
|
219
|
+
}),
|
|
220
|
+
n.containerId && !n.cyclesLoading && !n.cycleError && !n.cycles.length && /* @__PURE__ */ f("p", { children: "No usage cycles on this page." }),
|
|
221
|
+
/* @__PURE__ */ f("ul", {
|
|
222
|
+
className: "space-y-2",
|
|
223
|
+
children: n.cycles.map((e) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ p("button", {
|
|
224
|
+
type: "button",
|
|
225
|
+
"aria-pressed": e.id === n.cycleId,
|
|
226
|
+
disabled: G,
|
|
227
|
+
className: `w-full rounded-md border p-3 text-left ${e.id === n.cycleId ? "border-blue-500" : ""}`,
|
|
228
|
+
onClick: () => {
|
|
229
|
+
n.selectCycle(e.id), J(null), X(null);
|
|
230
|
+
},
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ p("span", {
|
|
233
|
+
className: "font-semibold",
|
|
234
|
+
children: [
|
|
235
|
+
e.bookingReference || "Unlinked booking",
|
|
236
|
+
" · ",
|
|
237
|
+
e.status
|
|
238
|
+
]
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ f("br", {}),
|
|
241
|
+
/* @__PURE__ */ p("span", {
|
|
242
|
+
className: "text-sm",
|
|
243
|
+
children: ["Opened ", h(e.openedAt)]
|
|
244
|
+
}),
|
|
245
|
+
e.closedAt && /* @__PURE__ */ p("span", {
|
|
246
|
+
className: "block text-sm",
|
|
247
|
+
children: ["Closed ", h(e.closedAt)]
|
|
248
|
+
})
|
|
249
|
+
]
|
|
250
|
+
}) }, e.id))
|
|
251
|
+
}),
|
|
252
|
+
n.containerId && /* @__PURE__ */ f(b, {
|
|
253
|
+
page: n.cyclePage,
|
|
254
|
+
more: n.hasMoreCycles,
|
|
255
|
+
disabled: n.cyclesLoading || G,
|
|
256
|
+
onChange: (e) => {
|
|
257
|
+
n.selectCycle(""), n.setCyclePage(e);
|
|
258
|
+
}
|
|
259
|
+
}),
|
|
260
|
+
n.containerId && /* @__PURE__ */ p("form", {
|
|
261
|
+
className: "space-y-3 border-t pt-4",
|
|
262
|
+
onSubmit: (e) => {
|
|
263
|
+
e.preventDefault(), $(async () => {
|
|
264
|
+
let e = new Date(k);
|
|
265
|
+
if (!Number.isFinite(e.getTime())) throw Error("Enter a valid cycle opening time.");
|
|
266
|
+
await n.openCycle({
|
|
267
|
+
containerId: n.containerId,
|
|
268
|
+
bookingReference: D.trim() || void 0,
|
|
269
|
+
openedAt: e.toISOString()
|
|
270
|
+
});
|
|
271
|
+
}, "Usage cycle opened.");
|
|
272
|
+
},
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ f(a, {
|
|
275
|
+
htmlFor: "booking-reference",
|
|
276
|
+
children: "Booking reference (optional)"
|
|
277
|
+
}),
|
|
278
|
+
/* @__PURE__ */ f(i, {
|
|
279
|
+
id: "booking-reference",
|
|
280
|
+
value: D,
|
|
281
|
+
onChange: (e) => O(e.target.value),
|
|
282
|
+
maxLength: 120
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ f(a, {
|
|
285
|
+
htmlFor: "cycle-opening-time",
|
|
286
|
+
children: "Cycle opening time (your local timezone)"
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ f(i, {
|
|
289
|
+
id: "cycle-opening-time",
|
|
290
|
+
type: "datetime-local",
|
|
291
|
+
step: 1,
|
|
292
|
+
value: k,
|
|
293
|
+
onChange: (e) => A(e.target.value),
|
|
294
|
+
required: !0
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ f(r, {
|
|
297
|
+
type: "submit",
|
|
298
|
+
disabled: G || n.cyclesLoading,
|
|
299
|
+
children: "Open usage cycle"
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ f("p", {
|
|
302
|
+
className: "text-sm text-text-secondary",
|
|
303
|
+
children: "Only one cycle may be open for this container. Use its actual start time so earlier movements can be recorded. Times are stored in UTC."
|
|
304
|
+
})
|
|
305
|
+
]
|
|
306
|
+
})
|
|
307
|
+
]
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ p("section", {
|
|
310
|
+
className: _,
|
|
311
|
+
children: [
|
|
312
|
+
/* @__PURE__ */ f("h2", {
|
|
313
|
+
className: "text-lg font-semibold",
|
|
314
|
+
children: "Movement and return history"
|
|
315
|
+
}),
|
|
316
|
+
!n.cycleId && /* @__PURE__ */ f("p", { children: "Select a usage cycle to view and record events." }),
|
|
317
|
+
n.eventsLoading && /* @__PURE__ */ f("p", {
|
|
318
|
+
role: "status",
|
|
319
|
+
children: "Loading events…"
|
|
320
|
+
}),
|
|
321
|
+
n.eventError && /* @__PURE__ */ f("p", {
|
|
322
|
+
role: "alert",
|
|
323
|
+
children: n.eventError
|
|
324
|
+
}),
|
|
325
|
+
n.cycleId && !n.eventsLoading && !n.eventError && !n.events.length && /* @__PURE__ */ f("p", { children: "No events on this page. Record actual movements with their source." }),
|
|
326
|
+
/* @__PURE__ */ f("ol", {
|
|
327
|
+
className: "space-y-3",
|
|
328
|
+
children: n.events.map((e) => /* @__PURE__ */ p("li", {
|
|
329
|
+
className: "rounded-md border p-3 text-sm",
|
|
330
|
+
children: [
|
|
331
|
+
/* @__PURE__ */ p("p", {
|
|
332
|
+
className: "font-semibold",
|
|
333
|
+
children: [
|
|
334
|
+
m(e.eventType),
|
|
335
|
+
" · ",
|
|
336
|
+
e.kind
|
|
337
|
+
]
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ p("p", { children: ["Occurred: ", h(e.occurredAt)] }),
|
|
340
|
+
/* @__PURE__ */ p("p", { children: ["Received: ", h(e.receivedAt)] }),
|
|
341
|
+
/* @__PURE__ */ p("p", { children: [
|
|
342
|
+
"Source: ",
|
|
343
|
+
e.source,
|
|
344
|
+
e.sourceReference ? ` · ${e.sourceReference}` : ""
|
|
345
|
+
] }),
|
|
346
|
+
e.location && /* @__PURE__ */ p("p", { children: ["Location: ", e.location] }),
|
|
347
|
+
e.evidenceNote && /* @__PURE__ */ p("p", { children: ["Evidence: ", e.evidenceNote] })
|
|
348
|
+
]
|
|
349
|
+
}, e.id))
|
|
350
|
+
}),
|
|
351
|
+
n.cycleId && /* @__PURE__ */ f(b, {
|
|
352
|
+
page: n.eventPage,
|
|
353
|
+
more: n.hasMoreEvents,
|
|
354
|
+
disabled: n.eventsLoading || G,
|
|
355
|
+
onChange: n.setEventPage
|
|
356
|
+
}),
|
|
357
|
+
Q?.status === "OPEN" && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("form", {
|
|
358
|
+
onSubmit: (e) => {
|
|
359
|
+
e.preventDefault(), Q && $(async () => {
|
|
360
|
+
let e = new Date(F);
|
|
361
|
+
if (!Number.isFinite(e.getTime())) throw Error("Enter a valid event time.");
|
|
362
|
+
await n.recordEvent({
|
|
363
|
+
cycleId: Q.id,
|
|
364
|
+
eventType: j,
|
|
365
|
+
kind: N,
|
|
366
|
+
occurredAt: e.toISOString(),
|
|
367
|
+
source: L.trim(),
|
|
368
|
+
sourceReference: z.trim() || void 0,
|
|
369
|
+
evidenceNote: V.trim() || void 0,
|
|
370
|
+
location: U.trim() || void 0
|
|
371
|
+
}), H(""), I("");
|
|
372
|
+
}, "Event recorded with its source and receipt time.");
|
|
373
|
+
},
|
|
374
|
+
className: "space-y-3 border-t pt-4",
|
|
375
|
+
children: [
|
|
376
|
+
/* @__PURE__ */ f("h3", {
|
|
377
|
+
className: "font-semibold",
|
|
378
|
+
children: "Record event"
|
|
379
|
+
}),
|
|
380
|
+
/* @__PURE__ */ f(a, {
|
|
381
|
+
htmlFor: "container-event",
|
|
382
|
+
children: "Event"
|
|
383
|
+
}),
|
|
384
|
+
/* @__PURE__ */ f("select", {
|
|
385
|
+
id: "container-event",
|
|
386
|
+
className: g,
|
|
387
|
+
value: j,
|
|
388
|
+
onChange: (e) => M(s.find((t) => t === e.target.value) ?? "POSITION_UPDATE"),
|
|
389
|
+
children: s.map((e) => /* @__PURE__ */ f("option", {
|
|
390
|
+
value: e,
|
|
391
|
+
children: m(e)
|
|
392
|
+
}, e))
|
|
393
|
+
}),
|
|
394
|
+
/* @__PURE__ */ f(a, {
|
|
395
|
+
htmlFor: "event-kind",
|
|
396
|
+
children: "Event certainty"
|
|
397
|
+
}),
|
|
398
|
+
/* @__PURE__ */ p("select", {
|
|
399
|
+
id: "event-kind",
|
|
400
|
+
className: g,
|
|
401
|
+
value: N,
|
|
402
|
+
onChange: (e) => P(e.target.value === "PLANNED" ? "PLANNED" : e.target.value === "ESTIMATED" ? "ESTIMATED" : "ACTUAL"),
|
|
403
|
+
children: [
|
|
404
|
+
/* @__PURE__ */ f("option", {
|
|
405
|
+
value: "ACTUAL",
|
|
406
|
+
children: "Actual"
|
|
407
|
+
}),
|
|
408
|
+
/* @__PURE__ */ f("option", {
|
|
409
|
+
value: "PLANNED",
|
|
410
|
+
children: "Planned"
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ f("option", {
|
|
413
|
+
value: "ESTIMATED",
|
|
414
|
+
children: "Estimated"
|
|
415
|
+
})
|
|
416
|
+
]
|
|
417
|
+
}),
|
|
418
|
+
/* @__PURE__ */ f(a, {
|
|
419
|
+
htmlFor: "event-time",
|
|
420
|
+
children: "Event time (your local timezone)"
|
|
421
|
+
}),
|
|
422
|
+
/* @__PURE__ */ f(i, {
|
|
423
|
+
id: "event-time",
|
|
424
|
+
type: "datetime-local",
|
|
425
|
+
step: 1,
|
|
426
|
+
value: F,
|
|
427
|
+
onChange: (e) => I(e.target.value),
|
|
428
|
+
required: !0
|
|
429
|
+
}),
|
|
430
|
+
/* @__PURE__ */ f(a, {
|
|
431
|
+
htmlFor: "event-source",
|
|
432
|
+
children: "Event source"
|
|
433
|
+
}),
|
|
434
|
+
/* @__PURE__ */ f(i, {
|
|
435
|
+
id: "event-source",
|
|
436
|
+
value: L,
|
|
437
|
+
onChange: (e) => R(e.target.value),
|
|
438
|
+
required: !0,
|
|
439
|
+
maxLength: 120
|
|
440
|
+
}),
|
|
441
|
+
/* @__PURE__ */ f(a, {
|
|
442
|
+
htmlFor: "source-reference",
|
|
443
|
+
children: "Source reference (optional)"
|
|
444
|
+
}),
|
|
445
|
+
/* @__PURE__ */ f(i, {
|
|
446
|
+
id: "source-reference",
|
|
447
|
+
value: z,
|
|
448
|
+
onChange: (e) => B(e.target.value),
|
|
449
|
+
maxLength: 200
|
|
450
|
+
}),
|
|
451
|
+
/* @__PURE__ */ f(a, {
|
|
452
|
+
htmlFor: "event-location",
|
|
453
|
+
children: "Location (optional)"
|
|
454
|
+
}),
|
|
455
|
+
/* @__PURE__ */ f(i, {
|
|
456
|
+
id: "event-location",
|
|
457
|
+
value: U,
|
|
458
|
+
onChange: (e) => W(e.target.value),
|
|
459
|
+
maxLength: 200
|
|
460
|
+
}),
|
|
461
|
+
/* @__PURE__ */ p(a, {
|
|
462
|
+
htmlFor: "event-evidence",
|
|
463
|
+
children: ["Evidence note", j === "RETURN_ACCEPTED" && N === "ACTUAL" ? " (required for acceptance)" : " (optional)"]
|
|
464
|
+
}),
|
|
465
|
+
/* @__PURE__ */ f(i, {
|
|
466
|
+
id: "event-evidence",
|
|
467
|
+
value: V,
|
|
468
|
+
onChange: (e) => H(e.target.value),
|
|
469
|
+
maxLength: 2e3,
|
|
470
|
+
required: j === "RETURN_ACCEPTED" && N === "ACTUAL"
|
|
471
|
+
}),
|
|
472
|
+
/* @__PURE__ */ f(r, {
|
|
473
|
+
type: "submit",
|
|
474
|
+
disabled: G || !L.trim(),
|
|
475
|
+
children: "Record event"
|
|
476
|
+
})
|
|
477
|
+
]
|
|
478
|
+
}), /* @__PURE__ */ p("div", {
|
|
479
|
+
className: "space-y-3 border-t pt-4",
|
|
480
|
+
children: [/* @__PURE__ */ f("p", {
|
|
481
|
+
className: "text-sm text-text-secondary",
|
|
482
|
+
children: "Closure checks the complete recorded history for actual empty return and acceptance. A planned return or delivered shipment is insufficient."
|
|
483
|
+
}), /* @__PURE__ */ f(r, {
|
|
484
|
+
variant: "outline",
|
|
485
|
+
disabled: G || n.cyclesLoading || n.eventsLoading,
|
|
486
|
+
onClick: () => void $(() => n.closeCycle(Q), "Cycle closed after accepted empty return."),
|
|
487
|
+
children: "Close cycle"
|
|
488
|
+
})]
|
|
489
|
+
})] }),
|
|
490
|
+
Q?.status === "CLOSED" && /* @__PURE__ */ f("p", { children: "This cycle is closed. Its recorded history remains available." })
|
|
491
|
+
]
|
|
492
|
+
})
|
|
493
|
+
]
|
|
494
|
+
})
|
|
495
|
+
]
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
function b({ page: e, more: t, disabled: n, onChange: i }) {
|
|
499
|
+
return /* @__PURE__ */ p("div", {
|
|
500
|
+
className: "flex items-center justify-between gap-2",
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ f(r, {
|
|
503
|
+
variant: "outline",
|
|
504
|
+
disabled: n || e === 0,
|
|
505
|
+
onClick: () => i(e - 1),
|
|
506
|
+
children: "Previous"
|
|
507
|
+
}),
|
|
508
|
+
/* @__PURE__ */ p("span", {
|
|
509
|
+
className: "text-sm",
|
|
510
|
+
children: ["Page ", e + 1]
|
|
511
|
+
}),
|
|
512
|
+
/* @__PURE__ */ f(r, {
|
|
513
|
+
variant: "outline",
|
|
514
|
+
disabled: n || !t,
|
|
515
|
+
onClick: () => i(e + 1),
|
|
516
|
+
children: "Next"
|
|
517
|
+
})
|
|
518
|
+
]
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
//#endregion
|
|
522
|
+
export { v as default };
|