Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Community Infrastructure Levy (CIL) schemas #4084

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Loading