Skip to content

Commit

Permalink
Merge pull request #495 from bcgov/release/1.4.0
Browse files Browse the repository at this point in the history
Release/1.4.0
  • Loading branch information
suzalflueck authored Jul 31, 2023
2 parents 44c6c3c + 218a94f commit 89d805f
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 35 deletions.
46 changes: 23 additions & 23 deletions frontend/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"name": "EDUC EDX",
"short_name": "EDX",
"icons": [
{
"src": "bcid-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "bcid-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "favicon.ico",
"sizes": "62x55",
"type": "image/ico"
}
],
"start_url": "/",
"theme_color": "#003366",
"background_color": "#fafafa",
"display": "standalone"
"name": "EDUC GRAD",
"short_name": "GRAD",
"icons": [
{
"src": "bcid-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "bcid-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "favicon.ico",
"sizes": "62x55",
"type": "image/ico"
}
],
"start_url": "/",
"theme_color": "#003366",
"background_color": "#fafafa",
"display": "standalone"
}
24 changes: 21 additions & 3 deletions frontend/src/components/Batch/Batch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@
<div
v-if="
batch.details['who'] == 'District' &&
batch.details['what'] != 'DISTRUN_YE'
batch.details['what'] != 'DISTRUN_YE' &&
batch.details['what'] != 'DISTRUN_SUPP' &&
batch.details['what'] != 'NONGRADRUN'
"
class="float-left col-12 px-0"
>
Expand All @@ -333,7 +335,11 @@
>{{ validationMessage }}</b-alert
>
<b-form-checkbox
v-if="batch.details['what'] == 'DISTRUN_YE'"
v-if="
batch.details['what'] == 'DISTRUN_YE' ||
batch.details['what'] == 'DISTRUN_SUPP' ||
batch.details['what'] == 'NONGRADRUN'
"
name="allDistrict"
:checked="batch.details['allDistricts']"
@change="editBatchJob('allDistricts', $event)"
Expand Down Expand Up @@ -1111,10 +1117,12 @@ export default {
psiTransmissionMode: true,
},
DISTRUN_SUPP: {
group: [{ text: "School Category", value: "District" }],
copies: true,
where: true,
},
NONGRADRUN: {
group: [{ text: "School Category", value: "District" }],
copies: true,
where: true,
},
Expand Down Expand Up @@ -1757,6 +1765,12 @@ export default {
if (event == "DISTRUN_YE") {
batchDetail.details["who"] = "District";
}
if (event == "DISTRUN_SUPP") {
batchDetail.details["who"] = "District";
}
if (event == "NONGRADRUN") {
batchDetail.details["who"] = "District";
}
}
if (type == "categoryCode") {
if (event != "04" || event != "09") {
Expand All @@ -1773,7 +1787,11 @@ export default {
{ value: "103", districtName: "OFFSHORE INDEPENDENT", city: "Y" },
{},
];
} else if (this.batch.details["what"] == "DISTRUN_YE") {
} else if (
this.batch.details["what"] == "DISTRUN_YE" ||
this.batch.details["what"] == "DISTRUN_SUPP" ||
this.batch.details["what"] == "NONGRADRUN"
) {
if (event == "01" || event == "02" || event == "03") {
this.batch.districts = [
{
Expand Down
8 changes: 7 additions & 1 deletion frontend/src/components/Batch/BatchConfimInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@
</li>
</ul>
</li>
<li v-if="details.who == 'District'">
<li
v-if="
details.who == 'District' &&
details.what != 'DISTRUN_YE' &&
details.what != 'NONGRADRUN'
"
>
<strong>District(s): </strong>
<ul>
<li
Expand Down
16 changes: 12 additions & 4 deletions frontend/src/services/BatchProcessingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,19 @@ export default {
runDISTRUN_SUPP(){
return ApiService.apiAxios.get('/api/v1/batch/executesuppdisrunbatchjob');
},
runDISTRUN_NONGRAD(){
return ApiService.apiAxios.get('/api/v1/batch/executenongraddisrunbatchjob');
runNONGRADRUN(request){
if (Array.isArray(request.districts) && request.districts.length === 1 && request.districts[0].toLowerCase() === "all") {
// If the condition is true, set districts to an empty array
request.districts = [];
}
return ApiService.apiAxios.post('/api/v1/batch/executenongraddisrunbatchjob',request);
},
runDISTRUN_YE(){
return ApiService.apiAxios.get('/api/v1/batch/executeyearlydisrunbatchjob');
runDISTRUN_YE(request){
if (Array.isArray(request.districts) && request.districts.length === 1 && request.districts[0].toLowerCase() === "all") {
// If the condition is true, set districts to an empty array
request.districts = [];
}
return ApiService.apiAxios.post('/api/v1/batch/executeyearlydisrunbatchjob', request);
},
runBlankDISTRUNUSERUserRequest(request, credentialType){
return ApiService.apiAxios.post('/api/v1/batch/userrequestblankdisrun/'+ credentialType, request);
Expand Down
57 changes: 53 additions & 4 deletions frontend/src/views/BatchProcessing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1016,13 +1016,13 @@ export default {
}
});
},
runDISTRUN_YE(id) {
runDISTRUN_YE(request, id) {
let requestId = id.replace("job-", "");
this.$set(this.spinners, id, true);
let index = id.replace("job-", "") - 1;
let value = true;
this.$store.commit("batchprocessing/setTabLoading", { index, value });
BatchProcessingService.runDISTRUN_YE()
BatchProcessingService.runDISTRUN_YE(request)
.then((response) => {
this.getAdminDashboardData();
this.cancelBatchJob(id);
Expand Down Expand Up @@ -1054,7 +1054,7 @@ export default {
}
});
},
runDISTRUN_SUPP(id) {
runDISTRUN_SUPP(request, id) {
let requestId = id.replace("job-", "");
this.$set(this.spinners, id, true);
let index = id.replace("job-", "") - 1;
Expand Down Expand Up @@ -1092,6 +1092,44 @@ export default {
}
});
},
runNONGRADRUN(request, id) {
let requestId = id.replace("job-", "");
this.$set(this.spinners, id, true);
let index = id.replace("job-", "") - 1;
let value = true;
this.$store.commit("batchprocessing/setTabLoading", { index, value });
BatchProcessingService.runNONGRADRUN(request)
.then((response) => {
this.getAdminDashboardData();
this.cancelBatchJob(id);
this.selectedTab = 0;
if (response.data) {
this.$bvToast.toast(
"Batch run " +
response.data.batchId +
" has started for request " +
requestId,
{
title: "BATCH PROCESSING STARTED",
variant: "success",
noAutoHide: true,
}
);
}
})
.catch((error) => {
if (error) {
this.getAdminDashboardData();
this.cancelBatchJob(id);
this.selectedTab = 0;
this.$bvToast.toast("This request is running in the background", {
title: "BATCH PROCESSING UPDATE",
variant: "success",
noAutoHide: true,
});
}
});
},
runBlankDISTRUNUSERUserRequest(request, id, credentialType) {
let requestId = id.replace("job-", "");
this.$set(this.spinners, id, true);
Expand Down Expand Up @@ -1457,6 +1495,17 @@ export default {
} else {
this.runDISTRUN_MONTHLY(id);
}
} else if (this.tabContent[id].details["what"] == "NONGRADRUN") {
if (cronTime) {
let scheduledRequest = {};
scheduledRequest.cronExpression = cronTime;
scheduledRequest.jobName = "NDBJ";
scheduledRequest.blankPayLoad = null;
scheduledRequest.payload = request;
this.addScheduledJob(scheduledRequest, id);
} else {
this.runNONGRADRUN(request, id);
}
} else if (this.tabContent[id].details["what"] == "DISTRUN_YE") {
if (cronTime) {
let scheduledRequest = {};
Expand All @@ -1466,7 +1515,7 @@ export default {
scheduledRequest.payload = request;
this.addScheduledJob(scheduledRequest, id);
} else {
this.runDISTRUN_YE(id);
this.runDISTRUN_YE(request, id);
}
} else if (this.tabContent[id].details["what"] == "DISTRUNUSER") {
if (cronTime) {
Expand Down

0 comments on commit 89d805f

Please sign in to comment.