From 15c43789d36019dc18f18c730b994610c4326fac Mon Sep 17 00:00:00 2001 From: Marshal Date: Wed, 5 Aug 2026 07:12:27 +0000 Subject: [PATCH] always-on calendar, currency cards --- .../ContractCustomerAction.tsx | 7 ---- .../deriveContractCustomerAction.ts | 37 +------------------ 2 files changed, 2 insertions(+), 42 deletions(-) diff --git a/apps/edr-freight-web/portal/src/components/customer-actions/ContractCustomerAction.tsx b/apps/edr-freight-web/portal/src/components/customer-actions/ContractCustomerAction.tsx index 7a9d942f8..3e5305210 100644 --- a/apps/edr-freight-web/portal/src/components/customer-actions/ContractCustomerAction.tsx +++ b/apps/edr-freight-web/portal/src/components/customer-actions/ContractCustomerAction.tsx @@ -14,7 +14,6 @@ import { useNavigate } from "react-router-dom"; import type { Freight } from "@edr/types"; -import { PayNowButton } from "@/pages/bookings/payments/PayNowButton"; import { api } from "@/services/api"; import { bookingDocNoun } from "@/pages/bookings/clearance/bookingNextAction"; import { deriveContractCustomerAction } from "./deriveContractCustomerAction"; @@ -50,12 +49,6 @@ export function ContractCustomerAction({ } : undefined; - if (action.type === "pay") { - return ( - - ); - } - if (action.type === "initiate") { return ( { - if (b.contractId !== contractId) return false; - if (b.paymentStatus === "PAID") return false; - const isGeneral = b.bookingType === "GENERAL_CONTRACT"; - return isGeneral - ? b.status === "FULLY_EXECUTED" - : b.status === "SELECTED_FOR_BATCH"; - }) ?? null - ); -} - /** Single best customer action for a contract row (list / home). */ export function deriveContractCustomerAction( contract: Freight.IContract, @@ -97,17 +73,8 @@ export function deriveContractCustomerAction( }; } - const payable = findPayableBookingForContract(id, bookings); - if (payable) { - return { - type: "pay", - booking: payable, - label: "Pay now", - primary: true, - icon: CreditCard, - }; - } - + // Paying happens from the booking row/detail — contract rows never show + // "Pay now" (payable bookings fall through to the next action here). if ( contract.customsClearingEnabled && ["CLEARANCE_READY_FOR_BOOKING", "ACTIVE_SHIPMENT_IN_PROGRESS"].includes(