From 123eb6e3ad648fb48c3665f3edf7ae29168fb32a Mon Sep 17 00:00:00 2001 From: Denis Bunakalya Date: Tue, 25 Apr 2023 18:33:14 +0300 Subject: [PATCH] TSK-1178 Show empty sprint in right panel (#3065) Signed-off-by: Denis Bunakalya --- .../issues/edit/ControlPanel.svelte | 10 +- .../components/sprints/SprintEditor.svelte | 104 +++++++++--------- .../components/sprints/SprintPresenter.svelte | 1 + 3 files changed, 57 insertions(+), 58 deletions(-) diff --git a/plugins/tracker-resources/src/components/issues/edit/ControlPanel.svelte b/plugins/tracker-resources/src/components/issues/edit/ControlPanel.svelte index 15a8377a2a..cea7d2f769 100644 --- a/plugins/tracker-resources/src/components/issues/edit/ControlPanel.svelte +++ b/plugins/tracker-resources/src/components/issues/edit/ControlPanel.svelte @@ -174,12 +174,10 @@ - {#if issue.sprint} - - - - {/if} + + + {#if issue.dueDate !== null}
diff --git a/plugins/tracker-resources/src/components/sprints/SprintEditor.svelte b/plugins/tracker-resources/src/components/sprints/SprintEditor.svelte index ff633a1f64..ab5478e631 100644 --- a/plugins/tracker-resources/src/components/sprints/SprintEditor.svelte +++ b/plugins/tracker-resources/src/components/sprints/SprintEditor.svelte @@ -67,8 +67,8 @@ $: twoRows = $deviceInfo.twoRows -{#if value.sprint || sprint} - {#if kind === 'list'} +{#if kind === 'list'} + {#if value.sprint}
- {:else} -
- {#if (value.sprint && value.sprint !== $activeSprint && groupBy !== 'sprint') || shouldShowPlaceholder} -
- -
- {/if} - - {#if sprint && kind === 'list-header'} -
- {#if sprint} - {@const now = Date.now()} - {@const sprintDaysFrom = - now < sprint.startDate - ? 0 - : now > sprint.targetDate - ? getDayOfSprint(sprint.startDate, sprint.targetDate) - : getDayOfSprint(sprint.startDate, now)} - {@const sprintDaysTo = getDayOfSprint(sprint.startDate, sprint.targetDate)} - - / - -
- - - / - - {/if} -
- {/if} -
{/if} +{:else} +
+ {#if (value.sprint && value.sprint !== $activeSprint && groupBy !== 'sprint') || shouldShowPlaceholder} +
+ +
+ {/if} + + {#if sprint && kind === 'list-header'} +
+ {#if sprint} + {@const now = Date.now()} + {@const sprintDaysFrom = + now < sprint.startDate + ? 0 + : now > sprint.targetDate + ? getDayOfSprint(sprint.startDate, sprint.targetDate) + : getDayOfSprint(sprint.startDate, now)} + {@const sprintDaysTo = getDayOfSprint(sprint.startDate, sprint.targetDate)} + + / + +
+ + + / + + {/if} +
+ {/if} +
{/if}