DogTags Schritt 2: die Marke in sieben Raengen, Register im Pult

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-28 01:20:19 +01:00
co-authored by Claude Opus 5.5
parent 0768abe7a3
commit 3e0a2b5389
56 changed files with 1356 additions and 724 deletions
+2 -1
View File
@@ -103,7 +103,7 @@ export function dogtagStand(personId, zeit = Date.now()) {
const tage = d.prepare("SELECT tag FROM dogtag_heulen WHERE person_id = ?")
.all(personId).map((z) => z.tag);
const serie = serieRechnen(tage, heute);
const person = d.prepare("SELECT erstellt FROM personen WHERE id = ?").get(personId);
const person = d.prepare("SELECT name, erstellt FROM personen WHERE id = ?").get(personId);
const start = startDogtags(person?.erstellt, einstellung().start_am);
const geheult = tage.filter((t) => t <= heute).length;
const sammlung = geheult + serie.bonus + start;
@@ -124,6 +124,7 @@ export function dogtagStand(personId, zeit = Date.now()) {
const siegel = { aktiv: geschenkt || imMonat >= noetig, geschenkt, spenden_monat: imMonat, noetig };
return {
name: person?.name || "",
heute,
geheult_heute: tage.includes(heute),
sekunden_bis_neu: Math.max(0, Math.ceil((naechsteMitternacht(zeit) - zeit) / 1000)),