Merge branch 'master' into feature/display-of-planning-data
This commit is contained in:
commit
e6b6187c24
@ -1,6 +1,8 @@
|
||||
.data-entry-group-header {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 410;
|
||||
}
|
||||
.data-entry-group-header .data-entry-group-title {
|
||||
position: absolute;
|
||||
|
@ -26,7 +26,6 @@ const DataEntryGroup: React.FunctionComponent<DataEntryGroupProps> = (props) =>
|
||||
<CollapseIcon collapsed={collapsed} />
|
||||
<span className='data-entry-group-title'>
|
||||
{props.name}
|
||||
<span className='data-entry-group-count'>{showCount && ` (${React.Children.count(props.children)} attributes)`}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div className={`data-entry-group-body ${collapsed ? 'collapse' : ''}`}>
|
||||
|
@ -86,53 +86,8 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Designation/protection" collapsed={false} >
|
||||
<DataEntryGroup name="Conservation" collapsed={false} >
|
||||
<DataEntry
|
||||
title={dataFields.planning_in_conservation_area_id.title}
|
||||
slug="planning_in_conservation_area_id"
|
||||
value={props.building.planning_in_conservation_area_id}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
placeholder="Please add Conservation Area identifier"
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_in_conservation_area_url"
|
||||
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area_url !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_in_conservation_area_url")}
|
||||
user_verified_as={props.user_verified.planning_in_conservation_area_url}
|
||||
verified_count={props.building.verified.planning_in_conservation_area_url}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.planning_in_conservation_area_url.title}
|
||||
slug="planning_in_conservation_area_url"
|
||||
value={props.building.planning_in_conservation_area_url}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
isUrl={true}
|
||||
placeholder="Please add CA appraisal link here"
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.planning_conservation_area_name.title}
|
||||
slug="planning_conservation_area_name"
|
||||
value={props.building.planning_conservation_area_name}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_conservation_area_name"
|
||||
allow_verify={props.user !== undefined && props.building.planning_conservation_area_name !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_conservation_area_name")}
|
||||
user_verified_as={props.user_verified.planning_conservation_area_name}
|
||||
verified_count={props.building.verified.planning_conservation_area_name}
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Listed buildings & scheduled monuments" collapsed={false} >
|
||||
<DataEntryGroup name="Planning contraints and building protection" collapsed={false} >
|
||||
<DataEntryGroup name="Building protection" collapsed={false} >
|
||||
<NumericDataEntryWithFormattedLink
|
||||
title={dataFields.planning_list_id.title}
|
||||
slug="planning_list_id"
|
||||
@ -193,8 +148,6 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
user_verified_as={props.user_verified.planning_heritage_at_risk_url}
|
||||
verified_count={props.building.verified.planning_heritage_at_risk_url}
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Other types of protection & recording" collapsed={false} >
|
||||
<NumericDataEntryWithFormattedLink
|
||||
title={dataFields.planning_world_list_id.title}
|
||||
slug="planning_world_list_id"
|
||||
@ -214,24 +167,6 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
user_verified_as={props.user_verified.planning_world_list_id}
|
||||
verified_count={props.building.verified.planning_world_list_id}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.planning_in_apa_url.title}
|
||||
slug="planning_in_apa_url"
|
||||
value={props.building.planning_in_apa_url}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
isUrl={true}
|
||||
placeholder="Please add relevant link here"
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_in_apa_url"
|
||||
allow_verify={props.user !== undefined && props.building.planning_in_apa_url !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_in_apa_url")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.planning_local_list_url.title}
|
||||
slug="planning_local_list_url"
|
||||
@ -250,23 +185,51 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
user_verified_as={props.user_verified.planning_local_list_url}
|
||||
verified_count={props.building.verified.planning_local_list_url}
|
||||
/>
|
||||
<InfoBox msg="Designation data is currently incomplete. We are aiming for 100% coverage by April 2023." />
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Area protection" collapsed={false} >
|
||||
<DataEntry
|
||||
title={dataFields.planning_glher_url.title}
|
||||
slug="planning_glher_url"
|
||||
value={props.building.planning_glher_url}
|
||||
title={dataFields.planning_in_conservation_area_id.title}
|
||||
slug="planning_in_conservation_area_id"
|
||||
value={props.building.planning_in_conservation_area_id}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
placeholder="Please add Conservation Area identifier"
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_in_conservation_area_url"
|
||||
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area_url !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_in_conservation_area_url")}
|
||||
user_verified_as={props.user_verified.planning_in_conservation_area_url}
|
||||
verified_count={props.building.verified.planning_in_conservation_area_url}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.planning_in_conservation_area_url.title}
|
||||
slug="planning_in_conservation_area_url"
|
||||
value={props.building.planning_in_conservation_area_url}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
isUrl={true}
|
||||
placeholder="Please add relevant link here"
|
||||
placeholder="Please add CA appraisal link here"
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.planning_conservation_area_name.title}
|
||||
slug="planning_conservation_area_name"
|
||||
value={props.building.planning_conservation_area_name}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_glher_url"
|
||||
allow_verify={props.user !== undefined && props.building.planning_glher_url !== null && !props.edited}
|
||||
slug="planning_conservation_area_name"
|
||||
allow_verify={props.user !== undefined && props.building.planning_conservation_area_name !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_glher_url")}
|
||||
user_verified_as={props.user_verified.planning_glher_url}
|
||||
verified_count={props.building.verified.planning_glher_url}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_conservation_area_name")}
|
||||
user_verified_as={props.user_verified.planning_conservation_area_name}
|
||||
verified_count={props.building.verified.planning_conservation_area_name}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.planning_historic_area_assessment_url.title}
|
||||
@ -286,7 +249,102 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
user_verified_as={props.user_verified.planning_historic_area_assessment_url}
|
||||
verified_count={props.building.verified.planning_historic_area_assessment_url}
|
||||
/>
|
||||
<InfoBox msg="Designation data is currently incomplete. We are aiming for 100% coverage by April 2023." />
|
||||
<DataEntry
|
||||
title={dataFields.planning_in_apa_url.title}
|
||||
slug="planning_in_apa_url"
|
||||
value={props.building.planning_in_apa_url}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
isUrl={true}
|
||||
placeholder="Please add relevant link here"
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_in_apa_url"
|
||||
allow_verify={props.user !== undefined && props.building.planning_in_apa_url !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_in_apa_url")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Other types of zoning" collapsed={false} >
|
||||
<CheckboxDataEntry
|
||||
title="Is the building inside a flood zone?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="dummy"
|
||||
allow_verify={false}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("dummy")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
<CheckboxDataEntry
|
||||
title="Is the building in a strategic development zone for housing?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="dummy"
|
||||
allow_verify={false}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("dummy")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
<CheckboxDataEntry
|
||||
title="Is the building in a strategic development zone for commerce or industry?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="dummy"
|
||||
allow_verify={false}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("dummy")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
<CheckboxDataEntry
|
||||
title="Is the building within a protected sightline?"
|
||||
slug="planning_live_application"
|
||||
value={null}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="dummy"
|
||||
allow_verify={false}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("dummy")}
|
||||
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||
verified_count={props.building.verified.planning_in_apa_url}
|
||||
/>
|
||||
{/*
|
||||
<DataEntry
|
||||
title={dataFields.planning_glher_url.title}
|
||||
slug="planning_glher_url"
|
||||
value={props.building.planning_glher_url}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
isUrl={true}
|
||||
placeholder="Please add relevant link here"
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_glher_url"
|
||||
allow_verify={props.user !== undefined && props.building.planning_glher_url !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_glher_url")}
|
||||
user_verified_as={props.user_verified.planning_glher_url}
|
||||
verified_count={props.building.verified.planning_glher_url}
|
||||
/>
|
||||
*/}
|
||||
</DataEntryGroup>
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
|
@ -520,7 +520,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
planning_historic_area_assessment_url: {
|
||||
category: Category.Planning,
|
||||
title: "Does it have an <a href=\"https://historicengland.org.uk/images-books/publications/understanding-place-historic-area-assessments/\" target=\"_blank\">Historic Area Assessment</a>?",
|
||||
title: "Does it have any other type of <a href=\"https://historicengland.org.uk/images-books/publications/understanding-place-historic-area-assessments/\" target=\"_blank\">Historic Area Assessment</a>?",
|
||||
example: "",
|
||||
//tooltip: ,
|
||||
},
|
||||
|
@ -39,7 +39,7 @@ export const Login: React.FC = () => {
|
||||
<input name="username" id="username"
|
||||
className="form-control" type="text"
|
||||
value={username} onChange={e => setUsername(e.target.value)}
|
||||
placeholder="not-your-real-name" required
|
||||
placeholder="please note the user name you choose will be public" required
|
||||
/>
|
||||
|
||||
<label htmlFor="password">Password</label>
|
||||
|
@ -58,7 +58,7 @@ export const SignUp: React.FC = () => {
|
||||
value={email} onChange={e => setEmail(e.target.value)}
|
||||
placeholder="someone@example.com"
|
||||
/>
|
||||
<InfoBox msg="Please note that if you forget your password, you will only be able to recover your account if you provide an email address." />
|
||||
<InfoBox msg="Our policy is to avoid collecting personal data wherever possible. An email address is only necessary if you wish to be able to recover your account should you forget your password." />
|
||||
|
||||
<label htmlFor="confirm_email">Confirm email (optional)</label>
|
||||
<input name="confirm_email" id="confirm_email"
|
||||
|
@ -6,11 +6,16 @@ SET planning_local_list_url = 'identified as listed: please replace with link'
|
||||
WHERE planning_local_list_url = ''
|
||||
AND planning_in_local_list;
|
||||
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area_url VARCHAR DEFAULT '';
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area_id VARCHAR DEFAULT '';
|
||||
|
||||
UPDATE buildings
|
||||
SET planning_in_conservation_area_url = 'identified as within conservation area: please replace with link'
|
||||
WHERE planning_in_conservation_area_url = ''
|
||||
AND planning_in_conservation_area;
|
||||
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area;
|
||||
|
||||
--no need to store both id and link that can be derived from it
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_nhle_link;
|
||||
|
||||
@ -21,11 +26,6 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_apa_url VARCHAR DEFAU
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_heritage_at_risk_id;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_heritage_at_risk_url VARCHAR DEFAULT '';
|
||||
|
||||
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area_id VARCHAR DEFAULT '';
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area_url VARCHAR DEFAULT '';
|
||||
|
||||
--fully removed
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_glher;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_apa_name;
|
||||
|
Loading…
Reference in New Issue
Block a user