This commit is contained in:
asyncnomi 2023-01-03 23:11:42 +01:00
parent 5cacbb003f
commit 12a549f7f2

View file

@ -111,7 +111,7 @@ function get_admin(type) {
data.prankData[prankUid].prankUid = prankUid;
prankData.push(data.prankData[prankUid]);
}
prankData.sort((a, b) => Date(a.date) - Date(b.date));
prankData.sort((a, b) => new Date(a.date) - new Date(b.date));
for (entry in prankData) {
switch (prankData[entry].type) {
case "crêpe":
@ -156,7 +156,7 @@ function get_admin(type) {
data.treasureData[treasureUid].treasureUid = treasureUid;
treasureData.push(data.treasureData[treasureUid]);
}
treasureData.sort((a, b) => Date(a.date) - Date(b.date));
treasureData.sort((a, b) => new Date(a.date) - new Date(b.date));
for (entry in treasureData) {
if (treasureData[entry].state == "pending") {
$("#admin-content").append(`
@ -201,8 +201,7 @@ function get_admin(type) {
data.activityData[activityUid].activityUid = activityUid;
activityData.push(data.activityData[activityUid]);
}
console.log(activityData)
activityData.sort((a, b) => Date(a.start) - Date(b.start));
activityData.sort((a, b) => new Date(a.start) - new Date(b.start));
for (entry in activityData) {
if (activityData[entry].type = "event") {
$("#admin-content").append(`