From 4125b0f09f8629697fc3c05f7937b5877e32d881 Mon Sep 17 00:00:00 2001 From: justin Date: Fri, 22 May 2026 01:53:44 -0500 Subject: [PATCH] Auto-fill entity from FRN in order intake_data, not just URL param When intake loads from ?order=CO-xxx, the FRN is in the order's intake_data, not the URL. Now checks state.intake_data.frn and state.entity.frn as fallback sources for auto-fill. Co-Authored-By: Claude Opus 4.6 (1M context) --- site/src/components/intake/steps/EntityStep.astro | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/site/src/components/intake/steps/EntityStep.astro b/site/src/components/intake/steps/EntityStep.astro index 90d6433..5058503 100644 --- a/site/src/components/intake/steps/EntityStep.astro +++ b/site/src/components/intake/steps/EntityStep.astro @@ -366,9 +366,12 @@ intoInputs(state.entity || {}); if (state.email) loadExisting(); - // Auto-fill from ?frn= URL param (first load only) - const urlFrn = new URLSearchParams(window.location.search).get("frn"); - if (urlFrn && !state.entity?.frn) { + // Auto-fill from FRN (URL param, or from order's intake_data) + const urlFrn = new URLSearchParams(window.location.search).get("frn") + || state.intake_data?.frn + || state.entity?.frn + || ""; + if (urlFrn && !state.entity?.legal_name) { autoFillFromFRN(urlFrn); } // Restore filing mode