Skip to content

Commit

Permalink
Merge pull request #1831 from bcgov/fix/edx-2088
Browse files Browse the repository at this point in the history
EDX-2088: corrected pagination behaviour when switching between Distr…
  • Loading branch information
arcshiftsolutions authored Dec 8, 2023
2 parents 6e515a0 + 6dbf6ce commit dedb531
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions frontend/src/components/secure-message/EDXInvitations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<v-col>
<v-data-table
id="dataTable"
v-model:page="pageNumber"
v-model:page="districtAccessPageNumber"
v-model:items="filteredDistrictInvites"
v-model:items-per-page="itemsPerPage"
:headers="districtHeaders"
Expand Down Expand Up @@ -101,7 +101,7 @@
<v-col>
<v-data-table
id="dataTable"
v-model:page="pageNumber"
v-model:page="schoolAccessPageNumber"
v-model:items="filteredSchoolInvites"
v-model:items-per-page="itemsPerPage"
:headers="schoolHeaders"
Expand Down Expand Up @@ -152,35 +152,38 @@
/>
</v-col>
</v-row>

</template>
</v-data-table>
</v-col>
</v-row>
</v-window-item>
<v-window-item value="sendInvites" style="align-self: center" class="mt-8">
<v-window-item
value="sendInvites"
style="align-self: center"
class="mt-8"
>
<v-row>
<v-col class="mb-3 d-flex justify-center">
<h1>Upload User Onboarding Data</h1>
</v-col>
</v-row>
<v-row>
<v-col>
<v-form
<v-form
ref="documentForm"
v-model="validForm"
class="h-80"
>
<v-file-input
>
<v-file-input
id="selectFileInput"
ref="uploader"
v-model="uploadFileValue"
accept=".csv"
:clearable="true"
:loading="uploadInProgress"
:disabled="uploadInProgress"
/>
</v-form>
/>
</v-form>
</v-col>
</v-row>
</v-window-item>
Expand All @@ -196,8 +199,8 @@
import ApiService from '../../common/apiService';
import {Routes} from '@/utils/constants';
import alertMixin from '@/mixins/alertMixin';
import {getFileNameWithMaxNameLength} from "@/utils/file";
import { deepCloneObject } from '../../utils/common';
import {getFileNameWithMaxNameLength} from '@/utils/file';
import { deepCloneObject } from '@/utils/common';
import {LocalDate} from '@js-joda/core';
export default {
Expand All @@ -208,8 +211,8 @@ export default {
tab: null,
schoolSearch: null,
districtSearch: null,
pageNumber: 1,
pageCount: 0,
districtAccessPageNumber: 1,
schoolAccessPageNumber: 1,
itemsPerPage: 10,
acceptableFileExtensions: 'CSV',
uploadInProgress: false,
Expand Down Expand Up @@ -297,6 +300,8 @@ export default {
expiryType: ['Active', 'Expired']
};
},
computed: {
},
watch: {
districtSearch() {
this.applyDistrictFilter();
Expand All @@ -310,8 +315,6 @@ export default {
}
},
},
computed: {
},
async mounted() {
this.loadDistrictInvites();
},
Expand Down Expand Up @@ -359,6 +362,7 @@ export default {
},
loadSchoolInvites() {
this.schoolLoading = true;
this.schoolAccessPageNumber = 1;
ApiService.apiAxios
.get(`${Routes.edx.FIND_SCHOOL_INVITATIONS}`)
.then(response => {
Expand All @@ -378,6 +382,7 @@ export default {
},
loadDistrictInvites() {
this.districtLoading = true;
this.districtAccessPageNumber = 1;
ApiService.apiAxios
.get(`${Routes.edx.FIND_DISTRICT_INVITATIONS}`)
.then(response => {
Expand Down

0 comments on commit dedb531

Please sign in to comment.