From abc3ea3cc5b4281a9f9be63e6801df425595c1da Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 22 Feb 2022 21:30:26 +0100 Subject: [PATCH] Ask about community activities in building fixes #774 --- app/src/api/config/dataFields.ts | 12 +++++++++ .../building/data-containers/community.tsx | 27 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 18 +++++++++++++ 3 files changed, 57 insertions(+) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index e108b2c7..425ff76a 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -284,6 +284,18 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: false }, + community_activities_current: { + edit: true, + verify: false + }, + community_activities_always: { + edit: true, + verify: false + }, + community_activities_not_anymore: { + edit: true, + verify: false + }, community_public_ownership: { edit: true, verify: true diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index 2bb6e066..789f5d0b 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -91,6 +91,33 @@ const CommunityView: React.FunctionComponent = (props) => { onChange={props.onChange} mode={props.mode} /> + + + {/* TODO: dates */} { // props.building.community_activities === true && diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 8d18e1b8..3a59acd0 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -521,6 +521,24 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ tooltip: "E.g. youth club, place of worship, GP surgery, pub", example: true }, + community_activities_current: { + category: Category.Community, + title: "Are activities open to the community currently taking place in the building?", + tooltip: "E.g. youth club, place of worship, GP surgery, pub", + example: true + }, + community_activities_always: { + category: Category.Community, + title: "Has the building always been used for community activities?", + tooltip: "E.g. youth club, place of worship, GP surgery, pub", + example: true + }, + community_activities_not_anymore: { + category: Category.Community, + title: "Has the building been used in the past for community activities but isn't now?", + tooltip: "E.g. youth club, place of worship, GP surgery, pub", + example: true + }, // community_activities_dates: { // category: Category.Community, // title: "When was this building used for community activities?"