Section 27: keep the key dates on a card with an open alert
This commit is contained in:
1 parent
101e421ab3
commit
59afff7906
1 file changed
+9
-6
+9
-6
@@ -125,14 +125,17 @@ function createKeyCard(entry) {
|
|||||||
top.append(number, status);
|
top.append(number, status);
|
||||||
card.append(top, name, type);
|
card.append(top, name, type);
|
||||||
|
|
||||||
|
// The dates stay visible with an open alert, so the card never hides the last
|
||||||
|
// check and the next due date of a key that only needs an informational
|
||||||
|
// follow-up (section 27).
|
||||||
|
const dates = document.createElement("dl");
|
||||||
|
dates.className = "key-dates";
|
||||||
|
appendDateRow(dates, "Last checked", entry.last_checked_at);
|
||||||
|
appendDateRow(dates, "Next check due", entry.next_check_due);
|
||||||
|
card.append(dates);
|
||||||
|
|
||||||
if (open.length) {
|
if (open.length) {
|
||||||
card.append(createKeyAlertNote(entry, open));
|
card.append(createKeyAlertNote(entry, open));
|
||||||
} else {
|
|
||||||
const dates = document.createElement("dl");
|
|
||||||
dates.className = "key-dates";
|
|
||||||
appendDateRow(dates, "Last checked", entry.last_checked_at);
|
|
||||||
appendDateRow(dates, "Next check due", entry.next_check_due);
|
|
||||||
card.append(dates);
|
|
||||||
}
|
}
|
||||||
return card;
|
return card;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user