mirror of
https://github.com/wekan/wekan.git
synced 2025-12-31 06:38:49 +01:00
Adjust classes given to due date to take into account end date
This commit is contained in:
parent
ca51ace22d
commit
45cf2843a6
1 changed files with 6 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue