Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlumbcgov committed May 27, 2024
1 parent 7630192 commit 0f83d21
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions frontend/src/components/Batch/Batch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1746,7 +1746,6 @@ export default {
this.validating = false;
}
if (type == "students") {
//remove duplicates
this.validating = true;
if (value) {
let student = await StudentService.getStudentByPen(value);
Expand All @@ -1756,12 +1755,6 @@ export default {
} else if (student.data[0].studentStatus == "MER") {
this.validationMessage =
value + " is a merged student and not permitted";
} else if (
!student.data[0].programCompletionDate &&
this.batch.details["what"] == "CERT_REGEN"
) {
this.validationMessage =
"Cannot regenerate a certificate for this student - this student has not completed their program";
} else {
//check if student has a gradStatus
let studentGradStatus = await StudentService.getGraduationStatus(
Expand Down Expand Up @@ -1814,6 +1807,17 @@ export default {
return;
}
}
// Students must have a program completion date if regenerating their certificate
if (
!studentGradStatus.data.programCompletionDate &&
this.batch.details["what"] == "CERT_REGEN"
) {
this.validationMessage =
"Cannot regenerate a certificate for this student - this student has not completed their program";
this.validating = false;
return;
}
this.addValueToTypeInBatchId({
id,
type,
Expand Down

0 comments on commit 0f83d21

Please sign in to comment.