Fix DOT intake section visibility — read slug from wizard data attribute

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
justin 2026-05-30 15:25:02 -05:00
parent 8ce9e2e118
commit ee4ea70beb

View file

@ -267,8 +267,10 @@
function showRelevantSections() {
const PW = (window as any).PWIntake;
const state = PW.get();
// Get all service slugs in this batch
const slugs: string[] = state.batch_slugs || [state.service_slug || ""];
// Get service slug from wizard element or state
const wizardEl = document.querySelector(".pw-wizard[data-service]");
const pageSlug = wizardEl?.getAttribute("data-service") || "";
const slugs: string[] = state.batch_slugs || [pageSlug || state.service_slug || ""];
// Collect all sections to show
const show = new Set<string>();