Fix Key change buttons
This commit is contained in:
parent
2da2834a72
commit
435d0cb2f3
@ -7,7 +7,6 @@ import { MultiSelectDataEntry } from '../data-components/multi-select-data-entry
|
|||||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||||
|
|
||||||
import { CategoryViewProps } from './category-view-props';
|
import { CategoryViewProps } from './category-view-props';
|
||||||
import InfoBox from '../../components/info-box';
|
|
||||||
import { LogicalDataEntry, LogicalDataEntryYesOnlyWithExplanation } from '../data-components/logical-data-entry/logical-data-entry';
|
import { LogicalDataEntry, LogicalDataEntryYesOnlyWithExplanation } from '../data-components/logical-data-entry/logical-data-entry';
|
||||||
import { buildingUserFields, dataFields } from '../../config/data-fields-config';
|
import { buildingUserFields, dataFields } from '../../config/data-fields-config';
|
||||||
|
|
||||||
@ -47,9 +46,7 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
<div className='community-opinion-pane'>
|
<div className='community-opinion-pane'>
|
||||||
{
|
{(props.building.is_domestic === "no" || props.building.is_domestic === "mixed domestic/non-domestic") ?
|
||||||
|
|
||||||
(props.building.is_domestic === "no" || props.building.is_domestic === "mixed domestic/non-domestic") ?
|
|
||||||
<>
|
<>
|
||||||
<UserOpinionEntry
|
<UserOpinionEntry
|
||||||
slug='community_like'
|
slug='community_like'
|
||||||
@ -61,13 +58,10 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
/>
|
/>
|
||||||
<button className={`map-switcher-inline ${props.mapColourScale == "likes" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`}>
|
|
||||||
{(props.mapColourScale == "likes")? 'Showing likes for specific buildings' : 'Click to see likes for specific buildings mapped'}
|
|
||||||
</button>
|
|
||||||
</>
|
</>
|
||||||
: <></>}
|
:
|
||||||
|
<></>
|
||||||
|
}
|
||||||
<LogicalDataEntryYesOnlyWithExplanation
|
<LogicalDataEntryYesOnlyWithExplanation
|
||||||
slug='community_type_worth_keeping'
|
slug='community_type_worth_keeping'
|
||||||
title={buildingUserFields.community_type_worth_keeping.title}
|
title={buildingUserFields.community_type_worth_keeping.title}
|
||||||
@ -80,6 +74,15 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
{(props.mapColourScale == "typology_likes") ?
|
||||||
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
||||||
|
{'Click here to change map to buildings of local interest.'}
|
||||||
|
</button>
|
||||||
|
:
|
||||||
|
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||||
|
{"Click to return to liked typologies mapped."}
|
||||||
|
</button>
|
||||||
|
}
|
||||||
{
|
{
|
||||||
props.building.community_type_worth_keeping === true &&
|
props.building.community_type_worth_keeping === true &&
|
||||||
<MultiSelectDataEntry
|
<MultiSelectDataEntry
|
||||||
@ -99,16 +102,7 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
{
|
|
||||||
/*
|
|
||||||
<button className={`map-switcher-inline ${props.mapColourScale == "typology_likes" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
|
||||||
{(props.mapColourScale == "typology_likes")? 'Showing likes for typologies (not about specific buildings)' : 'Click to see views on building typologies'}
|
|
||||||
</button>
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
|
|
||||||
<UserOpinionEntry
|
<UserOpinionEntry
|
||||||
slug='community_local_significance'
|
slug='community_local_significance'
|
||||||
title={buildingUserFields.community_local_significance.title}
|
title={buildingUserFields.community_local_significance.title}
|
||||||
@ -120,15 +114,14 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
/>
|
/>
|
||||||
{(props.mapColourScale == "community_local_significance_total") ?
|
{(props.mapColourScale == "community_local_significance_total") ?
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||||
{'Click to return to liked typologies mapped.'}
|
{'Click to return to liked typologies mapped.'}
|
||||||
</button>
|
</button>
|
||||||
:
|
:
|
||||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
||||||
{"Click here to change map to buildings of local interest."}
|
{"Click here to change map to buildings of local interest."}
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
<UserOpinionEntry
|
<UserOpinionEntry
|
||||||
slug='community_expected_planning_application'
|
slug='community_expected_planning_application'
|
||||||
@ -141,16 +134,14 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
/>
|
/>
|
||||||
{(props.mapColourScale == "community_expected_planning_application_total") ?
|
{(props.mapColourScale == "community_expected_planning_application_total") ?
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||||
{'Click to return to liked typologies mapped.'}
|
{'Click to return to liked typologies mapped.'}
|
||||||
</button>
|
</button>
|
||||||
:
|
:
|
||||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
|
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
|
||||||
{"Click here to change map to planning applications expected by community."}
|
{"Click here to change map to planning applications expected by community."}
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Building use for community activities">
|
<DataEntryGroup name="Building use for community activities">
|
||||||
@ -186,17 +177,6 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
/>
|
/>
|
||||||
{/* TODO: dates */}
|
|
||||||
{
|
|
||||||
// props.building.community_activities === true &&
|
|
||||||
// <FieldRow>
|
|
||||||
// <div>
|
|
||||||
// </div>
|
|
||||||
// <div>
|
|
||||||
// </div>
|
|
||||||
// </FieldRow>
|
|
||||||
}
|
|
||||||
|
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
slug='community_public_ownership'
|
slug='community_public_ownership'
|
||||||
title={dataFields.community_public_ownership.title}
|
title={dataFields.community_public_ownership.title}
|
||||||
@ -207,13 +187,13 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="community_public_ownership"
|
slug="community_public_ownership"
|
||||||
allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited}
|
allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited}
|
||||||
onVerify={props.onVerify}
|
onVerify={props.onVerify}
|
||||||
user_verified={props.user_verified.hasOwnProperty("community_public_ownership")}
|
user_verified={props.user_verified.hasOwnProperty("community_public_ownership")}
|
||||||
user_verified_as={props.user_verified.community_public_ownership}
|
user_verified_as={props.user_verified.community_public_ownership}
|
||||||
verified_count={props.building.verified.community_public_ownership}
|
verified_count={props.building.verified.community_public_ownership}
|
||||||
/>
|
/>
|
||||||
<MultiDataEntry
|
<MultiDataEntry
|
||||||
slug='community_public_ownership_sources'
|
slug='community_public_ownership_sources'
|
||||||
title={dataFields.community_public_ownership_sources.title}
|
title={dataFields.community_public_ownership_sources.title}
|
||||||
@ -226,21 +206,21 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="community_public_ownership_sources"
|
slug="community_public_ownership_sources"
|
||||||
allow_verify={props.user !== undefined && props.building.community_public_ownership_sources !== null && !props.edited}
|
allow_verify={props.user !== undefined && props.building.community_public_ownership_sources !== null && !props.edited}
|
||||||
onVerify={props.onVerify}
|
onVerify={props.onVerify}
|
||||||
user_verified={props.user_verified.hasOwnProperty("community_public_ownership_sources")}
|
user_verified={props.user_verified.hasOwnProperty("community_public_ownership_sources")}
|
||||||
user_verified_as={props.user_verified.community_public_ownership_sources}
|
user_verified_as={props.user_verified.community_public_ownership_sources}
|
||||||
verified_count={props.building.verified.community_public_ownership_sources}
|
verified_count={props.building.verified.community_public_ownership_sources}
|
||||||
/>
|
/>
|
||||||
{(props.mapColourScale == "community_in_public_ownership") ?
|
{(props.mapColourScale == "community_in_public_ownership") ?
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||||
{'Click to return to liked typologies mapped.'}
|
{'Click to return to liked typologies mapped.'}
|
||||||
</button>
|
</button>
|
||||||
:
|
:
|
||||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToPublicOwnershipMapStyle}>
|
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToPublicOwnershipMapStyle}>
|
||||||
{"Click here to see ownership type mapped."}
|
{"Click here to see ownership type mapped."}
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
</>
|
</>
|
||||||
|
Loading…
Reference in New Issue
Block a user