-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: List component - First iteration of a residential units schema (#…
- Loading branch information
1 parent
def8a8f
commit a8fac56
Showing
5 changed files
with
110 additions
and
12 deletions.
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
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
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
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
73 changes: 73 additions & 0 deletions
73
editor.planx.uk/src/@planx/components/List/schemas/ResidentialUnits.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,73 @@ | ||
import { Schema } from "../model"; | ||
|
||
export const ResidentialUnits: Schema = { | ||
type: "Residential Units", | ||
fields: [ | ||
{ | ||
type: "question", | ||
data: { | ||
title: "What type of change are you making?", | ||
fn: "changeType", | ||
options: [ | ||
{ id: "proposed", data: { text: "Proposed" } }, | ||
{ id: "existing", data: { text: "Existing" } }, | ||
], | ||
}, | ||
}, | ||
{ | ||
type: "question", | ||
unique: true, | ||
data: { | ||
title: "What is the tenure type?", | ||
fn: "tenureType", | ||
options: [ | ||
{ id: "marketHousing", data: { text: "Market housing" } }, | ||
{ | ||
id: "socialAffordableRent", | ||
data: { text: "Social and affordable rent" }, | ||
}, | ||
{ | ||
id: "affordableHomeOwnership", | ||
data: { text: "Affordable home ownership" }, | ||
}, | ||
{ id: "starterHome", data: { text: "Starter homes" } }, | ||
{ id: "selfBuild", data: { text: "Self build" } }, | ||
], | ||
}, | ||
}, | ||
{ | ||
type: "question", | ||
data: { | ||
title: "What is the unit type?", | ||
fn: "unitType", | ||
options: [ | ||
{ id: "houses", data: { text: "Houses" } }, | ||
{ id: "flats", data: { text: "Flats" } }, | ||
{ id: "bedsits", data: { text: "Bedsits" } }, | ||
{ id: "starterHome", data: { text: "Starter homes" } }, | ||
{ id: "shelteredHousing", data: { text: "Sheltered housing" } }, | ||
{ id: "clusteredFlats", data: { text: "Clustered flats" } }, | ||
{ id: "other", data: { text: "Other" } }, | ||
], | ||
}, | ||
}, | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many bedrooms are there?", | ||
fn: "numberBedrooms", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
{ | ||
type: "number", | ||
required: false, | ||
data: { | ||
title: "How many identical units of this type are there?", | ||
fn: "numberIdenticalUnits", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
], | ||
min: 1, | ||
} as const; |