Web-Push mit VAPID und Erinnerungs-Endpoint

This commit is contained in:
OpenCode 2026-11-13 01:03:54 +01:00
parent 67a1614081
commit b50267e4f0
24 changed files with 1703 additions and 50 deletions

View file

@ -9,6 +9,7 @@
/** @var bool $isAdmin */
/** @var string $today */
/** @var bool $mailEnabled */
/** @var bool $pushEnabled */
$rangeUrl = static function (string $r) use ($employeeFilter, $showDone): string {
$params = ['range' => $r];
if ($employeeFilter > 0) {
@ -33,10 +34,10 @@ foreach ($rows as $row) {
<p class="page-head__lede">Automatisch aus Mietbeginn und Mietende berechnet – für den zuständigen Mitarbeiter.</p>
</div>
<div class="page-head__actions">
<?php if ($isAdmin && $mailEnabled): ?>
<form method="post" action="<?= e(url('/admin/reminders/send')) ?>" data-confirm="Fällige Erinnerungen jetzt per E-Mail an die Mitarbeiter senden?">
<?php if ($isAdmin && ($mailEnabled || $pushEnabled)): ?>
<form method="post" action="<?= e(url('/admin/reminders/send')) ?>" data-confirm="Fällige Erinnerungen jetzt per Push und E-Mail senden?">
<?= csrf_field() ?>
<button class="btn" type="submit"><svg class="ico" aria-hidden="true"><use href="#i-mail"/></svg> E-Mail-Versand starten</button>
<button class="btn" type="submit"><svg class="ico" aria-hidden="true"><use href="#i-bell"/></svg> Erinnerungen jetzt senden</button>
</form>
<?php endif; ?>
<a class="btn primary" href="<?= e(url('/calendar')) ?>"><svg class="ico" aria-hidden="true"><use href="#i-calendar"/></svg> Kalender</a>