From 276becf63eda3bd2d2cba19800a3e5217f0c8f2d Mon Sep 17 00:00:00 2001 From: Shaun Lum Date: Tue, 5 Nov 2024 11:35:51 -0800 Subject: [PATCH 01/14] fixed batch errors pagination --- .../components/Batch/BatchJobErrorResults.vue | 41 +++++++++++-------- .../Batch/BatchJobSearchResults.vue | 2 +- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/frontend/src/components/Batch/BatchJobErrorResults.vue b/frontend/src/components/Batch/BatchJobErrorResults.vue index e167ccbe..dd26819a 100644 --- a/frontend/src/components/Batch/BatchJobErrorResults.vue +++ b/frontend/src/components/Batch/BatchJobErrorResults.vue @@ -6,19 +6,20 @@ +

There are no results to display.
Please select another Job Execution ID.

- - + @@ -58,9 +59,12 @@ export default { batchData: [], perPage: 10, rows: 0, + totalElements: 0, + itemsPerPage: 10, currentPage: 0, userSelectedPage: 0, batchLoading: false, + batchDataFields: [ { key: "pen", @@ -96,10 +100,6 @@ export default { computed: { ...mapGetters("auth", ["token"]), - - currentPageChange() { - return this.userSelectedPage; - }, }, created() { this.loadStudent = sharedMethods.loadStudent; @@ -109,13 +109,22 @@ export default { selectedErrorId: function () { this.getAdminDashboardData(this.selectedErrorId, 0); }, - currentPageChange: function () { - if (this.userSelectedPage !== null) { - this.getAdminDashboardData(this.selectedErrorId, this.userSelectedPage); - } - }, }, methods: { + loadItems({ page, itemsPerPage, sortBy }) { + this.batchLoading = true; + BatchProcessingService.getBatchErrors(this.selectedErrorId, page - 1) + .then((response) => { + this.batchData = response.data.errorList; + this.totalElements = response.data.totalElements; + this.batchLoading = false; + }) + .catch((error) => { + if (error.response.status) { + this.batchLoading = false; + } + }); + }, getAdminDashboardData(batchId, page) { this.batchData = []; this.rows = 0; diff --git a/frontend/src/components/Batch/BatchJobSearchResults.vue b/frontend/src/components/Batch/BatchJobSearchResults.vue index a13c3914..251b5aa9 100644 --- a/frontend/src/components/Batch/BatchJobSearchResults.vue +++ b/frontend/src/components/Batch/BatchJobSearchResults.vue @@ -129,7 +129,7 @@ export default { }) .catch((error) => { if (error.response.status) { - this.isBatchLoading = false; + this.batchLoading = false; } }); }, From b19eae1565d582b4589d17a243bc513bf64fe4a0 Mon Sep 17 00:00:00 2001 From: suzalflueck Date: Tue, 5 Nov 2024 13:17:57 -0800 Subject: [PATCH 02/14] typo fix --- .../src/components/StudentProfile/StudentOptionalPrograms.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/StudentProfile/StudentOptionalPrograms.vue b/frontend/src/components/StudentProfile/StudentOptionalPrograms.vue index 96a5485e..5408c0af 100644 --- a/frontend/src/components/StudentProfile/StudentOptionalPrograms.vue +++ b/frontend/src/components/StudentProfile/StudentOptionalPrograms.vue @@ -123,7 +123,7 @@ item.studentOptionalProgramData.optionalRequirementsMet .length != 0 " - >ALL requirements have been metAll requirements have been met
@@ -136,7 +136,7 @@ .length > 0 " > - ALL Requirements have been met + All Requirements have been met
Date: Tue, 5 Nov 2024 14:05:53 -0800 Subject: [PATCH 03/14] added total elements for batch search results --- frontend/src/components/Batch/BatchJobSearchResults.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Batch/BatchJobSearchResults.vue b/frontend/src/components/Batch/BatchJobSearchResults.vue index 251b5aa9..af4a0ec8 100644 --- a/frontend/src/components/Batch/BatchJobSearchResults.vue +++ b/frontend/src/components/Batch/BatchJobSearchResults.vue @@ -146,7 +146,7 @@ export default { StudentService.getBatchHistory(batchId, page) .then((response) => { this.batchData = response.data.content; - this.rows = response.data.totalElements; + this.totalElements = response.data.totalElements; this.itemsPerPage = response.data.size; this.batchLoading = false; }) From a382ce94fd3dc7608cf8a33ae5c33a306bcd5f5e Mon Sep 17 00:00:00 2001 From: Shaun Lum Date: Tue, 5 Nov 2024 16:35:26 -0800 Subject: [PATCH 04/14] fixed minstry of education --- .../components/Batch/Forms/DistrunForm.vue | 21 +++++++++++++++---- .../Batch/Forms/DistrunUserForm.vue | 17 +++++++++++++-- .../src/services/BatchProcessingService.js | 6 +++--- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/Batch/Forms/DistrunForm.vue b/frontend/src/components/Batch/Forms/DistrunForm.vue index e6c63d16..02fd9b58 100644 --- a/frontend/src/components/Batch/Forms/DistrunForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunForm.vue @@ -270,9 +270,15 @@ export default { // eslint-disable-next-line .catch((error) => { if (error.response.statusText) { - this.makeToast("ERROR " + error.response.statusText, "danger"); + this.snackbarStore.showSnackbar( + "ERROR " + error.response.statusText, + 5000 + ); } else { - this.makeToast("ERROR " + "error with webservervice", "danger"); + this.snackbarStore.showSnackbar( + "ERROR " + "error with webservervice", + 5000 + ); } }); }, @@ -284,9 +290,15 @@ export default { // eslint-disable-next-line .catch((error) => { if (error.response.statusText) { - this.makeToast("ERROR " + error.response.statusText, "danger"); + this.snackbarStore.showSnackbar( + "ERROR " + error.response.statusText, + 5000 + ); } else { - this.makeToast("ERROR " + "error with webservervice", "danger"); + this.snackbarStore.showSnackbar( + "ERROR " + "error with webservervice", + 5000 + ); } }); }, @@ -323,6 +335,7 @@ export default { this.getBatchRequest, requestTemplate ); + let response = await BatchProcessingService.runDISTRUN_MONTHLY( requestPayload, this.getBatchRequestCrontime diff --git a/frontend/src/components/Batch/Forms/DistrunUserForm.vue b/frontend/src/components/Batch/Forms/DistrunUserForm.vue index 36f6a619..1b2fca60 100644 --- a/frontend/src/components/Batch/Forms/DistrunUserForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunUserForm.vue @@ -543,9 +543,15 @@ export default { // eslint-disable-next-line .catch((error) => { if (error.response.statusText) { - this.makeToast("ERROR " + error.response.statusText, "danger"); + this.snackbarStore.showSnackbar( + "ERROR " + error.response.statusText, + 5000 + ); } else { - this.makeToast("ERROR " + "error with webservervice", "danger"); + this.snackbarStore.showSnackbar( + "ERROR " + "error with webservervice", + 5000 + ); } }); }, @@ -583,6 +589,13 @@ export default { this.getBatchRequest, requestTemplate ); + //set schoolOfRecords to "000000" + if ( + this.group == "Ministry of Advanced Education" && + this.getCredential == "Blank certificate print" + ) { + requestPayload.schoolOfRecords = ["00000000"]; + } let response = await BatchProcessingService.runDISTRUNUSER( requestPayload, this.getCredential, diff --git a/frontend/src/services/BatchProcessingService.js b/frontend/src/services/BatchProcessingService.js index a3297c66..a683e293 100644 --- a/frontend/src/services/BatchProcessingService.js +++ b/frontend/src/services/BatchProcessingService.js @@ -40,11 +40,11 @@ export default { //For Blank transcript print or Blank certificate print option, the payload must use the blankPayload if(credentialType == "Blank transcript print" || credentialType == "Blank certificate print"){ - scheduledRequest.payload = request; - scheduledRequest.blankPayLoad = null; - }else{ scheduledRequest.payload = null; scheduledRequest.blankPayLoad = request; + }else{ + scheduledRequest.payload = request; + scheduledRequest.blankPayLoad = null; } if(credentialType == "OT" && request.psi && request.psi.length >0){ From 3d23900466d98e11c1d4c9f95efd68e90b1656d6 Mon Sep 17 00:00:00 2001 From: Shaun Lum Date: Tue, 5 Nov 2024 16:48:39 -0800 Subject: [PATCH 05/14] fixed roles for monthy batch dist run --- frontend/src/components/Batch/Forms/DistrunForm.vue | 9 +++++++-- frontend/src/utils/constants.js | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Batch/Forms/DistrunForm.vue b/frontend/src/components/Batch/Forms/DistrunForm.vue index 02fd9b58..606a90ff 100644 --- a/frontend/src/components/Batch/Forms/DistrunForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunForm.vue @@ -3,7 +3,12 @@ - - - Loading... - -
Graduation Algorithm Submit
From 95a7cf0ad5f861cca72ba7f58129f9a359b88ff9 Mon Sep 17 00:00:00 2001 From: Shaun Lum Date: Wed, 6 Nov 2024 13:34:36 -0800 Subject: [PATCH 09/14] tvr delete fix --- .../Batch/Forms/ArchiveSchoolReportsForm.vue | 21 +++---- .../Batch/Forms/ArchiveStudentsForm.vue | 61 ++++++++++--------- .../components/Batch/Forms/DistrunForm.vue | 8 ++- .../Batch/Forms/DistrunFormYearEndForm.vue | 9 +-- .../Batch/Forms/GraduationAlgorithmForm.vue | 3 + .../Batch/Forms/NongradDistrunForm.vue | 8 ++- .../src/components/Batch/Forms/PSIForm.vue | 9 +-- .../Batch/Forms/RegenerateCertificateForm.vue | 8 ++- .../Forms/RegenerateSchoolReportForm.vue | 10 +-- .../Forms/TranscriptAlgorithmDeleteForm.vue | 18 +++--- .../Batch/Forms/TranscriptAlgorithmForm.vue | 11 ++-- 11 files changed, 92 insertions(+), 74 deletions(-) diff --git a/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue b/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue index 4b32ed08..18cf3326 100644 --- a/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue +++ b/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue @@ -186,17 +186,9 @@ > - Next - - Download - Submit @@ -237,7 +230,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 +305,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, selectedConfirmations: [], @@ -355,7 +349,7 @@ export default { }, async submit() { - this.dialog = false; + this.batchLoading = true; const requestTemplate = [ "districts", "gradDateFrom", @@ -379,7 +373,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 +388,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..da2edebb 100644 --- a/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue +++ b/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue @@ -213,7 +213,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -245,7 +246,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 +319,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, selectedConfirmations: [], }), @@ -380,7 +382,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; const requestTemplate = [ "credentialTypeCode", "districts", @@ -400,37 +402,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..4de97073 100644 --- a/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue @@ -113,7 +113,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -191,6 +192,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, }), computed: { @@ -254,7 +256,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; const requestTemplate = [ "credentialTypeCode", "districts", @@ -279,7 +281,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 +297,6 @@ export default { ); } this.closeDialogAndResetForm(); - this.setActiveTab("batchRuns"); this.updateDashboards(); } catch (error) { diff --git a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue index fa6dcbd8..7c96b5b4 100644 --- a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue +++ b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue @@ -267,6 +267,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, snackbarStore: useSnackbarStore(), batchProcessingStore: useBatchProcessingStore(), @@ -327,6 +328,7 @@ export default { this.step = step; }, async submit() { + this.batchLoading = true; try { this.batchLoading = true; const requestTemplate = [ @@ -368,6 +370,7 @@ export default { } this.closeDialogAndResetForm(); this.setActiveTab("batchRuns"); + this.updateDashboards(); } 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 3f7aa7dc..36478a7f 100644 --- a/frontend/src/components/Batch/Forms/NongradDistrunForm.vue +++ b/frontend/src/components/Batch/Forms/NongradDistrunForm.vue @@ -114,7 +114,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -192,6 +193,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, snackbarStore: useSnackbarStore(), }), @@ -256,7 +258,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; const requestTemplate = [ "credentialTypeCode", "districts", @@ -281,7 +283,7 @@ export default { requestPayload, this.getBatchRequestCrontime ); - + this.batchLoading = false; if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( "Non-Graduate Transcript Distribution Run has been successfully scheduled", diff --git a/frontend/src/components/Batch/Forms/PSIForm.vue b/frontend/src/components/Batch/Forms/PSIForm.vue index b7f696b5..ad1b3d09 100644 --- a/frontend/src/components/Batch/Forms/PSIForm.vue +++ b/frontend/src/components/Batch/Forms/PSIForm.vue @@ -110,7 +110,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -205,6 +206,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, snackbarStore: useSnackbarStore(), }), @@ -266,7 +268,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; try { const requestTemplate = [ "credentialTypeCode", @@ -293,7 +295,7 @@ export default { this.getPsiTrasmissionMode, this.getBatchRequestCrontime ); - + this.batchLoading = false; if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( "PSI Run FTP / Paper has been successfully scheduled", @@ -309,7 +311,6 @@ export default { ); } this.closeDialogAndResetForm(); - this.setActiveTab("batchRuns"); this.updateDashboards(); } catch (error) { diff --git a/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue b/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue index 3c99b24a..a0ecf441 100644 --- a/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue +++ b/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue @@ -129,7 +129,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -240,6 +241,7 @@ export default { data: () => ({ snackbarStore: useSnackbarStore(), step: 0, + batchLoading: false, dialog: false, }), computed: { @@ -273,7 +275,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; const requestTemplate = [ "districts", "pens", @@ -293,7 +295,7 @@ export default { requestPayload, this.getBatchRequestCrontime ); - + this.batchLoading = false; if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( "User Request Certificate Regeneration has been successfully scheduled", diff --git a/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue b/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue index 6dc691a8..e71d9143 100644 --- a/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue +++ b/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue @@ -145,7 +145,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -179,7 +180,7 @@ export default { watch(group, (newValue) => { batchRequestFormStore.who = newValue; if (newValue == "All Schools") { - batchRequestFormStore.setActivityCode("All"); + batchRequestFormStore.setActivityCode("ALL"); } else { batchRequestFormStore.setActivityCode(null); } @@ -257,6 +258,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, snackbarStore: useSnackbarStore(), batchProcessingStore: useBatchProcessingStore(), @@ -297,7 +299,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; try { const requestTemplate = [ "districts", @@ -321,7 +323,7 @@ export default { requestPayload, this.getBatchRequestCrontime ); - + this.batchLoading = false; if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( "User Request School Report Regeneration has been successfully scheduled", diff --git a/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue b/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue index dd3762d3..b03a7919 100644 --- a/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue +++ b/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue @@ -138,7 +138,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -170,11 +171,6 @@ export default { const group = ref(batchRequestFormStore.who); watch(group, (newValue) => { batchRequestFormStore.who = newValue; - if (newValue == "All Students") { - batchRequestFormStore.setActivityCode("ALL"); - } else { - batchRequestFormStore.setActivityCode(null); - } }); return { @@ -234,6 +230,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, snackbarStore: useSnackbarStore(), batchProcessingStore: useBatchProcessingStore(), @@ -295,7 +292,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; try { const requestTemplate = [ "credentialTypeCode", @@ -307,6 +304,7 @@ export default { "programs", "psiCodes", "quantity", + "activityCode", "reportTypes", "schoolCategoryCodes", "schoolOfRecords", @@ -316,11 +314,15 @@ export default { this.getBatchRequest, requestTemplate ); + requestPayload.reportTypes = ["ACHV"]; + if (this.group == "All Students") { + requestPayload.activityCode = "ALL"; + } let response = await BatchProcessingService.runTVR_DELETE( requestPayload, this.getBatchRequestCrontime ); - + this.batchLoading = false; if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( "Transcript verification report delete has been successfully scheduled", diff --git a/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue b/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue index a262a2c6..3e675255 100644 --- a/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue +++ b/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue @@ -138,7 +138,8 @@ class="text-none" density="default" @click="submit" - :disabled="v$.$invalid" + :loading="batchLoading" + :disabled="v$.$invalid || batchLoading" >Submit @@ -251,6 +252,7 @@ export default { }, data: () => ({ step: 0, + batchLoading: false, dialog: false, snackbarStore: useSnackbarStore(), }), @@ -312,7 +314,7 @@ export default { this.step = step; }, async submit() { - this.dialog = false; + this.batchLoading = true; try { const requestTemplate = [ "districts", @@ -336,8 +338,7 @@ export default { requestPayload, this.getBatchRequestCrontime ); - - this.activeTab = "batchRuns"; + this.batchLoading = false; if (this.getBatchRequestCrontime) { this.snackbarStore.showSnackbar( "Transcript verification report has been successfully scheduled", @@ -350,7 +351,9 @@ export default { 5000 ); } + this.setActiveTab("batchRuns"); this.closeDialogAndResetForm(); + this.updateDashboards(); } catch (error) { // handle the error and show the notification this.snackbarStore.showSnackbar( From 378443dd1e97a91ba002528c79096333676c6488 Mon Sep 17 00:00:00 2001 From: Shaun Lum Date: Wed, 6 Nov 2024 14:28:46 -0800 Subject: [PATCH 10/14] added varinat outine to batch forms --- .../Batch/Forms/ArchiveSchoolReportsForm.vue | 18 +++-- .../Batch/Forms/ArchiveStudentsForm.vue | 3 +- .../Batch/Forms/DistrunFormYearEndForm.vue | 3 +- .../Batch/Forms/DistrunUserForm.vue | 2 + .../Batch/Forms/FormInputs/DateRangeInput.vue | 11 +-- .../Forms/FormInputs/DistributionInput.vue | 2 + .../Batch/Forms/FormInputs/DistrictInput.vue | 3 +- .../Batch/Forms/FormInputs/PSIInput.vue | 6 +- .../Batch/Forms/FormInputs/ProgramInput.vue | 1 + .../Batch/Forms/FormInputs/SchoolInput.vue | 1 + .../Batch/Forms/FormInputs/StudentInput.vue | 3 +- .../Batch/Forms/GraduationAlgorithmForm.vue | 4 +- .../Batch/Forms/NongradDistrunForm.vue | 3 +- .../Batch/Forms/RegenerateCertificateForm.vue | 4 +- .../Forms/RegenerateSchoolReportForm.vue | 8 ++- .../Forms/TranscriptAlgorithmDeleteForm.vue | 4 +- .../Batch/Forms/TranscriptAlgorithmForm.vue | 69 ++++++++++--------- 17 files changed, 89 insertions(+), 56 deletions(-) diff --git a/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue b/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue index 18cf3326..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 - + + + diff --git a/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue b/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue index da2edebb..99bc6862 100644 --- a/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue +++ b/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue @@ -52,9 +52,10 @@ diff --git a/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue b/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue index 4de97073..f471800b 100644 --- a/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue @@ -57,7 +57,8 @@ diff --git a/frontend/src/components/Batch/Forms/DistrunUserForm.vue b/frontend/src/components/Batch/Forms/DistrunUserForm.vue index 8ad63ce2..f29335ab 100644 --- a/frontend/src/components/Batch/Forms/DistrunUserForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunUserForm.vue @@ -115,6 +115,8 @@ - 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 @@ diff --git a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue index 7c96b5b4..f8b97214 100644 --- a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue +++ b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue @@ -52,6 +52,7 @@