From 974034784f2a84044a20aad6560b05f72384e85c Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 10:46:30 +0100 Subject: [PATCH 01/12] Create Lost.ts --- .../List/schemas/ResidentialUnits/GLA/Lost.ts | 200 ++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Lost.ts 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 new file mode 100644 index 0000000000..d55013cb58 --- /dev/null +++ b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Lost.ts @@ -0,0 +1,200 @@ +import { Schema } from "@planx/components/List/model"; + +export const ResidentialUnitsGLALost: Schema = { + type: "Lost or replaced residential unit", + 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" } }, + { + id: "AR", + data: { text: "Affordable rent (not at LAR benchmark rents)" }, + }, + { id: "SR", data: { text: "Social rent" } }, + { id: "LRR", data: { text: "London Living Rent" } }, + { id: "sharedEquity", data: { text: "Shared equity" } }, + { id: "LSO", data: { text: "London Shared Ownership" } }, + { id: "DMS", data: { text: "Discount market sale" } }, + { id: "DMR", data: { text: "Discount market rent" } }, + { + id: "DMRLLR", + data: { + text: "Discount market rent (charged at London Living Rents)", + }, + }, + { id: "marketForRent", data: { text: "Market for rent" } }, + { id: "SH", data: { text: "Starter homes" } }, + { + id: "selfCustomBuild", + data: { text: "Self-build and custom build" }, + }, + { id: "marketForSale", data: { text: "Market for sale" } }, + { id: "other", data: { text: "Other" } }, + ], + }, + }, + // { + // type: "checklist", // @todo + // 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: + "Is this unit compliant with Part M4(2) of the Building Regulations 2010?", + fn: "complianceM42", // compliance.m42 + options: [ + { id: "true", data: { text: "Yes" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "question", + data: { + title: + "Is this unit compliant with Part M4(3)(2a) of the Building Regulations 2010?", + fn: "complianceM432a", // compliance.m432a + options: [ + { id: "true", data: { text: "Yes" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "question", + data: { + title: + "Is this unit compliant with Part M4(3)(2b) of the Building Regulations 2010?", + fn: "complianceM432b", // compliance.m432b + options: [ + { id: "true", data: { text: "Yes" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "question", + data: { + title: "What best describes the type of this unit?", + fn: "type", + options: [ + { id: "terraced", data: { text: "Terraced home" } }, + { id: "semiDetached", data: { text: "Semi detached home" } }, + { id: "detached", data: { text: "Detached home" } }, + { id: "flat", data: { text: "Flat/apartment or maisonette" } }, + { id: "LW", data: { text: "Live/work unit" } }, + { id: "cluster", data: { text: "Cluster flat" } }, + { id: "studio", data: { text: "Studio or bedsit" } }, + { id: "coLiving", data: { text: "Co living unit" } }, + { id: "hostel", data: { text: "Hostel room" } }, + { id: "HMO", data: { text: "HMO" } }, + { id: "student", data: { text: "Student accomodation" } }, + { id: "other", data: { text: "Other" } }, + ], + }, + }, + { + type: "question", + data: { + title: "What best describes the provider of this unit?", + fn: "provider", + options: [ + { id: "private", data: { text: "Private" } }, + { id: "privateRented", data: { text: "Private rented sector" } }, + { id: "HA", data: { text: "Housing association" } }, + { id: "LA", data: { text: "Local authority" } }, + { id: "publicAuthority", data: { text: "Other public authority" } }, + { id: "councilDelivery", data: { text: "Council delivery company" } }, + { + id: "councilBuildToRent", + data: { text: "Council delivered build to rent" }, + }, + { + id: "affordableHousing", + data: { text: "Other affordable housing provider" }, + }, + { id: "selfBuild", data: { text: "Self-build" } }, + ], + }, + }, + { + 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" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "question", + data: { + title: "Is this unit specifically designed for older people?", + fn: "olderPersons", + options: [ + { id: "true", data: { text: "Yes" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "number", + data: { + title: "How many identical units does the description above apply to?", + fn: "identicalUnits", + allowNegatives: false, + }, + }, + ], + min: 1, +} as const; From bf7789aee0ece8c3b8f89ac9ee09ba42f5540a7f Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 10:54:05 +0100 Subject: [PATCH 02/12] Create Gained.ts --- .../schemas/ResidentialUnits/GLA/Gained.ts | 225 ++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Gained.ts 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 new file mode 100644 index 0000000000..2ec4565243 --- /dev/null +++ b/editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Gained.ts @@ -0,0 +1,225 @@ +import { Schema } from "@planx/components/List/model"; + +export const ResidentialUnitsGLAGained: Schema = { + type: "Gained residential unit", + fields: [ + { + type: "question", + data: { + title: "What development does this unit result from?", + fn: "development", + options: [ + { id: "newBuild", data: { text: "New build", val: "newBuild" } }, + { id: "conversion", data: { text: "Conversion", val: "conversion" } }, + { id: "changeOfUse", data: { text: "Change of use", val: "changeOfUse" } }, + { id: "extension", data: { text: "Extension", val: "extension" } }, + { id: "notKnown", data: { text: "Not known", val: "notKnown" } }, + ], + }, + }, + { + 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" } }, + { + id: "AR", + data: { text: "Affordable rent (not at LAR benchmark rents)" }, + }, + { id: "SR", data: { text: "Social rent" } }, + { id: "LRR", data: { text: "London Living Rent" } }, + { id: "sharedEquity", data: { text: "Shared equity" } }, + { id: "LSO", data: { text: "London Shared Ownership" } }, + { id: "DMS", data: { text: "Discount market sale" } }, + { id: "DMR", data: { text: "Discount market rent" } }, + { + id: "DMRLLR", + data: { + text: "Discount market rent (charged at London Living Rents)", + }, + }, + { id: "marketForRent", data: { text: "Market for rent" } }, + { id: "SH", data: { text: "Starter homes" } }, + { + id: "selfCustomBuild", + data: { text: "Self-build and custom build" }, + }, + { id: "marketForSale", data: { text: "Market for sale" } }, + { id: "other", data: { text: "Other" } }, + ], + }, + }, + // { + // type: "checklist", // @todo + // 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: + "Is this unit compliant with Part M4(2) of the Building Regulations 2010?", + fn: "complianceM42", // compliance.m42 + options: [ + { id: "true", data: { text: "Yes" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "question", + data: { + title: + "Is this unit compliant with Part M4(3)(2a) of the Building Regulations 2010?", + fn: "complianceM432a", // compliance.m432a + options: [ + { id: "true", data: { text: "Yes" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "question", + data: { + title: + "Is this unit compliant with Part M4(3)(2b) of the Building Regulations 2010?", + fn: "complianceM432b", // compliance.m432b + options: [ + { id: "true", data: { text: "Yes" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "question", + data: { + title: "What best describes the type of this unit?", + fn: "type", + options: [ + { id: "terraced", data: { text: "Terraced home" } }, + { id: "semiDetached", data: { text: "Semi detached home" } }, + { id: "detached", data: { text: "Detached home" } }, + { id: "flat", data: { text: "Flat/apartment or maisonette" } }, + { id: "LW", data: { text: "Live/work unit" } }, + { id: "cluster", data: { text: "Cluster flat" } }, + { id: "studio", data: { text: "Studio or bedsit" } }, + { id: "coLiving", data: { text: "Co living unit" } }, + { id: "hostel", data: { text: "Hostel room" } }, + { id: "HMO", data: { text: "HMO" } }, + { id: "student", data: { text: "Student accomodation" } }, + { id: "other", data: { text: "Other" } }, + ], + }, + }, + { + type: "question", + data: { + title: "What best describes the provider of this unit?", + fn: "provider", + options: [ + { id: "private", data: { text: "Private" } }, + { id: "privateRented", data: { text: "Private rented sector" } }, + { id: "HA", data: { text: "Housing association" } }, + { id: "LA", data: { text: "Local authority" } }, + { id: "publicAuthority", data: { text: "Other public authority" } }, + { id: "councilDelivery", data: { text: "Council delivery company" } }, + { + id: "councilBuildToRent", + data: { text: "Council delivered build to rent" }, + }, + { + id: "affordableHousing", + data: { text: "Other affordable housing provider" }, + }, + { id: "selfBuild", data: { text: "Self-build" } }, + ], + }, + }, + { + type: "question", + data: { + title: "Is this unit built on garden land?", + fn: "garden", + options: [ + { id: "true", data: { text: "Yes" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + 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" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "question", + data: { + title: "Is this unit specifically designed for older people?", + fn: "olderPersons", + options: [ + { id: "true", data: { text: "Yes" } }, + { id: "false", data: { text: "No" } }, + ], + }, + }, + { + type: "number", + data: { + title: "How many identical units does the description above apply to?", + fn: "identicalUnits", + allowNegatives: false, + }, + }, + ], + min: 1, +} as const; From c31a0858aa154637395940146da9bb27b5552085 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:10:43 +0100 Subject: [PATCH 03/12] Update Editor.tsx --- .../src/@planx/components/List/Editor.tsx | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/editor.planx.uk/src/@planx/components/List/Editor.tsx b/editor.planx.uk/src/@planx/components/List/Editor.tsx index 8f96df6187..15b0df822f 100644 --- a/editor.planx.uk/src/@planx/components/List/Editor.tsx +++ b/editor.planx.uk/src/@planx/components/List/Editor.tsx @@ -14,11 +14,14 @@ import InputRowLabel from "ui/shared/InputRowLabel"; import { EditorProps, ICONS, InternalNotes, MoreInformation } from "../ui"; import { List, parseContent } from "./model"; import { ResidentialUnitsExisting } from "./schemas/ResidentialUnits/Existing"; -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 { ResidentialUnitsProposed } from "./schemas/ResidentialUnits/Proposed"; +// 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 { ResidentialUnitsGLAGained } from "./schemas/ResidentialUnits/GLA/Gained"; +import { ResidentialUnitsGLALost } from "./schemas/ResidentialUnits/GLA/Lost"; +import { ExistingAndProposedUsesGLA } from "./schemas/GLA/ExistingAndProposedUses"; import { Zoo } from "./schemas/Zoo"; import { ProposedAdvertisements } from "./schemas/Adverts"; @@ -27,19 +30,22 @@ 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: "Residentail units (GLA) - Removed", - schema: ResidentialUnitsGLARemoved, - }, - { - name: "Residential units (GLA) - Retained", - schema: ResidentialUnitsGLARetained, - }, + { name: "Residential units (GLA) - Gained", schema: ResidentialUnitsGLAGained }, + { name: "Residential units (GLA) - Lost", schema: ResidentialUnitsGLALost }, + { name: "Existing and proposed uses (GLA)", schema: ExistingAndProposedUsesGLA }, +// { name: "Residential units (GLA) - New", schema: ResidentialUnitsGLANew }, +// { +// name: "Residential units (GLA) - Rebuilt", +// schema: ResidentialUnitsGLARebuilt, +// }, +// { +// name: "Residentail units (GLA) - Removed", +// schema: ResidentialUnitsGLARemoved, +// }, +// { +// name: "Residential units (GLA) - Retained", +// schema: ResidentialUnitsGLARetained, +// }, { name: "Zoo (test)", schema: Zoo }, { name: "Proposed advertisements", schema: ProposedAdvertisements }, ]; From 596e1c0a2e105b6819f75ef19bdd180fb325aee2 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:32:05 +0100 Subject: [PATCH 04/12] Create ExistingAndProposedUses.ts --- .../schemas/GLA/ExistingAndProposedUses.ts | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts diff --git a/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts b/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts new file mode 100644 index 0000000000..02fa995ba7 --- /dev/null +++ b/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts @@ -0,0 +1,53 @@ +import { Schema } from "@planx/components/List/model"; + +export const ExistingAndProposedUsesGLA: Schema = { + type: "Existing and proposed uses", + fields: [ + { + type: "question", + data: { + title: "What is the use class?", + fn: "useClass", + options: [ + { id: "bTwo", data: { text: "B2 - General industry", val: "bTwo" } }, + { id: "bEight", data: { text: "B8 - Storage and distribution", val: "bEight" } }, + { id: "cOne", data: { text: "C1 - Hotels", val: "cOne" } }, + { id: "cTwo", data: { text: "C2 - Residential institutions", val: "cTwo" } }, + { id: "cTwoA", data: { text: "C2a - Secure residential institutions", val: "cTwoA" } }, + { id: "cThree", data: { text: "C3 - Dwellinghouses", val: "cThree" } }, + { id: "cFour", data: { text: "C4 - Houses in multiple occupation", val: "cFour" } }, + { id: "e", data: { text: "E - Commercial, business and service", val: "e" } }, + { id: "fOne", data: { text: "Learning and non-residential institutions", val: "fOne" } }, + { id: "fTwo", data: { text: "Local community uses", val: "fTwo" } }, + { id: "SG", data: { text: "Sui generis", val: "SG" } }, + { id: "unknown", data: { text: "Unknown", val: "unknown" } }, + ], + }, + }, + { + type: "number", + data: { + title: "What is the existing gross internal floor area (in square metres)?", + fn: "GIAExisting", + allowNegatives: false, + }, + }, + { + type: "number", + data: { + title: "What is the gross internal floor area lost (in square metres)?", + fn: "GIALost", + allowNegatives: false, + }, + }, + { + type: "number", + data: { + title: "What is the gross internal floor area gained (in square metres)?", + fn: "GIAGained", + allowNegatives: false, + }, + }, + ], + min: 1, +} as const; From 5a059efd18a368936764de99eb32f1156d3f8168 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:25:21 +0100 Subject: [PATCH 05/12] Update ExistingAndProposedUses.ts --- .../List/schemas/GLA/ExistingAndProposedUses.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts b/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts index 02fa995ba7..3ca65ea6b0 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts @@ -17,8 +17,8 @@ export const ExistingAndProposedUsesGLA: Schema = { { id: "cThree", data: { text: "C3 - Dwellinghouses", val: "cThree" } }, { id: "cFour", data: { text: "C4 - Houses in multiple occupation", val: "cFour" } }, { id: "e", data: { text: "E - Commercial, business and service", val: "e" } }, - { id: "fOne", data: { text: "Learning and non-residential institutions", val: "fOne" } }, - { id: "fTwo", data: { text: "Local community uses", val: "fTwo" } }, + { id: "fOne", data: { text: "F1 - Learning and non-residential institutions", val: "fOne" } }, + { id: "fTwo", data: { text: "F2 - Local community uses", val: "fTwo" } }, { id: "SG", data: { text: "Sui generis", val: "SG" } }, { id: "unknown", data: { text: "Unknown", val: "unknown" } }, ], @@ -27,7 +27,8 @@ export const ExistingAndProposedUsesGLA: Schema = { { type: "number", data: { - title: "What is the existing gross internal floor area (in square metres)?", + title: "What is the existing gross internal floor area?", + units: "m²", fn: "GIAExisting", allowNegatives: false, }, @@ -35,7 +36,8 @@ export const ExistingAndProposedUsesGLA: Schema = { { type: "number", data: { - title: "What is the gross internal floor area lost (in square metres)?", + title: "What is the gross internal floor area lost?", + units: "m²", fn: "GIALost", allowNegatives: false, }, @@ -43,7 +45,8 @@ export const ExistingAndProposedUsesGLA: Schema = { { type: "number", data: { - title: "What is the gross internal floor area gained (in square metres)?", + title: "What is the gross internal floor area gained?", + units: "m²", fn: "GIAGained", allowNegatives: false, }, From d9757b8099380be2ae9051302ce82786f04cd60d Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:27:04 +0100 Subject: [PATCH 06/12] Create CommunalSpace.ts --- .../List/schemas/GLA/CommunalSpace.ts | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 editor.planx.uk/src/@planx/components/List/schemas/GLA/CommunalSpace.ts diff --git a/editor.planx.uk/src/@planx/components/List/schemas/GLA/CommunalSpace.ts b/editor.planx.uk/src/@planx/components/List/schemas/GLA/CommunalSpace.ts new file mode 100644 index 0000000000..726cc1977e --- /dev/null +++ b/editor.planx.uk/src/@planx/components/List/schemas/GLA/CommunalSpace.ts @@ -0,0 +1,36 @@ +import { Schema } from "@planx/components/List/model"; + +export const CommunalSpaceGLA: Schema = { + type: "Unit of communal space", + fields: [ + { + type: "question", + data: { + title: "Is this unit of communal space lost or gained?", + fn: "development", + options: [ + { id: "gained", data: { text: "Gained", val: "gained" } }, + { id: "lost", data: { text: "Lost", val: "lost" } }, + ], + }, + }, + { + type: "number", + data: { + title: "What is the Gross Internal Floor Area (GIA) of this unit?", + units: "m²", + fn: "area", + allowNegatives: false, + }, + }, + { + type: "number", + data: { + title: "How many identical units does the description above apply to?", + fn: "identicalUnits", + allowNegatives: false, + }, + }, + ], + min: 1, +} as const; From 3aea51528ef50b12042b5f8fdcf9aa81db88657c Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:29:58 +0100 Subject: [PATCH 07/12] Update Editor.tsx --- editor.planx.uk/src/@planx/components/List/Editor.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor.planx.uk/src/@planx/components/List/Editor.tsx b/editor.planx.uk/src/@planx/components/List/Editor.tsx index 15b0df822f..9b707486ad 100644 --- a/editor.planx.uk/src/@planx/components/List/Editor.tsx +++ b/editor.planx.uk/src/@planx/components/List/Editor.tsx @@ -22,6 +22,7 @@ import { ResidentialUnitsProposed } from "./schemas/ResidentialUnits/Proposed"; import { ResidentialUnitsGLAGained } from "./schemas/ResidentialUnits/GLA/Gained"; import { ResidentialUnitsGLALost } from "./schemas/ResidentialUnits/GLA/Lost"; import { ExistingAndProposedUsesGLA } from "./schemas/GLA/ExistingAndProposedUses"; +import { CommunalSpaceGLA } from "./schemas/GLA/CommunalSpace"; import { Zoo } from "./schemas/Zoo"; import { ProposedAdvertisements } from "./schemas/Adverts"; @@ -33,6 +34,7 @@ export const SCHEMAS = [ { name: "Residential units (GLA) - Gained", schema: ResidentialUnitsGLAGained }, { name: "Residential units (GLA) - Lost", schema: ResidentialUnitsGLALost }, { name: "Existing and proposed uses (GLA)", schema: ExistingAndProposedUsesGLA }, + { name: "Communal spaces", schema: CommunalSpaceGLA }, // { name: "Residential units (GLA) - New", schema: ResidentialUnitsGLANew }, // { // name: "Residential units (GLA) - Rebuilt", From 6b56b2767408e3b9f5bd4988a8ca818d1459f894 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:31:00 +0100 Subject: [PATCH 08/12] Update ExistingAndProposedUses.ts --- .../components/List/schemas/GLA/ExistingAndProposedUses.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts b/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts index 3ca65ea6b0..b1732b4bd2 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts @@ -29,7 +29,7 @@ export const ExistingAndProposedUsesGLA: Schema = { data: { title: "What is the existing gross internal floor area?", units: "m²", - fn: "GIAExisting", + fn: "area.existing", allowNegatives: false, }, }, @@ -38,7 +38,7 @@ export const ExistingAndProposedUsesGLA: Schema = { data: { title: "What is the gross internal floor area lost?", units: "m²", - fn: "GIALost", + fn: "area.lost", allowNegatives: false, }, }, @@ -47,7 +47,7 @@ export const ExistingAndProposedUsesGLA: Schema = { data: { title: "What is the gross internal floor area gained?", units: "m²", - fn: "GIAGained", + fn: "area.gained", allowNegatives: false, }, }, From f76e2278262bd7db8c7ab57fcc4306f7b26601e8 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:50:50 +0100 Subject: [PATCH 09/12] Create BuildingDetails.ts --- .../List/schemas/GLA/BuildingDetails.ts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts diff --git a/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts b/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts new file mode 100644 index 0000000000..3bc8193d96 --- /dev/null +++ b/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts @@ -0,0 +1,34 @@ +import { Schema } from "@planx/components/List/model"; + +export const BuildingDetailsGLA: Schema = { + type: "Building detail", + fields: [ + { + type: "text", + data: { + title: "Building reference", + fn: "reference", + type: TextInputType.Short, + ], + }, + }, + { + type: "number", + data: { + title: "What is the maximum height of the building?", + units: "m", + fn: "height", + allowNegatives: false, + }, + }, + { + type: "number", + data: { + title: "How many storeys does the building have?", + fn: "storeys", + allowNegatives: false, + }, + }, + ], + min: 1, +} as const; From 322b78416641466dc65a758c1dd55c7d69fed179 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:52:13 +0100 Subject: [PATCH 10/12] Update Editor.tsx --- editor.planx.uk/src/@planx/components/List/Editor.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor.planx.uk/src/@planx/components/List/Editor.tsx b/editor.planx.uk/src/@planx/components/List/Editor.tsx index 9b707486ad..bcb1d988b4 100644 --- a/editor.planx.uk/src/@planx/components/List/Editor.tsx +++ b/editor.planx.uk/src/@planx/components/List/Editor.tsx @@ -23,6 +23,7 @@ import { ResidentialUnitsGLAGained } from "./schemas/ResidentialUnits/GLA/Gained import { ResidentialUnitsGLALost } from "./schemas/ResidentialUnits/GLA/Lost"; import { ExistingAndProposedUsesGLA } from "./schemas/GLA/ExistingAndProposedUses"; import { CommunalSpaceGLA } from "./schemas/GLA/CommunalSpace"; +import { BuildingDetailsGLA } from "./schemas/GLA/BuildingDetails"; import { Zoo } from "./schemas/Zoo"; import { ProposedAdvertisements } from "./schemas/Adverts"; @@ -34,7 +35,8 @@ export const SCHEMAS = [ { name: "Residential units (GLA) - Gained", schema: ResidentialUnitsGLAGained }, { name: "Residential units (GLA) - Lost", schema: ResidentialUnitsGLALost }, { name: "Existing and proposed uses (GLA)", schema: ExistingAndProposedUsesGLA }, - { name: "Communal spaces", schema: CommunalSpaceGLA }, + { name: "Communal spaces (GLA)", schema: CommunalSpaceGLA }, + { name: "Building details (GLA)", schema: BuildingDetailsGLA }, // { name: "Residential units (GLA) - New", schema: ResidentialUnitsGLANew }, // { // name: "Residential units (GLA) - Rebuilt", From 445b49f7d841adf47fa459a60b5518f00df40223 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:58:54 +0100 Subject: [PATCH 11/12] Update BuildingDetails.ts --- .../src/@planx/components/List/schemas/GLA/BuildingDetails.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts b/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts index 3bc8193d96..b72127049c 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts @@ -9,7 +9,6 @@ export const BuildingDetailsGLA: Schema = { title: "Building reference", fn: "reference", type: TextInputType.Short, - ], }, }, { From 919b46c4071f8c7bfc546319fb1b4793c302936b Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:05:54 +0100 Subject: [PATCH 12/12] Update BuildingDetails.ts --- .../src/@planx/components/List/schemas/GLA/BuildingDetails.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts b/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts index b72127049c..d77ac140b3 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/GLA/BuildingDetails.ts @@ -1,3 +1,4 @@ +import { TextInputType } from "@planx/components/TextInput/model"; import { Schema } from "@planx/components/List/model"; export const BuildingDetailsGLA: Schema = {