Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grad2 2323 #590

Merged
merged 11 commits into from
Sep 3, 2024
86 changes: 65 additions & 21 deletions frontend/src/components/Batch/Batch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
>
</b-form-select>
</div>

<div class="mt-2" v-if="batch.details['what'] == 'ARC_SCH_REPORTS'">
<label class="font-weight-bold">Report Type</label>
<b-form-select
Expand Down Expand Up @@ -149,6 +150,15 @@
@change="editBatchJob('who', $event)"
></b-form-select>
</div>

<div v-if="batch.details['what'] == 'ARC_SCH_REPORTS'">
<b-alert :show="batch.details['what'] == 'ARC_SCH_REPORTS'">
This will archive current school reports, which will become static
and no longer be updated. School reports must be archived before
the new data collection cycle begins so they are not overwritten
entirely.
</b-alert>
</div>
<div v-if="batch.details['what'] == 'ARC_STUDENTS'">
<b-alert
:show="
Expand All @@ -157,8 +167,9 @@
"
>
All students with a School of Record matching the entered school
and with a student status of CUR or a student status of TER will
have their status changed to ARC
and with a student status of CUR
<strong>or a student status of TER</strong> will have their status
changed to ARC
</b-alert>
<b-alert
:show="
Expand Down Expand Up @@ -214,6 +225,7 @@
batch.details['what'] != 'DISTRUN_YE' &&
batch.details['what'] != 'DISTRUN_SUPP' &&
batch.details['what'] != 'ARC_STUDENTS' &&
batch.details['what'] != 'ARC_SCH_REPORTS' &&
batch.details['what'] != 'CERT_REGEN'
"
>
Expand Down Expand Up @@ -1004,6 +1016,25 @@
</b-form-checkbox>
</b-form-checkbox-group>
</b-form-group>

<b-form-group v-if="batch.details['what'] == 'ARC_SCH_REPORTS'">
<h4>
Batch Confirmation: please read and accept before submitting
</h4>
<b-form-checkbox-group
v-model="ARC_SCHOOL_REPORTS_confirm"
name="checkbox-group"
>
<b-form-checkbox value="finalGraduation">
Final Graduation Algorithm and TVR batch jobs have been run for
students from the previous cycle.
</b-form-checkbox>
<b-form-checkbox value="regenerateReports">
Regenerate School Reports are completed for any schools that
require final updates
</b-form-checkbox>
</b-form-checkbox-group>
</b-form-group>
<b-form-group label="Batch Run" v-slot="{ ariaDescribedby }">
<b-form-radio-group v-model="batchRunTime">
<b-form-radio
Expand Down Expand Up @@ -1053,8 +1084,6 @@
>Custom</b-form-radio
>
<div class="pl-4" v-if="batchRunSchedule == 'Custom'">
<!-- <label for="batch-datepicker">Choose a date:</label> -->

<b-form-datepicker
id="batch-datepicker"
v-model="batchRunCustomDate"
Expand Down Expand Up @@ -1234,6 +1263,7 @@ export default {
data: function () {
return {
ARC_STUDENTS_confirm: [],
ARC_SCHOOL_REPORTS_confirm: [],
runType: "",
reportTypes: [],
reportType: "",
Expand Down Expand Up @@ -1348,8 +1378,6 @@ export default {
{
text: "School",
value: "School",
description:
"All students with a School of Record matching the entered school and with a student status of CUR or TER will have their status changed to ARC",
},
{
text: "All Schools",
Expand All @@ -1373,25 +1401,24 @@ export default {
this.batchTypes = this.getBatchJobTypes();
this.reportTypes = [
{
code: "NONGRADREGARC",
code: "NONGRADPRJ",
label:
"Archived Not-Yet Graduated Students (MM YYYY to MM YYYY) Report",
"NONGRADPRJ - Projected Non-Graduates - Summary Report (MM YYYY to MM YYYY)",
description:
"The final daily, cumulative list of student in the current cycle who have not-yet graduated, based on the latest information submitted by the school. Produced as part of the Batch Graduation Algorithm Run.",
"A list of all current students reported on a graduation program, in grade 12 or AD, who are not projected to graduate based on missing course registrations or assessment registrations. Produced as part of TVR Batch Run.",
},
{
code: "GRADREGARC",
label:
"Archived Projected Non-Graduates - Summary Report (MM YYYY to MM YYYY)",
code: "GRADREG",
label: "GRADREG - Graduated Students (MM YYYY to MM YYYY) Report",
description:
"The final daily, cumulative list of student in the current cycle who have graduated, based on the latest information submitted by the school. Produced as part of the Batch Graduation Algorithm Run.",
"A daily, cumulative list of student in the current cycle who have graduated, based on the latest information submitted by the school. Produced as part of the Batch Graduation Algorithm Run.",
},
{
code: "NONGRADPRJARC",
code: "NONGRADREG",
label:
"Archived Projected Non-Graduates - Summary Report (MM YYYY to MM YYYY)",
"NONGRADREG - Not-Yet Graduated Students (MM YYYY to MM YYYY) Report",
description:
"The final list of grade 12 or AD students on a graduation program who were not projected to graduate based on missing course registrations or assessment registrations submitted by the school in the reporting cycle.",
"A daily, cumulative list of student in the current cycle who have not-yet graduated, based on the latest information submitted by the school. Produced as part of the Batch Graduation Algorithm Run.",
},
];
},
Expand Down Expand Up @@ -1539,11 +1566,9 @@ export default {
);
}
//disable code for release 1.7.0
this.batchTypes = this.batchTypes.map((type) => {
if (
type.code === "SCHL_RPT_REGEN" ||
type.code === "ARC_SCH_REPORTS" ||
type.code === "EDW_SNAPSHOT"
) {
type.disabled = true;
Expand Down Expand Up @@ -1631,15 +1656,28 @@ export default {
this.ARC_STUDENTS_confirm.length !== 3
) {
return true;
} else if (
this.batch.details["what"] == "ARC_SCH_REPORTS" &&
this.ARC_SCHOOL_REPORTS_confirm.length !== 2
) {
return true;
} else if (this.batchRunTime == "Run Now") {
return false;
} else {
if (this.batchRunSchedule && this.batchRunSchedule == "Custom") {
if (this.batchRunTime && this.batchRunCustomDate) {
} else if (this.batchRunTime == "Run Later") {
if (this.batchRunSchedule) {
if (this.batchRunSchedule != "Custom") {
return false;
} else if (
this.batchRunSchedule == "Custom" &&
this.batchRunCustomDate &&
this.batchRunCustomTime
) {
return false;
} else {
return true;
}
} else {
return true;
}
}
},
Expand Down Expand Up @@ -2013,6 +2051,9 @@ export default {
if (event == "ARC_STUDENTS") {
batchDetail.details["who"] = "School";
}
if (event == "ARC_SCH_REPORTS") {
batchDetail.details["who"] = "School";
}
}
if (type == "gradDateFrom") {
event = SharedMethods.dateFormatYYYYMMDD(this.gradDateFrom);
Expand Down Expand Up @@ -2196,4 +2237,7 @@ export default {
input {
border-radius: 0px;
}
.modal-body {
margin: 10px !important;
}
</style>
8 changes: 5 additions & 3 deletions frontend/src/components/Batch/BatchConfimInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
>Warning: You have selected a large volume of documents to be
printed</b-alert
>
<ul>
<ul class="p-3">
<li v-if="typeLabel"><strong>Run Type: </strong>{{ typeLabel }}</li>
<li v-if="details.copies && details.what == 'DISTRUNUSER'">
<strong>Copies: </strong>{{ details.copies }}
Expand All @@ -28,7 +28,8 @@
details.gradDate &&
details.who != 'PSI' &&
details.who != 'Student' &&
details.who != 'District'
details.who != 'District' &&
details.what == 'ARC_STUDENTS'
"
>
<strong>Select Students: </strong>
Expand Down Expand Up @@ -114,7 +115,8 @@
details.what != 'REGALG' &&
details.what != 'TVRRUN' &&
details.what != 'CERT_REGEN' &&
details.what != 'ARC_STUDENTS'
details.what != 'ARC_STUDENTS' &&
details.what != 'ARC_SCH_REPORTS'
"
>
<strong>Where: </strong>
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/components/Batch/v3BatchRuns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@
</div>
<div
class="row border-bottom p-2"
v-if="row.item.jobType != 'DISTRUNUSER'"
v-if="
row.item.jobType != 'DISTRUNUSER' &&
row.item.jobType != 'ARC_SCH_REPORTS'
"
>
<div class="col-10 p-2">
Rerun this batch for <br />{{
Expand Down Expand Up @@ -113,7 +116,7 @@
<div
class="row border-bottom p-2"
v-if="
row.item.jobType != 'DISTRUNUSER' &&
(row.item.jobType != 'DISTRUNUSER' || row.item.jobType != '' ||) &&
row.item.failedStudentsProcessed != 0
"
>
Expand Down
17 changes: 15 additions & 2 deletions frontend/src/services/BatchProcessingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default {
return ApiService.apiAxios.post('/api/v1/batch/executecertregenbatchjob', request);
}
},
runYearlyArchiveBatchJobStudents(request, cronTime=""){
runArchiveStudents(request, cronTime=""){
if(cronTime){
let scheduledRequest = {};
scheduledRequest.cronExpression = cronTime;
Expand All @@ -109,7 +109,20 @@ export default {
this.addScheduledJob(scheduledRequest);
return
}else{
return ApiService.apiAxios.post('/api/v1/batch/executeyearlyarchivebatchjobstudents', request);
return ApiService.apiAxios.post('/api/v1/batch/student/archive', request);
}
},
runArchiveSchoolReports(request, cronTime=""){
if(cronTime){
let scheduledRequest = {};
scheduledRequest.cronExpression = cronTime;
scheduledRequest.jobName = "ASRBJ";
scheduledRequest.blankPayLoad = null;
scheduledRequest.payload = request;
this.addScheduledJob(scheduledRequest);
return
}else{
return ApiService.apiAxios.post('/api/v1/batch/report/school/archive', request);
}
},
runCERTREGEN_ALL(){
Expand Down
31 changes: 21 additions & 10 deletions frontend/src/views/BatchProcessing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@
<div
class="row border-bottom p-2"
v-if="
row.item.jobType != 'ARC_STUDENTS'
row.item.jobType != 'ARC_STUDENTS' &&
row.item.jobType != 'ARC_SCH_REPORTS'
"
>
<div class="col-12">
Expand Down Expand Up @@ -158,6 +159,8 @@
row.item.jobType != 'DISTRUN_SUPP' &&
row.item.jobType != 'NONGRADRUN' &&
row.item.jobType != 'ARC_STUDENTS' &&
row.item.jobType !=
'ARC_SCH_REPORTS' &&
row.item.jobType != 'PSIRUN'
"
>
Expand Down Expand Up @@ -212,6 +215,8 @@
row.item.jobType != 'NONGRADRUN' &&
row.item.jobType != 'DISTRUN_SUPP' &&
row.item.jobType != 'ARC_STUDENTS' &&
row.item.jobType !=
'ARC_SCH_REPORTS' &&
row.item.failedStudentsProcessed != 0
"
>
Expand Down Expand Up @@ -264,6 +269,8 @@
row.item.jobType != 'NONGRADRUN' &&
row.item.jobType != 'DISTRUN_SUPP' &&
row.item.jobType != 'PSIRUN' &&
row.item.jobType !=
'ARC_SCH_REPORTS' &&
row.item.jobType != 'ARC_STUDENTS'
"
>
Expand Down Expand Up @@ -1330,7 +1337,10 @@ export default {
let index = id.replace("job-", "") - 1;
let value = true;
this.setTabLoading({ index, value });
BatchProcessingService.runYearlyArchiveBatchJobStudents(request)
if (this.tabContent[id].details["who"] == "All Students") {
request.activityCode = "ALL";
}
BatchProcessingService.runArchiveStudents(request)
.then((response) => {
//update the admin dashboard
this.getAdminDashboardData();
Expand Down Expand Up @@ -1358,13 +1368,17 @@ export default {
}
});
},
runManageSchoolReports(request, id) {
runArchiveSchoolReports(request, id) {
let requestId = id.replace("job-", "");
this.$set(this.spinners, id, true);
let index = id.replace("job-", "") - 1;
let value = true;
this.setTabLoading({ index, value });
BatchProcessingService.runYearlyArchiveBatchJobSchools(request)
if (this.tabContent[id].details["who"] == "All Schools") {
request.activityCode = "ALL";
}
delete request.credentialTypeCode;
BatchProcessingService.runArchiveSchoolReports(request)
.then((response) => {
//update the admin dashboard
this.getAdminDashboardData();
Expand Down Expand Up @@ -1792,10 +1806,7 @@ export default {
}
} else if (this.tabContent[id].details["what"] == "ARC_STUDENTS") {
delete request.credentialTypeCode;
//All Students group selected, set the payload activityCode:ALL
if (this.tabContent[id].details["who"] == "All Students") {
request.activityCode = "ALL";
}
if (cronTime) {
let scheduledRequest = {};
scheduledRequest.cronExpression = cronTime;
Expand All @@ -1810,12 +1821,12 @@ export default {
if (cronTime) {
let scheduledRequest = {};
scheduledRequest.cronExpression = cronTime;
scheduledRequest.jobName = "ARCS";
scheduledRequest.jobName = "ASRBJ";
scheduledRequest.blankPayLoad = null;
scheduledRequest.payload = request;
this.addScheduledJob(scheduledRequest, id);
} else {
this.runManageSchoolReports(request, id);
this.runArchiveSchoolReports(request, id);
}
}
},
Expand Down
Loading