Restore Copy from Spouse CTA on freshly created clients #70
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-copy-from-spouse-cta"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Creating a new client no longer surfaced the Copy from Spouse CTA on the fresh Client Hub workspace.
Cause
The CTA is gated on the
isFreshWorkspaceflag inClientsHub.tsx, which still required!lilyFile.questionnaire_id. That was a valid "brand-new client" signal when the CTA was added (#53), because clients were created without a questionnaire stamped.#63 ("Replace global active questionnaire with point-of-use selection") changed the Create Client flow to pre-select a questionnaire and stamp its
questionnaire_idonto the.lilyat creation. From then on every new client immediately had aquestionnaire_id, soisFreshWorkspacewas always false and the CTA never appeared.Fix
Drop the obsolete
questionnaire_idcondition. The remaining checks — no documents, no contacts, no variables, no required documents — correctly identify an empty, just-created client.create_lily_filepopulates nothing but the questionnaire fields, so those conditions still hold for a fresh client.Verification
make typecheck,make lint, andmake test(96 passed) all pass.