Crest Painting & Decorating describes residential painting across metropolitan Perth. WA Health’s lead-exposure fact sheet advises seeking professional advice when renovating old homes or removing old paint. The form can capture an initial brief while leaving the site-specific decision for whoever assesses the job.
What the planner does today
The painting configuration in additional-flows.ts provides scope questions. The flow summary displays user choices; it does not identify hazardous materials. The shared script in frontend/src/scripts/project-flow.ts keeps answers in a map and builds summary rows from the selected labels. The six-step layout is declared in frontend/src/components/ProjectFlow.astro. You can inspect the Perth Quotes painting planner to compare the interface to the source.
A proposed data model with a small test
If a future workflow uses an assessment record, an empty field should route to review. Only a recorded professional decision should transition the specific preparation scope. The following self-contained example uses illustrative values only. Save the block as example.cjs and run node example.cjs.
const assert = require('node:assert/strict');
const scopeState = assessment => assessment?.decision === 'scope-cleared' ? 'ready-for-scope' : 'needs-review';
assert.equal(scopeState(undefined), 'needs-review');
assert.equal(scopeState({decision:'scope-cleared'}), 'ready-for-scope');
What to check in the browser
Verify the painting preview produces no surface-clearance result. The proposed state refers to drafting a scope and gives no safety clearance. This is a manual test design. The isolated Node example passed its assertions when executed locally for this draft. The browser interaction above was specified and has not been executed as part of this editorial run.
Top comments (0)