diff --git a/e2e/tests/ui-driven/src/helpers/userActions.ts b/e2e/tests/ui-driven/src/helpers/userActions.ts index bfaa9bccfd..7b2c92709a 100644 --- a/e2e/tests/ui-driven/src/helpers/userActions.ts +++ b/e2e/tests/ui-driven/src/helpers/userActions.ts @@ -334,13 +334,13 @@ export async function answerListInput( page.locator("h2", { hasText: "Existing residential unit type 1" }), ).toBeVisible(); // assume the default list for now await page - .getByRole("combobox", { name: "What best describes the type" }) + .getByRole("combobox", { name: "What best describes this unit?" }) .click(); await page.getByRole("option", { name: unitType }).click(); await page .getByRole("combobox", { - name: "What best describes the tenure of this unit? ", + name: "What best describes the tenure of this unit?", }) .click(); await page.getByRole("option", { name: tenure }).click(); @@ -349,7 +349,7 @@ export async function answerListInput( .getByLabel("How many bedrooms does this unit have?") .fill(numBedrooms.toString()); await page - .getByLabel("How many units of the type described above exist on the site?") + .getByLabel("Number of units of this type") .fill(numUnits.toString()); const saveButton = page.getByTestId("save-item-button"); diff --git a/editor.planx.uk/src/@planx/components/List/Editor.tsx b/editor.planx.uk/src/@planx/components/List/Editor.tsx index d8d923cf00..e77d217542 100644 --- a/editor.planx.uk/src/@planx/components/List/Editor.tsx +++ b/editor.planx.uk/src/@planx/components/List/Editor.tsx @@ -26,12 +26,10 @@ import { ProtectedSpaceGLA } from "./schemas/GLA/ProtectedSpace"; import { MaterialDetails } from "./schemas/Materials"; import { Parking } from "./schemas/Parking"; import { ResidentialUnitsExisting } from "./schemas/ResidentialUnits/Existing"; +import { ResidentialUnitsExistingLDCE } from "./schemas/ResidentialUnits/ExistingLDCE"; import { ResidentialUnitsGLAGained } from "./schemas/ResidentialUnits/GLA/Gained"; import { ResidentialUnitsGLALost } from "./schemas/ResidentialUnits/GLA/Lost"; -import { ResidentialUnitsGLANew } from "./schemas/ResidentialUnits/GLA/New"; -import { ResidentialUnitsGLARebuilt } from "./schemas/ResidentialUnits/GLA/Rebuilt"; -import { ResidentialUnitsGLARemoved } from "./schemas/ResidentialUnits/GLA/Removed"; -import { ResidentialUnitsGLARetained } from "./schemas/ResidentialUnits/GLA/Retained"; +import { ResidentialUnitsPreviousLDCE } from "./schemas/ResidentialUnits/PreviousLDCE"; import { ResidentialUnitsProposed } from "./schemas/ResidentialUnits/Proposed"; import { Trees } from "./schemas/Trees"; import { TreesMapFirst } from "./schemas/TreesMapFirst"; @@ -40,22 +38,14 @@ type Props = EditorProps; export const SCHEMAS = [ { name: "Residential units - Existing", schema: ResidentialUnitsExisting }, - { name: "Residential units - Proposed", schema: ResidentialUnitsProposed }, - { - name: "Residential units (GLA) - New", - schema: ResidentialUnitsGLANew, - }, { - name: "Residential units (GLA) - Rebuilt", - schema: ResidentialUnitsGLARebuilt, - }, - { - name: "Residential units (GLA) - Removed", - schema: ResidentialUnitsGLARemoved, + name: "Residential units (LDCE) - Existing", + schema: ResidentialUnitsExistingLDCE, }, + { name: "Residential units - Proposed", schema: ResidentialUnitsProposed }, { - name: "Residential units (GLA) - Retained", - schema: ResidentialUnitsGLARetained, + name: "Residential units (LDCE) - Previous", + schema: ResidentialUnitsPreviousLDCE, }, { name: "Residential units (GLA) - Lost", diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/Existing.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/Existing.ts index bc8d4353b9..ee73af901d 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/Existing.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/Existing.ts @@ -3,10 +3,20 @@ import { Schema } from "@planx/components/shared/Schema/model"; export const ResidentialUnitsExisting: Schema = { type: "Existing residential unit type", fields: [ + { + type: "number", + data: { + title: "Number of units of this type", + description: + "This is the number of units of this type that currently exist on the site.", + fn: "identicalUnits", + allowNegatives: false, + }, + }, { type: "question", data: { - title: "What best describes the type of this unit?", + title: "What best describes this unit?", fn: "type", options: [ { id: "house", data: { text: "House", val: "house" } }, @@ -59,14 +69,6 @@ export const ResidentialUnitsExisting: Schema = { allowNegatives: false, }, }, - { - type: "number", - data: { - title: "How many units of the type described above exist on the site?", - fn: "identicalUnits", - allowNegatives: false, - }, - }, ], min: 1, } as const; diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/ExistingLDCE.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/ExistingLDCE.ts new file mode 100644 index 0000000000..9b377252e0 --- /dev/null +++ b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/ExistingLDCE.ts @@ -0,0 +1,78 @@ +import { Schema } from "@planx/components/shared/Schema/model"; + +export const ResidentialUnitsExistingLDCE: Schema = { + type: "Existing residential unit type", + fields: [ + { + type: "number", + data: { + title: "Number of units of this type", + description: + "This is the number of units of this type that currently exist on the site.", + fn: "identicalUnits", + allowNegatives: false, + }, + }, + { + type: "question", + data: { + title: "What best describes this unit?", + fn: "type", + options: [ + { id: "house", data: { text: "House", val: "house" } }, + { + id: "flat", + data: { text: "Flat or maisonette", val: "flat" }, + }, + { + id: "liveWorkUnit", + data: { text: "Live/work unit", val: "LW" }, + }, + { + id: "sheltered", + data: { text: "Sheltered housing", val: "sheltered" }, + }, + { id: "studio", data: { text: "Studio or bedsit", val: "studio" } }, + { id: "cluster", data: { text: "Cluster flat", val: "cluster" } }, + { id: "other", data: { text: "Other", val: "other" } }, + ], + }, + }, + { + type: "question", + data: { + title: "What best describes the tenure of this unit?", + fn: "tenure", + options: [ + { id: "MH", data: { text: "Market housing", val: "MH" } }, + { + id: "SAIR", + data: { text: "Social, affordable or interim rent", val: "SAIR" }, + }, + { + id: "AHO", + data: { text: "Affordable home ownership", val: "AHO" }, + }, + { id: "SH", data: { text: "Starter homes", val: "SH" } }, + { + id: "selfCustomBuild", + data: { + text: "Self-build and custom build", + val: "selfCustomBuild", + }, + }, + { id: "other", data: { text: "Other", val: "other" } }, + ], + }, + }, + { + type: "number", + data: { + title: "How many bedrooms does this unit have?", + fn: "bedrooms", + allowNegatives: false, + }, + }, + ], + min: 1, +} as const; diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Gained.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Gained.ts index 0c67dcbe81..0f9b2d21cd 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Gained.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Gained.ts @@ -3,10 +3,20 @@ import { Schema } from "@planx/components/shared/Schema/model"; export const ResidentialUnitsGLAGained: Schema = { type: "Gained residential unit type", fields: [ + { + type: "number", + data: { + title: "Number of units of this type", + description: + "This is the number of units of this type that are gained.", + fn: "identicalUnits", + allowNegatives: false, + }, + }, { type: "question", data: { - title: "What best describes the type of this unit?", + title: "What best describes this unit?", fn: "type", options: [ { id: "terraced", data: { text: "Terraced home", val: "terraced" } }, @@ -61,7 +71,7 @@ export const ResidentialUnitsGLAGained: Schema = { { type: "question", data: { - title: "Which best describes the tenure of this unit?", + title: "What best describes the tenure of this unit?", fn: "tenure", options: [ { id: "LAR", data: { text: "London Affordable Rent", val: "LAR" } }, @@ -202,14 +212,6 @@ export const ResidentialUnitsGLAGained: Schema = { ], }, }, - { - type: "number", - data: { - title: "How many units of the type described above are gained?", - fn: "identicalUnits", - allowNegatives: false, - }, - }, ], min: 1, } as const; diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Lost.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Lost.ts index 0816a00e71..b0b09a0047 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Lost.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Lost.ts @@ -3,10 +3,19 @@ import { Schema } from "@planx/components/shared/Schema/model"; export const ResidentialUnitsGLALost: Schema = { type: "Lost residential unit type", fields: [ + { + type: "number", + data: { + title: "Number of units of this type", + description: "This is the number of units of this type that are lost.", + fn: "identicalUnits", + allowNegatives: false, + }, + }, { type: "question", data: { - title: "What best describes the type of this unit?", + title: "What best describes this unit?", fn: "type", options: [ { id: "terraced", data: { text: "Terraced home", val: "terraced" } }, @@ -61,7 +70,7 @@ export const ResidentialUnitsGLALost: Schema = { { type: "question", data: { - title: "Which best describes the tenure of this unit?", + title: "What best describes the tenure of this unit?", fn: "tenure", options: [ { id: "LAR", data: { text: "London Affordable Rent", val: "LAR" } }, @@ -202,14 +211,6 @@ export const ResidentialUnitsGLALost: Schema = { ], }, }, - { - type: "number", - data: { - title: "How many units of the type described above are lost?", - fn: "identicalUnits", - allowNegatives: false, - }, - }, ], min: 1, } as const; diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/New.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/New.ts deleted file mode 100644 index b1113df965..0000000000 --- a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/New.ts +++ /dev/null @@ -1,215 +0,0 @@ -import { Schema } from "@planx/components/shared/Schema/model"; - -export const ResidentialUnitsGLANew: Schema = { - type: "New residential unit type", - fields: [ - { - type: "number", - data: { - title: "What is the number of habitable rooms of this unit?", - fn: "habitable", - allowNegatives: false, - }, - }, - { - type: "number", - data: { - title: "What is the number of bedrooms of this unit?", - fn: "bedrooms", - allowNegatives: false, - }, - }, - { - type: "question", - data: { - title: "Which best describes the tenure of this unit?", - fn: "tenure", - options: [ - { id: "LAR", data: { text: "London Affordable Rent", val: "LAR" } }, - { - id: "AR", - data: { - text: "Affordable rent (not at LAR benchmark rents)", - val: "AR", - }, - }, - { id: "SR", data: { text: "Social rent", val: "SR" } }, - { id: "LRR", data: { text: "London Living Rent", val: "LRR" } }, - { - id: "sharedEquity", - data: { text: "Shared equity", val: "sharedEquity" }, - }, - { id: "LSO", data: { text: "London Shared Ownership", val: "LSO" } }, - { id: "DMS", data: { text: "Discount market sale", val: "DMS" } }, - { id: "DMR", data: { text: "Discount market rent", val: "DMR" } }, - { - id: "DMRLLR", - data: { - text: "Discount market rent (charged at London Living Rents)", - val: "DMRLLR", - }, - }, - { - id: "marketForRent", - data: { text: "Market for rent", val: "marketForRent" }, - }, - { id: "SH", data: { text: "Starter homes", val: "SH" } }, - { - id: "selfCustomBuild", - data: { - text: "Self-build and custom build", - val: "selfCustomBuild", - }, - }, - { - id: "marketForSale", - data: { text: "Market for sale", val: "marketForSale" }, - }, - { id: "other", data: { text: "Other", val: "other" } }, - ], - }, - }, - { - type: "checklist", - data: { - title: "Is this unit compliant with any of the following?", - fn: "compliance", - options: [ - { - id: "m42", - data: { text: "Part M4(2) of the Building Regulations 2010" }, - }, - { - id: "m432a", - data: { text: "Part M4(3)(2a) of the Building Regulations 2010" }, - }, - { - id: "m432b", - data: { text: "Part M4(3)(2b) of the Building Regulations 2010" }, - }, - { id: "none", data: { text: "None of these" } }, - ], - }, - }, - { - type: "question", - data: { - title: "What best describes the type of this unit?", - fn: "type", - options: [ - { id: "terraced", data: { text: "Terraced home", val: "terraced" } }, - { - id: "semiDetached", - data: { text: "Semi detached home", val: "semiDetached" }, - }, - { id: "detached", data: { text: "Detached home", val: "detached" } }, - { - id: "flat", - data: { text: "Flat/apartment or maisonette", val: "flat" }, - }, - { id: "LW", data: { text: "Live/work unit", val: "LW" } }, - { id: "cluster", data: { text: "Cluster flat", val: "cluster" } }, - { id: "studio", data: { text: "Studio or bedsit", val: "studio" } }, - { id: "coLiving", data: { text: "Co living unit", val: "coLiving" } }, - { id: "hostel", data: { text: "Hostel room", val: "hostel" } }, - { id: "HMO", data: { text: "HMO", val: "HMO" } }, - { - id: "student", - data: { text: "Student accommodation", val: "student" }, - }, - { id: "other", data: { text: "Other", val: "other" } }, - ], - }, - }, - { - type: "question", - data: { - title: "What best describes the provider of this unit?", - fn: "provider", - options: [ - { id: "private", data: { text: "Private", val: "private" } }, - { - id: "privateRented", - data: { text: "Private rented sector", val: "privateRented" }, - }, - { id: "HA", data: { text: "Housing association", val: "HA" } }, - { id: "LA", data: { text: "Local authority", val: "LA" } }, - { - id: "publicAuthority", - data: { text: "Other public authority", val: "publicAuthority" }, - }, - { - id: "councilDelivery", - data: { text: "Council delivery company", val: "councilDelivery" }, - }, - { - id: "councilBuildToRent", - data: { - text: "Council delivered build to rent", - val: "councilBuildToRent", - }, - }, - { - id: "affordableHousing", - data: { - text: "Other affordable housing provider", - val: "affordableHousing", - }, - }, - { id: "selfBuild", data: { text: "Self-build", val: "selfBuild" } }, - ], - }, - }, - { - type: "question", - data: { - title: "Is this unit built on garden land?", - fn: "garden", - options: [ - { id: "true", data: { text: "Yes", val: "true" } }, - { id: "false", data: { text: "No", val: "false" } }, - ], - }, - }, - { - type: "number", - data: { - title: "What is the Gross Internal Floor Area (GIA) of this unit?", - units: "m²", - fn: "area", - allowNegatives: false, - }, - }, - { - type: "question", - data: { - title: "Will this unit provide sheltered accommodation?", - fn: "sheltered", - options: [ - { id: "true", data: { text: "Yes", val: "true" } }, - { id: "false", data: { text: "No", val: "false" } }, - ], - }, - }, - { - type: "question", - data: { - title: "Is this unit specifically designed for older people?", - fn: "olderPersons", - options: [ - { id: "true", data: { text: "Yes", val: "true" } }, - { id: "false", data: { text: "No", val: "false" } }, - ], - }, - }, - { - type: "number", - data: { - title: "How many new units fit the descriptions above?", - fn: "identicalUnits", - allowNegatives: false, - }, - }, - ], - min: 1, -} as const; diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Rebuilt.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Rebuilt.ts deleted file mode 100644 index 1dfe2ad683..0000000000 --- a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Rebuilt.ts +++ /dev/null @@ -1,215 +0,0 @@ -import { Schema } from "@planx/components/shared/Schema/model"; - -export const ResidentialUnitsGLARebuilt: Schema = { - type: "Rebuilt residential unit type", - fields: [ - { - type: "number", - data: { - title: "What is the number of habitable rooms of this unit?", - fn: "habitable", - allowNegatives: false, - }, - }, - { - type: "number", - data: { - title: "What is the number of bedrooms of this unit?", - fn: "bedrooms", - allowNegatives: false, - }, - }, - { - type: "question", - data: { - title: "Which best describes the tenure of this unit?", - fn: "tenure", - options: [ - { id: "LAR", data: { text: "London Affordable Rent", val: "LAR" } }, - { - id: "AR", - data: { - text: "Affordable rent (not at LAR benchmark rents)", - val: "AR", - }, - }, - { id: "SR", data: { text: "Social rent", val: "SR" } }, - { id: "LRR", data: { text: "London Living Rent", val: "LRR" } }, - { - id: "sharedEquity", - data: { text: "Shared equity", val: "sharedEquity" }, - }, - { id: "LSO", data: { text: "London Shared Ownership", val: "LSO" } }, - { id: "DMS", data: { text: "Discount market sale", val: "DMS" } }, - { id: "DMR", data: { text: "Discount market rent", val: "DMR" } }, - { - id: "DMRLLR", - data: { - text: "Discount market rent (charged at London Living Rents)", - val: "DMRLLR", - }, - }, - { - id: "marketForRent", - data: { text: "Market for rent", val: "marketForRent" }, - }, - { id: "SH", data: { text: "Starter homes", val: "SH" } }, - { - id: "selfCustomBuild", - data: { - text: "Self-build and custom build", - val: "selfCustomBuild", - }, - }, - { - id: "marketForSale", - data: { text: "Market for sale", val: "marketForSale" }, - }, - { id: "other", data: { text: "Other", val: "other" } }, - ], - }, - }, - { - type: "checklist", - data: { - title: "Is this unit compliant with any of the following?", - fn: "compliance", - options: [ - { - id: "m42", - data: { text: "Part M4(2) of the Building Regulations 2010" }, - }, - { - id: "m432a", - data: { text: "Part M4(3)(2a) of the Building Regulations 2010" }, - }, - { - id: "m432b", - data: { text: "Part M4(3)(2b) of the Building Regulations 2010" }, - }, - { id: "none", data: { text: "None of these" } }, - ], - }, - }, - { - type: "question", - data: { - title: "What best describes the type of this unit?", - fn: "type", - options: [ - { id: "terraced", data: { text: "Terraced home", val: "terraced" } }, - { - id: "semiDetached", - data: { text: "Semi detached home", val: "semiDetached" }, - }, - { id: "detached", data: { text: "Detached home", val: "detached" } }, - { - id: "flat", - data: { text: "Flat/apartment or maisonette", val: "flat" }, - }, - { id: "LW", data: { text: "Live/work unit", val: "LW" } }, - { id: "cluster", data: { text: "Cluster flat", val: "cluster" } }, - { id: "studio", data: { text: "Studio or bedsit", val: "studio" } }, - { id: "coLiving", data: { text: "Co living unit", val: "coLiving" } }, - { id: "hostel", data: { text: "Hostel room", val: "hostel" } }, - { id: "HMO", data: { text: "HMO", val: "HMO" } }, - { - id: "student", - data: { text: "Student accommodation", val: "student" }, - }, - { id: "other", data: { text: "Other", val: "other" } }, - ], - }, - }, - { - type: "question", - data: { - title: "What best describes the provider of this unit?", - fn: "provider", - options: [ - { id: "private", data: { text: "Private", val: "private" } }, - { - id: "privateRented", - data: { text: "Private rented sector", val: "privateRented" }, - }, - { id: "HA", data: { text: "Housing association", val: "HA" } }, - { id: "LA", data: { text: "Local authority", val: "LA" } }, - { - id: "publicAuthority", - data: { text: "Other public authority", val: "publicAuthority" }, - }, - { - id: "councilDelivery", - data: { text: "Council delivery company", val: "councilDelivery" }, - }, - { - id: "councilBuildToRent", - data: { - text: "Council delivered build to rent", - val: "councilBuildToRent", - }, - }, - { - id: "affordableHousing", - data: { - text: "Other affordable housing provider", - val: "affordableHousing", - }, - }, - { id: "selfBuild", data: { text: "Self-build", val: "selfBuild" } }, - ], - }, - }, - { - type: "question", - data: { - title: "Is this unit built on garden land?", - fn: "garden", - options: [ - { id: "true", data: { text: "Yes", val: "true" } }, - { id: "false", data: { text: "No", val: "false" } }, - ], - }, - }, - { - type: "number", - data: { - title: "What is the Gross Internal Floor Area (GIA) of this unit?", - units: "m²", - fn: "area", - allowNegatives: false, - }, - }, - { - type: "question", - data: { - title: "Will this unit provide sheltered accommodation?", - fn: "sheltered", - options: [ - { id: "true", data: { text: "Yes", val: "true" } }, - { id: "false", data: { text: "No", val: "false" } }, - ], - }, - }, - { - type: "question", - data: { - title: "Is this unit specifically designed for older people?", - fn: "olderPersons", - options: [ - { id: "true", data: { text: "Yes", val: "true" } }, - { id: "false", data: { text: "No", val: "false" } }, - ], - }, - }, - { - type: "number", - data: { - title: "How many rebuilt units fit the descriptions above?", - fn: "identicalUnits", - allowNegatives: false, - }, - }, - ], - min: 1, -} as const; diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Removed.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Removed.ts deleted file mode 100644 index a9a473d9bc..0000000000 --- a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Removed.ts +++ /dev/null @@ -1,204 +0,0 @@ -import { Schema } from "@planx/components/shared/Schema/model"; - -export const ResidentialUnitsGLARemoved: Schema = { - type: "Removed residential unit type", - fields: [ - { - type: "number", - data: { - title: "What is the number of habitable rooms of this unit?", - fn: "habitable", - allowNegatives: false, - }, - }, - { - type: "number", - data: { - title: "What is the number of bedrooms of this unit?", - fn: "bedrooms", - allowNegatives: false, - }, - }, - { - type: "question", - data: { - title: "Which best describes the tenure of this unit?", - fn: "tenure", - options: [ - { id: "LAR", data: { text: "London Affordable Rent", val: "LAR" } }, - { - id: "AR", - data: { - text: "Affordable rent (not at LAR benchmark rents)", - val: "AR", - }, - }, - { id: "SR", data: { text: "Social rent", val: "SR" } }, - { id: "LRR", data: { text: "London Living Rent", val: "LRR" } }, - { - id: "sharedEquity", - data: { text: "Shared equity", val: "sharedEquity" }, - }, - { id: "LSO", data: { text: "London Shared Ownership", val: "LSO" } }, - { id: "DMS", data: { text: "Discount market sale", val: "DMS" } }, - { id: "DMR", data: { text: "Discount market rent", val: "DMR" } }, - { - id: "DMRLLR", - data: { - text: "Discount market rent (charged at London Living Rents)", - val: "DMRLLR", - }, - }, - { - id: "marketForRent", - data: { text: "Market for rent", val: "marketForRent" }, - }, - { id: "SH", data: { text: "Starter homes", val: "SH" } }, - { - id: "selfCustomBuild", - data: { - text: "Self-build and custom build", - val: "selfCustomBuild", - }, - }, - { - id: "marketForSale", - data: { text: "Market for sale", val: "marketForSale" }, - }, - { id: "other", data: { text: "Other", val: "other" } }, - ], - }, - }, - { - type: "checklist", - data: { - title: "Is this unit compliant with any of the following?", - fn: "compliance", - options: [ - { - id: "m42", - data: { text: "Part M4(2) of the Building Regulations 2010" }, - }, - { - id: "m432a", - data: { text: "Part M4(3)(2a) of the Building Regulations 2010" }, - }, - { - id: "m432b", - data: { text: "Part M4(3)(2b) of the Building Regulations 2010" }, - }, - { id: "none", data: { text: "None of these" } }, - ], - }, - }, - { - type: "question", - data: { - title: "What best describes the type of this unit?", - fn: "type", - options: [ - { id: "terraced", data: { text: "Terraced home", val: "terraced" } }, - { - id: "semiDetached", - data: { text: "Semi detached home", val: "semiDetached" }, - }, - { id: "detached", data: { text: "Detached home", val: "detached" } }, - { - id: "flat", - data: { text: "Flat/apartment or maisonette", val: "flat" }, - }, - { id: "LW", data: { text: "Live/work unit", val: "LW" } }, - { id: "cluster", data: { text: "Cluster flat", val: "cluster" } }, - { id: "studio", data: { text: "Studio or bedsit", val: "studio" } }, - { id: "coLiving", data: { text: "Co living unit", val: "coLiving" } }, - { id: "hostel", data: { text: "Hostel room", val: "hostel" } }, - { id: "HMO", data: { text: "HMO", val: "HMO" } }, - { - id: "student", - data: { text: "Student accommodation", val: "student" }, - }, - { id: "other", data: { text: "Other", val: "other" } }, - ], - }, - }, - { - type: "question", - data: { - title: "What best describes the provider of this unit?", - fn: "provider", - options: [ - { id: "private", data: { text: "Private", val: "private" } }, - { - id: "privateRented", - data: { text: "Private rented sector", val: "privateRented" }, - }, - { id: "HA", data: { text: "Housing association", val: "HA" } }, - { id: "LA", data: { text: "Local authority", val: "LA" } }, - { - id: "publicAuthority", - data: { text: "Other public authority", val: "publicAuthority" }, - }, - { - id: "councilDelivery", - data: { text: "Council delivery company", val: "councilDelivery" }, - }, - { - id: "councilBuildToRent", - data: { - text: "Council delivered build to rent", - val: "councilBuildToRent", - }, - }, - { - id: "affordableHousing", - data: { - text: "Other affordable housing provider", - val: "affordableHousing", - }, - }, - { id: "selfBuild", data: { text: "Self-build", val: "selfBuild" } }, - ], - }, - }, - { - type: "number", - data: { - title: "What is the Gross Internal Floor Area (GIA) of this unit?", - units: "m²", - fn: "area", - allowNegatives: false, - }, - }, - { - type: "question", - data: { - title: "Is this unit providing sheltered accommodation?", - fn: "sheltered", - options: [ - { id: "true", data: { text: "Yes", val: "true" } }, - { id: "false", data: { text: "No", val: "false" } }, - ], - }, - }, - { - type: "question", - data: { - title: "Is this unit specifically designed for older people?", - fn: "olderPersons", - options: [ - { id: "true", data: { text: "Yes", val: "true" } }, - { id: "false", data: { text: "No", val: "false" } }, - ], - }, - }, - { - type: "number", - data: { - title: "How many removed units fit the descriptions above?", - fn: "identicalUnits", - allowNegatives: false, - }, - }, - ], - min: 1, -} as const; diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Retained.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Retained.ts deleted file mode 100644 index 8a1da55ad0..0000000000 --- a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Retained.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Schema } from "@planx/components/shared/Schema/model"; - -export const ResidentialUnitsGLARetained: Schema = { - type: "Retained residential unit type", - fields: [ - { - type: "number", - data: { - title: "What is the number of bedrooms of this unit?", - fn: "bedrooms", - allowNegatives: false, - }, - }, - { - type: "question", - data: { - title: "Which best describes the tenure of this unit?", - fn: "tenure", - options: [ - { id: "LAR", data: { text: "London Affordable Rent", val: "LAR" } }, - { - id: "AR", - data: { - text: "Affordable rent (not at LAR benchmark rents)", - val: "AR", - }, - }, - { id: "SR", data: { text: "Social rent", val: "SR" } }, - { id: "LRR", data: { text: "London Living Rent", val: "LRR" } }, - { - id: "sharedEquity", - data: { text: "Shared equity", val: "sharedEquity" }, - }, - { id: "LSO", data: { text: "London Shared Ownership", val: "LSO" } }, - { id: "DMS", data: { text: "Discount market sale", val: "DMS" } }, - { id: "DMR", data: { text: "Discount market rent", val: "DMR" } }, - { - id: "DMRLLR", - data: { - text: "Discount market rent (charged at London Living Rents)", - val: "DMRLLR", - }, - }, - { - id: "marketForRent", - data: { text: "Market for rent", val: "marketForRent" }, - }, - { id: "SH", data: { text: "Starter homes", val: "SH" } }, - { - id: "selfCustomBuild", - data: { - text: "Self-build and custom build", - val: "selfCustomBuild", - }, - }, - { - id: "marketForSale", - data: { text: "Market for sale", val: "marketForSale" }, - }, - { id: "other", data: { text: "Other", val: "other" } }, - ], - }, - }, - { - type: "question", - data: { - title: "What best describes the type of this unit?", - fn: "type", - options: [ - { id: "terraced", data: { text: "Terraced home", val: "terraced" } }, - { - id: "semiDetached", - data: { text: "Semi detached home", val: "semiDetached" }, - }, - { id: "detached", data: { text: "Detached home", val: "detached" } }, - { - id: "flat", - data: { text: "Flat/apartment or maisonette", val: "flat" }, - }, - { id: "LW", data: { text: "Live/work unit", val: "LW" } }, - { id: "cluster", data: { text: "Cluster flat", val: "cluster" } }, - { id: "studio", data: { text: "Studio or bedsit", val: "studio" } }, - { id: "coLiving", data: { text: "Co living unit", val: "coLiving" } }, - { id: "hostel", data: { text: "Hostel room", val: "hostel" } }, - { id: "HMO", data: { text: "HMO", val: "HMO" } }, - { - id: "student", - data: { text: "Student accommodation", val: "student" }, - }, - { id: "other", data: { text: "Other", val: "other" } }, - ], - }, - }, - { - type: "number", - data: { - title: "How many retained units fit the descriptions above?", - fn: "identicalUnits", - allowNegatives: false, - }, - }, - ], - min: 1, -} as const; diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/PreviousLDCE.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/PreviousLDCE.ts new file mode 100644 index 0000000000..ba19d4e0d8 --- /dev/null +++ b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/PreviousLDCE.ts @@ -0,0 +1,78 @@ +import { Schema } from "@planx/components/shared/Schema/model"; + +export const ResidentialUnitsPreviousLDCE: Schema = { + type: "Previously existing residential unit type", + fields: [ + { + type: "number", + data: { + title: "Number of units of this type", + description: + "This is the number of units of this type that existed on the site before the changes.", + fn: "identicalUnits", + allowNegatives: false, + }, + }, + { + type: "question", + data: { + title: "What best describes this unit?", + fn: "type", + options: [ + { id: "house", data: { text: "House", val: "house" } }, + { + id: "flat", + data: { text: "Flat, apartment or maisonette", val: "flat" }, + }, + { + id: "liveWorkUnit", + data: { text: "Live/work unit", val: "LW" }, + }, + { + id: "sheltered", + data: { text: "Sheltered housing", val: "sheltered" }, + }, + { id: "studio", data: { text: "Studio or bedsit", val: "studio" } }, + { id: "cluster", data: { text: "Cluster flat", val: "cluster" } }, + { id: "other", data: { text: "Other", val: "other" } }, + ], + }, + }, + { + type: "question", + data: { + title: "What best describes the tenure of this unit?", + fn: "tenure", + options: [ + { id: "MH", data: { text: "Market housing", val: "MH" } }, + { + id: "SAIR", + data: { text: "Social, affordable or interim rent", val: "SAIR" }, + }, + { + id: "AHO", + data: { text: "Affordable home ownership", val: "AHO" }, + }, + { id: "SH", data: { text: "Starter homes", val: "SH" } }, + { + id: "selfCustomBuild", + data: { + text: "Self-build and custom build", + val: "selfCustomBuild", + }, + }, + { id: "other", data: { text: "Other", val: "other" } }, + ], + }, + }, + { + type: "number", + data: { + title: "How many bedrooms did this unit have?", + fn: "bedrooms", + allowNegatives: false, + }, + }, + ], + min: 1, +} as const; diff --git a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/Proposed.ts b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/Proposed.ts index a62a70cfef..e2a5ead690 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/Proposed.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/Proposed.ts @@ -3,10 +3,20 @@ import { Schema } from "@planx/components/shared/Schema/model"; export const ResidentialUnitsProposed: Schema = { type: "Proposed residential unit type", fields: [ + { + type: "number", + data: { + title: "Number of units of this type", + description: + "This is the total number of units of this type that will be on the site after the changes.", + fn: "identicalUnits", + allowNegatives: false, + }, + }, { type: "question", data: { - title: "What best describes the type of this unit?", + title: "What best describes this unit?", fn: "type", options: [ { id: "house", data: { text: "House", val: "house" } }, @@ -59,16 +69,6 @@ export const ResidentialUnitsProposed: Schema = { allowNegatives: false, }, }, - { - type: "number", - data: { - title: "How many units of the type described above are you proposing?", - description: - "This is the total number of units of this type that will be on the site after completion of the project.", - fn: "identicalUnits", - allowNegatives: false, - }, - }, ], min: 1, } as const;