From 373ef70d3440cc7b6743200403024a806aa0ff2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Sun, 23 Sep 2018 15:37:22 +0200 Subject: [PATCH] Work on showing tasks in list views --- src/components/Task.vue | 127 ++++++++++++++++----- src/components/TheCollections/Calendar.vue | 30 +++-- src/components/TheCollections/General.vue | 16 +-- src/components/TheCollections/Week.vue | 14 +-- 4 files changed, 129 insertions(+), 58 deletions(-) diff --git a/src/components/Task.vue b/src/components/Task.vue index 63dd08de..bf9e4597 100644 --- a/src/components/Task.vue +++ b/src/components/Task.vue @@ -22,10 +22,10 @@ License along with this library. If not, see . diff --git a/src/components/TheCollections/Calendar.vue b/src/components/TheCollections/Calendar.vue index 6d573665..43708499 100644 --- a/src/components/TheCollections/Calendar.vue +++ b/src/components/TheCollections/Calendar.vue @@ -23,21 +23,20 @@ License along with this library. If not, see .
-
    @@ -46,10 +45,10 @@ License along with this library. If not, see .
-

- +

+ {{ completedCountString(calendarId) }}

-
    . dnd-drop="dropAsRootTask(event, item, index)" dnd-dragover="dragover(event, index)"> @@ -103,12 +101,20 @@ export default { } } }, mapGetters({ - tasks: 'getTasksByRoute' + tasks: 'getTasksByRoute', + completedCount: 'getCalendarCountCompleted' }) ), methods: { toggleHidden: function() { this.showHidden = +!this.showHidden + }, + + /** + * Returns the string for completed tasks + */ + completedCountString: function() { + return n('tasks', '%n Completed Task', '%n Completed Tasks', this.completedCount(this.calendarId)) } } } diff --git a/src/components/TheCollections/General.vue b/src/components/TheCollections/General.vue index 1b04d413..5d6b49ba 100644 --- a/src/components/TheCollections/General.vue +++ b/src/components/TheCollections/General.vue @@ -27,26 +27,26 @@ License along with this library. If not, see . class="grouped-tasks ui-droppable">

    {{ calendar.displayname }}

      -
    1. -
    2. +
    {{ t('tasks', 'Load remaining completed tasks.') }} diff --git a/src/components/TheCollections/Week.vue b/src/components/TheCollections/Week.vue index f26e1900..2eb52503 100644 --- a/src/components/TheCollections/Week.vue +++ b/src/components/TheCollections/Week.vue @@ -30,20 +30,20 @@ License along with this library. If not, see . dnd-list="draggedTasks" dnd-drop="dropAsRootTask(event, item, index)" dnd-dragover="dragover(event, index)"> -
  1. -
  2. +