Browse Source

add sorting of tasks in the UI to counteract weirdness with links.

main
Gisle Aune 4 years ago
parent
commit
e0822cce24
  1. 6
      svelte-ui/src/components/TaskList.svelte

6
svelte-ui/src/components/TaskList.svelte

@ -8,11 +8,15 @@
export let tasks: TaskResult[]; export let tasks: TaskResult[];
export let showAllOptions: boolean; export let showAllOptions: boolean;
export let header: string; export let header: string;
let sortedTasks: TaskResult[] = [];
$: sortedTasks = tasks.sort((a,b) => a.createdTime.localeCompare(b.createdTime))
</script> </script>
{#if tasks.length > 0} {#if tasks.length > 0}
<h3>{header}</h3> <h3>{header}</h3>
{#each tasks as task (task.id)}
{#each sortedTasks as task (task.id)}
<TaskEntry <TaskEntry
showAllOptions={showAllOptions} showAllOptions={showAllOptions}
task={task} project={project} task={task} project={project}

Loading…
Cancel
Save