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

Make Pagination numerical by default #2454

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Changes from all commits
Commits
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
10 changes: 7 additions & 3 deletions src/views/Exercise/Reports/StatutoryConsultation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
data-key="id"
:data="applicationRecords"
:columns="tableColumns"
page-item-type="uppercase-letter"
page-item-type="number"
:page-size="50"
:custom-search="{
placeholder: 'Search candidate names',
handler: candidateSearch,
field: 'candidate.id',
}"
:total="total"
@change="getTableData"
>
<template #row="{row}">
Expand Down Expand Up @@ -87,7 +88,7 @@ import { firestore, functions } from '@/firebase';
import vuexfireSerialize from '@jac-uk/jac-kit/helpers/vuexfireSerialize';
import Table from '@jac-uk/jac-kit/components/Table/Table.vue';
import TableCell from '@jac-uk/jac-kit/components/Table/TableCell.vue';
import tableQuery from '@jac-uk/jac-kit/components/Table/tableQuery';
import { tableAsyncQuery } from '@jac-uk/jac-kit/components/Table/tableQuery';
import TextareaInput from '@jac-uk/jac-kit/draftComponents/Form/TextareaInput.vue';
import ActionButton from '@jac-uk/jac-kit/draftComponents/ActionButton.vue';
import { downloadXLSX } from '@jac-uk/jac-kit/helpers/export';
Expand All @@ -114,6 +115,7 @@ export default {
unsubscribe: null,
unsubscribeReport: null,
report: null,
total: 0,
};
},
computed: {
Expand Down Expand Up @@ -156,7 +158,9 @@ export default {
where('status', 'in', statuses)
);
params.orderBy = 'candidate.fullName';
firestoreRef = await tableQuery(this.applicationRecords, firestoreRef, params);
const res = await tableAsyncQuery(this.applicationRecords, firestoreRef, params, null);
firestoreRef = res.queryRef;
this.total = res.total;
if (firestoreRef) {
this.unsubscribe = onSnapshot(
firestoreRef,
Expand Down
Loading