summaryrefslogtreecommitdiffstats
path: root/client/components/cards
diff options
context:
space:
mode:
authorRJevnikar <12701645+rjevnikar@users.noreply.github.com>2018-06-08 21:09:52 +0000
committerRJevnikar <12701645+rjevnikar@users.noreply.github.com>2018-06-08 21:09:52 +0000
commit45cf2843a63e96eefc5174dd55cf540c9b74c3a9 (patch)
tree8aae4def6a3c2db988a013c7a2b46c313535c02b /client/components/cards
parentca51ace22d6f5097a8d0dbf9a62e7248cce1c4a3 (diff)
downloadwekan-45cf2843a63e96eefc5174dd55cf540c9b74c3a9.tar.gz
wekan-45cf2843a63e96eefc5174dd55cf540c9b74c3a9.tar.bz2
wekan-45cf2843a63e96eefc5174dd55cf540c9b74c3a9.zip
Adjust classes given to due date to take into account end date
Diffstat (limited to 'client/components/cards')
-rw-r--r--client/components/cards/cardDate.js9
1 files changed, 6 insertions, 3 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;
}