diff --git a/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue b/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue
index de6b5024..e212ec73 100644
--- a/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue
+++ b/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue
@@ -397,7 +397,10 @@ export default {
this.batchLoading = false;
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
this.snackbarStore.showSnackbar(
"An error occurred: " + error.message,
diff --git a/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue b/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue
index 99bc6862..8c437fdd 100644
--- a/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue
+++ b/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue
@@ -426,7 +426,10 @@ export default {
}
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
// handle the error and show the notification
this.snackbarStore.showSnackbar(
diff --git a/frontend/src/components/Batch/Forms/DistrunForm.vue b/frontend/src/components/Batch/Forms/DistrunForm.vue
index bab668a5..27e3f6c1 100644
--- a/frontend/src/components/Batch/Forms/DistrunForm.vue
+++ b/frontend/src/components/Batch/Forms/DistrunForm.vue
@@ -367,7 +367,10 @@ export default {
}
this.setActiveTab("batchRuns");
this.closeDialogAndResetForm();
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
// handle the error and show the notification
console.error("Error:", error);
diff --git a/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue b/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue
index f471800b..8383067c 100644
--- a/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue
+++ b/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue
@@ -299,7 +299,10 @@ export default {
}
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
this.snackbarStore.showSnackbar(
"An error occurred: " + error.message,
diff --git a/frontend/src/components/Batch/Forms/DistrunUserForm.vue b/frontend/src/components/Batch/Forms/DistrunUserForm.vue
index f29335ab..120e36a8 100644
--- a/frontend/src/components/Batch/Forms/DistrunUserForm.vue
+++ b/frontend/src/components/Batch/Forms/DistrunUserForm.vue
@@ -126,7 +126,10 @@
-
+
@@ -626,7 +629,10 @@ export default {
}
this.setActiveTab("batchRuns");
this.closeDialogAndResetForm();
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
// handle the error and show the notification
console.error("Error:", error);
diff --git a/frontend/src/components/Batch/Forms/FormInputs/StudentInput.vue b/frontend/src/components/Batch/Forms/FormInputs/StudentInput.vue
index 60fba7e9..b454e380 100644
--- a/frontend/src/components/Batch/Forms/FormInputs/StudentInput.vue
+++ b/frontend/src/components/Batch/Forms/FormInputs/StudentInput.vue
@@ -145,6 +145,7 @@ export default {
this.clearPenStudentInfo();
const result = await this.v$.$validate();
if (!result) {
+ this.penLoading = false;
return;
}
this.penValidating = false;
@@ -163,8 +164,10 @@ export default {
let student = await StudentService.getStudentByPen(this.pen);
if (student.data && student.data.length === 0) {
this.validationMessage = "Student not found";
+ this.penLoading = false;
return false;
}
+ let studentID = student.data[0].studentID;
let studentGRADStatus = await StudentService.getGraduationStatus(
student.data[0].studentID
@@ -186,6 +189,7 @@ export default {
if (studentGRADStatus.data.studentStatusName == "Merged") {
this.validationMessage =
this.pen + " is a merged student and not permitted";
+ this.penLoading = false;
return;
}
if (this.runType == "CERT_REGEN") {
@@ -193,6 +197,7 @@ export default {
if (!studentGRADStatus.data.programCompletionDate) {
this.validationMessage =
"Error: Cannot regenerate a certificate for this student - this student has not completed their program";
+ this.penLoading = false;
return;
}
}
@@ -204,7 +209,7 @@ export default {
) {
let certificate =
await GraduationReportService.getStudentCertificates(studentID);
- if (certificate.data.length) {
+ if (certificate?.data.length) {
//check that certificate has does not have a null distribution date
if (
@@ -213,17 +218,20 @@ export default {
) {
this.validationMessage =
"Cannot reprint certificate for this student. Distribution date is null";
+ this.penLoading = false;
return;
}
} else {
if (this.credentialType == "RC") {
this.validationMessage =
"Cannot reprint certificate for this student.";
+ this.penLoading = false;
return;
}
if (this.credentialType == "OC") {
this.validationMessage =
"Cannot print certificate for this student,this student does not have a certificate.";
+ this.penLoading = false;
return;
}
}
@@ -246,8 +254,8 @@ export default {
},
},
props: {
- credentialType: String,
runType: String,
+ credentialType: String,
},
computed: {
@@ -255,6 +263,7 @@ export default {
...mapState(useBatchRequestFormStore, [
"getBatchRequest",
"getBatchRunTime",
+ "getCredential",
]),
},
isEmpty() {
diff --git a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue
index f8b97214..9fc97cf5 100644
--- a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue
+++ b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue
@@ -370,9 +370,13 @@ export default {
5000
);
}
+
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
// handle the error and show the notification
this.snackbarStore.showSnackbar(
diff --git a/frontend/src/components/Batch/Forms/NongradDistrunForm.vue b/frontend/src/components/Batch/Forms/NongradDistrunForm.vue
index 8855527a..224b25f3 100644
--- a/frontend/src/components/Batch/Forms/NongradDistrunForm.vue
+++ b/frontend/src/components/Batch/Forms/NongradDistrunForm.vue
@@ -301,7 +301,10 @@ export default {
}
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
this.snackbarStore.showSnackbar(
"An error occurred: " + error.message,
diff --git a/frontend/src/components/Batch/Forms/PSIForm.vue b/frontend/src/components/Batch/Forms/PSIForm.vue
index ad1b3d09..2a4cac7c 100644
--- a/frontend/src/components/Batch/Forms/PSIForm.vue
+++ b/frontend/src/components/Batch/Forms/PSIForm.vue
@@ -312,7 +312,10 @@ export default {
}
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
this.snackbarStore.showSnackbar(
"An error occurred: " + error.message,
diff --git a/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue b/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue
index fe95c223..c5929421 100644
--- a/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue
+++ b/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue
@@ -314,7 +314,10 @@ export default {
}
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
this.snackbarStore.showSnackbar(
"An error occurred: " + error.message,
diff --git a/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue b/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue
index d637b906..12a665f2 100644
--- a/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue
+++ b/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue
@@ -346,7 +346,10 @@ export default {
}
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
this.snackbarStore.showSnackbar(
"An error occurred: " + error.message,
diff --git a/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue b/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue
index 7b603afd..e55b4cff 100644
--- a/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue
+++ b/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue
@@ -339,7 +339,10 @@ export default {
}
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
// handle the error and show the notification
this.snackbarStore.showSnackbar(
diff --git a/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue b/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue
index 26f41e76..ee492816 100644
--- a/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue
+++ b/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue
@@ -356,7 +356,10 @@ export default {
}
this.setActiveTab("batchRuns");
this.closeDialogAndResetForm();
- this.updateDashboards();
+ //add a wait before updating dashboard
+ setTimeout(() => {
+ this.updateDashboards();
+ }, 2000);
} catch (error) {
// handle the error and show the notification
this.snackbarStore.showSnackbar(