From fbed33686b306bf5a3d30a81d40b2d3566ef9365 Mon Sep 17 00:00:00 2001 From: Shaun Lum Date: Fri, 22 Nov 2024 14:40:29 -0800 Subject: [PATCH 1/3] added user and addess to batch run for min of ae --- .../components/Batch/Forms/DistrunUserForm.vue | 16 +++++++++++++++- .../Batch/Forms/FormInputs/DistributionInput.vue | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Batch/Forms/DistrunUserForm.vue b/frontend/src/components/Batch/Forms/DistrunUserForm.vue index 120e36a80..c05981132 100644 --- a/frontend/src/components/Batch/Forms/DistrunUserForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunUserForm.vue @@ -260,6 +260,7 @@ import DistributionInput from "@/components/Batch/Forms/FormInputs/DistributionI import { mapActions, mapState } from "pinia"; import BatchProcessingService from "@/services/BatchProcessingService.js"; import { useAccessStore } from "../../../store/modules/access"; +import { useAuthStore } from "../../../store/modules/auth"; import { useSnackbarStore } from "../../../store/modules/snackbar"; import { useBatchProcessingStore } from "../../../store/modules/batchprocessing"; import { useBatchRequestFormStore } from "../../../store/modules/batchRequestFormStore"; @@ -305,7 +306,10 @@ export default { }); watch(group, (newValue) => { - batchRequestFormStore.who = newValue; + if (newValue == "Ministry of Advanced Education") { + batchRequestFormStore.who = newValue; + batchRequestFormStore.distribution = "User"; + } }); return { @@ -440,6 +444,7 @@ export default { ], }), computed: { + ...mapState(useAuthStore, ["userFullName"]), ...mapState(useAccessStore, ["hasPermissions"]), ...mapState(useBatchRequestFormStore, [ "getBatchRequest", @@ -603,6 +608,15 @@ export default { this.group == "Ministry of Advanced Education" && this.getCredential == "Blank certificate print" ) { + requestPayload.user = this.userFullName; + requestPayload.address = { + streetLine1: "4TH FLOOR 620 SUPERIOR", + streetLine2: "PO BOX 9886 STN PROV GOVT", + city: "VICTORIA", + region: "BRITISH COLUMBIA", + country: "CANADA", + code: "V8W9T6", + }; requestPayload.schoolOfRecords = ["00000000"]; } let response = await BatchProcessingService.runDISTRUNUSER( diff --git a/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue b/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue index f68f5ea4a..ca1f04345 100644 --- a/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue +++ b/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue @@ -27,6 +27,7 @@ variant="outlined" require hide-details + :disabled="distribution === 'User'" > From 4b8d6144cc11b8460f47e924d89da0e24828778a Mon Sep 17 00:00:00 2001 From: Shaun Lum Date: Fri, 22 Nov 2024 15:03:55 -0800 Subject: [PATCH 2/3] fixed reactive issue --- .../Batch/Forms/DistrunUserForm.vue | 4 +++- .../Forms/FormInputs/DistributionInput.vue | 21 ++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/Batch/Forms/DistrunUserForm.vue b/frontend/src/components/Batch/Forms/DistrunUserForm.vue index c05981132..5506643a3 100644 --- a/frontend/src/components/Batch/Forms/DistrunUserForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunUserForm.vue @@ -306,9 +306,11 @@ export default { }); watch(group, (newValue) => { + batchRequestFormStore.who = newValue; if (newValue == "Ministry of Advanced Education") { - batchRequestFormStore.who = newValue; batchRequestFormStore.distribution = "User"; + } else { + batchRequestFormStore.distribution = "BC Mail"; } }); diff --git a/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue b/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue index ca1f04345..129e56d3f 100644 --- a/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue +++ b/frontend/src/components/Batch/Forms/FormInputs/DistributionInput.vue @@ -10,24 +10,20 @@ required variant="outlined" > - + + + Where @@ -35,7 +31,11 @@ - + {{ userFullName }}
@@ -126,6 +126,7 @@ export default { "getBatchRunTime", "getBatchRunCustomDate", "getbatchRunCustomTime", + "getDistribution", "getGroup", "getUserDistributionAddress", ]), From 62a46e6b79ba616ec11246510b779a76329ecfbf Mon Sep 17 00:00:00 2001 From: Shaun Lum Date: Fri, 22 Nov 2024 15:55:22 -0800 Subject: [PATCH 3/3] Added loading wheel to cancel if submit is processing?: --- .../src/components/Batch/Forms/ArchiveSchoolReportsForm.vue | 1 + frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue | 1 + frontend/src/components/Batch/Forms/DistrunForm.vue | 1 + frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue | 1 + frontend/src/components/Batch/Forms/DistrunUserForm.vue | 1 + frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue | 2 ++ frontend/src/components/Batch/Forms/NongradDistrunForm.vue | 1 + frontend/src/components/Batch/Forms/PSIForm.vue | 1 + .../src/components/Batch/Forms/RegenerateCertificateForm.vue | 1 + .../src/components/Batch/Forms/RegenerateSchoolReportForm.vue | 1 + .../components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue | 1 + frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue | 1 + 12 files changed, 13 insertions(+) diff --git a/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue b/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue index e212ec736..6b2db1950 100644 --- a/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue +++ b/frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue @@ -18,6 +18,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue b/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue index 8c437fdd7..bf3bbf8ba 100644 --- a/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue +++ b/frontend/src/components/Batch/Forms/ArchiveStudentsForm.vue @@ -19,6 +19,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/DistrunForm.vue b/frontend/src/components/Batch/Forms/DistrunForm.vue index 27e3f6c1d..65f7d5d58 100644 --- a/frontend/src/components/Batch/Forms/DistrunForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunForm.vue @@ -27,6 +27,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue b/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue index dc6e30a49..92fa506a3 100644 --- a/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunFormYearEndForm.vue @@ -22,6 +22,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/DistrunUserForm.vue b/frontend/src/components/Batch/Forms/DistrunUserForm.vue index 5506643a3..807a5ddee 100644 --- a/frontend/src/components/Batch/Forms/DistrunUserForm.vue +++ b/frontend/src/components/Batch/Forms/DistrunUserForm.vue @@ -21,6 +21,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue index 2e6b1a34b..37035fff4 100644 --- a/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue +++ b/frontend/src/components/Batch/Forms/GraduationAlgorithmForm.vue @@ -18,6 +18,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel @@ -352,6 +353,7 @@ export default { this.getBatchRequest, requestTemplate ); + requestPayload.user = "Shaun Lum"; let response = await BatchProcessingService.runREGALG( requestPayload, this.getBatchRequestCrontime diff --git a/frontend/src/components/Batch/Forms/NongradDistrunForm.vue b/frontend/src/components/Batch/Forms/NongradDistrunForm.vue index 224b25f33..f4f5d2ac5 100644 --- a/frontend/src/components/Batch/Forms/NongradDistrunForm.vue +++ b/frontend/src/components/Batch/Forms/NongradDistrunForm.vue @@ -20,6 +20,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/PSIForm.vue b/frontend/src/components/Batch/Forms/PSIForm.vue index 2a4cac7cc..e8318bea3 100644 --- a/frontend/src/components/Batch/Forms/PSIForm.vue +++ b/frontend/src/components/Batch/Forms/PSIForm.vue @@ -20,6 +20,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue b/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue index c5929421e..8b5f4029b 100644 --- a/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue +++ b/frontend/src/components/Batch/Forms/RegenerateCertificateForm.vue @@ -18,6 +18,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue b/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue index 12a665f2a..cfc1f302d 100644 --- a/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue +++ b/frontend/src/components/Batch/Forms/RegenerateSchoolReportForm.vue @@ -18,6 +18,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue b/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue index e55b4cff0..129f528eb 100644 --- a/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue +++ b/frontend/src/components/Batch/Forms/TranscriptAlgorithmDeleteForm.vue @@ -19,6 +19,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel diff --git a/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue b/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue index ee4928160..d4d7ac563 100644 --- a/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue +++ b/frontend/src/components/Batch/Forms/TranscriptAlgorithmForm.vue @@ -18,6 +18,7 @@ color="error" variant="outlined" class="m-4" + :loading="batchLoading" >Cancel