From 077f66661987abe0e3268404f91d7abeff7f7c9e Mon Sep 17 00:00:00 2001 From: Alex <41288429+Dvinyanin@users.noreply.github.com> Date: Wed, 18 May 2022 11:03:00 +0700 Subject: [PATCH] Board: Add checklists info (#1772) --- .../src/components/KanbanCard.svelte | 6 ++++ .../presenters/ChecklistsPresenter.svelte | 29 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 plugins/board-resources/src/components/presenters/ChecklistsPresenter.svelte diff --git a/plugins/board-resources/src/components/KanbanCard.svelte b/plugins/board-resources/src/components/KanbanCard.svelte index db0b6d2eab..2649272e35 100644 --- a/plugins/board-resources/src/components/KanbanCard.svelte +++ b/plugins/board-resources/src/components/KanbanCard.svelte @@ -28,6 +28,7 @@ import DatePresenter from './presenters/DatePresenter.svelte' import { hasDate, openCardPanel, updateCard, updateCardMembers } from '../utils/CardUtils' import { getElementPopupAlignment } from '../utils/PopupUtils' + import CheckListsPresenter from './presenters/ChecklistsPresenter.svelte' export let object: WithLookup @@ -186,6 +187,11 @@ {/if} + {#if (object.todoItems ?? 0) > 0} +
+ +
+ {/if} {#if (object.members?.length ?? 0) > 0} diff --git a/plugins/board-resources/src/components/presenters/ChecklistsPresenter.svelte b/plugins/board-resources/src/components/presenters/ChecklistsPresenter.svelte new file mode 100644 index 0000000000..15ef2ee146 --- /dev/null +++ b/plugins/board-resources/src/components/presenters/ChecklistsPresenter.svelte @@ -0,0 +1,29 @@ + + +{#if value && (total ?? 0) > 0} +
+ +  {done}/{total} +
+{/if}