multi-user: users, per-user profiles/filters/notifications, tab UI, apply forensics
* DB: users + user_profiles/filters/notifications/preferences; applications gets user_id + forensics_json + profile_snapshot_json; new errors table with 14d retention; schema versioning via MIGRATIONS list * auth: password hashes in DB (argon2); env vars seed first admin; per-user sessions; CSRF bound to user id * apply: personal info/WBS moved out of env into the request body; providers take an ApplyContext with Profile + submit_forms; full Playwright recorder (step log, console, page errors, network, screenshots, final HTML) * web: five top-level tabs (Wohnungen/Bewerbungen/Logs/Fehler/Einstellungen); settings sub-tabs profil/filter/benachrichtigungen/account/benutzer; per-user matching, auto-apply and notifications (UI/Telegram/SMTP); red auto-apply switch on Wohnungen tab; forensics detail view for bewerbungen and fehler; retention background thread Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e663386a19
commit
c630b500ef
36 changed files with 2763 additions and 1113 deletions
51
web/templates/_settings_notifications.html
Normal file
51
web/templates/_settings_notifications.html
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<h2 class="font-semibold mb-2">Benachrichtigungen</h2>
|
||||
<p class="text-sm text-slate-600 mb-4">
|
||||
Wähle einen Kanal und entscheide, welche Events dich erreichen sollen.
|
||||
</p>
|
||||
|
||||
<form method="post" action="/actions/notifications" class="space-y-4 max-w-xl">
|
||||
<input type="hidden" name="csrf" value="{{ csrf }}">
|
||||
|
||||
<div>
|
||||
<label class="block text-xs uppercase text-slate-500 mb-1">Kanal</label>
|
||||
<select class="input" name="channel">
|
||||
<option value="ui" {% if notifications.channel == 'ui' %}selected{% endif %}>Nur im Dashboard (kein Push)</option>
|
||||
<option value="telegram" {% if notifications.channel == 'telegram' %}selected{% endif %}>Telegram</option>
|
||||
<option value="email" {% if notifications.channel == 'email' %}selected{% endif %}>E-Mail</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-xs uppercase text-slate-500 mb-1">Telegram Bot-Token</label>
|
||||
<input class="input" name="telegram_bot_token" value="{{ notifications.telegram_bot_token }}"
|
||||
placeholder="123456:ABC...">
|
||||
<p class="text-xs text-slate-500 mt-1">Bot bei @BotFather anlegen, Token hier eintragen.</p>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs uppercase text-slate-500 mb-1">Telegram Chat-ID</label>
|
||||
<input class="input" name="telegram_chat_id" value="{{ notifications.telegram_chat_id }}" placeholder="987654321">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="block text-xs uppercase text-slate-500 mb-1">E-Mail Adresse</label>
|
||||
<input class="input" type="email" name="email_address" value="{{ notifications.email_address }}"
|
||||
placeholder="du@example.com">
|
||||
</div>
|
||||
|
||||
<div class="border-t border-soft pt-4 space-y-2">
|
||||
<label class="flex items-center gap-2">
|
||||
<input type="checkbox" name="notify_on_match" {% if notifications.notify_on_match %}checked{% endif %}>
|
||||
<span>Bei passender Wohnung</span>
|
||||
</label>
|
||||
<label class="flex items-center gap-2">
|
||||
<input type="checkbox" name="notify_on_apply_success" {% if notifications.notify_on_apply_success %}checked{% endif %}>
|
||||
<span>Bei erfolgreicher Bewerbung</span>
|
||||
</label>
|
||||
<label class="flex items-center gap-2">
|
||||
<input type="checkbox" name="notify_on_apply_fail" {% if notifications.notify_on_apply_fail %}checked{% endif %}>
|
||||
<span>Bei fehlgeschlagener Bewerbung</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" type="submit">Speichern</button>
|
||||
</form>
|
||||
Loading…
Add table
Add a link
Reference in a new issue