Fix Key change buttons

This commit is contained in:
Mike Simpson 2023-06-06 14:48:15 +01:00
parent 2da2834a72
commit 435d0cb2f3

View File

@ -7,7 +7,6 @@ import { MultiSelectDataEntry } from '../data-components/multi-select-data-entry
import { DataEntryGroup } from '../data-components/data-entry-group';
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 { buildingUserFields, dataFields } from '../../config/data-fields-config';
@ -47,9 +46,7 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
</i>
</div>
<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
slug='community_like'
@ -61,13 +58,10 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
mode={props.mode}
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
slug='community_type_worth_keeping'
title={buildingUserFields.community_type_worth_keeping.title}
@ -80,6 +74,15 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
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 &&
<MultiSelectDataEntry
@ -99,16 +102,7 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
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 />
<UserOpinionEntry
slug='community_local_significance'
title={buildingUserFields.community_local_significance.title}
@ -128,7 +122,6 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
{"Click here to change map to buildings of local interest."}
</button>
}
<hr />
<UserOpinionEntry
slug='community_expected_planning_application'
@ -149,8 +142,6 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
{"Click here to change map to planning applications expected by community."}
</button>
}
</div>
</DataEntryGroup>
<DataEntryGroup name="Building use for community activities">
@ -186,17 +177,6 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
onChange={props.onChange}
mode={props.mode}
/>
{/* TODO: dates */}
{
// props.building.community_activities === true &&
// <FieldRow>
// <div>
// </div>
// <div>
// </div>
// </FieldRow>
}
<SelectDataEntry
slug='community_public_ownership'
title={dataFields.community_public_ownership.title}