From 232b2f37eb5d7e5493ed606b6f32e309c5c14518 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:12:52 +0100 Subject: [PATCH 1/5] Create adverts.ts Added advertisement schema. --- .../@planx/components/List/schemas/adverts.ts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 editor.planx.uk/src/@planx/components/List/schemas/adverts.ts diff --git a/editor.planx.uk/src/@planx/components/List/schemas/adverts.ts b/editor.planx.uk/src/@planx/components/List/schemas/adverts.ts new file mode 100644 index 0000000000..20fea0ecbf --- /dev/null +++ b/editor.planx.uk/src/@planx/components/List/schemas/adverts.ts @@ -0,0 +1,40 @@ +import { Schema } from "../../model"; + +export const ProposedAdvertisements: Schema = { + type: "Proposed advertisements", + fields: [ + { + type: "number", + data: { + title: "How many fascia signs are you applying for?", + fn: "fascia", + allowNegatives: false, + }, + }, + { + type: "number", + data: { + title: "How many projecting or hanging signs are you applying for?", + fn: "projecting", + allowNegatives: false, + }, + }, + { + type: "number", + data: { + title: "How many hoardings are you applying for?", + fn: "hoarding", + allowNegatives: false, + }, + }, + { + type: "number", + data: { + title: "How many other advertisements are you applying for?", + fn: "other", + allowNegatives: false, + }, + }, + ], + min: 0, +} as const; From eb74b317127b0a526255b8fe82bf8aa536e28cbb Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:19:06 +0100 Subject: [PATCH 2/5] Update Editor.tsx Added schema selection for proposed advertisements --- editor.planx.uk/src/@planx/components/List/Editor.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor.planx.uk/src/@planx/components/List/Editor.tsx b/editor.planx.uk/src/@planx/components/List/Editor.tsx index 46873233b1..8f96df6187 100644 --- a/editor.planx.uk/src/@planx/components/List/Editor.tsx +++ b/editor.planx.uk/src/@planx/components/List/Editor.tsx @@ -20,6 +20,7 @@ import { ResidentialUnitsGLARemoved } from "./schemas/ResidentialUnits/GLA/Remov import { ResidentialUnitsGLARetained } from "./schemas/ResidentialUnits/GLA/Retained"; import { ResidentialUnitsProposed } from "./schemas/ResidentialUnits/Proposed"; import { Zoo } from "./schemas/Zoo"; +import { ProposedAdvertisements } from "./schemas/Adverts"; type Props = EditorProps; @@ -40,6 +41,7 @@ export const SCHEMAS = [ schema: ResidentialUnitsGLARetained, }, { name: "Zoo (test)", schema: Zoo }, + { name: "Proposed advertisements", schema: ProposedAdvertisements }, ]; function ListComponent(props: Props) { From b0641efa6104ba07d0c5d23e85dc4e2ad19a469e Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:19:27 +0100 Subject: [PATCH 3/5] Rename adverts.ts to Adverts.ts --- .../src/@planx/components/List/schemas/{adverts.ts => Adverts.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename editor.planx.uk/src/@planx/components/List/schemas/{adverts.ts => Adverts.ts} (100%) diff --git a/editor.planx.uk/src/@planx/components/List/schemas/adverts.ts b/editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts similarity index 100% rename from editor.planx.uk/src/@planx/components/List/schemas/adverts.ts rename to editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts From ff55588e058fcbb7b875fea7f01ae7ed49da1ffd Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:41:40 +0100 Subject: [PATCH 4/5] Update Adverts.ts --- editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts b/editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts index 20fea0ecbf..78c3e10c00 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts @@ -1,4 +1,4 @@ -import { Schema } from "../../model"; +import { Schema } from "../model"; export const ProposedAdvertisements: Schema = { type: "Proposed advertisements", From a266587731f5b774bf0f0525198f0fbe8b49b6f0 Mon Sep 17 00:00:00 2001 From: augustlindemer <118665588+augustlindemer@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:42:33 +0100 Subject: [PATCH 5/5] Update Adverts.ts --- editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts b/editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts index 78c3e10c00..67ab527929 100644 --- a/editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts +++ b/editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts @@ -1,4 +1,4 @@ -import { Schema } from "../model"; +import { Schema } from "@planx/components/List/model"; export const ProposedAdvertisements: Schema = { type: "Proposed advertisements",