Skip to content

Commit

Permalink
feat: Add Proposed Advertisements to List component and schema (#3262)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustlindemer authored Jun 11, 2024
1 parent 4ec33b0 commit 17a35c6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor.planx.uk/src/@planx/components/List/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<TYPES.List, List>;

Expand All @@ -40,6 +41,7 @@ export const SCHEMAS = [
schema: ResidentialUnitsGLARetained,
},
{ name: "Zoo (test)", schema: Zoo },
{ name: "Proposed advertisements", schema: ProposedAdvertisements },
];

function ListComponent(props: Props) {
Expand Down
41 changes: 41 additions & 0 deletions editor.planx.uk/src/@planx/components/List/schemas/Adverts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Schema } from "@planx/components/List/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: 1,
max: 1,
} as const;

0 comments on commit 17a35c6

Please sign in to comment.