-
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.
- Loading branch information
1 parent
85e851e
commit a7f59f8
Showing
6 changed files
with
117 additions
and
9 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
67 changes: 67 additions & 0 deletions
67
editor.planx.uk/src/@planx/components/List/schemas/GenericUnitsTest.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,67 @@ | ||
import { Schema } from "@planx/components/List/model"; | ||
|
||
export const GenericUnitsTest: Schema = { | ||
type: "Unit", | ||
fields: [ | ||
// fn = "development" triggers summary stat | ||
{ | ||
type: "question", | ||
data: { | ||
title: "What development does this unit result from?", | ||
fn: "development", | ||
options: [ | ||
{ id: "newBuild", data: { text: "New build", val: "newBuild" } }, | ||
{ | ||
id: "changeOfUseFrom", | ||
data: { | ||
text: "Change of use of existing single home", | ||
val: "changeOfUseFrom", | ||
}, | ||
}, | ||
{ | ||
id: "changeOfUseTo", | ||
data: { text: "Change of use to a home", val: "changeOfUseTo" }, | ||
}, | ||
], | ||
}, | ||
}, | ||
// options set "val" | ||
{ | ||
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" } }, | ||
], | ||
}, | ||
}, | ||
// options set "text" only | ||
{ | ||
type: "question", | ||
data: { | ||
title: "Is this unit built on garden land?", | ||
fn: "garden", | ||
options: [ | ||
{ id: "true", data: { text: "Yes" } }, | ||
{ id: "false", data: { text: "No" } }, | ||
], | ||
}, | ||
}, | ||
// fn = "identicalUnits" triggers summary stat | ||
{ | ||
type: "number", | ||
data: { | ||
title: "How many identical units does the description above apply to?", | ||
fn: "identicalUnits", | ||
allowNegatives: false, | ||
}, | ||
}, | ||
], | ||
min: 1, | ||
} as const; |
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