diff --git a/apps/portal/src/app/features/seaman-book/pages/SeamanBookPage.tsx b/apps/portal/src/app/features/seaman-book/pages/SeamanBookPage.tsx index 91e65a622..4d04d4063 100644 --- a/apps/portal/src/app/features/seaman-book/pages/SeamanBookPage.tsx +++ b/apps/portal/src/app/features/seaman-book/pages/SeamanBookPage.tsx @@ -236,10 +236,21 @@ export function SeamanBookPage({ const isBtc = service === "BTC"; const isCombined = service === "COMBINED"; - const { data, isLoading, refetch } = useApiQuery({ - url: "/seaman-book/my", - method: "GET", - }); + // Polled, not fetch-once: the officer who claims/reviews/approves this + // application (and the auto-promotion when the parent seafarer + // registration is approved) all happen in a different session, so nothing + // in this tab would otherwise tell RTK Query the status changed underneath + // it — the applicant would see a stale "Draft"/"Payment Pending" until they + // manually reloaded. `useApiQuery` is a generic untagged passthrough (many + // unrelated callers share it), so polling this one call is the fix that + // doesn't risk over-invalidating everyone else's cache. + const { data, isLoading, refetch } = useApiQuery( + { + url: "/seaman-book/my", + method: "GET", + }, + { pollingInterval: 15_000 }, + ); const { data: paymentCapabilities } = useGetPaymentCapabilitiesQuery(); const [bypassPayment, { isLoading: bypassingPayment }] = useBypassPaymentMutation();