From 25e4f5ce8efce30691cdb256b282d7468c4db514 Mon Sep 17 00:00:00 2001 From: volar Date: Mon, 29 Jun 2026 15:50:46 +0200 Subject: [PATCH] fix(author): order author lists by createdAt instead of id Author ids are UUIDs (DocId), so sorting by id produced an arbitrary order. Both the author list (useAuthorListActions) and the author select autocomplete (useAuthorSelectActions) hard-set pagination.sortBy to 'id' on non-text fetches; default them to createdAt so the newest authors show first, while keeping relevance ordering for fulltext search. --- src/views/coreDam/author/composables/authorActions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/coreDam/author/composables/authorActions.ts b/src/views/coreDam/author/composables/authorActions.ts index 6713d388..2545e329 100644 --- a/src/views/coreDam/author/composables/authorActions.ts +++ b/src/views/coreDam/author/composables/authorActions.ts @@ -25,7 +25,7 @@ export const useAuthorListActions = () => { const fetchList = async (pagination: Pagination, filterBag: FilterBag) => { listLoading.value = true - pagination.sortBy = filterBag.text.model ? null : 'id' + pagination.sortBy = filterBag.text.model ? null : 'createdAt' try { listItems.value = await fetchAuthorList(currentExtSystemId.value, pagination, filterBag) } catch (error) { @@ -163,7 +163,7 @@ export const useAuthorSelectActions = () => { } const fetchItems = async (pagination: Pagination, filterBag: FilterBag) => { - pagination.sortBy = filterBag.text.model ? null : 'id' + pagination.sortBy = filterBag.text.model ? null : 'createdAt' return mapToValueObjects(await fetchAuthorList(currentExtSystemId.value, pagination, filterBag)) }