-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add new GLA schemas for residential units and existing and proposed uses #3264
Closed
Closed
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9740347
Create Lost.ts
augustlindemer bf7789a
Create Gained.ts
augustlindemer c31a085
Update Editor.tsx
augustlindemer 596e1c0
Create ExistingAndProposedUses.ts
augustlindemer 5a059ef
Update ExistingAndProposedUses.ts
augustlindemer d9757b8
Create CommunalSpace.ts
augustlindemer 3aea515
Update Editor.tsx
augustlindemer 6b56b27
Update ExistingAndProposedUses.ts
augustlindemer f76e227
Create BuildingDetails.ts
augustlindemer 322b784
Update Editor.tsx
augustlindemer 445b49f
Update BuildingDetails.ts
augustlindemer 919b46c
Update BuildingDetails.ts
augustlindemer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
editor.planx.uk/src/@planx/components/List/schemas/GLA/ExistingAndProposedUses.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
225 changes: 225 additions & 0 deletions
225
editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits/GLA/Gained.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi: "number" types accept an optional
units
like this that will display to the right of the input box: