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>
|
||||
Can you share your opinion on how well the building works?
|
||||
</InfoBox>
|
||||
<LogicalDataEntry
|
||||
<SelectDataEntry
|
||||
title={dataFields.is_domestic.title}
|
||||
slug="is_domestic"
|
||||
value={props.building.is_domestic}
|
||||
options={["yes", "no", "mixed"]}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
@ -60,7 +61,7 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (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") ?
|
||||
<UserOpinionEntry
|
||||
slug='community_like'
|
||||
title={buildingUserFields.community_like.title}
|
||||
|
@ -22,10 +22,11 @@ const UseView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
){
|
||||
return (
|
||||
<Fragment>
|
||||
<LogicalDataEntry
|
||||
<SelectDataEntry
|
||||
title={dataFields.is_domestic.title}
|
||||
slug="is_domestic"
|
||||
value={props.building.is_domestic}
|
||||
options={["yes", "no", "mixed"]}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
|
@ -575,7 +575,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
category: Category.Team,
|
||||
title: "Is the building a home/domestic building?",
|
||||
tooltip: "",
|
||||
example: false
|
||||
example: "mixed"
|
||||
},
|
||||
likes_total: {
|
||||
category: Category.Community,
|
||||
|
@ -116,7 +116,7 @@ const LAYER_QUERIES = {
|
||||
FROM
|
||||
buildings
|
||||
WHERE
|
||||
is_domestic = FALSE
|
||||
is_domestic <> 'yes'
|
||||
AND
|
||||
likes_total > 0`,
|
||||
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