Skip to content

Commit

Permalink
feat: Community Infrastructure Levy (CIL) schemas (#4084)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustlindemer authored Dec 17, 2024
1 parent 8607b97 commit d87637e
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor.planx.uk/src/@planx/components/List/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import { ICONS } from "../shared/icons";
import { EditorProps } from "../shared/types";
import { List, parseContent, validationSchema } from "./model";
import { ProposedAdvertisements } from "./schemas/Adverts";
import { ExistingBuildingsCIL } from "./schemas/CIL/ExistingCIL";
import { MezzanineCIL } from "./schemas/CIL/MezzanineCIL";
import { UnoccupiedBuildingsCIL } from "./schemas/CIL/UnoccupiedCIL";
import { NonResidentialFloorspace } from "./schemas/Floorspace";
import { BuildingDetailsGLA } from "./schemas/GLA/BuildingDetails";
import { CommunalSpaceGLA } from "./schemas/GLA/CommunalSpace";
Expand Down Expand Up @@ -69,6 +72,9 @@ export const SCHEMAS = [
{ name: "Proposed advertisements", schema: ProposedAdvertisements },
{ name: "Parking details", schema: Parking },
{ name: "Parking details (GLA)", schema: ParkingGLA },
{ name: "Existing buildings (CIL)", schema: ExistingBuildingsCIL },
{ name: "Unoccupied buildings (CIL)", schema: UnoccupiedBuildingsCIL },
{ name: "Mezzanine floors (CIL)", schema: MezzanineCIL },
{ name: "Trees", schema: Trees },
{ name: "Trees (Map first)", schema: TreesMapFirst },
];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { Schema } from "@planx/components/shared/Schema/model";
import { TextInputType } from "@planx/components/TextInput/model";

export const ExistingBuildingsCIL: Schema = {
type: "Existing building or part of building",
fields: [
{
type: "text",
data: {
title: "Describe the existing building or part",
fn: "descriptionExisting",
type: TextInputType.Short,
},
},
{
type: "number",
data: {
title: "How much of its floorspace will be retained?",
units: "m²",
fn: "area.retained",
allowNegatives: false,
},
},
{
type: "text",
data: {
title: "What will the retained floorspace be used for?",
description: "This can be identical to its current use.",
fn: "descriptionProposed",
type: TextInputType.Short,
},
},
{
type: "number",
data: {
title: "How much of its floorspace will be lost?",
units: "m²",
fn: "area.loss",
allowNegatives: false,
},
},
{
type: "question",
data: {
title:
"Has the building or part been lawfully occupied for 6 continuous months in the past 36 months?",
fn: "continuousOccupation",
options: [
{ id: "true", data: { text: "Yes", val: "true" } },
{ id: "false", data: { text: "No", val: "false" } },
],
},
},
{
type: "text",
data: {
title: "When was it last occupied for its lawful use?",
description: "Please enter a date or whether it is still in use.",
fn: "lastOccupation",
type: TextInputType.Short,
},
},
],
min: 1,
} as const;
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Schema } from "@planx/components/shared/Schema/model";
import { TextInputType } from "@planx/components/TextInput/model";

export const MezzanineCIL: Schema = {
type: "New mezzanine floor",
fields: [
{
type: "text",
data: {
title: "Describe the use of the mezzanine",
fn: "description",
type: TextInputType.Short,
},
},
{
type: "number",
data: {
title:
"What will be the Gross Internal Floor Area (GIA) of the mezzanine?",
units: "m²",
fn: "area",
allowNegatives: false,
},
},
],
min: 1,
} as const;
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Schema } from "@planx/components/shared/Schema/model";
import { TextInputType } from "@planx/components/TextInput/model";

export const UnoccupiedBuildingsCIL: Schema = {
type: "Building not meant for occupation or temporarily permitted",
fields: [
{
type: "text",
data: {
title: "Describe the existing building",
fn: "descriptionExisting",
type: TextInputType.Short,
},
},
{
type: "number",
data: {
title: "How much of its floorspace will be retained?",
units: "m²",
fn: "area.retained",
allowNegatives: false,
},
},
{
type: "text",
data: {
title: "What will the retained floorspace be used for?",
description: "This can be identical to its current use.",
fn: "descriptionProposed",
type: TextInputType.Short,
},
},
{
type: "number",
data: {
title: "How much of its floorspace will be lost?",
units: "m²",
fn: "area.loss",
allowNegatives: false,
},
},
],
min: 1,
} as const;

0 comments on commit d87637e

Please sign in to comment.