Settings: Sort workflows by name

This commit is contained in:
Gustav Hansen 2023-05-19 13:36:22 +02:00
parent 624ee834df
commit 5f126020b3
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ describe('useReviewWorkflows', () => {
expect(result.current.workflows.isLoading).toBe(true);
expect(get).toBeCalledWith('/admin/review-workflows/workflows/', {
params: { populate: 'stages' },
params: { sort: 'name:asc', populate: 'stages' },
});
await waitFor(() => expect(result.current.workflows.isLoading).toBe(false));

View File

@ -9,7 +9,7 @@ export function useReviewWorkflows(workflowId) {
const client = useQueryClient();
const workflowQueryKey = [QUERY_BASE_KEY, workflowId ?? 'default'];
async function fetchWorkflows({ params = { populate: 'stages' } }) {
async function fetchWorkflows({ params = { sort: 'name:asc', populate: 'stages' } }) {
try {
const {
data: { data },