From 7c826554448c3f2f9c22c442a2c9e37b7d26840f Mon Sep 17 00:00:00 2001 From: Thibaud Dauce Date: Thu, 19 Dec 2024 10:59:01 +0100 Subject: [PATCH] Fix posts pagination (#220) --- pages/beta/admin/site/posts.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/beta/admin/site/posts.vue b/pages/beta/admin/site/posts.vue index a86efad..3022067 100644 --- a/pages/beta/admin/site/posts.vue +++ b/pages/beta/admin/site/posts.vue @@ -98,7 +98,6 @@ import { formatDate, Pagination, type User } from '@datagouv/components' import { refDebounced } from '@vueuse/core' import { computed, ref } from 'vue' import { useI18n } from 'vue-i18n' -import { RiMailLine } from '@remixicon/vue' import type { AdminBadgeType, DiscussionSortedBy, PaginatedArray, Post, SortDirection } from '~/types/types' import Breadcrumb from '~/components/Breadcrumb/Breadcrumb.vue' import AdminTable from '~/components/AdminTable/Table/AdminTable.vue' @@ -117,6 +116,11 @@ const qDebounced = refDebounced(q, 500) // TODO add 500 in config const params = computed(() => { return { with_drafts: true, + + sort: sortDirection.value, + q: qDebounced.value, + page_size: pageSize.value, + page: page.value, } }) @@ -126,7 +130,7 @@ function getStatus(post: Post): { label: string, type: AdminBadgeType } { if (post.published) { return { label: t('Published the {date}', { date: formatDate(post.published) }), - type: 'success', + type: 'primary', } } else {