allow mixed answer for domestic use
This commit is contained in:
parent
621a5b67db
commit
e3e9e83632
@ -43,10 +43,11 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
<InfoBox>
|
<InfoBox>
|
||||||
Can you share your opinion on how well the building works?
|
Can you share your opinion on how well the building works?
|
||||||
</InfoBox>
|
</InfoBox>
|
||||||
<LogicalDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.is_domestic.title}
|
title={dataFields.is_domestic.title}
|
||||||
slug="is_domestic"
|
slug="is_domestic"
|
||||||
value={props.building.is_domestic}
|
value={props.building.is_domestic}
|
||||||
|
options={["yes", "no", "mixed"]}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
@ -60,7 +61,7 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
user_verified_as={props.user_verified.is_domestic}
|
user_verified_as={props.user_verified.is_domestic}
|
||||||
verified_count={props.building.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") ?
|
||||||
<UserOpinionEntry
|
<UserOpinionEntry
|
||||||
slug='community_like'
|
slug='community_like'
|
||||||
title={buildingUserFields.community_like.title}
|
title={buildingUserFields.community_like.title}
|
||||||
|
@ -22,10 +22,11 @@ const UseView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
){
|
){
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<LogicalDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.is_domestic.title}
|
title={dataFields.is_domestic.title}
|
||||||
slug="is_domestic"
|
slug="is_domestic"
|
||||||
value={props.building.is_domestic}
|
value={props.building.is_domestic}
|
||||||
|
options={["yes", "no", "mixed"]}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
@ -575,7 +575,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Is the building a home/domestic building?",
|
title: "Is the building a home/domestic building?",
|
||||||
tooltip: "",
|
tooltip: "",
|
||||||
example: false
|
example: "mixed"
|
||||||
},
|
},
|
||||||
likes_total: {
|
likes_total: {
|
||||||
category: Category.Community,
|
category: Category.Community,
|
||||||
|
@ -116,7 +116,7 @@ const LAYER_QUERIES = {
|
|||||||
FROM
|
FROM
|
||||||
buildings
|
buildings
|
||||||
WHERE
|
WHERE
|
||||||
is_domestic = FALSE
|
is_domestic <> 'yes'
|
||||||
AND
|
AND
|
||||||
likes_total > 0`,
|
likes_total > 0`,
|
||||||
community_local_significance_total: `
|
community_local_significance_total: `
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user