From e3e9e836328d30051662ba049ccc7275342430e6 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 7 Feb 2023 09:57:54 +0100 Subject: [PATCH] allow mixed answer for domestic use --- app/src/frontend/building/data-containers/community.tsx | 5 +++-- app/src/frontend/building/data-containers/use.tsx | 3 ++- app/src/frontend/config/data-fields-config.ts | 2 +- app/src/tiles/dataDefinition.ts | 2 +- migrations/037.is_domestic.up.sql | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index 885c1dfe..ad345bcb 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -43,10 +43,11 @@ const CommunityView: React.FunctionComponent = (props) => { Can you share your opinion on how well the building works? - = (props) => { user_verified_as={props.user_verified.is_domestic} verified_count={props.building.verified.is_domestic} /> - {props.building.is_domestic === false ? + {(props.building.is_domestic === "no" || props.building.is_domestic === "mixed") ? = (props) => { ){ return ( - 'yes' AND likes_total > 0`, community_local_significance_total: ` diff --git a/migrations/037.is_domestic.up.sql b/migrations/037.is_domestic.up.sql index da8e360b..33d556c3 100644 --- a/migrations/037.is_domestic.up.sql +++ b/migrations/037.is_domestic.up.sql @@ -1 +1 @@ -ALTER TABLE buildings ADD COLUMN IF NOT EXISTS is_domestic boolean null; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS is_domestic text null;