Geburtstagsbug - Geburtstag am Trainingstag wurd ich der folgenden Woche auch angezeigt Z108
This commit is contained in:
parent
898708b37c
commit
0ac7e87d3e
4
app.js
4
app.js
|
@ -105,7 +105,7 @@ const isBirthday = (birthdate, date, previousTraining) => {
|
|||
return 2;
|
||||
}
|
||||
if (
|
||||
adjustedBirthdate.getTime() >= previousTraining.getTime() &&
|
||||
adjustedBirthdate.getTime() > previousTraining.getTime() &&
|
||||
adjustedBirthdate.getTime() <= date.getTime()
|
||||
) {
|
||||
return 1;
|
||||
|
@ -791,7 +791,6 @@ ORDER BY r.riegennummer, t.geburtsdatum ASC;
|
|||
});
|
||||
});
|
||||
if (training) {
|
||||
console.log("THIS!");
|
||||
training.datum = getdayOfWeek(training.kw, training.jahr);
|
||||
}
|
||||
|
||||
|
@ -926,7 +925,6 @@ app.get("/mitglied/:id", requireAuth, requireAdmin, async (req, res) => {
|
|||
"SELECT t.id, TO_CHAR(t.datum, 'DD.MM.YYYY') as date, t.* FROM trainings t JOIN anwesend a ON t.id = a.fid_training WHERE a.fid_teilnehmer = $1;",
|
||||
[id]
|
||||
);
|
||||
console.log(anwesendResult);
|
||||
const anwesenheiten = anwesendResult.rows;
|
||||
const anwesend = anwesendResult.rows.length;
|
||||
const numberResult = await pool.query(
|
||||
|
|
Loading…
Reference in New Issue