Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v1.26.1 #682

Merged
merged 23 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
276becf
fixed batch errors pagination
shaunlumbcgov Nov 5, 2024
b19eae1
typo fix
suzalflueck Nov 5, 2024
021d953
Merge pull request #675 from bcgov/fix-typo
michaeltangbcgov Nov 5, 2024
132c46b
added total elements for batch search results
shaunlumbcgov Nov 5, 2024
256d34b
Merge branch 'release/v1.26.1' of https://github.com/bcgov/EDUC-GRAD-…
shaunlumbcgov Nov 5, 2024
a382ce9
fixed minstry of education
shaunlumbcgov Nov 6, 2024
3d23900
fixed roles for monthy batch dist run
shaunlumbcgov Nov 6, 2024
295ee35
added close dialog on submit
shaunlumbcgov Nov 6, 2024
a6fd965
Merge pull request #676 from bcgov/shaun-dev
suzalflueck Nov 6, 2024
710742e
fixed loading for error and search
shaunlumbcgov Nov 6, 2024
ef65d98
Merge pull request #677 from bcgov/shaun-dev
michaeltangbcgov Nov 6, 2024
1b3f475
added Pen Loading
shaunlumbcgov Nov 6, 2024
95a7cf0
tvr delete fix
shaunlumbcgov Nov 6, 2024
378443d
added varinat outine to batch forms
shaunlumbcgov Nov 6, 2024
e2aab2f
Merge pull request #678 from bcgov/shaun-dev
suzalflueck Nov 6, 2024
10fddb2
fixed change tab after batch run
shaunlumbcgov Nov 6, 2024
6ba7e8f
Merge pull request #679 from bcgov/shaun-dev
suzalflueck Nov 6, 2024
fad8ce6
added loading to the update button
michaeltangbcgov Nov 6, 2024
bdf6e27
Merge branch 'release/v1.26.1' of https://github.com/bcgov/EDUC-GRAD-…
michaeltangbcgov Nov 6, 2024
698eb1c
Merge pull request #680 from bcgov/vuetify-mt
shaunlumbcgov Nov 7, 2024
187ed9f
fixed the update after batch submission
shaunlumbcgov Nov 7, 2024
2b148fb
fixed GRAD2-3046 distrun users with no certificate
shaunlumbcgov Nov 7, 2024
f95a571
Merge pull request #681 from bcgov/shaun-dev
michaeltangbcgov Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 42 additions & 18 deletions frontend/src/components/Batch/BatchJobErrorResults.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
<template>
<v-card>
<v-card class="p-3">
<v-overlay
v-model="batchLoading"
class="align-center justify-center"
contained
>
<v-progress-circular
v-if="batchLoading"
indeterminate
color="primary"
size="64"
>
Loading...
</v-progress-circular>
</v-overlay>
<div class="d-flex justify-space-between align-center">
<v-card-title> Batch Job #{{ selectedErrorId }} Error(s) </v-card-title>

<!-- Slot for close button -->
<slot name="close"></slot>
</div>

<!-- No results message-->
<p v-if="rows < 1">
<p v-if="totalElements < 1 && !batchLoading">
There are no results to display.<br />
Please select another Job Execution ID.
</p>
<v-data-table

<v-data-table-server
v-model:items-per-page="itemsPerPage"
title="Job/Runs"
:items="batchData"
:headers="batchDataFields"
id="id"
:showFilter="false"
:pagination="true"
class="p-3"
:items="batchData"
:items-length="totalElements"
item-value="id"
@update:options="loadItems"
>
<template v-slot:item.pen="{ item }">
<v-btn
Expand All @@ -35,7 +51,7 @@
<template v-slot:item.schoolOfRecord="{ item }">
<div v-if="item.schoolOfRecord">{{ item.schoolOfRecord }}</div>
</template>
</v-data-table>
</v-data-table-server>
</v-card>
</template>

Expand All @@ -58,9 +74,12 @@ export default {
batchData: [],
perPage: 10,
rows: 0,
totalElements: 0,
itemsPerPage: 10,
currentPage: 0,
userSelectedPage: 0,
batchLoading: false,

batchDataFields: [
{
key: "pen",
Expand Down Expand Up @@ -96,10 +115,6 @@ export default {

computed: {
...mapGetters("auth", ["token"]),

currentPageChange() {
return this.userSelectedPage;
},
},
created() {
this.loadStudent = sharedMethods.loadStudent;
Expand All @@ -109,13 +124,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;
Expand Down
33 changes: 19 additions & 14 deletions frontend/src/components/Batch/BatchJobSearchResults.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
<template>
<v-card class="p-3">
<v-overlay
v-model="batchLoading"
class="align-center justify-center"
contained
>
<v-progress-circular
v-if="batchLoading"
indeterminate
color="primary"
size="64"
>
Loading...
</v-progress-circular>
</v-overlay>
<div class="d-flex justify-space-between align-center">
<v-card-title> Batch Job #{{ selectedBatchId }} students </v-card-title>

<!-- Slot for close button -->
<slot name="close"></slot>
</div>
<v-progress-circular
v-if="isLoading"
indeterminate
color="primary"
size="64"
>
Loading...
</v-progress-circular>

<!-- No results message-->
<p v-if="rows < 1">
<p v-if="totalElements < 1 && !batchLoading">
There are no results to display.<br />
Please select another Job Execution ID.
</p>
Expand All @@ -26,7 +32,7 @@
:headers="batchDataFields"
:items="batchData"
:items-length="totalElements"
:loading="loading"
:loading="batchLoading"
item-value="id"
@update:options="loadItems"
>
Expand Down Expand Up @@ -60,7 +66,6 @@ export default {
batchData: [],
perPage: 10,
rows: 0,
loading: false,
totalElements: 0,
itemsPerPage: 10,
currentPage: 0,
Expand Down Expand Up @@ -129,7 +134,7 @@ export default {
})
.catch((error) => {
if (error.response.status) {
this.isBatchLoading = false;
this.batchLoading = false;
}
});
},
Expand All @@ -146,13 +151,13 @@ 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;
})
.catch((error) => {
if (error.response.status) {
this.isBatchLoading = false;
this.BatchLoading = false;
}
});
},
Expand Down
18 changes: 16 additions & 2 deletions frontend/src/components/Batch/BatchRoutines.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<template>
<div>
<v-container>
<v-overlay
v-model="isBatchRoutinesLoading"
class="align-center justify-center"
contained
>
<v-progress-circular
v-if="isBatchRoutinesLoading"
indeterminate
color="primary"
size="64"
>
</v-progress-circular>
</v-overlay>
<v-data-table
:headers="scheduledRoutinesFields"
:items="batchRoutines"
Expand Down Expand Up @@ -45,7 +58,7 @@
{{ snackbarMessage }}
<v-btn text @click="snackbarVisible = false">Close</v-btn>
</v-snackbar>
</div>
</v-container>
</template>

<script>
Expand Down Expand Up @@ -153,6 +166,7 @@ export default {
computed: {
...mapState(useBatchProcessingStore, {
batchRoutines: "getBatchRoutines",
isBatchRoutinesLoading: "getIsGettingBatchRoutinesLoading",
}),
...mapState(useAccessStore, ["hasPermissions"]),
},
Expand Down
22 changes: 14 additions & 8 deletions frontend/src/components/Batch/BatchRuns.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<template>
<v-container>
<v-overlay
v-model="isBatchJobsLoading"
class="align-center justify-center"
contained
>
<v-progress-circular
v-if="isBatchJobsLoading"
indeterminate
color="primary"
size="64"
>
</v-progress-circular>
</v-overlay>
<v-row>
<!-- First Column (col-5 for medium screens, col-12 for small screens) -->
<v-col :cols="12" :md="isBatchShowing || isErrorShowing ? 7 : 12">
Expand Down Expand Up @@ -324,6 +337,7 @@ export default {
computed: {
...mapState(useBatchProcessingStore, {
batchRuns: "getBatchRuns",
isBatchJobsLoading: "getIsGettingBatchJobsLoading",
}),
},
methods: {
Expand All @@ -335,14 +349,6 @@ export default {
rerunBatch(bid) {
BatchProcessingService.rerunBatch(bid).then((response) => {
if (response) {
// this.$bvToast.toast(
// "Created a new batch job based on batch #" + bid,
// {
// title: "NEW BATCH JOB STARTED",
// variant: "success",
// noAutoHide: true,
// }
// );
this.snackbarStore.showSnackbar(
"Created a new batch job based on batch #" + bid,
"success",
Expand Down
43 changes: 24 additions & 19 deletions frontend/src/components/Batch/Forms/ArchiveSchoolReportsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<v-stepper-window>
<v-stepper-window-item value="0">
<v-row>
<v-col sm="2"> Report Type </v-col>
<v-col sm="2">Report Type </v-col>
<v-col sm="10">
<v-select
v-model="reportType"
Expand All @@ -70,15 +70,21 @@
item-title="text"
item-value="value"
label="Select a report type"
variant="outlined"
class="mt-2"
></v-select>
</v-col>
</v-row>
<v-row>
<v-select
v-model="group"
:items="['School', 'All Schools']"
label="Select a group"
></v-select>
<v-col>
<v-select
class="mt-2"
v-model="group"
:items="['School', 'All Schools']"
label="Select a group"
variant="outlined"
></v-select>
</v-col>
</v-row>
<v-row v-if="group == 'School'">
<SchoolInput>
Expand Down Expand Up @@ -186,25 +192,18 @@
>
<v-spacer />
<!-- Right Action Button -->
<v-btn v-if="step < 3" @click="step++" color="bcGovBlue"
<v-btn v-if="step < 1" @click="step++" color="bcGovBlue"
>Next</v-btn
>
<v-btn
v-else-if="getBatchRequest.localDownload == 'Y'"
color="bcGovBlue"
variant="text"
@click="submit"
>
Download
</v-btn>
<v-btn
v-else
color="error"
variant="flat"
class="text-none"
density="default"
@click="submit"
:disabled="v$.$invalid"
:loading="batchLoading"
:disabled="v$.$invalid || batchLoading"
>Submit</v-btn
>
</div>
Expand Down Expand Up @@ -237,7 +236,7 @@ export default {
watch(group, (newValue) => {
batchRequestFormStore.who = newValue;
if (newValue == "All Schools") {
batchRequestFormStore.setActivityCode("All");
batchRequestFormStore.setActivityCode("ALL");
} else {
batchRequestFormStore.setActivityCode(null);
}
Expand Down Expand Up @@ -312,6 +311,7 @@ export default {
},
data: () => ({
step: 0,
batchLoading: false,
dialog: false,
selectedConfirmations: [],

Expand Down Expand Up @@ -355,6 +355,7 @@ export default {
},

async submit() {
this.batchLoading = true;
const requestTemplate = [
"districts",
"gradDateFrom",
Expand All @@ -378,7 +379,7 @@ export default {
requestPayload,
this.getBatchRequestCrontime
);

this.batchLoading = false;
if (this.getBatchRequestCrontime) {
this.snackbarStore.showSnackbar(
"Archive School Reports Process has been successfully scheduled",
Expand All @@ -393,9 +394,13 @@ export default {
5000
);
}
this.batchLoading = false;
this.closeDialogAndResetForm();
this.setActiveTab("batchRuns");
this.updateDashboards();
//add a wait before updating dashboard
setTimeout(() => {
this.updateDashboards();
}, 2000);
} catch (error) {
this.snackbarStore.showSnackbar(
"An error occurred: " + error.message,
Expand Down
Loading
Loading