@burdenoff/microfe-movethewheels 2026.1016.1 → 2026.1016.3
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/components/freight-cost/FreightCommercialEditor.js +217 -0
- package/dist/components/freight-cost/FreightCommercialFactEditor.js +217 -0
- package/dist/components/freight-cost/FreightCommercialHistory.js +115 -0
- package/dist/components/freight-cost/FreightDraftForm.js +106 -91
- package/dist/components/freight-cost/FreightHistory.js +42 -40
- package/dist/dev/main.d.ts +0 -1
- package/dist/generated/freight-cost-operations.d.ts +959 -0
- package/dist/hooks/useFreightRecoveryAction.js +20 -20
- package/dist/index.d.ts +2 -4
- package/dist/movethewheels/MoveTheWheelsRoot.d.ts +0 -1
- package/dist/movethewheels/MoveTheWheelsRoutes.d.ts +1 -1
- package/dist/movethewheels/components/AssignmentSuggestions.d.ts +1 -2
- package/dist/movethewheels/components/CarbonFootprintPanel.d.ts +1 -1
- package/dist/movethewheels/components/ContainerEvidencePicker.d.ts +1 -2
- package/dist/movethewheels/components/CustomerPicker.d.ts +1 -2
- package/dist/movethewheels/components/DataTable.d.ts +1 -2
- package/dist/movethewheels/components/DocumentsCard.d.ts +1 -2
- package/dist/movethewheels/components/EntityCombobox.d.ts +1 -1
- package/dist/movethewheels/components/FleetAlertsPanel.d.ts +1 -2
- package/dist/movethewheels/components/FormError.d.ts +1 -1
- package/dist/movethewheels/components/FreeTimeAgreementForm.d.ts +1 -2
- package/dist/movethewheels/components/GlassPanel.d.ts +1 -2
- package/dist/movethewheels/components/MetricCard.d.ts +3 -4
- package/dist/movethewheels/components/Notice.d.ts +1 -1
- package/dist/movethewheels/components/OrderItemRow.d.ts +1 -2
- package/dist/movethewheels/components/PageLayout.d.ts +5 -6
- package/dist/movethewheels/components/ProofOfDeliveryCard.d.ts +1 -1
- package/dist/movethewheels/components/ReturnInstructionForm.d.ts +1 -2
- package/dist/movethewheels/components/ReuseControls.d.ts +4 -5
- package/dist/movethewheels/components/ReusePermissionForm.d.ts +1 -2
- package/dist/movethewheels/components/ReuseProposalForm.d.ts +1 -2
- package/dist/movethewheels/components/ReuseSourceFields.d.ts +1 -2
- package/dist/movethewheels/components/ShippingQuoteResults.d.ts +1 -2
- package/dist/movethewheels/components/StatusBadge.d.ts +5 -6
- package/dist/movethewheels/components/StockActionDialogs.d.ts +3 -3
- package/dist/movethewheels/components/UpcomingDemandPanel.d.ts +1 -2
- package/dist/movethewheels/components/VehicleServiceCard.d.ts +1 -2
- package/dist/movethewheels/components/charts/ChartShell.d.ts +2 -3
- package/dist/movethewheels/components/charts/Sparkline.d.ts +1 -1
- package/dist/movethewheels/components/charts/StatusDonut.d.ts +1 -1
- package/dist/movethewheels/components/charts/TrendChart.d.ts +1 -1
- package/dist/movethewheels/components/charts/VolumeBar.d.ts +1 -1
- package/dist/movethewheels/components/consolidation/ConsolidationHistory.d.ts +3 -4
- package/dist/movethewheels/components/consolidation/ConsolidationLotEditor.d.ts +1 -2
- package/dist/movethewheels/components/consolidation/ConsolidationManifestWorkbench.d.ts +1 -2
- package/dist/movethewheels/components/consolidation/ConsolidationPlanForm.d.ts +1 -2
- package/dist/movethewheels/components/consolidation/ConsolidationPlanWorkbench.d.ts +1 -2
- package/dist/movethewheels/components/consolidation/ConsolidationReportForm.d.ts +1 -2
- package/dist/movethewheels/components/consolidation/ConsolidationReportsWorkbench.d.ts +1 -2
- package/dist/movethewheels/components/consolidation/ConsolidationSummary.d.ts +1 -2
- package/dist/movethewheels/components/consolidation/OriginalConsolidationHistory.d.ts +1 -2
- package/dist/movethewheels/components/freight-cost/FreightCommercialEditor.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightCommercialFactEditor.d.ts +8 -0
- package/dist/movethewheels/components/freight-cost/FreightCommercialHistory.d.ts +4 -0
- package/dist/movethewheels/components/freight-cost/FreightDraftForm.d.ts +5 -4
- package/dist/movethewheels/components/freight-cost/FreightFields.d.ts +3 -4
- package/dist/movethewheels/components/freight-cost/FreightFxEditor.d.ts +1 -2
- package/dist/movethewheels/components/freight-cost/FreightHistory.d.ts +3 -4
- package/dist/movethewheels/components/freight-cost/FreightLineEditor.d.ts +1 -2
- package/dist/movethewheels/components/freight-cost/FreightScopeEditor.d.ts +1 -2
- package/dist/movethewheels/components/freight-cost/FreightTotals.d.ts +1 -2
- package/dist/movethewheels/components/logistics-procedure/ProcedureDecisionForm.d.ts +2 -3
- package/dist/movethewheels/components/logistics-procedure/ProcedureFields.d.ts +3 -4
- package/dist/movethewheels/components/logistics-procedure/ProcedureHistory.d.ts +1 -2
- package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyForm.d.ts +1 -2
- package/dist/movethewheels/components/logistics-procedure/ProcedurePolicyWorkbench.d.ts +1 -2
- package/dist/movethewheels/components/logistics-procedure/ProcedureReviewWorkbench.d.ts +1 -2
- package/dist/movethewheels/components/logistics-procedure/ProcedureRunWorkbench.d.ts +1 -2
- package/dist/movethewheels/components/logistics-procedure/ProcedureSubjectPicker.d.ts +1 -2
- package/dist/movethewheels/components/maps/LogisticsMap.d.ts +1 -2
- package/dist/movethewheels/components/maps/MapCanvas.d.ts +1 -2
- package/dist/movethewheels/components/maps/RouteMap.d.ts +1 -1
- package/dist/movethewheels/components/maps/TrackingMap.d.ts +1 -1
- package/dist/movethewheels/components/maps/leaflet-setup.d.ts +0 -1
- package/dist/movethewheels/components/pending-pick/PendingPickDraft.d.ts +1 -2
- package/dist/movethewheels/components/pending-pick/PendingPickHistory.d.ts +1 -1
- package/dist/movethewheels/components/pending-pick/PickCapture.d.ts +1 -2
- package/dist/movethewheels/components/pending-pick/PickLineSelection.d.ts +1 -2
- package/dist/movethewheels/components/pending-pick/PickReviewPanel.d.ts +1 -2
- package/dist/movethewheels/components/stock-binding/StockAssessmentDraft.d.ts +1 -2
- package/dist/movethewheels/components/stock-binding/StockAssessmentHistory.d.ts +1 -2
- package/dist/movethewheels/components/stock-binding/StockAssessmentSummary.d.ts +1 -2
- package/dist/movethewheels/components/stock-binding/StockFactForm.d.ts +1 -2
- package/dist/movethewheels/components/stock-observation/StockIssueForm.d.ts +1 -2
- package/dist/movethewheels/components/stock-observation/StockIssueHistory.d.ts +1 -2
- package/dist/movethewheels/components/stock-observation/StockIssueReadPanel.d.ts +1 -1
- package/dist/movethewheels/components/trip-utilization/TripReportForm.d.ts +1 -2
- package/dist/movethewheels/components/trip-utilization/TripReportHistory.d.ts +1 -2
- package/dist/movethewheels/components/trip-utilization/TripReportSummary.d.ts +1 -2
- package/dist/movethewheels/components/trip-utilization/TripSegmentFields.d.ts +1 -2
- package/dist/movethewheels/hooks/useAnalytics.d.ts +0 -1
- package/dist/movethewheels/hooks/useConsolidationAction.d.ts +0 -1
- package/dist/movethewheels/hooks/useContainerCondition.d.ts +0 -1
- package/dist/movethewheels/hooks/useContainerLifecycle.d.ts +0 -1
- package/dist/movethewheels/hooks/useCustomers.d.ts +0 -1
- package/dist/movethewheels/hooks/useEmptyReuseAction.d.ts +0 -1
- package/dist/movethewheels/hooks/useEpod.d.ts +0 -1
- package/dist/movethewheels/hooks/useFleet.d.ts +0 -1
- package/dist/movethewheels/hooks/useFreightRecoveryAction.d.ts +0 -1
- package/dist/movethewheels/hooks/useInventory.d.ts +0 -1
- package/dist/movethewheels/hooks/useOrders.d.ts +0 -1
- package/dist/movethewheels/hooks/useProcedureAction.d.ts +0 -1
- package/dist/movethewheels/hooks/useProcedureSelection.d.ts +0 -1
- package/dist/movethewheels/hooks/useReuseRecoveryAction.d.ts +0 -1
- package/dist/movethewheels/hooks/useRoutes.d.ts +0 -1
- package/dist/movethewheels/hooks/useShipmentStatusAuthority.d.ts +0 -1
- package/dist/movethewheels/hooks/useTracking.d.ts +0 -1
- package/dist/movethewheels/hooks/useTrackingEventQuality.d.ts +0 -1
- package/dist/movethewheels/pages/AIAssistantPage.d.ts +1 -1
- package/dist/movethewheels/pages/AnalyticsPage.d.ts +1 -1
- package/dist/movethewheels/pages/ConsolidationPage.d.ts +1 -1
- package/dist/movethewheels/pages/ContainerConditionPage.d.ts +1 -1
- package/dist/movethewheels/pages/ContainersPage.d.ts +1 -1
- package/dist/movethewheels/pages/CreateOrderPage.d.ts +1 -1
- package/dist/movethewheels/pages/CustomerDetailsPage.d.ts +1 -1
- package/dist/movethewheels/pages/CustomersPage.d.ts +1 -1
- package/dist/movethewheels/pages/DashboardPage.d.ts +1 -1
- package/dist/movethewheels/pages/DeliveryCapturePage.d.ts +1 -1
- package/dist/movethewheels/pages/DriverDetailsPage.d.ts +1 -1
- package/dist/movethewheels/pages/DriversPage.d.ts +1 -1
- package/dist/movethewheels/pages/EmptyReusePage.d.ts +1 -1
- package/dist/movethewheels/pages/FinancePage.d.ts +1 -1
- package/dist/movethewheels/pages/FleetPage.d.ts +1 -1
- package/dist/movethewheels/pages/FreeTimePage.d.ts +1 -1
- package/dist/movethewheels/pages/FreightEstimatePage.d.ts +1 -1
- package/dist/movethewheels/pages/ImportExportPage.d.ts +1 -1
- package/dist/movethewheels/pages/InventoryPage.d.ts +1 -1
- package/dist/movethewheels/pages/LiveTrackingPage.d.ts +1 -1
- package/dist/movethewheels/pages/LogisticsProceduresPage.d.ts +1 -1
- package/dist/movethewheels/pages/MarketplacePage.d.ts +1 -1
- package/dist/movethewheels/pages/MultiModalShipmentPage.d.ts +1 -1
- package/dist/movethewheels/pages/OrderDetailsPage.d.ts +1 -1
- package/dist/movethewheels/pages/OrdersListPage.d.ts +1 -1
- package/dist/movethewheels/pages/PendingPickPage.d.ts +1 -1
- package/dist/movethewheels/pages/ProductDetailsPage.d.ts +1 -1
- package/dist/movethewheels/pages/ProductsPage.d.ts +1 -1
- package/dist/movethewheels/pages/ReportsPage.d.ts +1 -1
- package/dist/movethewheels/pages/RouteDetailsPage.d.ts +1 -1
- package/dist/movethewheels/pages/RoutesPage.d.ts +1 -1
- package/dist/movethewheels/pages/SettingsPage.d.ts +1 -1
- package/dist/movethewheels/pages/ShipmentStatusAuthorityPage.d.ts +1 -1
- package/dist/movethewheels/pages/ShippingRatesPage.d.ts +1 -1
- package/dist/movethewheels/pages/StockBindingPage.d.ts +1 -1
- package/dist/movethewheels/pages/StockObservationsPage.d.ts +1 -1
- package/dist/movethewheels/pages/TrackingEventQualityPage.d.ts +1 -1
- package/dist/movethewheels/pages/TrackingPage.d.ts +1 -1
- package/dist/movethewheels/pages/TripUtilizationPage.d.ts +1 -1
- package/dist/movethewheels/pages/VehicleDetailsPage.d.ts +1 -1
- package/dist/movethewheels/pages/VehiclesPage.d.ts +1 -1
- package/dist/movethewheels/pages/WarehouseDetailsPage.d.ts +1 -1
- package/dist/movethewheels/pages/WarehousesPage.d.ts +1 -1
- package/dist/movethewheels/providers/MoveTheWheelsProvider.d.ts +0 -1
- package/dist/movethewheels/store/movethewheelsStore.d.ts +0 -1
- package/dist/movethewheels/types/index.d.ts +0 -1
- package/dist/movethewheels/utils/cn.d.ts +0 -1
- package/dist/movethewheels/utils/consolidationHistoryTarget.d.ts +0 -1
- package/dist/movethewheels/utils/consolidationInput.d.ts +0 -1
- package/dist/movethewheels/utils/consolidationLot.d.ts +0 -1
- package/dist/movethewheels/utils/consolidationPins.d.ts +0 -1
- package/dist/movethewheels/utils/consolidationRecovery.d.ts +0 -1
- package/dist/movethewheels/utils/consolidationReportHead.d.ts +0 -1
- package/dist/movethewheels/utils/formatters.d.ts +0 -1
- package/dist/movethewheels/utils/freightCommercial.d.ts +44 -0
- package/dist/movethewheels/utils/freightDraft.d.ts +0 -1
- package/dist/movethewheels/utils/freightRecovery.d.ts +0 -1
- package/dist/movethewheels/utils/mapMarkers.d.ts +0 -1
- package/dist/movethewheels/utils/orderValidation.d.ts +0 -1
- package/dist/movethewheels/utils/pendingPickDraft.d.ts +0 -1
- package/dist/movethewheels/utils/pickReviewAcknowledgement.d.ts +0 -1
- package/dist/movethewheels/utils/procedureInput.d.ts +0 -1
- package/dist/movethewheels/utils/procedureRecovery.d.ts +0 -1
- package/dist/movethewheels/utils/reuseForm.d.ts +0 -1
- package/dist/movethewheels/utils/reuseRecovery.d.ts +0 -1
- package/dist/movethewheels/utils/stockBindingForm.d.ts +0 -1
- package/dist/movethewheels/utils/stockObservationForm.d.ts +0 -1
- package/dist/movethewheels/utils/tripDraftContext.d.ts +0 -1
- package/dist/movethewheels/utils/tripUtilizationForm.d.ts +0 -1
- package/dist/pages/FreightEstimatePage.js +96 -92
- package/dist/services/createSandboxAssistantTransport.d.ts +2 -1
- package/dist/src/generated/freight-cost-operations.js +495 -6
- package/dist/stories/EntityCombobox.stories.d.ts +1 -2
- package/dist/stories/MetricCard.stories.d.ts +0 -1
- package/dist/stories/Notice.stories.d.ts +0 -1
- package/dist/stories/StatusBadge.stories.d.ts +0 -1
- package/dist/utils/freightAcknowledgement.js +6 -5
- package/dist/utils/freightCommercial.js +194 -0
- package/dist/utils/freightRecovery.js +22 -22
- package/package.json +6 -5
- package/src/generated/freight-cost-operations.ts +831 -1
- package/src/movethewheels/components/freight-cost/FreightCommercialEditor.tsx +236 -0
- package/src/movethewheels/components/freight-cost/FreightCommercialFactEditor.tsx +258 -0
- package/src/movethewheels/components/freight-cost/FreightCommercialHistory.tsx +90 -0
- package/src/movethewheels/components/freight-cost/FreightDraftForm.tsx +33 -4
- package/src/movethewheels/components/freight-cost/FreightHistory.tsx +4 -2
- package/src/movethewheels/hooks/useFreightRecoveryAction.ts +2 -1
- package/src/movethewheels/pages/FreightEstimatePage.tsx +14 -7
- package/src/movethewheels/utils/freightAcknowledgement.ts +3 -1
- package/src/movethewheels/utils/freightCommercial.ts +388 -0
- package/src/movethewheels/utils/freightRecovery.ts +6 -2
- package/src/operations/freight-cost/commercial.graphql +483 -0
|
@@ -3,144 +3,147 @@ import { Button as t } from "../components/ui.js";
|
|
|
3
3
|
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
4
|
import { useConditionApi as r, useConditionQuery as i } from "../hooks/useContainerCondition.js";
|
|
5
5
|
import { PinnedSelect as a, ReusePager as o, ReuseState as s, reuseCard as c } from "../components/ReuseControls.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { FreightCommercialVersionDocument as l, FreightHistoryDocument as u, FreightShipmentDocument as d, FreightShipmentsDocument as f, PreviewFreightCostsDocument as ee, SaveFreightCommercialCostsDocument as p, SaveFreightCostsDocument as m } from "../src/generated/freight-cost-operations.js";
|
|
7
|
+
import { FreightText as h } from "../components/freight-cost/FreightFields.js";
|
|
8
|
+
import { freightPinMatches as g, freightSaveInput as _ } from "../utils/freightDraft.js";
|
|
9
|
+
import { FreightDraftForm as v } from "../components/freight-cost/FreightDraftForm.js";
|
|
10
|
+
import { FreightHistory as te } from "../components/freight-cost/FreightHistory.js";
|
|
11
11
|
import { useFreightRecoveryAction as y } from "../hooks/useFreightRecoveryAction.js";
|
|
12
|
-
import { useEffect as
|
|
13
|
-
import { Fragment as
|
|
12
|
+
import { useEffect as b, useRef as x, useState as S } from "react";
|
|
13
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
14
|
//#region src/movethewheels/pages/FreightEstimatePage.tsx
|
|
15
|
-
function
|
|
15
|
+
function E() {
|
|
16
16
|
let t = y();
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ w(n, {
|
|
18
18
|
title: "Freight cost estimates",
|
|
19
19
|
subtitle: "Dated source costs, visible unknowns and immutable versions.",
|
|
20
|
-
icon: /* @__PURE__ */
|
|
21
|
-
children: /* @__PURE__ */
|
|
20
|
+
icon: /* @__PURE__ */ w(e, { "aria-hidden": "true" }),
|
|
21
|
+
children: /* @__PURE__ */ w(D, { actions: t }, t.contextKey)
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
let n = r(), [y,
|
|
26
|
-
|
|
24
|
+
function D({ actions: e }) {
|
|
25
|
+
let n = r(), [y, E] = S(0), [D, O] = S(0), [k, A] = S(null), [j, M] = S(""), [N, P] = S(null), [F, I] = S(null), [ne, L] = S(!1), [R, z] = S(!1), [B, V] = S(null), H = x(!0), U = x(!1);
|
|
26
|
+
b(() => (H.current = !0, () => {
|
|
27
27
|
H.current = !1;
|
|
28
28
|
}), []);
|
|
29
|
-
let W = i(
|
|
29
|
+
let W = i(f, { pagination: {
|
|
30
30
|
limit: 25,
|
|
31
31
|
offset: y
|
|
32
|
-
} }, e.revision), G = i(
|
|
33
|
-
shipmentId:
|
|
34
|
-
estimateReference:
|
|
32
|
+
} }, e.revision), G = i(d, k ? { id: k.id } : null, e.revision), K = i(u, k && j.trim() ? {
|
|
33
|
+
shipmentId: k.id,
|
|
34
|
+
estimateReference: j.trim(),
|
|
35
35
|
pagination: {
|
|
36
36
|
limit: 1,
|
|
37
37
|
offset: 0
|
|
38
38
|
}
|
|
39
|
-
} : null, e.revision), q = e.uncertain ? e.originalHistoryTarget :
|
|
40
|
-
shipmentId:
|
|
39
|
+
} : null, e.revision), q = e.uncertain ? e.originalHistoryTarget : k ? {
|
|
40
|
+
shipmentId: k.id,
|
|
41
41
|
estimateReference: void 0
|
|
42
|
-
} : null, J = i(
|
|
42
|
+
} : null, J = i(u, q ? {
|
|
43
43
|
shipmentId: q.shipmentId,
|
|
44
44
|
estimateReference: q.estimateReference,
|
|
45
45
|
pagination: {
|
|
46
46
|
limit: 10,
|
|
47
|
-
offset:
|
|
47
|
+
offset: D
|
|
48
48
|
}
|
|
49
|
-
} : null, e.revision), Y = i(
|
|
49
|
+
} : null, e.revision), Y = i(l, q && N ? {
|
|
50
50
|
shipmentId: q.shipmentId,
|
|
51
|
-
id:
|
|
52
|
-
} : null, e.revision), X = K.data?.mtwFreightEstimatePage.items[0] ?? null, Z = !!
|
|
51
|
+
id: N
|
|
52
|
+
} : null, e.revision), X = K.data?.mtwFreightEstimatePage.items[0] ?? null, Z = !!F && !!G.data && !!K.data && !g(F, G.data.shipment, X), Q = e.busy || ne || e.uncertain, $ = W.data?.shipments.map((e) => ({
|
|
53
53
|
id: e.id,
|
|
54
54
|
label: `${e.shipmentNumber} — ${e.primaryMode} — ${e.status}`
|
|
55
55
|
})) ?? [];
|
|
56
|
-
|
|
57
|
-
id:
|
|
58
|
-
label: `${
|
|
56
|
+
k && !$.some((e) => e.id === k.id) && $.unshift({
|
|
57
|
+
id: k.id,
|
|
58
|
+
label: `${k.label} — selected outside this page`
|
|
59
59
|
});
|
|
60
|
-
let
|
|
60
|
+
let re = async (t, r, i) => {
|
|
61
61
|
if (U.current || Q) return;
|
|
62
|
-
if (!
|
|
62
|
+
if (!F) throw Error("Review the shipment and current cost history first.");
|
|
63
63
|
U.current = !0, L(!0), V(null);
|
|
64
|
-
let
|
|
64
|
+
let a = F;
|
|
65
65
|
try {
|
|
66
|
-
let
|
|
67
|
-
shipmentId:
|
|
68
|
-
estimateReference:
|
|
66
|
+
let o = await n(d, { id: a.shipmentId }), s = await n(u, {
|
|
67
|
+
shipmentId: a.shipmentId,
|
|
68
|
+
estimateReference: a.estimateReference,
|
|
69
69
|
pagination: {
|
|
70
70
|
limit: 1,
|
|
71
71
|
offset: 0
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
if (!H.current) throw Error("The current workspace changed. Nothing was sent.");
|
|
75
|
-
let
|
|
76
|
-
|
|
77
|
-
let
|
|
75
|
+
let c = s.mtwFreightEstimatePage.items[0] ?? null;
|
|
76
|
+
g(a, o.shipment, c) || z(!0);
|
|
77
|
+
let l = _(a, o.shipment, c, t, r.map(({ fileId: e, versionId: t }) => ({
|
|
78
78
|
fileId: e,
|
|
79
79
|
versionId: t
|
|
80
|
-
}))),
|
|
81
|
-
|
|
80
|
+
}))), f = await e.run(i ? p : m, i ? {
|
|
81
|
+
...l,
|
|
82
|
+
commercialCapture: i
|
|
83
|
+
} : l, "Sourced cost version recorded.");
|
|
84
|
+
f && H.current && (P(f.saveMtwFreightEstimate.id), I(null), O(0));
|
|
82
85
|
} finally {
|
|
83
86
|
H.current && L(!1), U.current = !1;
|
|
84
87
|
}
|
|
85
|
-
},
|
|
88
|
+
}, ie = W.data ? {
|
|
86
89
|
total: W.data.shipmentsCount,
|
|
87
90
|
limit: 25,
|
|
88
91
|
offset: y,
|
|
89
92
|
hasMore: y + W.data.shipments.length < W.data.shipmentsCount,
|
|
90
93
|
nextOffset: y + 25
|
|
91
94
|
} : void 0;
|
|
92
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ T("div", {
|
|
93
96
|
className: "min-w-0 space-y-6 break-words",
|
|
94
97
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ w("p", {
|
|
96
99
|
className: "rounded border p-4 text-sm",
|
|
97
100
|
children: "Record the costs stated by your source. Missing facts are not zero. Saving does not book freight, accept a quote or settle an invoice."
|
|
98
101
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ T("section", {
|
|
100
103
|
className: c,
|
|
101
104
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ w("h2", {
|
|
103
106
|
className: "text-lg font-semibold",
|
|
104
107
|
children: "Shipment and cost sheet"
|
|
105
108
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ w(a, {
|
|
107
110
|
label: "Shipment",
|
|
108
|
-
value:
|
|
111
|
+
value: k?.id ?? "",
|
|
109
112
|
options: $,
|
|
110
113
|
disabled: Q,
|
|
111
114
|
onChange: (e) => {
|
|
112
115
|
let t = $.find((t) => t.id === e);
|
|
113
|
-
|
|
116
|
+
A(t ? {
|
|
114
117
|
id: t.id,
|
|
115
118
|
label: t.label
|
|
116
|
-
} : null),
|
|
119
|
+
} : null), I(null), P(null), O(0), z(!1);
|
|
117
120
|
}
|
|
118
121
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ w(s, {
|
|
120
123
|
loading: W.loading,
|
|
121
124
|
error: W.error
|
|
122
125
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
page:
|
|
126
|
+
/* @__PURE__ */ w(o, {
|
|
127
|
+
page: ie,
|
|
125
128
|
busy: W.loading || Q,
|
|
126
129
|
offset: y,
|
|
127
|
-
onChange:
|
|
130
|
+
onChange: E
|
|
128
131
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ w(h, {
|
|
130
133
|
label: "Cost sheet reference",
|
|
131
|
-
value:
|
|
132
|
-
disabled: Q ||
|
|
133
|
-
onChange:
|
|
134
|
+
value: j,
|
|
135
|
+
disabled: Q || F !== null,
|
|
136
|
+
onChange: M
|
|
134
137
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ w(s, {
|
|
136
139
|
loading: G.loading,
|
|
137
140
|
error: G.error
|
|
138
141
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ w(s, {
|
|
140
143
|
loading: K.loading,
|
|
141
144
|
error: K.error
|
|
142
145
|
}),
|
|
143
|
-
G.data?.shipment && /* @__PURE__ */
|
|
146
|
+
G.data?.shipment && /* @__PURE__ */ T("p", { children: [
|
|
144
147
|
G.data.shipment.shipmentNumber,
|
|
145
148
|
" — ",
|
|
146
149
|
G.data.shipment.primaryMode,
|
|
@@ -149,23 +152,23 @@ function E({ actions: e }) {
|
|
|
149
152
|
X ? `latest sheet version ${X.version}` : "no version in the loaded sheet",
|
|
150
153
|
"."
|
|
151
154
|
] }),
|
|
152
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ T("div", {
|
|
153
156
|
className: "flex flex-wrap gap-3",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [/* @__PURE__ */ w(t, {
|
|
155
158
|
type: "button",
|
|
156
159
|
variant: "outline",
|
|
157
160
|
disabled: Q,
|
|
158
161
|
onClick: e.refresh,
|
|
159
162
|
children: "Refresh current records"
|
|
160
|
-
}), /* @__PURE__ */
|
|
163
|
+
}), /* @__PURE__ */ w(t, {
|
|
161
164
|
type: "button",
|
|
162
|
-
disabled: Q || G.loading || K.loading || !!G.error || !!K.error || !G.data?.shipment || !K.data || !
|
|
165
|
+
disabled: Q || G.loading || K.loading || !!G.error || !!K.error || !G.data?.shipment || !K.data || !j.trim(),
|
|
163
166
|
onClick: () => {
|
|
164
167
|
let e = G.data?.shipment;
|
|
165
|
-
e && K.data && (
|
|
168
|
+
e && K.data && (I({
|
|
166
169
|
shipmentId: e.id,
|
|
167
170
|
shipmentUpdatedAt: e.updatedAt,
|
|
168
|
-
estimateReference:
|
|
171
|
+
estimateReference: j.trim(),
|
|
169
172
|
previousId: X?.id ?? null,
|
|
170
173
|
version: X?.version ?? 0,
|
|
171
174
|
generation: crypto.randomUUID()
|
|
@@ -176,42 +179,43 @@ function E({ actions: e }) {
|
|
|
176
179
|
})
|
|
177
180
|
]
|
|
178
181
|
}),
|
|
179
|
-
(Z || R) && /* @__PURE__ */
|
|
182
|
+
(Z || R) && /* @__PURE__ */ w("p", {
|
|
180
183
|
role: "alert",
|
|
181
184
|
children: "The shipment or cost history changed. Review the current records and explicitly start a new draft; entered facts were not rebound."
|
|
182
185
|
}),
|
|
183
|
-
|
|
186
|
+
F && !Z && !R && /* @__PURE__ */ w(v, {
|
|
187
|
+
shipmentId: F.shipmentId,
|
|
184
188
|
disabled: Q || G.loading || K.loading || !!G.error || !!K.error,
|
|
185
|
-
onPreview: async (e) => (await n(
|
|
186
|
-
onSave:
|
|
187
|
-
},
|
|
188
|
-
B && /* @__PURE__ */
|
|
189
|
+
onPreview: async (e) => (await n(ee, { input: e })).previewMtwFreightTotal,
|
|
190
|
+
onSave: re
|
|
191
|
+
}, F.generation),
|
|
192
|
+
B && /* @__PURE__ */ w("p", {
|
|
189
193
|
role: "alert",
|
|
190
194
|
children: B
|
|
191
195
|
}),
|
|
192
|
-
e.error && /* @__PURE__ */
|
|
196
|
+
e.error && /* @__PURE__ */ w("p", {
|
|
193
197
|
role: "alert",
|
|
194
198
|
children: e.error
|
|
195
199
|
}),
|
|
196
|
-
e.notice && /* @__PURE__ */
|
|
200
|
+
e.notice && /* @__PURE__ */ w("p", {
|
|
197
201
|
role: "status",
|
|
198
202
|
children: e.notice
|
|
199
203
|
}),
|
|
200
|
-
e.uncertain && /* @__PURE__ */
|
|
204
|
+
e.uncertain && /* @__PURE__ */ T("section", {
|
|
201
205
|
className: "space-y-4 rounded-xl border bg-bg-surface p-5",
|
|
202
206
|
children: [
|
|
203
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ w("h2", {
|
|
204
208
|
className: "font-semibold",
|
|
205
209
|
children: "Resolve the original save"
|
|
206
210
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ w("p", { children: "The server may already have recorded it. Check history first. Return to the original account, organization, workspace and project before retrying." }),
|
|
212
|
+
/* @__PURE__ */ w(t, {
|
|
209
213
|
type: "button",
|
|
210
214
|
disabled: !e.canRetry || e.busy,
|
|
211
215
|
onClick: () => void e.retryOriginal(),
|
|
212
216
|
children: "Retry original request"
|
|
213
217
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ w(t, {
|
|
215
219
|
type: "button",
|
|
216
220
|
variant: "outline",
|
|
217
221
|
disabled: e.busy,
|
|
@@ -222,38 +226,38 @@ function E({ actions: e }) {
|
|
|
222
226
|
})
|
|
223
227
|
]
|
|
224
228
|
}),
|
|
225
|
-
e.uncertain && !e.originalHistoryTarget && /* @__PURE__ */
|
|
229
|
+
e.uncertain && !e.originalHistoryTarget && /* @__PURE__ */ w("p", {
|
|
226
230
|
role: "status",
|
|
227
231
|
children: "Original history is unavailable in this context. Return to the original account, organization, workspace and project. A malformed saved request cannot supply a history target."
|
|
228
232
|
}),
|
|
229
|
-
q && /* @__PURE__ */
|
|
233
|
+
q && /* @__PURE__ */ T("section", {
|
|
230
234
|
className: "space-y-4 rounded-xl border bg-bg-surface p-5",
|
|
231
235
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ w("h2", {
|
|
233
237
|
className: "text-lg font-semibold",
|
|
234
238
|
children: e.uncertain ? "Original request cost history" : "Immutable cost history"
|
|
235
239
|
}),
|
|
236
|
-
e.uncertain && /* @__PURE__ */
|
|
240
|
+
e.uncertain && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("p", { children: [
|
|
237
241
|
"Shipment ",
|
|
238
242
|
q.shipmentId,
|
|
239
243
|
"; sheet ",
|
|
240
244
|
q.estimateReference,
|
|
241
245
|
". Reading these records does not confirm the original request key or clear recovery."
|
|
242
|
-
] }), /* @__PURE__ */
|
|
246
|
+
] }), /* @__PURE__ */ w(t, {
|
|
243
247
|
type: "button",
|
|
244
248
|
variant: "outline",
|
|
245
249
|
disabled: e.busy,
|
|
246
250
|
onClick: e.refresh,
|
|
247
251
|
children: "Refresh original history"
|
|
248
252
|
})] }),
|
|
249
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ w(s, {
|
|
250
254
|
loading: J.loading,
|
|
251
255
|
error: J.error
|
|
252
256
|
}),
|
|
253
|
-
J.data?.mtwFreightEstimatePage.items.map((e) => /* @__PURE__ */
|
|
257
|
+
J.data?.mtwFreightEstimatePage.items.map((e) => /* @__PURE__ */ T(t, {
|
|
254
258
|
type: "button",
|
|
255
259
|
variant: "outline",
|
|
256
|
-
onClick: () =>
|
|
260
|
+
onClick: () => P(e.id),
|
|
257
261
|
children: [
|
|
258
262
|
e.facts.title,
|
|
259
263
|
" / ",
|
|
@@ -265,20 +269,20 @@ function E({ actions: e }) {
|
|
|
265
269
|
new Date(e.recordedAt).toLocaleString()
|
|
266
270
|
]
|
|
267
271
|
}, e.id)),
|
|
268
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ w(o, {
|
|
269
273
|
page: J.data?.mtwFreightEstimatePage,
|
|
270
274
|
busy: J.loading,
|
|
271
|
-
offset:
|
|
272
|
-
onChange:
|
|
275
|
+
offset: D,
|
|
276
|
+
onChange: O
|
|
273
277
|
})
|
|
274
278
|
]
|
|
275
279
|
}),
|
|
276
|
-
q &&
|
|
280
|
+
q && N && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(s, {
|
|
277
281
|
loading: Y.loading,
|
|
278
282
|
error: Y.error
|
|
279
|
-
}), Y.data && /* @__PURE__ */
|
|
283
|
+
}), Y.data && /* @__PURE__ */ w(te, { record: Y.data.mtwFreightEstimateVersion })] })
|
|
280
284
|
]
|
|
281
285
|
});
|
|
282
286
|
}
|
|
283
287
|
//#endregion
|
|
284
|
-
export {
|
|
288
|
+
export { E as default };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from '../movethewheels/services/createSandboxAssistantTransport'
|
|
1
|
+
export * from '../movethewheels/services/createSandboxAssistantTransport.js'
|
|
2
|
+
export {}
|