Skip to content

Commit

Permalink
Merge pull request #695 from bcgov/release/v1.26.5
Browse files Browse the repository at this point in the history
Release/v1.26.5
  • Loading branch information
suzalflueck authored Dec 4, 2024
2 parents 6bc1541 + 9315cb4 commit 98cdeff
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 27 deletions.
2 changes: 1 addition & 1 deletion backend/src/routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ router.get("/error", (_req, res) => {
router.get(
"/login",
passport.authenticate("oidc", {
failureRedirect: "error",
failureRedirect: "error"
})
);

Expand Down
1 change: 0 additions & 1 deletion frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<!-- <div class="container"> -->
<v-main>
<router-view />

<div class="overlay-dialog">
<v-dialog v-model="tokenExpiring" max-width="600px">
<v-card>
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/Batch/Forms/DistrunForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ export default {
return ["School"];
}
} else if (this.getCredential === "Blank transcript print") {
return this.blankTranscriptDetails
? ["School", "Ministry of Advanced Education"]
: ["Select a credential type"];
let groupOptions = [
{ title: "Student", value: "Student" },
{ title: "School", value: "School" },
];
return groupOptions;
} else {
let groupOptions = [
{ title: "Student", value: "Student" },
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/Batch/Forms/DistrunUserForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,8 @@ export default {
return ["School"];
}
} else if (this.getCredential === "Blank transcript print") {
return this.blankTranscriptDetails
? ["School", "Ministry of Advanced Education"]
: ["Select a credential type"];
let groupOptions = [{ title: "School", value: "School" }];
return groupOptions;
} else {
let groupOptions = [
{ title: "Student", value: "Student" },
Expand Down Expand Up @@ -575,6 +574,7 @@ export default {
},
closeDialogAndResetForm() {
this.blankCertificateDetails = [];
this.blankTranscriptDetails = [];
this.group = null;
this.dialog = false;
this.clearBatchDetails();
Expand Down
17 changes: 3 additions & 14 deletions frontend/src/components/Batch/Forms/FormInputs/StudentInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,28 +209,17 @@ export default {
) {
let certificate =
await GraduationReportService.getStudentCertificates(studentID);
if (certificate?.data.length) {
//check that certificate has does not have a null distribution date
if (
!certificate.data.distributionDate &&
this.credentialType == "RC"
) {
this.validationMessage =
"Cannot reprint certificate for this student. Distribution date is null";
this.penLoading = false;
return;
}
} else {
if (!certificate?.data.length) {
if (this.credentialType == "RC") {
this.validationMessage =
"Cannot reprint certificate for this student.";
"Cannot reprint certificate for this student. This student does not have a certificate.";
this.penLoading = false;
return;
}
if (this.credentialType == "OC") {
this.validationMessage =
"Cannot print certificate for this student,this student does not have a certificate.";
"Cannot print certificate for this student. This student does not have a certificate.";
this.penLoading = false;
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,15 @@ export default {
requestTemplate
);
try {
let response = await BatchProcessingService.runCERTREGEN(
requestPayload,
this.getBatchRequestCrontime
);
if (this.getGroup == "all") {
let response = await BatchProcessingService.runCERTREGEN_ALL();
} else {
let response = await BatchProcessingService.runCERTREGEN(
requestPayload,
this.getBatchRequestCrontime
);
}
this.batchLoading = false;
if (this.getBatchRequestCrontime) {
this.snackbarStore.showSnackbar(
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/services/BatchProcessingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ export default {

return ApiService.apiAxios.get("/api/v1/batch/executesuppdisrunbatchjob");
},
runCERTREGEN_ALL() {
//To run regenerate all Certificates, you must run a get

return ApiService.apiAxios.get(
"/api/v1/batch/executecertregenbatchjob"
);
},
runCERTREGEN(request, cronTime = "") {
if (
Array.isArray(request.districts) &&
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/store/modules/batchRequestFormStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,10 @@ export const useBatchRequestFormStore = defineStore("batchRequestFormStore", {
gradDateFrom: state.getFormattedGradDateFrom,
gradDateTo: state.getFormattedGradDateTo,

credentialTypeCode: [...state.blankCertificateDetails],
credentialTypeCode: [
...state.blankCertificateDetails,
...state.blankTranscriptDetails
],

quantity: state.copies,
localDownload: state.getLocalDownload,
Expand Down

0 comments on commit 98cdeff

Please sign in to comment.