diff --git a/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue b/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue index 4b32ed08..de6b5024 100644 --- a/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue +++ b/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue @@ -49,7 +49,7 @@ - Report Type + Report Type - + + + @@ -186,17 +192,9 @@ > - Next - - Download - Submit @@ -237,7 +236,7 @@ export default { watch(group, (newValue) => { batchRequestFormStore.who = newValue; if (newValue == "All Schools") { - batchRequestFormStore.setActivityCode("All"); + batchRequestFormStore.setActivityCode("ALL"); } else { batchRequestFormStore.setActivityCode(null); } @@ -312,6 +311,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, selectedConfirmations: [], @@ -355,7 +355,7 @@ export default { }, async submit() { - this.dialog = false; + this.batchLoading = true; const requestTemplate = [ "districts", "gradDateFrom", @@ -379,7 +379,7 @@ export default { requestPayload, this.getBatchRequestCrontime ); - + this.batchLoading = false; if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( "Archive School Reports Process has been successfully scheduled", @@ -394,6 +394,7 @@ export default { 5000 ); } + this.batchLoading = false; this.closeDialogAndResetForm(); this.setActiveTab("batchRuns"); this.updateDashboards(); diff --git a/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue b/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue index 7ae246ed..99bc6862 100644 --- a/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue +++ b/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue @@ -52,9 +52,10 @@ @@ -213,7 +214,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -245,7 +247,7 @@ export default { watch(group, (newValue) => { batchRequestFormStore.who = newValue; if (newValue == "All Students") { - batchRequestFormStore.setActivityCode("All"); + batchRequestFormStore.setActivityCode("ALL"); } else { batchRequestFormStore.setActivityCode(null); } @@ -318,6 +320,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, selectedConfirmations: [], }), @@ -380,7 +383,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; const requestTemplate = [ "credentialTypeCode", "districts", @@ -400,37 +403,38 @@ export default { this.getBatchRequest, requestTemplate ); - try { - let response = await BatchProcessingService.runArchiveStudents( - requestPayload, - this.getBatchRequestCrontime - ); - - if (this.getBatchRequestCrontime) { - this.snackbarStore.showSnackbar( - "Archive student batch process has been successfully scheduled", - 5000 + if (this.group == "All Students") + try { + let response = await BatchProcessingService.runArchiveStudents( + requestPayload, + this.getBatchRequestCrontime ); - } else { + this.batchLoading = false; + if (this.getBatchRequestCrontime) { + this.snackbarStore.showSnackbar( + "Archive student batch process has been successfully scheduled", + 5000 + ); + } else { + this.snackbarStore.showSnackbar( + "Batch " + + response.data.batchId + + "- Archive student batch process submitted", + "success", + 5000 + ); + } + this.closeDialogAndResetForm(); + this.setActiveTab("batchRuns"); + this.updateDashboards(); + } catch (error) { + // handle the error and show the notification this.snackbarStore.showSnackbar( - "Batch " + - response.data.batchId + - "- Archive student batch process submitted", - "success", + "An error occurred: " + error.message, + "danger", 5000 ); } - this.closeDialogAndResetForm(); - this.setActiveTab("batchRuns"); - this.updateDashboards(); - } catch (error) { - // handle the error and show the notification - this.snackbarStore.showSnackbar( - "An error occurred: " + error.message, - "danger", - 5000 - ); - } }, }, }; diff --git a/frontend/src/components/Batch/Forms/DistrunForm.vue b/frontend/src/components/Batch/Forms/DistrunForm.vue index 95a0069f..bab668a5 100644 --- a/frontend/src/components/Batch/Forms/DistrunForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunForm.vue @@ -58,7 +58,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -166,6 +167,7 @@ export default { data: () => ({ snackbarStore: useSnackbarStore(), step: 0, + batchLoading: false, dialog: false, groupSelected: "", transcriptTypes: [], @@ -320,7 +322,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; try { const requestTemplate = [ "pens", @@ -346,6 +348,7 @@ export default { requestPayload, this.getBatchRequestCrontime ); + this.batchLoading = false; if (response) { if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( @@ -362,6 +365,7 @@ export default { ); } } + this.setActiveTab("batchRuns"); this.closeDialogAndResetForm(); this.updateDashboards(); } catch (error) { diff --git a/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue b/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue index 52aaa754..f471800b 100644 --- a/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue @@ -57,7 +57,8 @@ @@ -113,7 +114,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -191,6 +193,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, }), computed: { @@ -254,7 +257,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; const requestTemplate = [ "credentialTypeCode", "districts", @@ -279,7 +282,7 @@ export default { requestPayload, this.getBatchRequestCrontime ); - + this.batchLoading = false; if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( "Year-End Credentials and Transcript Distribution Run has been successfully scheduled", @@ -295,7 +298,6 @@ export default { ); } this.closeDialogAndResetForm(); - this.setActiveTab("batchRuns"); this.updateDashboards(); } catch (error) { diff --git a/frontend/src/components/Batch/Forms/DistrunUserForm.vue b/frontend/src/components/Batch/Forms/DistrunUserForm.vue index ea9e2d04..f29335ab 100644 --- a/frontend/src/components/Batch/Forms/DistrunUserForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunUserForm.vue @@ -115,6 +115,8 @@ Download @@ -226,7 +229,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -413,6 +417,7 @@ export default { snackbarStore: useSnackbarStore(), step: 0, dialog: false, + batchLoading: false, groupSelected: "", transcriptTypes: [], certificateTypes: [], @@ -569,7 +574,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; try { const requestTemplate = [ "credentialTypeCode", @@ -603,6 +608,7 @@ export default { this.getBatchRequestCrontime ); if (response) { + this.batchLoading = false; if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( "User distribution batch request has been successfully scheduled", @@ -618,6 +624,7 @@ export default { ); } } + this.setActiveTab("batchRuns"); this.closeDialogAndResetForm(); this.updateDashboards(); } catch (error) { diff --git a/frontend/src/components/Batch/Forms/FormInputs/DateRangeInput.vue b/frontend/src/components/Batch/Forms/FormInputs/DateRangeInput.vue index 057610c4..ea7c9adf 100644 --- a/frontend/src/components/Batch/Forms/FormInputs/DateRangeInput.vue +++ b/frontend/src/components/Batch/Forms/FormInputs/DateRangeInput.vue @@ -7,6 +7,7 @@ - End Date must be greater than Start Date. + End Date must be greater than Start Date.
End Date is invalid or required. diff --git a/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue b/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue index d35ca370..f68f5ea4 100644 --- a/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue +++ b/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue @@ -8,6 +8,7 @@ label="Copies" type="number" required + variant="outlined" > @@ -23,6 +24,7 @@ item-title="title" item-value="value" label="Where" + variant="outlined" require hide-details > diff --git a/frontend/src/components/Batch/Forms/FormInputs/DistrictInput.vue b/frontend/src/components/Batch/Forms/FormInputs/DistrictInput.vue index fb1076ce..26c65c81 100644 --- a/frontend/src/components/Batch/Forms/FormInputs/DistrictInput.vue +++ b/frontend/src/components/Batch/Forms/FormInputs/DistrictInput.vue @@ -17,6 +17,7 @@ item-value="value" label="School Category" class="my-2" + variant="outlined" outlined hide-details > @@ -43,7 +44,7 @@ v-if="!selectAllDistricts" :items="getDistrictList" label="Category" - outlined + variant="outlined" :item-title="districtTitle" item-value="districtNumber" > diff --git a/frontend/src/components/Batch/Forms/FormInputs/PSIInput.vue b/frontend/src/components/Batch/Forms/FormInputs/PSIInput.vue index 4064d37c..deb58e98 100644 --- a/frontend/src/components/Batch/Forms/FormInputs/PSIInput.vue +++ b/frontend/src/components/Batch/Forms/FormInputs/PSIInput.vue @@ -7,7 +7,7 @@ v-model="transmissionMode" label="Select a Transmission Mode" :items="[{ title: 'Paper', value: 'PAPER' }, 'FTP']" - outlined + variant="outlined" small hide-details > @@ -21,7 +21,7 @@ v-model="psiYear" type="number" label="Enter PSI Year" - outlined + variant="outlined" small > @@ -36,7 +36,7 @@ v-model="psi" maxlength="3" @input="validatePSI" - outlined + variant="outlined" />
diff --git a/frontend/src/components/Batch/Forms/FormInputs/SchoolInput.vue b/frontend/src/components/Batch/Forms/FormInputs/SchoolInput.vue index 960ad26f..a85e9ff8 100644 --- a/frontend/src/components/Batch/Forms/FormInputs/SchoolInput.vue +++ b/frontend/src/components/Batch/Forms/FormInputs/SchoolInput.vue @@ -18,6 +18,7 @@ @@ -16,6 +17,7 @@ color="bcGovBlue" @click="addStudent()" :disabled="v$.pen.$invalid || pen == ''" + :loading="penLoading" > Add Student @@ -105,6 +107,7 @@ export default { data() { return { pen: "", + penLoading: false, penStudentInfo: "", penValidating: false, validationMessage: "", @@ -154,6 +157,7 @@ export default { this.clearPenStudentInfo(); }, async addStudent() { + this.penLoading = true; this.validationMessage = ""; if (this.pen.length == 9) { let student = await StudentService.getStudentByPen(this.pen); @@ -230,6 +234,7 @@ export default { info: this.penStudentInfo, }); this.clearPen(); + this.penLoading = false; } }, removeStudent(pen) { diff --git a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue index 7c881635..f8b97214 100644 --- a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue +++ b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue @@ -11,15 +11,6 @@ > - - - Loading... - -
Graduation Algorithm