Skip to content

Commit

Permalink
fixed GRADA2-3167 and GRAD2-3168
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlumbcgov committed Dec 10, 2024
1 parent 9315cb4 commit 26aded3
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 14 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
23 changes: 15 additions & 8 deletions frontend/src/components/Batch/Forms/DistrunUserForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@
:disabled="
step == 0 ||
(step == 1 &&
(getCredential !== 'Blank certificate print' ||
getCredential !== 'Blank transcript print'))
getCredential !== 'Blank certificate print' &&
getCredential !== 'Blank transcript print')
"
variant="outlined"
>Back</v-btn
Expand Down Expand Up @@ -310,8 +310,7 @@ export default {
batchRequestFormStore.who = newValue;
if (newValue == "Ministry of Advanced Education") {
batchRequestFormStore.distribution = "User";
} else {
batchRequestFormStore.distribution = "BC Mail";
batchRequestFormStore.schools = [];
}
});
Expand Down Expand Up @@ -458,6 +457,7 @@ export default {
"getCredential",
"getDistribution",
"getCopies",
"gwtWhere",
]),
requestPayload() {
const requestTemplate = [
Expand Down Expand Up @@ -608,10 +608,11 @@ export default {
this.getBatchRequest,
requestTemplate
);
//set schoolOfRecords to "000000"
// set payload.user and payload.address for the request
if (
this.group == "Ministry of Advanced Education" &&
this.getCredential == "Blank certificate print"
(this.group == "Ministry of Advanced Education" &&
this.getCredential == "Blank certificate print") ||
this.getDistribution == "User"
) {
requestPayload.user = this.userFullName;
requestPayload.address = {
Expand All @@ -622,9 +623,15 @@ export default {
country: "CANADA",
code: "V8W9T6",
};
requestPayload.schoolOfRecords = ["00000000"];
}
//set schoolOfRecords to "000000" for Ministry of Advanced Education
if (
this.group == "Ministry of Advanced Education" &&
this.getCredential == "Blank certificate print"
) {
requestPayload.schoolOfRecords = ["00000000"];
}
BatchProcessingService.runDISTRUNUSER(
requestPayload,
this.getCredential,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,23 @@
></v-text-field>
</v-col>
</v-row>
<v-row v-if="getDistribution !== 'User'">
<v-row>
<v-col sm="2"><strong>Where</strong></v-col>
<v-col sm="10" md="4">
<v-select
v-if="getGroup != 'Ministry of Advanced Education'"
v-model="distribution"
:items="['BC Mail', 'Download']"
:items="[
'BC Mail',
'Download',
{
title: 'User - ' + userFullName,
value: 'User',
},
]"
item-title="title"
item-value="value"
:key="value"
label="Where"
variant="outlined"
require
Expand All @@ -32,7 +41,7 @@
</v-col>
</v-row>
<v-card
v-if="getDistribution === 'User'"
v-if="getDistribution == 'User'"
class="mt-4"
title="Mailing Address"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,16 @@ export default {
requestTemplate
);
try {
let response;
if (this.getGroup == "all") {
let response = await BatchProcessingService.runCERTREGEN_ALL();
response = await BatchProcessingService.runCERTREGEN_ALL();
} else {
let response = await BatchProcessingService.runCERTREGEN(
response = await BatchProcessingService.runCERTREGEN(
requestPayload,
this.getBatchRequestCrontime
);
}
console.log("returned");
this.batchLoading = false;
if (this.getBatchRequestCrontime) {
Expand Down

0 comments on commit 26aded3

Please sign in to comment.