Skip to content

Commit

Permalink
Fix hardcoded and outdated category links
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoniecz committed Dec 11, 2024
1 parent 0a95362 commit 63e0d3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/src/frontend/building/data-containers/community.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SelectDataEntry from '../data-components/select-data-entry';
import Verification from '../data-components/verification';
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
import SliderDataEntry from '../data-components/slider-data-entry';
import { Category } from '../../config/categories-config';

/**
* Community view/edit section
Expand Down Expand Up @@ -320,7 +321,7 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
/>
<hr/>
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
<i className="source-url">Click <a href={"/"+props.mode+"/planning/"+props.building.building_id}>here</a> for 'Planning Controls' to see status of planning applications or to record if you think this building is likely to be demolished/significantly altered.</i>
<i className="source-url">Click <a href={"/"+props.mode+"/"+Category.PlanningConservation+"/"+props.building.building_id}>here</a> for 'Planning Controls' to see status of planning applications or to record if you think this building is likely to be demolished/significantly altered.</i>
</div>
{/* <label className='average-score'>
Average neuroaesthetic score for this building: <span className='float-right'><strong>{props.building.community_building_neuroaesthetic_avg}</strong></span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Fragment } from 'react';

import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
import { Category } from '../../config/categories-config';
import DataEntry from '../data-components/data-entry';
import { DataEntryGroup } from '../data-components/data-entry-group';
import NumericDataEntry from '../data-components/numeric-data-entry';
Expand Down Expand Up @@ -667,7 +668,7 @@ const ConstructionDesignView: React.FunctionComponent<CategoryViewProps> = (prop
/>
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
<i className="source-url">To edit the building age, and to see the data mapped, please go to&nbsp;
<a href={"/"+props.mode+"/age/"+props.building.building_id+"?sc=1"}>Age & History</a>.</i>
<a href={"/"+props.mode+"/"+Category.AgeHistory+"/"+props.building.building_id+"?sc=1"}>Age & History</a>.</i>
</div>
<DataEntryGroup name="Client" collapsed={subcat==null || subcat!="3"}>
<MultiDataEntry
Expand Down Expand Up @@ -959,7 +960,7 @@ const ConstructionDesignView: React.FunctionComponent<CategoryViewProps> = (prop
/>
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
<i className="source-url">To edit the extension date, and to see the data mapped, please go to&nbsp;
<a href={"/"+props.mode+"/age/"+props.building.building_id+"?sc=3"}>Age & History</a>.</i>
<a href={"/"+props.mode+"/"+Category.AgeHistory+"/"+props.building.building_id+"?sc=3"}>Age & History</a>.</i>
</div>
<DataEntryGroup name="Client" collapsed={subcat==null || subcat!="8"}>
<MultiDataEntry
Expand Down
3 changes: 2 additions & 1 deletion app/src/frontend/building/data-containers/typology-size.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Fragment } from 'react';

import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
import { Category } from '../../config/categories-config';
import DataEntry from '../data-components/data-entry';
import NumericDataEntry from '../data-components/numeric-data-entry';
import SelectDataEntry from '../data-components/select-data-entry';
Expand Down Expand Up @@ -124,7 +125,7 @@ const TypologySizeView: React.FunctionComponent<CategoryViewProps> = (props) =>
/>
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
<i className="source-url">To edit the historical period box, and to see the data mapped, please go to&nbsp;
<a href={"/"+props.mode+"/age/"+props.building.building_id+"?sc=2"}>Age & History</a>.</i>
<a href={"/"+props.mode+"/" + Category.AgeHistory + "/"+props.building.building_id+"?sc=2"}>Age & History</a>.</i>
</div>
</DataEntryGroup>
<DataEntryGroup name="Dynamic Classification" collapsed={subcat==null || subcat!="3"}>
Expand Down

0 comments on commit 63e0d3c

Please sign in to comment.