diff --git a/frontend/src/components/Batch/Batch.vue b/frontend/src/components/Batch/Batch.vue index fabaa5e6..2fa7c267 100644 --- a/frontend/src/components/Batch/Batch.vue +++ b/frontend/src/components/Batch/Batch.vue @@ -1728,7 +1728,6 @@ export default { this.validating = false; } if (type == "students") { - //remove duplicates this.validating = true; if (value) { let student = await StudentService.getStudentByPen(value); @@ -1790,6 +1789,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,