Anpassung der Verlinkung

This commit is contained in:
2026-04-08 23:54:44 +02:00
parent e16217a116
commit c297709489
+77 -101
View File
@@ -982,6 +982,24 @@ $marketing = app_marketing_messages();
<section class="alert alert-warning"><?= h((string) $dbError) ?></section>
<?php endif; ?>
<?php elseif ($page === 'dashboard'): ?>
<?php if ($dashboardAnnouncements !== []): ?>
<section class="card" style="margin-bottom:18px">
<div class="eyebrow">Aktuelle Hinweise</div>
<h2>Wichtige Informationen</h2>
<div class="stack">
<?php foreach ($dashboardAnnouncements as $announcement): ?>
<article class="metric">
<h3><?= h((string) ($announcement['title'] ?? 'Hinweis')) ?></h3>
<p><?= nl2br(h((string) ($announcement['message'] ?? ''))) ?></p>
<?php if ((string) ($announcement['visible_until'] ?? '') !== ''): ?>
<p class="muted">Sichtbar bis <?= dt((string) ($announcement['visible_until'] ?? '')) ?></p>
<?php endif; ?>
</article>
<?php endforeach; ?>
</div>
</section>
<?php endif; ?>
<section class="hero">
<div class="eyebrow">Kaffeeliste aktuell</div>
<h1><?= h((string) $auth['tenant_name']) ?></h1>
@@ -1048,77 +1066,66 @@ $marketing = app_marketing_messages();
</article>
</section>
<section class="grid grid-2" style="margin-top:18px">
<article class="card">
<div class="eyebrow"><?= $canManageTenant ? 'Schnellaktionen' : 'Self-Service' ?></div>
<h2><?= $canManageTenant ? 'Direkt arbeiten' : 'Mein Bereich' ?></h2>
<?php if ($canManageTenant): ?>
<div class="grid grid-2">
<article class="metric">
<strong>Buchungen</strong>
<h3>Sammelerfassung öffnen</h3>
<p>Striche für alle, Vorderseite oder Rückseite direkt buchen.</p>
<div class="actions" style="margin-top:14px"><a class="button secondary" href="/ledger/">Zu den Buchungen</a></div>
</article>
<article class="metric">
<strong>Zahlungen</strong>
<h3>Einzahlungen und Korrekturen</h3>
<p>Einzahlungen buchen, stornieren und Zahlarten sauber nachführen.</p>
<div class="actions" style="margin-top:14px"><a class="button secondary" href="/payments/">Zu den Zahlungen</a></div>
</article>
<?php if ($canManageTenant): ?>
<section class="card" style="margin-top:18px">
<div class="eyebrow">Saldo-Lage</div>
<h2>Auffällige Kontostände</h2>
<div class="grid grid-2">
<div>
<h3 style="margin-bottom:10px">Höchste Rückstände</h3>
<ul class="list">
<?php foreach (($tenantDashboard['largest_debtors'] ?? []) as $row): ?>
<li><?= h((string) ($row['display_name'] ?? 'Mitglied')) ?> · <?= money($row['balance'] ?? 0) ?></li>
<?php endforeach; ?>
<?php if (($tenantDashboard['largest_debtors'] ?? []) === []): ?><li>Aktuell keine negativen Salden.</li><?php endif; ?>
</ul>
</div>
<?php elseif (($tenantSettings['allow_self_service_booking'] ?? '1') === '1' && !empty($auth['member_id'])): ?>
<form method="post" action="/dashboard/" class="grid">
<input type="hidden" name="action" value="record-coffee">
<input type="hidden" name="member_id" value="<?= h((string) ($auth['member_id'] ?? '')) ?>">
<label>Anzahl Striche<input type="number" name="strokes" min="1" max="2" step="1" value="1"></label>
<label>Preis pro Strich<input type="number" name="unit_price" min="0.01" step="0.01" value="<?= h((string) ($tenantSettings['default_unit_price'] ?? '0.50')) ?>"></label>
<label>Buchungszeit<input type="datetime-local" name="booked_at" value="<?= date('Y-m-d\TH:i') ?>"></label>
<input type="hidden" name="booking_source" value="self-service">
<div class="actions"><button type="submit">Eigene Striche buchen</button></div>
</form>
<?php else: ?>
<ul class="list">
<li>Hier siehst du deinen Kontostand, letzte Buchungen und aktuelle Hinweise.</li>
<li>Self-Service-Striche sind in diesem Mandanten aktuell deaktiviert.</li>
<li>Wenn dir etwas fehlt, wende dich an den Betreiber deines Bereichs.</li>
</ul>
<?php endif; ?>
</article>
<div>
<h3 style="margin-bottom:10px">Größte Guthaben</h3>
<ul class="list">
<?php foreach (($tenantDashboard['largest_credits'] ?? []) as $row): ?>
<li><?= h((string) ($row['display_name'] ?? 'Mitglied')) ?> · <?= money($row['balance'] ?? 0) ?></li>
<?php endforeach; ?>
<?php if (($tenantDashboard['largest_credits'] ?? []) === []): ?><li>Aktuell keine Guthaben über 0 EUR.</li><?php endif; ?>
</ul>
</div>
</div>
</section>
<?php else: ?>
<section class="grid grid-2" style="margin-top:18px">
<article class="card">
<div class="eyebrow">Self-Service</div>
<h2>Mein Bereich</h2>
<?php if (($tenantSettings['allow_self_service_booking'] ?? '1') === '1' && !empty($auth['member_id'])): ?>
<form method="post" action="/dashboard/" class="grid">
<input type="hidden" name="action" value="record-coffee">
<input type="hidden" name="member_id" value="<?= h((string) ($auth['member_id'] ?? '')) ?>">
<label>Anzahl Striche<input type="number" name="strokes" min="1" max="2" step="1" value="1"></label>
<label>Preis pro Strich<input type="number" name="unit_price" min="0.01" step="0.01" value="<?= h((string) ($tenantSettings['default_unit_price'] ?? '0.50')) ?>"></label>
<label>Buchungszeit<input type="datetime-local" name="booked_at" value="<?= date('Y-m-d\TH:i') ?>"></label>
<input type="hidden" name="booking_source" value="self-service">
<div class="actions"><button type="submit">Eigene Striche buchen</button></div>
</form>
<?php else: ?>
<ul class="list">
<li>Hier siehst du deinen Kontostand und aktuelle Hinweise.</li>
<li>Self-Service-Striche sind in diesem Mandanten aktuell deaktiviert.</li>
<li>Wenn dir etwas fehlt, wende dich an den Betreiber deines Bereichs.</li>
</ul>
<?php endif; ?>
</article>
<article class="card">
<div class="eyebrow"><?= $canManageTenant ? 'Saldo-Lage' : 'Konto' ?></div>
<h2><?= $canManageTenant ? 'Auffällige Kontostände' : 'Persönliche Einstellungen' ?></h2>
<?php if ($canManageTenant): ?>
<div class="grid grid-2">
<div>
<h3 style="margin-bottom:10px">Höchste Rückstände</h3>
<ul class="list">
<?php foreach (($tenantDashboard['largest_debtors'] ?? []) as $row): ?>
<li><?= h((string) ($row['display_name'] ?? 'Mitglied')) ?> · <?= money($row['balance'] ?? 0) ?></li>
<?php endforeach; ?>
<?php if (($tenantDashboard['largest_debtors'] ?? []) === []): ?><li>Aktuell keine negativen Salden.</li><?php endif; ?>
</ul>
</div>
<div>
<h3 style="margin-bottom:10px">Größte Guthaben</h3>
<ul class="list">
<?php foreach (($tenantDashboard['largest_credits'] ?? []) as $row): ?>
<li><?= h((string) ($row['display_name'] ?? 'Mitglied')) ?> · <?= money($row['balance'] ?? 0) ?></li>
<?php endforeach; ?>
<?php if (($tenantDashboard['largest_credits'] ?? []) === []): ?><li>Aktuell keine Guthaben über 0 EUR.</li><?php endif; ?>
</ul>
</div>
</div>
<?php else: ?>
<article class="card">
<div class="eyebrow">Konto</div>
<h2>Persönliche Einstellungen</h2>
<p>Profil, Passwort und Anzeigemodus liegen in deiner persönlichen Einstellungsseite.</p>
<div class="actions" style="margin-top:18px">
<a class="button secondary" href="/profile/">Persönliche Einstellungen öffnen</a>
</div>
<p class="muted" style="margin-top:12px">Aktuell aktiv: <?= h($themeMode === 'dark' ? 'Dunkelmodus' : 'Hellmodus') ?></p>
<?php endif; ?>
</article>
</section>
</article>
</section>
<?php endif; ?>
<?php if ($canManageTenant): ?>
<section class="card" style="margin-top:18px">
@@ -1127,7 +1134,12 @@ $marketing = app_marketing_messages();
<div class="eyebrow">Kaffeelisten-Stand</div>
<h2 style="margin:0">Aktive Mitglieder im Überblick</h2>
</div>
<a class="button secondary" href="/members/">Mitgliederverwaltung öffnen</a>
<div class="actions">
<a class="button secondary" href="/members/">Mitgliederverwaltung öffnen</a>
<?php if ($hasPdfExportFeature || $hasPaperStrikeEntryFeature): ?>
<a class="button secondary" href="/exports/">PDF-Export öffnen</a>
<?php endif; ?>
</div>
</div>
<div class="table">
<table>
@@ -1147,42 +1159,6 @@ $marketing = app_marketing_messages();
</div>
</section>
<?php endif; ?>
<section class="grid grid-2" style="margin-top:18px">
<article class="card">
<div class="eyebrow">Verlauf</div>
<h2>Letzte Buchungen</h2>
<div class="table">
<table>
<thead><tr><th>Zeit</th><?php if ($canManageTenant): ?><th>Mitglied</th><?php endif; ?><th>Typ</th><th>Referenz</th><th>Betrag</th></tr></thead>
<tbody><?php foreach (($canManageTenant ? $ledger : ($memberSummary['recent_entries'] ?? [])) as $entry): ?><tr><td><?= dt((string) ($entry['booked_at'] ?? '')) ?></td><?php if ($canManageTenant): ?><td><?= h((string) ($entry['member_name'] ?? '')) ?></td><?php endif; ?><td><?= h((string) ($entry['entry_type'] ?? '')) ?></td><td><?= h((string) ($entry['reference_type'] ?? '')) ?></td><td><?= money($entry['amount'] ?? 0) ?></td></tr><?php endforeach; ?></tbody>
</table>
</div>
</article>
<article class="card">
<div class="eyebrow">Hinweise</div>
<h2>Wichtige Informationen</h2>
<?php if ($dashboardAnnouncements !== []): ?>
<ul class="list">
<?php foreach ($dashboardAnnouncements as $announcement): ?>
<li>
<strong><?= h((string) ($announcement['title'] ?? 'Hinweis')) ?></strong><br>
<?= h((string) ($announcement['message'] ?? '')) ?>
</li>
<?php endforeach; ?>
</ul>
<?php else: ?>
<p class="muted">Aktuell sind keine aktiven Hinweise veröffentlicht.</p>
<?php endif; ?>
<div class="actions" style="margin-top:18px">
<?php if ($canManageTenant): ?>
<a class="button secondary" href="/content/">Hinweise verwalten</a>
<?php else: ?>
<a class="button secondary" href="/support/">Hilfe öffnen</a>
<?php endif; ?>
</div>
</article>
</section>
<?php elseif ($page === 'members'): ?>
<section class="hero">
<div class="eyebrow">Mitgliederverwaltung</div>