-
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: add parking space schemas (#3624)
- Loading branch information
1 parent
e1c2e22
commit 4dc4c0f
Showing
3 changed files
with
149 additions
and
0 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
83 changes: 83 additions & 0 deletions
83
editor.planx.uk/src/@planx/components/List/schemas/GLA/ParkingGLA.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,83 @@ | ||
import { Schema } from "@planx/components/shared/Schema/model"; | ||
|
||
export const ParkingGLA: Schema = { | ||
type: "Parking space type", | ||
fields: [ | ||
{ | ||
type: "question", | ||
data: { | ||
title: "Type", | ||
fn: "type", | ||
options: [ | ||
{ id: "cars", data: { text: "Cars", val: "cars" } }, | ||
{ | ||
id: "vans", | ||
data: { text: "Vans or minibuses", val: "vans" }, | ||
}, | ||
{ | ||
id: "motorcycles", | ||
data: { text: "Motorcycles", val: "motorcycles" }, | ||
}, | ||
{ | ||
id: "cycles", | ||
data: { | ||
text: "Bicycles", | ||
val: "cycles", | ||
}, | ||
}, | ||
{ | ||
id: "bus", | ||
data: { | ||
text: "Buses", | ||
val: "bus", | ||
}, | ||
}, | ||
{ | ||
id: "disabled", | ||
data: { text: "Disabled person parking", val: "disabled" }, | ||
}, | ||
{ | ||
id: "carClub", | ||
data: { | ||
text: "Car club", | ||
val: "carClub", | ||
}, | ||
}, | ||
{ | ||
id: "offStreet.residential", | ||
data: { | ||
text: "Residential off-street parking", | ||
val: "offStreet.residential", | ||
}, | ||
}, | ||
{ | ||
id: "other", | ||
data: { | ||
text: "Other", | ||
val: "other", | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many existing spaces of this type are there on the site?", | ||
fn: "existing", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many spaces of this type are you proposing?", | ||
description: | ||
"This is the total number of parking spaces of this type after the works, including any retained spaces.", | ||
fn: "proposed", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
], | ||
min: 1, | ||
} as const; |
62 changes: 62 additions & 0 deletions
62
editor.planx.uk/src/@planx/components/List/schemas/Parking.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,62 @@ | ||
import { Schema } from "@planx/components/shared/Schema/model"; | ||
|
||
export const Parking: Schema = { | ||
type: "Parking space type", | ||
fields: [ | ||
{ | ||
type: "question", | ||
data: { | ||
title: "Type", | ||
fn: "type", | ||
options: [ | ||
{ id: "cars", data: { text: "Cars", val: "cars" } }, | ||
{ | ||
id: "vans", | ||
data: { text: "Vans or minibuses", val: "vans" }, | ||
}, | ||
{ | ||
id: "motorcycles", | ||
data: { text: "Motorcycles", val: "motorcycles" }, | ||
}, | ||
{ | ||
id: "disabled", | ||
data: { text: "Disabled person parking", val: "disabled" }, | ||
}, | ||
{ | ||
id: "cycles", | ||
data: { | ||
text: "Bicycles", | ||
val: "cycles", | ||
}, | ||
}, | ||
{ | ||
id: "other", | ||
data: { | ||
text: "Other (e.g. bus)", | ||
val: "other", | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many existing spaces of this type are there on the site?", | ||
fn: "existing", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many spaces of this type are you proposing?", | ||
description: | ||
"This is the total number of parking spaces of this type after the works, including any retained spaces.", | ||
fn: "proposed", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
], | ||
min: 1, | ||
} as const; |