From bf94deab1d51db85b8f090c9d51f61ca0b780b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaas=20B=C3=B6rgmann?= Date: Wed, 18 Sep 2024 15:15:22 +0200 Subject: [PATCH 1/2] Anzahl der anwesenden --- .vscode/settings.json | 3 +++ app.js | 3 ++- views/trainings.ejs | 12 ++++++------ 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e75b1e7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cSpell.language": "en,de-DE" +} \ No newline at end of file diff --git a/app.js b/app.js index 9749d4e..8558d3e 100644 --- a/app.js +++ b/app.js @@ -648,7 +648,7 @@ app.get("/training", requireAuth, async (req, res) => { [training.id] ); anwesend = anwesendResult.rows; - + const anzahl = anwesend.length; const trainingsResult = await pool.query( "SELECT kw, jahr FROM trainings ORDER BY kw ASC" ); @@ -697,6 +697,7 @@ app.get("/training", requireAuth, async (req, res) => { age: age, helfer: row.helfer, anwesend: tnAnwesend, + anzahl, }); }); diff --git a/views/trainings.ejs b/views/trainings.ejs index 59e6236..dc99dce 100644 --- a/views/trainings.ejs +++ b/views/trainings.ejs @@ -28,11 +28,11 @@

Geräte

@@ -255,7 +255,7 @@

Anwesenheit

- +

Anwesend: <%= anwesend.length %>