From e1b95a20fb2f869e2c9d2f87e9a63520dbb0dd43 Mon Sep 17 00:00:00 2001 From: justin Date: Wed, 29 Apr 2026 01:40:48 -0500 Subject: [PATCH] Show 'Intake Already Completed' screen with Revise button on revisit When the user revisits a completed intake (intake_data_validated=true), shows a success screen with Go to Portal and Revise buttons instead of the blank form. Revise adds ?revise=1 to bypass the check. Co-Authored-By: Claude Opus 4.6 (1M context) --- site/src/components/intake/Wizard.astro | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/site/src/components/intake/Wizard.astro b/site/src/components/intake/Wizard.astro index 2b5547a..4cb2b4a 100644 --- a/site/src/components/intake/Wizard.astro +++ b/site/src/components/intake/Wizard.astro @@ -366,6 +366,33 @@ const STEP_LABELS: Record = { if (order.intake_data) { state.intake_data = { ...state.intake_data, ...order.intake_data }; } + + // If intake was already completed and user isn't revising, show "completed" screen + if (order.intake_data_validated && !urlParams.has("revise")) { + const body = document.querySelector(".pw-wizard-body") as HTMLElement; + const footer = document.querySelector(".pw-wizard-nav") as HTMLElement; + body.innerHTML = ` +
+
+ +
+

Intake Already Completed

+

You've already submitted your information for this order. We're processing your filing now.

+
+ Go to Portal + +
+
+ `; + if (footer) footer.hidden = true; + document.getElementById("pw-revise-btn")?.addEventListener("click", () => { + sessionStorage.removeItem(\`pw-intake-\${slug}\`); + const url = new URL(window.location.href); + url.searchParams.set("revise", "1"); + window.location.href = url.toString(); + }); + return; // Don't render steps + } } } catch {} }