From ffa04233fe9235768336f8e12eef43c99e39a585 Mon Sep 17 00:00:00 2001 From: Alex <41288429+Dvinyanin@users.noreply.github.com> Date: Mon, 18 Apr 2022 17:25:52 +0700 Subject: [PATCH] Fix date (#1430) Signed-off-by: Dvinyanin Alexandr --- .../src/components/editor/CardDetails.svelte | 4 +++- .../src/components/popups/DateRangePicker.svelte | 11 +++++++++-- .../src/components/presenters/DatePresenter.svelte | 7 ++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/plugins/board-resources/src/components/editor/CardDetails.svelte b/plugins/board-resources/src/components/editor/CardDetails.svelte index d80bf33181..2c8bbeee1b 100644 --- a/plugins/board-resources/src/components/editor/CardDetails.svelte +++ b/plugins/board-resources/src/components/editor/CardDetails.svelte @@ -99,7 +99,9 @@
- + {#key value.date} + + {/key} {/if} {/if} diff --git a/plugins/board-resources/src/components/popups/DateRangePicker.svelte b/plugins/board-resources/src/components/popups/DateRangePicker.svelte index e5bf490f8d..ce43d7683d 100644 --- a/plugins/board-resources/src/components/popups/DateRangePicker.svelte +++ b/plugins/board-resources/src/components/popups/DateRangePicker.svelte @@ -1,7 +1,7 @@
@@ -70,7 +77,7 @@ size={'small'} kind={'primary'} on:click={() => { - client.update(object, {date: {startDate, dueDate}}) + update() dispatch('close') }} /> diff --git a/plugins/board-resources/src/components/presenters/DatePresenter.svelte b/plugins/board-resources/src/components/presenters/DatePresenter.svelte index 40b1141e81..71c7d9a1d0 100644 --- a/plugins/board-resources/src/components/presenters/DatePresenter.svelte +++ b/plugins/board-resources/src/components/presenters/DatePresenter.svelte @@ -8,11 +8,16 @@ const client = getClient() const {date} = value let isChecked = date?.isChecked + + function update(){ + if (isChecked === undefined) return + client.update(value, {date: {...date, isChecked}}) + } {#if date}
- client.update(value, {date: {...date, isChecked}})}/> +
{#if date.startDate}