From baab337aa37d85f22796961f58fa480e21eb9dfd Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Mon, 8 Jul 2024 12:58:09 +0100 Subject: [PATCH 1/3] Create Materials.ts --- editor.planx.uk/src/@planx/components/List/schemas/Materials.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 editor.planx.uk/src/@planx/components/List/schemas/Materials.ts diff --git a/editor.planx.uk/src/@planx/components/List/schemas/Materials.ts b/editor.planx.uk/src/@planx/components/List/schemas/Materials.ts new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/editor.planx.uk/src/@planx/components/List/schemas/Materials.ts @@ -0,0 +1 @@ + From 4b57ba0215b519779ed5cb1f2d540e6ad7b9b890 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:16:50 +0100 Subject: [PATCH 2/3] Update Materials.ts --- .../components/List/schemas/Materials.ts | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/editor.planx.uk/src/@planx/components/List/schemas/Materials.ts b/editor.planx.uk/src/@planx/components/List/schemas/Materials.ts index 8b13789179..be09469488 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/Materials.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/Materials.ts @@ -1 +1,63 @@ +import { Schema } from "@planx/components/List/model"; +import { TextInputType } from "@planx/components/TextInput/model"; +export const MaterialDetails: Schema = { + type: "Material", + fields: [ + { + type: "question", + data: { + title: "Type", + fn: "type", + options: [ + { id: "wall", data: { text: "External walls", val: "wall" } }, + { + id: "window", + data: { text: "Windows", val: "window" }, + }, + { id: "door", data: { text: "Doors", val: "door" } }, + { + id: "roof", + data: { text: "Roof", val: "roof" }, + }, + { + id: "boundary", + data: { + text: "Fences, walls and gates", + val: "boundary", + }, + }, + { + id: "surface", + data: { text: "External ground materials for access and parking", val: "surface" }, + }, + { + id: "lighting", + data: { text: "Lighting", val: "lighting" }, + }, + { + id: "other", + data: { text: "Others", val: "other" }, + }, + ], + }, + }, + { + type: "text", + data: { + title: "Existing material description", + fn: "existing", + type: TextInputType.Short, + }, + }, + { + type: "text", + data: { + title: "Proposed material description", + fn: "proposed", + type: TextInputType.Short, + }, + }, + ], + min: 1, +} as const; From d0e9aee150f40ca53aa354871440bb476b6b8b06 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:18:49 +0100 Subject: [PATCH 3/3] Update Editor.tsx --- editor.planx.uk/src/@planx/components/List/Editor.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor.planx.uk/src/@planx/components/List/Editor.tsx b/editor.planx.uk/src/@planx/components/List/Editor.tsx index bfa3e99ae8..53d1f15fad 100644 --- a/editor.planx.uk/src/@planx/components/List/Editor.tsx +++ b/editor.planx.uk/src/@planx/components/List/Editor.tsx @@ -14,6 +14,7 @@ import InputRowLabel from "ui/shared/InputRowLabel"; import { EditorProps, ICONS, InternalNotes, MoreInformation } from "../ui"; import { List, parseContent } from "./model"; import { ProposedAdvertisements } from "./schemas/Adverts"; +import { MaterialDetails } from "./schemas/Materials"; import { NonResidentialFloorspace } from "./schemas/Floorspace"; import { BuildingDetailsGLA } from "./schemas/GLA/BuildingDetails"; import { CommunalSpaceGLA } from "./schemas/GLA/CommunalSpace"; @@ -28,6 +29,7 @@ import { ResidentialUnitsGLARebuilt } from "./schemas/ResidentialUnits/GLA/Rebui import { ResidentialUnitsGLARemoved } from "./schemas/ResidentialUnits/GLA/Removed"; import { ResidentialUnitsProposed } from "./schemas/ResidentialUnits/Proposed"; + type Props = EditorProps; export const SCHEMAS = [ @@ -55,6 +57,7 @@ export const SCHEMAS = [ name: "Existing and proposed uses (GLA)", schema: ExistingAndProposedUsesGLA, }, + { name: "Material details", schema: MaterialDetails }, { name: "Building details (GLA)", schema: BuildingDetailsGLA }, { name: "Communal spaces (GLA)", schema: CommunalSpaceGLA }, { name: "Protected spaces (GLA)", schema: ProtectedSpaceGLA },