Keep alternate equipment locations in the estimate until one is selected
Air-Cond Installs WA describes split-system installation in Perth’s northern suburbs. City of Wanneroo’s installer guide to air-conditioner noise gives practical siting guidance for reducing the impact of outdoor equipme
Air-Cond Installs WA describes split-system installation in Perth’s northern suburbs. City of Wanneroo’s installer guide to air-conditioner noise gives practical siting guidance for reducing the impact of outdoor equipment noise. The form can capture an initial brief while leaving the site-specific decision for whoever assesses the job.
What the planner does today
The air-conditioning flow in additional-flows.ts records general answers; project-flow.ts holds them in memory. There is no equipment-location model. 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 air conditioning planner to compare the interface to the source.
A proposed data model with a small test
A later estimate can store multiple sites and attach decisions to stable location IDs. Sorting alternatives must not change which location was selected. 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 locations = [{id:'side', metres:3}, {id:'rear', metres:6}];
const selected = 'rear';
const reordered = [...locations].reverse();
assert.equal(reordered.find(item => item.id === selected).metres, 6);
What to check in the browser
Complete the air-conditioning preview and check that it does not recommend an outdoor position or infer a siting assessment. 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.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.