RA-#4 Registration open icon is red when deadline expired

This commit is contained in:
Timon Ostertun
2020-09-30 22:46:20 +02:00
parent b739e6cc4e
commit a72c462483
2 changed files with 94 additions and 88 deletions

View File

@@ -120,8 +120,10 @@ var siteScript = async function() {
ms = parseDate(regatta['meldungSchluss']); ms = parseDate(regatta['meldungSchluss']);
} }
var diff = Math.round((ms - today) / 86400000); var diff = Math.round((ms - today) / 86400000);
if ((ms >= today) && (diff < 7)) { if (ms < today) {
color = ' color-red2-dark'; color = ' color-red2-dark';
} else if (diff < 7) {
color = ' color-yellow2-dark';
} }
} }
} }
@@ -227,8 +229,10 @@ var siteScript = async function() {
ms = parseDate(regatta['meldungSchluss']); ms = parseDate(regatta['meldungSchluss']);
} }
var diff = Math.round((ms - today) / 86400000); var diff = Math.round((ms - today) / 86400000);
if ((ms >= today) && (diff < 7)) { if (ms < today) {
color = ' color-red2-dark'; color = ' color-red2-dark';
} else if (diff < 7) {
color = ' color-yellow2-dark';
} }
} }
} }

View File

@@ -160,8 +160,10 @@ var siteScript = async function() {
ms = parseDate(entry['meldungSchluss']); ms = parseDate(entry['meldungSchluss']);
} }
var diff = Math.round((ms - today) / 86400000); var diff = Math.round((ms - today) / 86400000);
if ((ms >= today) && (diff < 7)) { if (ms < today) {
color = ' color-red2-dark'; color = ' color-red2-dark';
} else if (diff < 7) {
color = ' color-yellow2-dark';
} }
} }
} }