Skip to content

Commit d3d31bc

Browse files
Merge pull request #2266 from bcgov/feature/addProjNonGradReports
Add Non-graduated projection reports
2 parents 48b9a3b + 8a9bc3f commit d3d31bc

File tree

4 files changed

+27
-17
lines changed

4 files changed

+27
-17
lines changed

backend/src/components/gradReports.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ async function handleReportDownload(req, res, reportType) {
7676
url += 'DISTREP_YE_SD';
7777
fileName = `${instituteMincode}_YearEnd_${formattedDate}.pdf`;
7878
break;
79+
case 'historicalProjNonGrad':
80+
url+= 'NONGRADPRJARC';
81+
fileName = `${instituteMincode}_HistoricalNotGraduatedProjection_${formattedDate}.pdf`;
82+
break;
83+
case 'projNonGrad':
84+
url+= 'NONGRADPRJ';
85+
fileName = `${instituteMincode}_NotGraduatedProjection_${formattedDate}.pdf`;
86+
break;
7987
default:
8088
return res.status(HttpStatus.BAD_REQUEST).json({ message: 'Invalid docType' });
8189
}

frontend/src/components/graduation/district/reports/GradDistrictReportsAndTranscripts.vue

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210
<v-col cols="12">
211211
<DownloadLink
212212
label="Projected Non-Graduates"
213-
:download-action="downloadGradProjections"
213+
:download-action="() => downloadGradProjections('projNonGrad')"
214214
/>
215215
</v-col>
216216
</v-row>
@@ -239,7 +239,7 @@
239239
<v-col cols="12">
240240
<DownloadLink
241241
label="Projected Non-Graduates"
242-
:download-action="downloadGradProjections"
242+
:download-action="() => downloadGradProjections('historicalProjNonGrad')"
243243
/>
244244
</v-col>
245245
</v-row>
@@ -463,8 +463,11 @@ export default {
463463
await fetchAndDownloadGradReport(this, schoolID, reportType, docTypeFilename(reportType), docTypeName(reportType), true, false);
464464
this.isLoading = false;
465465
},
466-
downloadGradProjections(){
467-
return;
466+
async downloadGradProjections(reportType){
467+
this.isLoading = true;
468+
const schoolID = this.schoolCodeNameFilter;
469+
await fetchAndDownloadGradReport(this, schoolID, reportType, docTypeFilename(reportType), docTypeName(reportType), true, true);
470+
this.isLoading = false;
468471
},
469472
close() {
470473
this.studentForSearch = {};
@@ -480,13 +483,6 @@ export default {
480483

481484
<style scoped>
482485
483-
.border {
484-
border: 2px solid grey;
485-
border-radius: 5px;
486-
padding: 35px;
487-
margin: 2em;
488-
}
489-
490486
h3 {
491487
color: #38598a;
492488
}

frontend/src/components/graduation/school/reports/GradSchoolReportsAndTranscripts.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
<v-col cols="12">
183183
<DownloadLink
184184
label="Projected Non-Graduates"
185-
:download-action="downloadProjectedGradReport"
185+
:download-action="() => downloadGradProjections('projNonGrad')"
186186
/>
187187
</v-col>
188188
</v-row>
@@ -208,7 +208,7 @@
208208
<v-col cols="12">
209209
<DownloadLink
210210
label="Projected Non-Graduates"
211-
:download-action = "downloadProjectedGradReport"
211+
:download-action = "() => downloadGradProjections('historicalProjNonGrad')"
212212
/>
213213
</v-col>
214214
</v-row>
@@ -399,11 +399,13 @@ export default {
399399
const schoolID = this.userInfo.activeInstituteIdentifier;
400400
await fetchAndDownloadGradReport(this, schoolID, reportType, docTypeFilename(reportType), docTypeName(reportType), true, false);
401401
},
402-
downloadProjectedGradReport(){
403-
return;
402+
async downloadGradProjections(reportType){
403+
this.isLoading = true;
404+
const schoolID = this.userInfo.activeInstituteIdentifier;
405+
await fetchAndDownloadGradReport(this, schoolID, reportType, docTypeFilename(reportType), docTypeName(reportType), true, true);
406+
this.isLoading = false;
404407
},
405408
close() {
406-
this.showPENSearchDialog = false;
407409
this.studentForSearch = {};
408410
this.studentPENXML = null;
409411
this.studentPENTranscript = null;

frontend/src/utils/gdc/gradReports.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ export function docTypeFilename(summaryDownloadType) {
149149
case 'transcript': return 'Transcript';
150150
case 'xml': return 'XML';
151151
case 'tvr': return 'TVR';
152-
case 'yearEnd': return 'Year-End Report';
152+
case 'yearEnd': return 'YearEndReport';
153+
case 'projNonGrad': return 'ProjectedNotGraduated';
154+
case 'historicalProjNonGrad': return 'HistoricalProjectedNotGraduated';
153155
default: return '';
154156
}
155157
}
@@ -163,6 +165,8 @@ export function docTypeName(summaryDownloadType) {
163165
case 'historicalGraduated': return 'Historical Graduated Students Summary';
164166
case 'historicalNonGraduated': return 'Historical Not Yet Graduated Students Summary';
165167
case 'yearEnd': return 'Year-End District Credential and Transcript Distribution Reports';
168+
case 'projNonGrad': return 'Not Yet Graduated Projection Report';
169+
case 'historicalProjNonGrad': return 'Historical Not Yet Graduated Projection Report';
166170
default: return '';
167171
}
168172
}

0 commit comments

Comments
 (0)