diff --git a/dashboard.html b/dashboard.html index f0c33e9..2bfa9ef 100644 --- a/dashboard.html +++ b/dashboard.html @@ -528,6 +528,13 @@ `; } + function buildSignupItems(raw) { + if (!raw) return { html: "", count: 0 }; + const items = Array.isArray(raw) ? raw : [raw]; + const html = items.map(buildSignupItem).join(""); + return { html, count: items.length }; + } + // --------------------------------------------------------------------------- // Render // --------------------------------------------------------------------------- @@ -536,7 +543,7 @@ const calOdoo = data["Calender ODOO4projects"] || []; const calBrandize = data["Calender Brandize"] || []; const todos = data["Todos"] || []; - const currentTest = data["Current Tests"] || null; + const currentTestsRaw = data["Current Tests"] || null; // Deduplicate servers by Server key const serverMap = {}; @@ -582,7 +589,7 @@ .map(buildMeetingCard) .join(""); const todosHtml = todos.map(buildTodoItem).join(""); - const signupsHtml = buildSignupItem(currentTest); + const signups = buildSignupItems(currentTestsRaw); document.getElementById("dashboard").innerHTML = ` @@ -604,10 +611,10 @@ -
-
Latest Signups
+
+
Latest Signups ${signups.count}
- ${signupsHtml || '
No signups
'} + ${signups.html || '
No signups
'}
@@ -619,27 +626,6 @@
- -
-
Current Test
- ${ - currentTest - ? ` -
-
UUID${currentTest.UUID || ""}
-
Email${currentTest.email || ""}
-
Server${currentTest.server || ""}
-
Tags
-
Status${currentTest.status || ""}
-
Expires${currentTest.expires || ""}
-
Domains${currentTest.Domains || ""}
-
Created${currentTest.created || ""}
-
- ` - : '
No active test
' - } -
- `; }