kurt-compliance-auditor/src/check-badges.js
Qognio Bot Extract e679eedcc6 init: extract kurt-compliance-auditor from qognio-bot-widget-template@d2c816f
Source files (src/) and rendered bundle (www/) extracted on 2026-04-29T01:35:47+02:00.
Adds nginx:alpine Dockerfile + docker-compose.yml (Caddy-labels) so the bot
runs stand-alone or as a per-customer template clone.

Parent monorepo commit: d2c816f3edbc9760802a11b29ff4151c7aad4b46
Bot version: 2026-04-25
2026-04-29 01:35:47 +02:00

20 lines
No EOL
1.4 KiB
JavaScript

// Erste Audit — 1 Quiz im Integrations-Modul (warum DSGVO+AI-Act zusammen)
if ((state.moduleCorrect && state.moduleCorrect['integration'] >= 1)) unlockBadge('erste_audit');
// DSGVO-Kenner — 5 Quiz in DSGVO-Essenz-Modulen
if ((state.moduleCorrect && state.moduleCorrect['dsgvo-essenz'] >= 5)) unlockBadge('dsgvo_kenner');
// AI-Act-Kenner — 5 Quiz in AI-Act-Essenz-Modulen
if ((state.moduleCorrect && state.moduleCorrect['ai-act-essenz'] >= 5)) unlockBadge('ai_act_kenner');
// Crosswalk-Meister — 5 Quiz im Crosswalk-Modul (DSFA <-> RMS)
if ((state.moduleCorrect && state.moduleCorrect['crosswalk'] >= 5)) unlockBadge('crosswalk_meister');
// Art-22-Pro — 3 Quiz im Art-22-Modul
if ((state.moduleCorrect && state.moduleCorrect['art22'] >= 3)) unlockBadge('art22_pro');
// Register-Architekt — alle Flashcards des Risikoregister-Moduls bestanden
if ((state.modulePassedFlash && state.modulePassedFlash['risikoregister'])) unlockBadge('register_architekt');
// KURT-Meister — alle 5 Curricula komplett
if ((state.completedCurricula || []).length >= 5) unlockBadge('kurt_meister');
// Compliance-Disziplin — 14-Tage-Streak (etwas weicher als Cora's 30, weil KURT-Use-Cases punktuell)
if (state.maxStreak >= 14) unlockBadge('streak_14');
// Night Owl & Early Bird (beibehalten)
const h = new Date().getHours();
if (h >= 22) unlockBadge('night_owl');
if (h < 7) unlockBadge('early_bird');