This commit is contained in:
estifanos
2026-07-25 06:16:12 +00:00
parent 7cfef9d09a
commit 86163fa7eb
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ const configurationApi = baseApi.injectEndpoints({
getProfessions: builder.query<
ListResponse<Profession>,
{ skip?: number; take?: number; q?: string } | void
{ skip?: number; take?: number; q?: string; orderBy?: string } | void
>({
query: (arg) => ({ url: '/professions', params: arg ?? {} }),
providesTags: ['Api'],

View File

@@ -145,7 +145,7 @@ function ProfessionTab() {
isFetching,
isError,
refetch,
} = useGetProfessionsQuery({ skip, take, q: q || undefined });
} = useGetProfessionsQuery({ skip, take, q: q || undefined, orderBy: 'CreatedAt:DESC' });
const [createProfession, { isLoading: isCreating }] = useCreateProfessionMutation();
const [updateProfession, { isLoading: isUpdating }] = useUpdateProfessionMutation();
const [deleteProfession] = useDeleteProfessionMutation();