diff --git a/frontend/src/components/Codes/CareerPrograms.vue b/frontend/src/components/Codes/CareerPrograms.vue index e357dd28..b60b4bd2 100644 --- a/frontend/src/components/Codes/CareerPrograms.vue +++ b/frontend/src/components/Codes/CareerPrograms.vue @@ -8,7 +8,7 @@

{ this.careerPrograms = response.data; + this.sortedCareerPrograms = this.careerPrograms.sort( + (a, b) => a.displayOrder - b.displayOrder + ); }) // eslint-disable-next-line .catch((error) => { @@ -49,7 +52,16 @@ export default { data: function () { return { careerPrograms: [], + sortedCareerPrograms: [], careerProgramFields: [ + { + key: "displayOrder", + label: "Display Order", + sortable: true, + sortDirection: "asc", + thClass: "d-none", + tdClass: "d-none", + }, { key: "code", label: "Code", @@ -64,12 +76,12 @@ export default { }, { key: "startDate", - label: "Start Date", + label: "Effective Date", sortable: true, }, { key: "endDate", - label: "End Date", + label: "Expiry Date", sortable: true, }, ], diff --git a/frontend/src/components/DisplayTable.vue b/frontend/src/components/DisplayTable.vue index e7b14adf..ca64d81c 100644 --- a/frontend/src/components/DisplayTable.vue +++ b/frontend/src/components/DisplayTable.vue @@ -197,6 +197,7 @@ field.editable); }, - // totalRows: function () { - // if (this.items?.length) { - // return this.items.length; - // } else return this.totalRows; - // }, + totalRows: function () { + if (this.items?.length && !this.filter) { + return this.items.length; + } else return this.totalRows; + }, sortOptions() { return this.fields .filter((f) => f.sortable) @@ -344,8 +346,11 @@ export default { }, onFiltered(filteredItems) { // Trigger pagination to update the number of buttons/pages due to filtering - this.totalRows = filteredItems.length; - this.currentPage = 1; + if (this.filter) { + this.totalRows = filteredItems.length; + } + + this.currentPage = 0; }, }, }; diff --git a/frontend/src/components/StudentProfile/StudentAssessments.vue b/frontend/src/components/StudentProfile/StudentAssessments.vue index 2c5eade1..ce9617cb 100644 --- a/frontend/src/components/StudentProfile/StudentAssessments.vue +++ b/frontend/src/components/StudentProfile/StudentAssessments.vue @@ -136,6 +136,12 @@ export default { sortable: true, sortDirection: "desc", }, + { + key: "wroteFlag", + label: "Wrote Flag", + sortable: true, + sortDirection: "desc", + }, { key: "exceededWriteFlag", label: "Exceeded Writes",