diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-06-12 21:36:16 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-06-12 21:36:16 +0300 |
commit | aa7199af2d3f4f3d3c3e16ad0d04978c88b6c7c0 (patch) | |
tree | f395e7a5aa3148ecfc98b18d9367cb85fd63ae72 /client/components | |
parent | aef871833ba58299d165b693f2bd7d2bd3947ef8 (diff) | |
parent | fba0a52e4af3c304cffb057651afb593f76860f2 (diff) | |
download | wekan-aa7199af2d3f4f3d3c3e16ad0d04978c88b6c7c0.tar.gz wekan-aa7199af2d3f4f3d3c3e16ad0d04978c88b6c7c0.tar.bz2 wekan-aa7199af2d3f4f3d3c3e16ad0d04978c88b6c7c0.zip |
Merge branch 'rjevnikar-cardCoverTimeBadges' into devel
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/cards/cardDate.js | 9 | ||||
-rw-r--r-- | client/components/cards/minicard.jade | 12 |
2 files changed, 17 insertions, 4 deletions
diff --git a/client/components/cards/cardDate.js b/client/components/cards/cardDate.js index 52a48f47..e95c3a23 100644 --- a/client/components/cards/cardDate.js +++ b/client/components/cards/cardDate.js @@ -279,11 +279,14 @@ class CardDueDate extends CardDate { classes() { let classes = 'due-date' + ' '; - if (this.now.get().diff(this.date.get(), 'days') >= 2) + if ((this.now.get().diff(this.date.get(), 'days') >= 2) && + (this.date.get().isBefore(this.data().endAt))) classes += 'long-overdue'; - else if (this.now.get().diff(this.date.get(), 'minute') >= 0) + else if ((this.now.get().diff(this.date.get(), 'minute') >= 0) && + (this.date.get().isBefore(this.data().endAt))) classes += 'due'; - else if (this.now.get().diff(this.date.get(), 'days') >= -1) + else if ((this.now.get().diff(this.date.get(), 'days') >= -1) && + (this.date.get().isBefore(this.data().endAt))) classes += 'almost-due'; return classes; } diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index aa0708dd..b44021a6 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -10,12 +10,22 @@ template(name="minicard") +viewer = title .dates + if receivedAt + unless startAt + unless dueAt + unless endAt + .date + +miniCardReceivedDate if startAt .date +minicardStartDate if dueAt + unless endAt + .date + +minicardDueDate + if endAt .date - +minicardDueDate + +minicardEndDate if spentTime .date +cardSpentTime |