@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,96 @@
|
|
|
1
|
+
import type { ReportedStockIssueFragment } from '../../../generated/stock-observation-operations';
|
|
2
|
+
import { Button } from '../ui';
|
|
3
|
+
|
|
4
|
+
const labels = {
|
|
5
|
+
COUNT_DISCREPANCY: 'Count discrepancy',
|
|
6
|
+
DAMAGE: 'Damage',
|
|
7
|
+
IDENTITY_UNCERTAIN: 'Uncertain item identity',
|
|
8
|
+
OTHER: 'Other issue',
|
|
9
|
+
};
|
|
10
|
+
export function StockIssueHistory({
|
|
11
|
+
items,
|
|
12
|
+
onSelect,
|
|
13
|
+
disabled,
|
|
14
|
+
}: {
|
|
15
|
+
items: ReportedStockIssueFragment[];
|
|
16
|
+
onSelect: (id: string) => void;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
}) {
|
|
19
|
+
return (
|
|
20
|
+
<div className="space-y-3">
|
|
21
|
+
{items.map((item) => (
|
|
22
|
+
<article key={item.id} className="rounded-lg border p-4 space-y-2">
|
|
23
|
+
<h3 className="font-semibold">
|
|
24
|
+
{labels[item.kind]} · report {item.sequence} · unresolved
|
|
25
|
+
</h3>
|
|
26
|
+
<p className="whitespace-pre-wrap break-words">{item.reason}</p>
|
|
27
|
+
<p className="text-sm">
|
|
28
|
+
Reported count: {item.observedCount ?? 'Not known'}; scope:{' '}
|
|
29
|
+
{item.countScope === 'WHOLE_LINE' ? 'Whole inventory line' : 'Not known'}; unit:{' '}
|
|
30
|
+
{item.reportedCountUnit ? 'Reported count unit' : 'Not known'}.
|
|
31
|
+
</p>
|
|
32
|
+
<p className="text-sm">
|
|
33
|
+
Received {new Date(item.recordedAt).toLocaleString()}; reported observation{' '}
|
|
34
|
+
{item.reportedObservedAt
|
|
35
|
+
? new Date(item.reportedObservedAt).toLocaleString()
|
|
36
|
+
: 'time not known'}
|
|
37
|
+
.
|
|
38
|
+
</p>
|
|
39
|
+
<details>
|
|
40
|
+
<summary>Recorded references and attribution</summary>
|
|
41
|
+
<dl className="text-sm break-all">
|
|
42
|
+
<dt>Exact issue reference</dt>
|
|
43
|
+
<dd>{item.id}</dd>
|
|
44
|
+
<dt>Inventory line</dt>
|
|
45
|
+
<dd>{item.inventoryItemId}</dd>
|
|
46
|
+
<dt>Recorded actor</dt>
|
|
47
|
+
<dd>
|
|
48
|
+
{item.attribution.actorId} (
|
|
49
|
+
{item.attribution.provenance === 'delegated'
|
|
50
|
+
? 'Delegated operational session'
|
|
51
|
+
: 'Direct operational session'}
|
|
52
|
+
)
|
|
53
|
+
</dd>
|
|
54
|
+
<dt>Reported count-unit reference and revision</dt>
|
|
55
|
+
<dd>
|
|
56
|
+
{item.reportedCountUnit?.reference ?? 'Not known'} /{' '}
|
|
57
|
+
{item.reportedCountUnit?.revision ?? 'Revision not known'}
|
|
58
|
+
</dd>
|
|
59
|
+
<dt>On behalf of</dt>
|
|
60
|
+
<dd>{item.attribution.onBehalfOf ?? 'Not supplied by verified context'}</dd>
|
|
61
|
+
<dt>Source</dt>
|
|
62
|
+
<dd>
|
|
63
|
+
{item.source?.reference ?? 'Not known'} /{' '}
|
|
64
|
+
{item.source?.revision ?? 'Revision not known'}
|
|
65
|
+
</dd>
|
|
66
|
+
<dt>Originating application</dt>
|
|
67
|
+
<dd>{item.attribution.originatingAppId ?? 'Not supplied by verified context'}</dd>
|
|
68
|
+
</dl>
|
|
69
|
+
{item.evidenceDeclarations.length > 0 ? (
|
|
70
|
+
<ul>
|
|
71
|
+
{item.evidenceDeclarations.map((ref) => (
|
|
72
|
+
<li key={JSON.stringify([ref.fileId, ref.versionId])} className="break-all">
|
|
73
|
+
{ref.fileId} / {ref.versionId} — unverified declaration
|
|
74
|
+
</li>
|
|
75
|
+
))}
|
|
76
|
+
</ul>
|
|
77
|
+
) : (
|
|
78
|
+
<p>No file references supplied.</p>
|
|
79
|
+
)}
|
|
80
|
+
<p className="text-sm">
|
|
81
|
+
Operational reporting is not move-review authority or verified evidence.
|
|
82
|
+
</p>
|
|
83
|
+
</details>
|
|
84
|
+
<Button
|
|
85
|
+
variant="outline"
|
|
86
|
+
type="button"
|
|
87
|
+
disabled={disabled}
|
|
88
|
+
onClick={() => onSelect(item.id)}
|
|
89
|
+
>
|
|
90
|
+
Read exact report
|
|
91
|
+
</Button>
|
|
92
|
+
</article>
|
|
93
|
+
))}
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useConditionQuery } from '../../hooks/useContainerCondition';
|
|
3
|
+
import { ReusePager, ReuseState, reuseCard } from '../ReuseControls';
|
|
4
|
+
import { StockIssueHistory } from './StockIssueHistory';
|
|
5
|
+
import {
|
|
6
|
+
StockIssueHistoryDocument,
|
|
7
|
+
ExactStockIssueDocument,
|
|
8
|
+
type StockIssueHistoryQuery,
|
|
9
|
+
type ExactStockIssueQuery,
|
|
10
|
+
} from '../../../generated/stock-observation-operations';
|
|
11
|
+
|
|
12
|
+
export function StockIssueReadPanel({
|
|
13
|
+
inventoryItemId,
|
|
14
|
+
revision,
|
|
15
|
+
busy,
|
|
16
|
+
}: {
|
|
17
|
+
inventoryItemId: string;
|
|
18
|
+
revision: number;
|
|
19
|
+
busy: boolean;
|
|
20
|
+
}) {
|
|
21
|
+
const [offset, setOffset] = useState(0),
|
|
22
|
+
[exactId, setExactId] = useState<string | null>(null);
|
|
23
|
+
const history = useConditionQuery<StockIssueHistoryQuery>(
|
|
24
|
+
StockIssueHistoryDocument,
|
|
25
|
+
{ inventoryItemId, pagination: { limit: 25, offset } },
|
|
26
|
+
revision
|
|
27
|
+
);
|
|
28
|
+
const exact = useConditionQuery<ExactStockIssueQuery>(
|
|
29
|
+
ExactStockIssueDocument,
|
|
30
|
+
exactId ? { inventoryItemId, id: exactId } : null,
|
|
31
|
+
revision
|
|
32
|
+
);
|
|
33
|
+
return (
|
|
34
|
+
<section className={reuseCard}>
|
|
35
|
+
<h2 className="text-lg font-semibold">Immediate issue history</h2>
|
|
36
|
+
<p className="text-sm">
|
|
37
|
+
All reports remain unresolved. This stream is independent of source assessments and their
|
|
38
|
+
effective dates.
|
|
39
|
+
</p>
|
|
40
|
+
<ReuseState loading={history.loading} error={history.error} />
|
|
41
|
+
{history.data && (
|
|
42
|
+
<>
|
|
43
|
+
<StockIssueHistory
|
|
44
|
+
items={history.data.mtwStockObservationPage.items}
|
|
45
|
+
disabled={busy}
|
|
46
|
+
onSelect={setExactId}
|
|
47
|
+
/>
|
|
48
|
+
<ReusePager
|
|
49
|
+
page={history.data.mtwStockObservationPage}
|
|
50
|
+
offset={offset}
|
|
51
|
+
onChange={setOffset}
|
|
52
|
+
busy={busy}
|
|
53
|
+
/>
|
|
54
|
+
{history.data.mtwStockObservationPage.total === 0 && <p>No reported issues.</p>}
|
|
55
|
+
</>
|
|
56
|
+
)}
|
|
57
|
+
{exactId && (
|
|
58
|
+
<div className="space-y-3">
|
|
59
|
+
<h3 className="font-semibold">Exact recorded report</h3>
|
|
60
|
+
<ReuseState loading={exact.loading} error={exact.error} />
|
|
61
|
+
{exact.data && (
|
|
62
|
+
<StockIssueHistory
|
|
63
|
+
items={[exact.data.mtwStockObservation]}
|
|
64
|
+
disabled={busy}
|
|
65
|
+
onSelect={setExactId}
|
|
66
|
+
/>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
69
|
+
)}
|
|
70
|
+
</section>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import type {
|
|
3
|
+
MtwTripUtilizationBasis,
|
|
4
|
+
MtwTripUtilizationCoverage,
|
|
5
|
+
} from '../../../generated/trip-utilization-operations';
|
|
6
|
+
import { ContainerEvidencePicker, type SelectedEvidence } from '../ContainerEvidencePicker';
|
|
7
|
+
import { ReuseField, reuseSelect } from '../ReuseControls';
|
|
8
|
+
import { Button } from '../ui';
|
|
9
|
+
import { readTripDraft, type TripReportDraft } from '../../utils/tripUtilizationForm';
|
|
10
|
+
import { TripSegmentFields } from './TripSegmentFields';
|
|
11
|
+
export function TripReportForm({
|
|
12
|
+
busy,
|
|
13
|
+
onSubmit,
|
|
14
|
+
}: {
|
|
15
|
+
busy: boolean;
|
|
16
|
+
onSubmit: (draft: TripReportDraft) => Promise<void>;
|
|
17
|
+
}) {
|
|
18
|
+
const [basis, setBasis] = useState<MtwTripUtilizationBasis>('OBSERVED');
|
|
19
|
+
const [coverage, setCoverage] = useState<MtwTripUtilizationCoverage>('PARTIAL');
|
|
20
|
+
const [ids, setIds] = useState(() => [crypto.randomUUID()]);
|
|
21
|
+
const [evidence, setEvidence] = useState<SelectedEvidence[]>([]);
|
|
22
|
+
const [error, setError] = useState<string | null>(null);
|
|
23
|
+
return (
|
|
24
|
+
<form
|
|
25
|
+
className="space-y-4"
|
|
26
|
+
onSubmit={async (event) => {
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
setError(null);
|
|
29
|
+
try {
|
|
30
|
+
await onSubmit(
|
|
31
|
+
readTripDraft(new FormData(event.currentTarget), ids, basis, coverage, evidence)
|
|
32
|
+
);
|
|
33
|
+
} catch (failure) {
|
|
34
|
+
setError(failure instanceof Error ? failure.message : 'Unable to record report.');
|
|
35
|
+
}
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
<fieldset disabled={busy} className="space-y-4">
|
|
39
|
+
<ReuseField label="Trip reference" name="tripReference" />
|
|
40
|
+
<div className="grid gap-3 md:grid-cols-2">
|
|
41
|
+
<ReuseField label="Report interval starts (ISO with timezone)" name="intervalFrom" />
|
|
42
|
+
<ReuseField label="Report interval ends (ISO with timezone)" name="intervalUntil" />
|
|
43
|
+
</div>
|
|
44
|
+
<label className="block">
|
|
45
|
+
Reported basis
|
|
46
|
+
<select
|
|
47
|
+
className={reuseSelect}
|
|
48
|
+
value={basis}
|
|
49
|
+
onChange={(event) => {
|
|
50
|
+
const next = event.target.value;
|
|
51
|
+
if (next === 'OBSERVED' || next === 'ESTIMATED') {
|
|
52
|
+
setBasis(next);
|
|
53
|
+
setIds([crypto.randomUUID()]);
|
|
54
|
+
setEvidence([]);
|
|
55
|
+
setError(null);
|
|
56
|
+
}
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
<option value="OBSERVED">OBSERVED measurements</option>
|
|
60
|
+
<option value="ESTIMATED">ESTIMATED values</option>
|
|
61
|
+
</select>
|
|
62
|
+
</label>
|
|
63
|
+
<p className="text-sm">
|
|
64
|
+
Changing the basis clears segment and evidence entries so measurements are not silently
|
|
65
|
+
converted into estimates.
|
|
66
|
+
</p>
|
|
67
|
+
<label className="block">
|
|
68
|
+
Operator-declared interval coverage
|
|
69
|
+
<select
|
|
70
|
+
className={reuseSelect}
|
|
71
|
+
value={coverage}
|
|
72
|
+
onChange={(event) => {
|
|
73
|
+
const next = event.target.value;
|
|
74
|
+
if (next === 'COMPLETE' || next === 'PARTIAL') setCoverage(next);
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
<option value="PARTIAL">PARTIAL — some segments supplied</option>
|
|
78
|
+
<option value="COMPLETE">COMPLETE — operator declares all segments supplied</option>
|
|
79
|
+
</select>
|
|
80
|
+
</label>
|
|
81
|
+
<p className="text-sm">
|
|
82
|
+
COMPLETE is your declaration, not independently certified whole-trip coverage. Receipt
|
|
83
|
+
time is generated by the server and cannot be entered here.
|
|
84
|
+
</p>
|
|
85
|
+
{ids.map((id, index) => (
|
|
86
|
+
<TripSegmentFields
|
|
87
|
+
key={id}
|
|
88
|
+
id={id}
|
|
89
|
+
sequence={index + 1}
|
|
90
|
+
basis={basis}
|
|
91
|
+
removable={ids.length > 1}
|
|
92
|
+
onRemove={() => setIds((items) => items.filter((item) => item !== id))}
|
|
93
|
+
/>
|
|
94
|
+
))}
|
|
95
|
+
<Button
|
|
96
|
+
type="button"
|
|
97
|
+
variant="outline"
|
|
98
|
+
disabled={ids.length >= 100}
|
|
99
|
+
onClick={() => setIds((items) => [...items, crypto.randomUUID()])}
|
|
100
|
+
>
|
|
101
|
+
Add next segment
|
|
102
|
+
</Button>
|
|
103
|
+
<p className="text-sm">
|
|
104
|
+
This manual form supports up to 100 segments. The server report remains authoritative.
|
|
105
|
+
</p>
|
|
106
|
+
<ContainerEvidencePicker
|
|
107
|
+
value={evidence}
|
|
108
|
+
onChange={setEvidence}
|
|
109
|
+
description="Choose exact readable versions from shared Files for the supplied report sources. Integrity fingerprints do not authenticate the provider or certify measurements."
|
|
110
|
+
/>
|
|
111
|
+
<Button type="submit">Record immutable utilization report</Button>
|
|
112
|
+
</fieldset>
|
|
113
|
+
{error && <p role="alert">{error}</p>}
|
|
114
|
+
</form>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UtilizationReportFragment,
|
|
3
|
+
UtilizationReportsQuery,
|
|
4
|
+
} from '../../../generated/trip-utilization-operations';
|
|
5
|
+
import { ReusePager, ReuseState, reuseCard } from '../ReuseControls';
|
|
6
|
+
import { Button } from '../ui';
|
|
7
|
+
import { TripReportSummary } from './TripReportSummary';
|
|
8
|
+
export function TripReportHistory({
|
|
9
|
+
query,
|
|
10
|
+
offset,
|
|
11
|
+
onPage,
|
|
12
|
+
selected,
|
|
13
|
+
onSelect,
|
|
14
|
+
busy,
|
|
15
|
+
}: {
|
|
16
|
+
query: { data: UtilizationReportsQuery | null; loading: boolean; error: string | null };
|
|
17
|
+
offset: number;
|
|
18
|
+
onPage: (value: number) => void;
|
|
19
|
+
selected: UtilizationReportFragment | null;
|
|
20
|
+
onSelect: (report: UtilizationReportFragment) => void;
|
|
21
|
+
busy: boolean;
|
|
22
|
+
}) {
|
|
23
|
+
const page = query.data?.mtwTripUtilizationReportPage;
|
|
24
|
+
return (
|
|
25
|
+
<section className={reuseCard} aria-label="Historical utilization reports">
|
|
26
|
+
<h2 className="text-lg font-semibold">Immutable report history</h2>
|
|
27
|
+
<ReuseState {...query} />
|
|
28
|
+
{page?.items.length === 0 && <p>No reports recorded for this route.</p>}
|
|
29
|
+
{page?.items.map((report) => (
|
|
30
|
+
<div key={report.id} className="flex flex-wrap items-center gap-3 rounded border p-3">
|
|
31
|
+
<p>
|
|
32
|
+
Trip {report.tripId} — {report.basis}; {report.intervalFrom}–{report.intervalUntil};
|
|
33
|
+
recorded {report.recordedAt}.
|
|
34
|
+
</p>
|
|
35
|
+
<Button type="button" variant="outline" disabled={busy} onClick={() => onSelect(report)}>
|
|
36
|
+
Inspect report
|
|
37
|
+
</Button>
|
|
38
|
+
</div>
|
|
39
|
+
))}
|
|
40
|
+
<ReusePager page={page} offset={offset} onChange={onPage} busy={busy || query.loading} />
|
|
41
|
+
{selected && (
|
|
42
|
+
<>
|
|
43
|
+
<p className="text-sm">
|
|
44
|
+
Selected immutable report stays pinned when you change history pages.
|
|
45
|
+
</p>
|
|
46
|
+
<TripReportSummary report={selected} />
|
|
47
|
+
</>
|
|
48
|
+
)}
|
|
49
|
+
</section>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UtilizationReportFragment,
|
|
3
|
+
UtilizationMetricFragment,
|
|
4
|
+
MtwUtilizationMetricReason,
|
|
5
|
+
} from '../../../generated/trip-utilization-operations';
|
|
6
|
+
const number = new Intl.NumberFormat(undefined, { maximumFractionDigits: 4 });
|
|
7
|
+
const reasons: Record<MtwUtilizationMetricReason, string> = {
|
|
8
|
+
NO_SEGMENTS: 'No segments supplied',
|
|
9
|
+
PARTIAL_TRIP: 'Operator declared partial coverage',
|
|
10
|
+
DISTANCE_UNKNOWN: 'At least one segment has unknown distance',
|
|
11
|
+
ZERO_DISTANCE: 'No positive distance denominator',
|
|
12
|
+
SEGMENT_FACTS_UNKNOWN: 'Required segment facts are unknown',
|
|
13
|
+
};
|
|
14
|
+
function value(input: number | null | undefined, unit: string) {
|
|
15
|
+
return input == null ? 'UNKNOWN' : `${number.format(input)} ${unit}`;
|
|
16
|
+
}
|
|
17
|
+
function Metric({ title, metric }: { title: string; metric: UtilizationMetricFragment }) {
|
|
18
|
+
return (
|
|
19
|
+
<article className="space-y-2 rounded border p-4">
|
|
20
|
+
<h3 className="font-semibold">{title}</h3>
|
|
21
|
+
<p>
|
|
22
|
+
{metric.status === 'KNOWN'
|
|
23
|
+
? value(metric.percentage, '%')
|
|
24
|
+
: `UNKNOWN — ${metric.reason ? reasons[metric.reason] : 'No valid percentage'}`}
|
|
25
|
+
</p>
|
|
26
|
+
<p className="text-sm">
|
|
27
|
+
Distance with sufficient facts for this metric: {value(metric.knownDistanceKm, 'km')};
|
|
28
|
+
unknown segment facts: {metric.unknownSegmentCount}.
|
|
29
|
+
</p>
|
|
30
|
+
</article>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export function TripReportSummary({ report }: { report: UtilizationReportFragment }) {
|
|
34
|
+
const summary = report.summary;
|
|
35
|
+
return (
|
|
36
|
+
<article className="min-w-0 space-y-4 break-words rounded-lg border p-5">
|
|
37
|
+
<h3 className="font-semibold">
|
|
38
|
+
Trip {report.tripId} — {report.basis}
|
|
39
|
+
</h3>
|
|
40
|
+
<p>
|
|
41
|
+
Interval {report.intervalFrom}–{report.intervalUntil}. Operator-declared{' '}
|
|
42
|
+
{report.declaredCoverage}; {summary.segmentCount} segments,{' '}
|
|
43
|
+
{summary.unknownFactsSegmentCount} with unknown/contradictory facts.
|
|
44
|
+
</p>
|
|
45
|
+
<p>
|
|
46
|
+
Known supplied distance: {value(summary.distanceCoverage.knownDistanceKm, 'km')}; declared
|
|
47
|
+
whole-interval distance: {value(summary.distanceCoverage.totalDistanceKm, 'km')}.
|
|
48
|
+
Unknown-distance segments: {summary.distanceCoverage.unknownSegmentCount}.
|
|
49
|
+
</p>
|
|
50
|
+
<div className="grid gap-3 md:grid-cols-3">
|
|
51
|
+
<Metric title="Loaded-distance percentage" metric={summary.loadedDistance} />
|
|
52
|
+
<Metric title="Distance-weighted payload ratio" metric={summary.distanceWeightedWeight} />
|
|
53
|
+
<Metric title="Distance-weighted cube ratio" metric={summary.distanceWeightedCube} />
|
|
54
|
+
</div>
|
|
55
|
+
<p className="text-sm">
|
|
56
|
+
Weight and cube are distance-weighted means of each segment’s individual ratio, not pooled
|
|
57
|
+
capacities. Zero-distance segments retain facts but add no weighting. Unknown facts do not
|
|
58
|
+
become zeros; overloads remain above 100%.
|
|
59
|
+
</p>
|
|
60
|
+
<details className="space-y-3">
|
|
61
|
+
<summary>Reported segment facts and sources</summary>
|
|
62
|
+
{summary.segments.map((segment) => (
|
|
63
|
+
<article key={segment.segmentId} className="space-y-2 rounded border p-3 text-sm">
|
|
64
|
+
<h4 className="font-semibold">
|
|
65
|
+
Segment {segment.sequence} — {segment.loadedState}
|
|
66
|
+
</h4>
|
|
67
|
+
<p>
|
|
68
|
+
{value(segment.distanceKm, 'km')}; payload {value(segment.payloadKg, 'kg')} / reported
|
|
69
|
+
payload capacity {value(segment.payloadCapacityKg, 'kg')}; occupied{' '}
|
|
70
|
+
{value(segment.cubeM3, 'm³')} / usable {value(segment.cubeCapacityM3, 'm³')}.
|
|
71
|
+
</p>
|
|
72
|
+
<p>
|
|
73
|
+
Payload ratio {value(segment.weightUtilizationPercentage, '%')}; cube ratio{' '}
|
|
74
|
+
{value(segment.cubeUtilizationPercentage, '%')}.
|
|
75
|
+
</p>
|
|
76
|
+
{segment.warnings.length > 0 && (
|
|
77
|
+
<ul className="space-y-1">
|
|
78
|
+
{segment.warnings.map((warning) => (
|
|
79
|
+
<li key={warning} role="note">
|
|
80
|
+
{warning === 'WEIGHT_OVERLOAD'
|
|
81
|
+
? 'WEIGHT OVERLOAD — reported payload exceeds supplied capacity'
|
|
82
|
+
: warning === 'CUBE_OVERLOAD'
|
|
83
|
+
? 'CUBE OVERLOAD — occupied cube exceeds supplied capacity'
|
|
84
|
+
: 'CONTRADICTORY EMPTY — positive reported payload or cube; empty distance remains unconfirmed'}
|
|
85
|
+
</li>
|
|
86
|
+
))}
|
|
87
|
+
</ul>
|
|
88
|
+
)}
|
|
89
|
+
<p>
|
|
90
|
+
Source {segment.source.reference}; revision {segment.source.revision}. Observation{' '}
|
|
91
|
+
{segment.source.observedAt ?? 'not recorded'}; server receipt{' '}
|
|
92
|
+
{segment.source.recordedAt}.
|
|
93
|
+
</p>
|
|
94
|
+
<p>
|
|
95
|
+
Distance basis {segment.source.distanceBasis}; load basis {segment.source.loadBasis};
|
|
96
|
+
capacity basis {segment.source.capacityBasis}.
|
|
97
|
+
</p>
|
|
98
|
+
</article>
|
|
99
|
+
))}
|
|
100
|
+
</details>
|
|
101
|
+
<details className="space-y-2">
|
|
102
|
+
<summary>Captured context and exact evidence</summary>
|
|
103
|
+
<p>
|
|
104
|
+
Captured route {report.routeId}; vehicle {report.vehicleId}. Recorded {report.recordedAt};
|
|
105
|
+
actor {report.createdBy}; gateway provenance {report.actorProvenance}.
|
|
106
|
+
</p>
|
|
107
|
+
<p>
|
|
108
|
+
Captured route revision {report.routeUpdatedAt}; vehicle revision{' '}
|
|
109
|
+
{report.vehicleUpdatedAt}. This is a historical context snapshot.
|
|
110
|
+
</p>
|
|
111
|
+
<p className="break-all">Route-content fingerprint: {report.routeWaypointsFingerprint}.</p>
|
|
112
|
+
<ul>
|
|
113
|
+
{report.evidence.map((item) => (
|
|
114
|
+
<li key={item.versionId} className="break-all">
|
|
115
|
+
File {item.fileId}; version {item.versionId}; fingerprint {item.sha256Hash}; checked{' '}
|
|
116
|
+
{item.checkedAt}.
|
|
117
|
+
</li>
|
|
118
|
+
))}
|
|
119
|
+
</ul>
|
|
120
|
+
<p>
|
|
121
|
+
Files readability and fingerprints were checked at recording time. Stored references are
|
|
122
|
+
not a guarantee of future readability or document authenticity.
|
|
123
|
+
</p>
|
|
124
|
+
</details>
|
|
125
|
+
</article>
|
|
126
|
+
);
|
|
127
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { MtwTripUtilizationBasis } from '../../../generated/trip-utilization-operations';
|
|
2
|
+
import { ReuseField, reuseSelect } from '../ReuseControls';
|
|
3
|
+
import { Button } from '../ui';
|
|
4
|
+
export function TripSegmentFields({
|
|
5
|
+
id,
|
|
6
|
+
sequence,
|
|
7
|
+
basis,
|
|
8
|
+
onRemove,
|
|
9
|
+
removable,
|
|
10
|
+
}: {
|
|
11
|
+
id: string;
|
|
12
|
+
sequence: number;
|
|
13
|
+
basis: MtwTripUtilizationBasis;
|
|
14
|
+
onRemove: () => void;
|
|
15
|
+
removable: boolean;
|
|
16
|
+
}) {
|
|
17
|
+
const name = (field: string) => `${id}.${field}`;
|
|
18
|
+
return (
|
|
19
|
+
<fieldset className="space-y-4 rounded-lg border p-4">
|
|
20
|
+
<legend className="px-2 font-semibold">Segment {sequence}</legend>
|
|
21
|
+
<p className="text-sm">
|
|
22
|
+
Blank measurements stay UNKNOWN. EMPTY does not fill in zero weight or cube. Segment order
|
|
23
|
+
is the order reported here.
|
|
24
|
+
</p>
|
|
25
|
+
<label className="block">
|
|
26
|
+
Reported load state
|
|
27
|
+
<select name={name('loadedState')} className={reuseSelect} defaultValue="UNKNOWN">
|
|
28
|
+
<option value="UNKNOWN">UNKNOWN</option>
|
|
29
|
+
<option value="EMPTY">EMPTY</option>
|
|
30
|
+
<option value="LOADED">LOADED</option>
|
|
31
|
+
</select>
|
|
32
|
+
</label>
|
|
33
|
+
<div className="grid gap-3 md:grid-cols-2">
|
|
34
|
+
{[
|
|
35
|
+
['distanceKm', 'Distance (km)'],
|
|
36
|
+
['payloadKg', 'Payload (kg)'],
|
|
37
|
+
['payloadCapacityKg', 'Reported payload capacity (kg)'],
|
|
38
|
+
['cubeM3', 'Occupied cube (m³)'],
|
|
39
|
+
['cubeCapacityM3', 'Usable cube capacity (m³)'],
|
|
40
|
+
].map(([field, label]) => (
|
|
41
|
+
<label key={field} className="block">
|
|
42
|
+
{label}
|
|
43
|
+
<input
|
|
44
|
+
name={name(field)}
|
|
45
|
+
type="number"
|
|
46
|
+
min="0"
|
|
47
|
+
step="any"
|
|
48
|
+
className={reuseSelect}
|
|
49
|
+
placeholder="UNKNOWN / not recorded"
|
|
50
|
+
/>
|
|
51
|
+
</label>
|
|
52
|
+
))}
|
|
53
|
+
</div>
|
|
54
|
+
<div className="grid gap-3 md:grid-cols-2">
|
|
55
|
+
<ReuseField label="Source reference" name={name('reference')} />
|
|
56
|
+
<ReuseField label="Source revision" name={name('revision')} maxLength={120} />
|
|
57
|
+
<ReuseField
|
|
58
|
+
label={
|
|
59
|
+
basis === 'OBSERVED'
|
|
60
|
+
? 'Observation time (ISO with timezone)'
|
|
61
|
+
: 'Source observation time, if any (ISO with timezone)'
|
|
62
|
+
}
|
|
63
|
+
name={name('observedAt')}
|
|
64
|
+
required={basis === 'OBSERVED'}
|
|
65
|
+
/>
|
|
66
|
+
<label className="block">
|
|
67
|
+
Distance source
|
|
68
|
+
<select
|
|
69
|
+
required
|
|
70
|
+
name={name('distanceBasis')}
|
|
71
|
+
className={reuseSelect}
|
|
72
|
+
defaultValue={basis === 'OBSERVED' ? 'MEASURED' : ''}
|
|
73
|
+
>
|
|
74
|
+
{basis === 'OBSERVED' ? (
|
|
75
|
+
<option value="MEASURED">Measured</option>
|
|
76
|
+
) : (
|
|
77
|
+
<>
|
|
78
|
+
<option value="">Choose estimate source</option>
|
|
79
|
+
<option value="PROVIDER_ESTIMATE">Provider estimate</option>
|
|
80
|
+
<option value="OPERATOR_ESTIMATE">Operator estimate</option>
|
|
81
|
+
</>
|
|
82
|
+
)}
|
|
83
|
+
</select>
|
|
84
|
+
</label>
|
|
85
|
+
<label className="block">
|
|
86
|
+
Load source
|
|
87
|
+
<select
|
|
88
|
+
required
|
|
89
|
+
name={name('loadBasis')}
|
|
90
|
+
className={reuseSelect}
|
|
91
|
+
defaultValue={basis === 'OBSERVED' ? 'MEASURED' : ''}
|
|
92
|
+
>
|
|
93
|
+
{basis === 'ESTIMATED' && <option value="">Choose load source</option>}
|
|
94
|
+
<option value="MEASURED">Measured</option>
|
|
95
|
+
{basis === 'ESTIMATED' && (
|
|
96
|
+
<option value="SOURCE_CONFIRMED_PLAN">Source-confirmed plan</option>
|
|
97
|
+
)}
|
|
98
|
+
</select>
|
|
99
|
+
</label>
|
|
100
|
+
<label className="block">
|
|
101
|
+
Capacity source
|
|
102
|
+
<select required name={name('capacityBasis')} className={reuseSelect} defaultValue="">
|
|
103
|
+
<option value="">Choose capacity source</option>
|
|
104
|
+
<option value="RATED">Rated</option>
|
|
105
|
+
<option value="MEASURED">Measured</option>
|
|
106
|
+
</select>
|
|
107
|
+
</label>
|
|
108
|
+
</div>
|
|
109
|
+
<p className="text-sm">
|
|
110
|
+
These source labels are recorded by the operator. A source reference or evidence hash does
|
|
111
|
+
not authenticate the provider or certify measurements.
|
|
112
|
+
</p>
|
|
113
|
+
<Button type="button" variant="outline" disabled={!removable} onClick={onRemove}>
|
|
114
|
+
Remove segment {sequence}
|
|
115
|
+
</Button>
|
|
116
|
+
</fieldset>
|
|
117
|
+
);
|
|
118
|
+
}
|