diff --git a/frontend/src/components/Batch/BatchJobErrorResults.vue b/frontend/src/components/Batch/BatchJobErrorResults.vue index e167ccbe..b220831e 100644 --- a/frontend/src/components/Batch/BatchJobErrorResults.vue +++ b/frontend/src/components/Batch/BatchJobErrorResults.vue @@ -1,24 +1,40 @@ - + + + + Loading... + + Batch Job #{{ selectedErrorId }} Error(s) + - + There are no results to display. Please select another Job Execution ID. - {{ item.schoolOfRecord }} - + @@ -58,9 +74,12 @@ export default { batchData: [], perPage: 10, rows: 0, + totalElements: 0, + itemsPerPage: 10, currentPage: 0, userSelectedPage: 0, batchLoading: false, + batchDataFields: [ { key: "pen", @@ -96,10 +115,6 @@ export default { computed: { ...mapGetters("auth", ["token"]), - - currentPageChange() { - return this.userSelectedPage; - }, }, created() { this.loadStudent = sharedMethods.loadStudent; @@ -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; diff --git a/frontend/src/components/Batch/BatchJobSearchResults.vue b/frontend/src/components/Batch/BatchJobSearchResults.vue index a13c3914..b3954c17 100644 --- a/frontend/src/components/Batch/BatchJobSearchResults.vue +++ b/frontend/src/components/Batch/BatchJobSearchResults.vue @@ -1,22 +1,28 @@ + + + Loading... + + Batch Job #{{ selectedBatchId }} students - - Loading... - - + There are no results to display. Please select another Job Execution ID. @@ -26,7 +32,7 @@ :headers="batchDataFields" :items="batchData" :items-length="totalElements" - :loading="loading" + :loading="batchLoading" item-value="id" @update:options="loadItems" > @@ -60,7 +66,6 @@ export default { batchData: [], perPage: 10, rows: 0, - loading: false, totalElements: 0, itemsPerPage: 10, currentPage: 0, @@ -129,7 +134,7 @@ export default { }) .catch((error) => { if (error.response.status) { - this.isBatchLoading = false; + this.batchLoading = false; } }); }, @@ -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; } }); }, diff --git a/frontend/src/components/Batch/BatchRoutines.vue b/frontend/src/components/Batch/BatchRoutines.vue index 01f6fd66..b33ac60f 100644 --- a/frontend/src/components/Batch/BatchRoutines.vue +++ b/frontend/src/components/Batch/BatchRoutines.vue @@ -1,5 +1,18 @@ - + + + + + Close - +
+
There are no results to display. Please select another Job Execution ID.