diff --git a/svelte-ui/src/components/ProjectEntry.svelte b/svelte-ui/src/components/ProjectEntry.svelte
index 7b5112b..9adaf50 100644
--- a/svelte-ui/src/components/ProjectEntry.svelte
+++ b/svelte-ui/src/components/ProjectEntry.svelte
@@ -26,6 +26,7 @@ import stuffLogClient from "../clients/stufflog";
let mdAddTask: ModalData;
let mdProjectEdit: ModalData;
let mdProjectDelete: ModalData;
+ let mdLinkTask: ModalData;
let linkTarget: string = "";
let activeTasks: TaskResult[] = [];
let inactiveTasks: TaskResult[] = [];
@@ -73,6 +74,7 @@ import stuffLogClient from "../clients/stufflog";
}
$: mdAddTask = {name:"task.add", project};
+ $: mdLinkTask = {name:"tasklink.add", project};
$: mdProjectEdit = {name:"project.edit", project};
$: mdProjectDelete = {name:"project.delete", project};
@@ -114,6 +116,7 @@ import stuffLogClient from "../clients/stufflog";
{#if showAllOptions}
+
{#if canComplete}
diff --git a/svelte-ui/src/components/ProjectSelect.svelte b/svelte-ui/src/components/ProjectSelect.svelte
index 85fb3e5..e8b84a5 100644
--- a/svelte-ui/src/components/ProjectSelect.svelte
+++ b/svelte-ui/src/components/ProjectSelect.svelte
@@ -14,12 +14,6 @@
let optGroups: OptGroup[]
- $: {
- if ($projectStore.stale && !$projectStore.loading) {
- projectStore.load({});
- }
- }
-
$: {
optGroups = [
{
@@ -42,6 +36,14 @@
status: "Completed",
projects: $projectStore.projects.filter(p => !p.active && p.statusTag === "completed")
},
+ {
+ status: "Background",
+ projects: $projectStore.projects.filter(p => !p.active && p.statusTag === "background")
+ },
+ {
+ status: "Progress",
+ projects: $projectStore.projects.filter(p => !p.active && p.statusTag === "progress")
+ },
{
status: "Failed",
projects: $projectStore.projects.filter(p => !p.active && p.statusTag === "failed")
diff --git a/svelte-ui/src/components/TaskEntry.svelte b/svelte-ui/src/components/TaskEntry.svelte
index 6f37d28..5f948e6 100644
--- a/svelte-ui/src/components/TaskEntry.svelte
+++ b/svelte-ui/src/components/TaskEntry.svelte
@@ -1,5 +1,5 @@
@@ -81,25 +85,29 @@ import { tick } from "svelte";
{#if showAllOptions}
-
- ·
- {#if !isMoving && (!task.active) }
-
- {/if}
- {#if !isMoving && (task.statusTag !== "to do") }
-
- {/if}
- {#if !isMoving && (task.statusTag !== "on hold") }
-
- {/if}
- {#if !isMoving && (task.statusTag !== "declined") }
-
- {/if}
- {#if !isMoving && task.active }
-
- {/if}
- {#if !isMoving && (task.statusTag !== "failed") }
-
+ {#if isLinked}
+
+ {:else}
+
+ ·
+ {#if !isMoving && (!task.active) }
+
+ {/if}
+ {#if !isMoving && (task.statusTag !== "to do") }
+
+ {/if}
+ {#if !isMoving && (task.statusTag !== "on hold") }
+
+ {/if}
+ {#if !isMoving && (task.statusTag !== "declined") }
+
+ {/if}
+ {#if !isMoving && task.active }
+
+ {/if}
+ {#if !isMoving && (task.statusTag !== "failed") }
+
+ {/if}
{/if}
{/if}
diff --git a/svelte-ui/src/components/TaskSelect.svelte b/svelte-ui/src/components/TaskSelect.svelte
new file mode 100644
index 0000000..b28147b
--- /dev/null
+++ b/svelte-ui/src/components/TaskSelect.svelte
@@ -0,0 +1,36 @@
+
+
+
\ No newline at end of file
diff --git a/svelte-ui/src/forms/TaskLinkForm.svelte b/svelte-ui/src/forms/TaskLinkForm.svelte
new file mode 100644
index 0000000..38d7c60
--- /dev/null
+++ b/svelte-ui/src/forms/TaskLinkForm.svelte
@@ -0,0 +1,69 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/svelte-ui/src/models/task.ts b/svelte-ui/src/models/task.ts
index 892b4a7..9732ca0 100644
--- a/svelte-ui/src/models/task.ts
+++ b/svelte-ui/src/models/task.ts
@@ -23,6 +23,12 @@ export interface TaskResult extends Task {
project?: Project
}
+// TaskLink is only returned by the API. The tasks are returned transparently.
+export interface TaskLink {
+ taskId: string
+ projectId: string
+}
+
export interface TaskFilter {
active?: boolean
expiring?: boolean
diff --git a/svelte-ui/src/pages/QLPage.svelte b/svelte-ui/src/pages/QLPage.svelte
index 7bc040c..4b826be 100644
--- a/svelte-ui/src/pages/QLPage.svelte
+++ b/svelte-ui/src/pages/QLPage.svelte
@@ -4,7 +4,7 @@
import projectStore from "../stores/project";
$: {
- if (($projectStore.stale || $projectStore.filter.active != null) && !$projectStore.loading) {
+ if ($projectStore.stale && !$projectStore.loading) {
projectStore.load({});
}
}
diff --git a/svelte-ui/src/stores/modal.ts b/svelte-ui/src/stores/modal.ts
index 9b85583..0aa62e9 100644
--- a/svelte-ui/src/stores/modal.ts
+++ b/svelte-ui/src/stores/modal.ts
@@ -3,8 +3,10 @@ import type { GoalResult } from "../models/goal";
import type { GroupResult } from "../models/group";
import type { ItemResult } from "../models/item";
import type { LogResult } from "../models/log";
-import type { ProjectResult } from "../models/project";
-import type { TaskResult } from "../models/task";
+import type {ProjectResult} from "../models/project";
+import type {TaskResult} from "../models/task";
+import type Project from "../models/project";
+import type Task from "../models/task";
export type ModalData =
| { name: "none" }
@@ -26,6 +28,8 @@ export type ModalData =
| { name: "goal.add" }
| { name: "goal.edit", goal: GoalResult }
| { name: "goal.delete", goal: GoalResult }
+ | { name: "tasklink.add", project?: Project, task?: Task }
+ | { name: "tasklink.delete", project: Project, task: Task }
function createModalStore() {
const {set, subscribe} = writable
({name: "none"});