From 2ead1d0782ab49068a198aa2bac9bc2846a57804 Mon Sep 17 00:00:00 2001 From: Nathnael Date: Sun, 2 Aug 2026 20:09:27 +0000 Subject: [PATCH] fix: cbe not appearing --- .../onboarding/OnboardingResumeBanner.tsx | 42 +++++++++---------- .../components/ActionNeededSection.tsx | 8 ++-- .../BookingDetailPage/ReadonlyBookingView.tsx | 1 + .../components/WarehousePaymentsSection.tsx | 1 + .../pages/bookings/payments/PayNowButton.tsx | 1 + .../bookings/payments/useBookingPayment.ts | 1 + 6 files changed, 28 insertions(+), 26 deletions(-) diff --git a/apps/edr-freight-web/portal/src/components/onboarding/OnboardingResumeBanner.tsx b/apps/edr-freight-web/portal/src/components/onboarding/OnboardingResumeBanner.tsx index 4d078c2cb..27b9eec43 100644 --- a/apps/edr-freight-web/portal/src/components/onboarding/OnboardingResumeBanner.tsx +++ b/apps/edr-freight-web/portal/src/components/onboarding/OnboardingResumeBanner.tsx @@ -1,6 +1,6 @@ import { useQuery } from "@tanstack/react-query"; import { Link } from "react-router-dom"; -import { AlertTriangle, ArrowRight, CheckCircle2, Clock } from "lucide-react"; +import { AlertTriangle, ArrowRight, Clock } from "lucide-react"; import { api } from "@/services/api"; import useAuth from "@/hooks/useAuth"; import type { OnboardingRequirements } from "@/services/companies.service"; @@ -28,7 +28,8 @@ function getCopy( if (!requirements || requirements.progress.completed === 0) { return { title: "Set up your company profile", - subtitle: "Unlock bookings, tracking and billing — it only takes a minute.", + subtitle: + "Unlock bookings, tracking and billing — it only takes a minute.", cta: "Start onboarding", }; } @@ -46,9 +47,8 @@ function getCopy( if (remaining <= 2) { return { title: `Almost done — you're ${pct}% set up`, - subtitle: `Just ${remaining} more ${ - remaining === 1 ? "item" : "items" - } to finish: ${requirements.outstanding.join(", ")}.`, + subtitle: `Just ${remaining} more ${remaining === 1 ? "item" : "items" + } to finish: ${requirements.outstanding.join(", ")}.`, cta: "Finish onboarding", }; } @@ -301,26 +301,24 @@ export function AccountReviewBanner() { // 5. Per-operational-profile approval (existing behaviour). if (pending.length === 0) { // Nothing outstanding — a quiet confirmation that the account is live. - if (companyStatus === "active") { - return ( -
-
- - - - - Your account is approved - -
-
- ); - } + // if (companyStatus === "active") { + // return ( + //
+ //
+ // + // + // + // + // Your account is approved + // + //
+ //
+ // ); + // } return null; } - const pendingLabel = pending - .map((p) => p.type.replace(/_/g, " ")) - .join(", "); + const pendingLabel = pending.map((p) => p.type.replace(/_/g, " ")).join(", "); return (
diff --git a/apps/edr-freight-web/portal/src/pages/MyPortalPage/components/ActionNeededSection.tsx b/apps/edr-freight-web/portal/src/pages/MyPortalPage/components/ActionNeededSection.tsx index 9581a4f3d..4b16e132d 100644 --- a/apps/edr-freight-web/portal/src/pages/MyPortalPage/components/ActionNeededSection.tsx +++ b/apps/edr-freight-web/portal/src/pages/MyPortalPage/components/ActionNeededSection.tsx @@ -55,9 +55,8 @@ export function ActionNeededSection({ items: base }: ActionNeededSectionProps) { invoicesService.listForSource("booking", payItem!.targetId), enabled: payItem !== null, }); - const payableInvoiceId = payItemInvoices.find((inv) => - isPayable(inv.status), - )?.id; + const payableInvoice = payItemInvoices.find((inv) => isPayable(inv.status)); + const payableInvoiceId = payableInvoice?.id; const pay = useInvoicePayment(); @@ -171,7 +170,7 @@ export function ActionNeededSection({ items: base }: ActionNeededSectionProps) { pay.reset(); } }} - currency={undefined} + currency={payableInvoice?.currency} processing={pay.processing} error={ pay.error ?? @@ -180,6 +179,7 @@ export function ActionNeededSection({ items: base }: ActionNeededSectionProps) { : null) } otp={pay.otp} + bill={pay.bill} onConfirm={(method, payerAccount) => payableInvoiceId && pay.pay(payableInvoiceId, method, payerAccount) diff --git a/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage/ReadonlyBookingView.tsx b/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage/ReadonlyBookingView.tsx index ac211b5be..e8fa01118 100644 --- a/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage/ReadonlyBookingView.tsx +++ b/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage/ReadonlyBookingView.tsx @@ -295,6 +295,7 @@ export function ReadonlyBookingView({ processing={pay.processing} error={pay.error} otp={pay.otp} + bill={pay.bill} onConfirm={pay.confirm} /> {viewer} diff --git a/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage/components/WarehousePaymentsSection.tsx b/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage/components/WarehousePaymentsSection.tsx index a146dfb11..d3bbc55e9 100644 --- a/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage/components/WarehousePaymentsSection.tsx +++ b/apps/edr-freight-web/portal/src/pages/bookings/BookingDetailPage/components/WarehousePaymentsSection.tsx @@ -243,6 +243,7 @@ export function WarehousePaymentsSection({ bookingId }: { bookingId: string }) { processing={pay.processing} error={pay.error} otp={pay.otp} + bill={pay.bill} /> ); diff --git a/apps/edr-freight-web/portal/src/pages/bookings/payments/PayNowButton.tsx b/apps/edr-freight-web/portal/src/pages/bookings/payments/PayNowButton.tsx index 7a9949e8a..2eb07a0b1 100644 --- a/apps/edr-freight-web/portal/src/pages/bookings/payments/PayNowButton.tsx +++ b/apps/edr-freight-web/portal/src/pages/bookings/payments/PayNowButton.tsx @@ -56,6 +56,7 @@ export function PayNowButton({ processing={pay.processing} error={pay.error} otp={pay.otp} + bill={pay.bill} onConfirm={pay.confirm} /> diff --git a/apps/edr-freight-web/portal/src/pages/bookings/payments/useBookingPayment.ts b/apps/edr-freight-web/portal/src/pages/bookings/payments/useBookingPayment.ts index bb1bd33ab..eb6e170d1 100644 --- a/apps/edr-freight-web/portal/src/pages/bookings/payments/useBookingPayment.ts +++ b/apps/edr-freight-web/portal/src/pages/bookings/payments/useBookingPayment.ts @@ -45,6 +45,7 @@ export function useBookingPayment(bookingId: string) { ? "No payable invoice found for this booking yet. Please refresh or contact support." : flow.error, otp: flow.otp, + bill: flow.bill, confirm: (method: PaymentMethod, payerAccount?: string) => { if (!payableInvoiceId) { setNoInvoice(true);