diff --git a/readme.md b/readme.md index 7d1fdcf6..8fbba153 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# Check planning and housing data for England +# Submit and update planning and housing data for England Project is a web application for validating and submitting planning and housing data for England. diff --git a/src/middleware/datasetOverview.middleware.js b/src/middleware/datasetOverview.middleware.js index c239554a..ac2a747e 100644 --- a/src/middleware/datasetOverview.middleware.js +++ b/src/middleware/datasetOverview.middleware.js @@ -62,7 +62,7 @@ const fetchEntityCount = fetchOne({ }) export const prepareDatasetOverviewTemplateParams = (req, res, next) => { - const { orgInfo, specification, columnSummary, entityCount, sources, dataset } = req + const { orgInfo, specification, columnSummary, entityCount, sources, dataset, issues } = req const mappingFields = columnSummary[0].mapping_field?.split(';') ?? [] const nonMappingFields = columnSummary[0].non_mapping_field?.split(';') ?? [] @@ -106,6 +106,7 @@ export const prepareDatasetOverviewTemplateParams = (req, res, next) => { req.templateParams = { organisation: orgInfo, dataset, + issueCount: issues.length ?? 0, stats: { numberOfFieldsSupplied: numberOfFieldsSupplied ?? 0, numberOfFieldsMatched: numberOfFieldsMatched ?? 0, @@ -127,10 +128,8 @@ const getDatasetOverview = renderTemplate( ) export default [ - parallel([ - fetchOrgInfo, - fetchDatasetInfo - ]), + fetchOrgInfo, + fetchDatasetInfo, parallel([ fetchColumnSummary, fetchResourceStatus, diff --git a/src/middleware/datasetTaskList.middleware.js b/src/middleware/datasetTaskList.middleware.js index 07ce42c3..8a5d9f23 100644 --- a/src/middleware/datasetTaskList.middleware.js +++ b/src/middleware/datasetTaskList.middleware.js @@ -113,9 +113,8 @@ const getDatasetTaskListError = renderTemplate({ export default [ fetchResourceStatus, - parallel([ - fetchOrgInfoWithStatGeo, - fetchDatasetInfo]), + fetchOrgInfoWithStatGeo, + fetchDatasetInfo, fetchIf(isResourceAccessible, fetchLatestResource), parallel([ fetchIf(isResourceAccessible, fetchLpaDatasetIssues), diff --git a/src/middleware/issueDetails.middleware.js b/src/middleware/issueDetails.middleware.js index e84e402e..ce5befd3 100644 --- a/src/middleware/issueDetails.middleware.js +++ b/src/middleware/issueDetails.middleware.js @@ -286,10 +286,8 @@ export const getIssueDetails = renderTemplate({ export default [ validateIssueDetailsQueryParams, - parallel([ - fetchOrgInfo, - fetchDatasetInfo - ]), + fetchOrgInfo, + fetchDatasetInfo, fetchIf(isResourceIdInParams, fetchLatestResource, takeResourceIdFromParams), fetchIssues, reformatIssuesToBeByEntryNumber, diff --git a/src/middleware/overview.middleware.js b/src/middleware/overview.middleware.js index 52df17d3..10bb11d2 100644 --- a/src/middleware/overview.middleware.js +++ b/src/middleware/overview.middleware.js @@ -1,6 +1,6 @@ import performanceDbApi, { lpaOverviewQuery } from '../services/performanceDbApi.js' import { fetchOrgInfo, logPageError } from './common.middleware.js' -import { fetchMany, FetchOptions, parallel, renderTemplate } from './middleware.builders.js' +import { fetchMany, FetchOptions, renderTemplate } from './middleware.builders.js' import { dataSubjects } from '../utils/utils.js' import config from '../../config/index.js' import _ from 'lodash' @@ -154,10 +154,8 @@ export const getOverview = renderTemplate({ }) export default [ - parallel([ - fetchOrgInfo, - fetchLatestResources] - ), + fetchOrgInfo, + fetchLatestResources, fetchEntityCounts, fetchLpaOverview, prepareOverviewTemplateParams, diff --git a/src/routes/schemas.js b/src/routes/schemas.js index ef2e15e8..7c9ed66b 100644 --- a/src/routes/schemas.js +++ b/src/routes/schemas.js @@ -73,6 +73,7 @@ export const OrgGetStarted = v.strictObject({ export const OrgDatasetOverview = v.strictObject({ organisation: OrgField, dataset: DatasetNameField, + issueCount: v.integer(), stats: v.strictObject({ numberOfRecords: v.integer(), numberOfFieldsSupplied: v.integer(), diff --git a/src/views/accessibility.html b/src/views/accessibility.html index ddf2bd04..65113ad3 100644 --- a/src/views/accessibility.html +++ b/src/views/accessibility.html @@ -1,12 +1,12 @@ {% extends "layouts/main.html" %} -{% set pageName = 'Accessibility statement for check planning and housing data for England' %} +{% set pageName = 'Accessibility statement for Submit and update planning and housing data for England' %} {% set markdownContent %} -# Accessibility statement for check planning and housing data for England +# Accessibility statement for Submit and update planning and housing data for England -This accessibility statement applies to the check planning and housing data for England service (publish.development.digital-land.info). +This accessibility statement applies to the Submit and update planning and housing data for England service (publish.development.digital-land.info). This service is run by the Ministry of Housing, Communities and Local Government (MHCLG). We want as many people as possible to be able to use this service. For example, that means you should be able to: diff --git a/src/views/cookies.html b/src/views/cookies.html index fce09ec2..b626585d 100644 --- a/src/views/cookies.html +++ b/src/views/cookies.html @@ -1,12 +1,12 @@ {% extends "layouts/main.html" %} -{% set pageName = 'Accessibility statement for check planning and housing data for England' %} +{% set pageName = 'Accessibility statement for Submit and update planning and housing data for England' %} {% set markdownContent %} -# Check planning and housing data for England cookies notice +# Submit and update planning and housing data for England cookies notice -The Check planning and housing data for England service puts cookies onto your computer to collect information about how you use the service. This helps us to: +The Submit and update planning and housing data for England service puts cookies onto your computer to collect information about how you use the service. This helps us to: @@ -21,16 +21,16 @@ Essential cookies are needed for the service to work. We do not need to ask for permission to use them. -## How cookies are used on the Check planning and housing data for England service +## How cookies are used on the Submit and update planning and housing data for England service ### Our cookie banner (essential) -When you first visit the Check planning and housing data for England service, you will see a banner asking if you accept cookies. We’ll store a cookie to remember which option you selected. You can always change your mind and change your choice on this page. +When you first visit the Submit and update planning and housing data for England service, you will see a banner asking if you accept cookies. We’ll store a cookie to remember which option you selected. You can always change your mind and change your choice on this page. Next time you visit the site, we will remember your preference and not show the banner again. -To do this, the Check planning and housing data for England service sets the following cookies: +To do this, the Submit and update planning and housing data for England service sets the following cookies: