mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 04:57:07 -04:00
cardDate: endDate coloring change
if no due-date timestamp is set => Gray if end-date timestamp is younger than due-date timestamp => Green if end-date timestamp is older than due-date timestamp => Red resolves #2741
This commit is contained in:
parent
d3ca816762
commit
7a5401d5f0
1 changed files with 3 additions and 3 deletions
|
@ -344,9 +344,9 @@ class CardEndDate extends CardDate {
|
|||
let classes = 'end-date' + ' ';
|
||||
const dueAt = this.data().getDue();
|
||||
const theDate = this.date.get();
|
||||
if (theDate.diff(dueAt, 'days') >= 2) classes += 'long-overdue';
|
||||
else if (theDate.diff(dueAt, 'days') >= 0) classes += 'due';
|
||||
else if (theDate.diff(dueAt, 'days') >= -2) classes += 'almost-due';
|
||||
if (!dueAt) classes += ''
|
||||
else if (theDate.isBefore(dueAt)) classes += 'current'
|
||||
else if (theDate.isAfter(dueAt)) classes += 'due'
|
||||
return classes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue