feat: nový stav "Doručeno" pro objednávky
CI / Generate TypeScript types (push) Successful in 10s
CI / Server unit tests (push) Successful in 26s
CI / Build server (push) Successful in 28s
CI / Build client (push) Successful in 42s
CI / Playwright E2E tests (push) Successful in 1m43s
CI / Build and push Docker image (push) Successful in 48s
CI / Notify (push) Successful in 1s

This commit is contained in:
2026-09-07 11:30:40 +02:00
parent ecc28ee82d
commit b6834cb7aa
6 changed files with 162 additions and 25 deletions
+4 -2
View File
@@ -4,7 +4,7 @@ import { parseToken, formatDate } from "../utils";
import { generateQr } from "../qr";
import { addPendingQr } from "../pizza";
import { markGroupQrGenerated } from "../groups";
import { emitToUser } from "../websocket";
import { emitToUser, getWebsocket } from "../websocket";
import { GenerateQrData } from "../../../types";
import crypto from "crypto";
@@ -59,7 +59,9 @@ router.post("/generate", async (req: Request<{}, any, GenerateQrData["body"]>, r
}
if (groupId) {
await markGroupQrGenerated(login, groupId);
// Skupina se zároveň překlopí do stavu "doručeno" — rozešleme nová data všem
const data = await markGroupQrGenerated(login, groupId);
getWebsocket().emit("message", data);
}
res.status(200).json({ success: true, count: recipients.length });