Browse Source

Add Link button to non-link tasks to link them elsewhere.

main
Gisle Aune 4 years ago
parent
commit
eebb3d9f77
  1. 3
      svelte-ui/src/components/TaskEntry.svelte

3
svelte-ui/src/components/TaskEntry.svelte

@ -24,6 +24,7 @@
let mdTaskEdit: ModalData; let mdTaskEdit: ModalData;
let mdTaskDelete: ModalData; let mdTaskDelete: ModalData;
let mdTaskUnlink: ModalData; let mdTaskUnlink: ModalData;
let mdTaskLink: ModalData;
let isMoving = false; let isMoving = false;
let isLinked = false; let isLinked = false;
@ -68,6 +69,7 @@
$: mdLogAdd = {name: "log.add", task: {...task, project}}; $: mdLogAdd = {name: "log.add", task: {...task, project}};
$: mdTaskEdit = {name: "task.edit", task: {...task, project}}; $: mdTaskEdit = {name: "task.edit", task: {...task, project}};
$: mdTaskDelete = {name: "task.delete", task: {...task, project}}; $: mdTaskDelete = {name: "task.delete", task: {...task, project}};
$: mdTaskLink = {name: "tasklink.add", task};
$: mdTaskUnlink = {name: "tasklink.delete", task, project}; $: mdTaskUnlink = {name: "tasklink.delete", task, project};
$: isLinked = task.projectId !== project.id; $: isLinked = task.projectId !== project.id;
</script> </script>
@ -88,6 +90,7 @@
{#if isLinked} {#if isLinked}
<Option open={mdTaskUnlink}>Unlink</Option> <Option open={mdTaskUnlink}>Unlink</Option>
{:else} {:else}
<Option open={mdTaskLink}>Link</Option>
<Option open={mdTaskDelete}>Delete</Option> <Option open={mdTaskDelete}>Delete</Option>
· ·
{#if !isMoving && (!task.active) } {#if !isMoving && (!task.active) }

Loading…
Cancel
Save