diff --git a/backend/src/components/ministrySDCReports.js b/backend/src/components/ministrySDCReports.js index dd7c6647..c6b4ff4e 100644 --- a/backend/src/components/ministrySDCReports.js +++ b/backend/src/components/ministrySDCReports.js @@ -4,7 +4,7 @@ const config = require('../config/index'); const HttpStatus = require('http-status-codes'); let reportTypes = ['indy-inclusive-ed-enrollment-headcounts', 'school-enrollment-headcounts', 'indy-school-enrollment-headcounts', 'school-address-report', 'fsa-registration-report', 'offshore-enrollment-headcounts', 'offshore-languages-headcounts', 'indy-inclusive-ed-funding-headcounts', 'indy-funding-report', 'online-indy-funding-report', 'non-graduated-adult-indy-funding-report', - 'inclusive-education-variance-headcounts','enrolled-fte-headcounts', 'enrolment-fte-headcounts-for-ce-ol-schools', 'refugee-enrolment-fte-headcounts']; + 'inclusive-education-variance-headcounts','enrolled-fte-headcounts', 'enrolment-fte-headcounts-for-ce-ol-schools', 'refugee-enrolment-fte-headcounts','posted-duplicates']; async function getMinistrySDCReport(req, res) { try { @@ -57,6 +57,7 @@ function getFileDetails(reportType) { 'enrolled-fte-headcounts': { filename: 'EnroledHeadcountsAndFteReport.csv', contentType: 'text/csv' }, 'enrolment-fte-headcounts-for-ce-ol-schools': { filename: 'EnroledHeadcountsAndFteReportForCEOLSchools.csv', contentType: 'text/csv' }, 'refugee-enrolment-fte-headcounts': { filename: 'RefugeeEnroledHeadcountsAndFteReport.csv', contentType: 'text/csv' }, + 'posted-duplicates': { filename: 'PostedDuplicatesReport.csv', contentType: 'text/csv' }, 'DEFAULT': { filename: 'download.pdf', contentType: 'application/pdf' } }; return mappings[reportType] || mappings['DEFAULT']; diff --git a/backend/src/routes/ministrySDCReports.js b/backend/src/routes/ministrySDCReports.js index e8d59d1f..c44da873 100644 --- a/backend/src/routes/ministrySDCReports.js +++ b/backend/src/routes/ministrySDCReports.js @@ -13,6 +13,6 @@ router.get('/public/:reportType/:collectionID', passport.authenticate('jwt', {se router.get('/independent/:reportType/:collectionID', passport.authenticate('jwt', {session: false}, undefined), permUtils.checkUserHasPermission(PERMISSION.REPORTS_SDC_INDEPENDENT_SCHOOLS_PERMISSION), permUtils.isValidUUIDParam('collectionID'), extendSession, getMinistrySDCReport); router.get('/headcount/:reportType/:collectionID', passport.authenticate('jwt', {session: false}, undefined), permUtils.checkUserHasPermission(PERMISSION.REPORTS_SDC_HEADCOUNTS_PERMISSION), permUtils.isValidUUIDParam('collectionID'), extendSession, getMinistrySDCReport); -router.get('/download/headcount/:reportType/:collectionID', auth.refreshJWT, permUtils.checkUserHasPermission(PERMISSION.REPORTS_SDC_HEADCOUNTS_PERMISSION), permUtils.isValidUUIDParam('collectionID'), extendSession, downloadMinistrySDCReport); +router.get('/download/headcount/:reportType/:collectionID', auth.refreshJWT, permUtils.checkUserHasPermission(PERMISSION.STUDENT_DATA_COLLECTION), permUtils.isValidUUIDParam('collectionID'), extendSession, downloadMinistrySDCReport); module.exports = router; diff --git a/frontend/src/components/data-collection/DuplicatesPosting.vue b/frontend/src/components/data-collection/DuplicatesPosting.vue index 50dd14a2..5ce7e2b7 100644 --- a/frontend/src/components/data-collection/DuplicatesPosting.vue +++ b/frontend/src/components/data-collection/DuplicatesPosting.vue @@ -38,6 +38,20 @@ @click="resolveRemainingDuplicates" /> + + + + mdi-tray-arrow-down + Download Posted Duplicates CSV + + + @@ -202,6 +216,7 @@ export default { duplicationResolutionDueDate: null, signoffDueDate: null }, + postedDupesReport: Routes.POSTED_DUPES_REPORT, monitorSdcDistrictCollectionsResponse: [], monitorSdcSchoolCollectionsResponse: [], isPostProvincialDuplicatesButtonDisabled: false, diff --git a/frontend/src/utils/constants.js b/frontend/src/utils/constants.js index d90c2ccf..a0639449 100644 --- a/frontend/src/utils/constants.js +++ b/frontend/src/utils/constants.js @@ -30,6 +30,7 @@ let object = { SESSION_REMAINING_TIME: authRoot + '/user-session-remaining-time', CONFIG: baseRoot + '/config', SDC_MINISTRY_REPORTS: ministrySDCReportsRoot, + POSTED_DUPES_REPORT: ministrySDCReportsRoot + '/download/headcount/posted-duplicates/', digitalIdentity: { ROOT_ENDPOINT: digitalIDRoot,