start showing registration date

This commit is contained in:
Mateusz Konieczny 2022-09-15 12:41:52 +02:00
parent e3ef25aa0c
commit 39190f7712
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import db from '../../../db';
export async function getBuildingPlanningDataById(id: number) { export async function getBuildingPlanningDataById(id: number) {
try { try {
return await db.any( return await db.any(
'SELECT building_properties.uprn, building_properties.building_id, planning_data.description, planning_data.status, planning_data.uprn, planning_data.planning_application_id, planning_application_link, to_char(planning_data.decision_date, \'YYYY-MM-DD\') AS decision_date, to_char(planning_data.last_synced_date, \'YYYY-MM-DD\') AS last_synced_date, planning_data.data_source, planning_data.data_source_link \ 'SELECT building_properties.uprn, building_properties.building_id, planning_data.description, planning_data.status, planning_data.uprn, planning_data.planning_application_id, planning_application_link, to_char(planning_data.registered_with_local_authority_date, \'YYYY-MM-DD\') AS registered_with_local_authority_date, to_char(planning_data.decision_date, \'YYYY-MM-DD\') AS decision_date, to_char(planning_data.last_synced_date, \'YYYY-MM-DD\') AS last_synced_date, planning_data.data_source, planning_data.data_source_link \
FROM building_properties \ FROM building_properties \
INNER JOIN planning_data ON \ INNER JOIN planning_data ON \
building_properties.uprn = planning_data.uprn WHERE building_id = $1', building_properties.uprn = planning_data.uprn WHERE building_id = $1',

View File

@ -55,7 +55,7 @@ const PlanningDataOfficialDataEntry: React.FC<PlanningDataOfficialDataEntryProps
<br/> <br/>
<div>Planning application status is visualised using data uploaded by local authorities to the <a href={data[0]["data_source_link"]}>{data[0]["data_source"]}</a></div> <div>Planning application status is visualised using data uploaded by local authorities to the <a href={data[0]["data_source_link"]}>{data[0]["data_source"]}</a></div>
<div><b>Planning application ID:</b> {data[0]["planning_application_id"]}</div> <div><b>Planning application ID:</b> {data[0]["planning_application_id"]}</div>
<div><b>Date registered by the planning authority (validation date)</b>: TODO</div> <div><b>Date registered by the planning authority (validation date)</b>: {data[0]["registered_with_local_authority_date"]}</div>
<div><b>Decision date</b>: {data[0]["decision_date"].toString()}</div> <div><b>Decision date</b>: {data[0]["decision_date"].toString()}</div>
<div><b>Description of proposed work</b>: <LongText content = {data[0]["description"]} limit = {400}/></div> <div><b>Description of proposed work</b>: <LongText content = {data[0]["description"]} limit = {400}/></div>
<div><b>Most recent update by data provider:</b> {data[0]["decision_date"]}</div> <div><b>Most recent update by data provider:</b> {data[0]["decision_date"]}</div>