Skip to content

Commit 1e5f7e1

Browse files
committed
Sort selection tasks with order by current owner first
1 parent 14d204d commit 1e5f7e1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/components/workflow/WorkflowTaskSelection.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script>
2-
// import { page } from '$app/stores';
2+
import { page } from '$app/stores';
33
import { onMount } from 'svelte';
44
import SlimSelect from 'slim-select';
5-
import { greatestVersionDesc } from '$lib/common/component_utilities.js';
5+
import { greatestVersionDesc, orderTasksByOwnerThenByNameThenByVersion } from '$lib/common/component_utilities.js';
66
77
export let tasks = undefined;
88
@@ -79,6 +79,7 @@
7979
}
8080
8181
if (selectedTypeOfTask === 'user') {
82+
filteredTasks = orderTasksByOwnerThenByNameThenByVersion(filteredTasks, $page.data.userInfo.username);
8283
optionsMap = filteredTasks.reduce((dataOptions, task) => {
8384
const source = task.owner;
8485
const sourceIndex = dataOptions.findIndex(d => d.label === source);

0 commit comments

Comments
 (0)