diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-06-12 21:21:56 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-06-12 21:21:56 +0300 |
commit | 6d7bdad140d322a617034caebd6d2a0189c4628c (patch) | |
tree | 8fc379a864411f32c03f8a0eec52794c93df6421 | |
parent | aef871833ba58299d165b693f2bd7d2bd3947ef8 (diff) | |
parent | 45cf2843a63e96eefc5174dd55cf540c9b74c3a9 (diff) | |
download | wekan-6d7bdad140d322a617034caebd6d2a0189c4628c.tar.gz wekan-6d7bdad140d322a617034caebd6d2a0189c4628c.tar.bz2 wekan-6d7bdad140d322a617034caebd6d2a0189c4628c.zip |
Merge branch 'cardCoverTimeBadges' of https://github.com/rjevnikar/wekan into rjevnikar-cardCoverTimeBadges
-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 |