Benutzerliste um Tipp- und Jokerstatus der naechsten Runde ergaenzen
This commit is contained in:
parent
9df54016df
commit
f37740f277
2 changed files with 44 additions and 0 deletions
|
|
@ -825,6 +825,22 @@ if ($page === 'reminder') {
|
|||
if ($currentSeason) {
|
||||
$payments = Payment::getPaymentsBySeason($currentSeason['id']);
|
||||
}
|
||||
|
||||
// Status der anstehenden (ersten tippbaren) Runde für die Benutzerliste:
|
||||
// fehlende Tipps und fehlender Joker je Benutzer.
|
||||
$tippableRound = $currentSeason ? Round::getFirstTippable($currentSeason['id']) : null;
|
||||
$missingTipps = [];
|
||||
$missingJoker = [];
|
||||
if ($tippableRound && !empty($users)) {
|
||||
$missing = Tipp::getMissing(
|
||||
(int)$tippableRound['id'],
|
||||
array_map(function ($user) {
|
||||
return (int)$user['id'];
|
||||
}, $users)
|
||||
);
|
||||
$missingTipps = array_flip($missing['tipps']);
|
||||
$missingJoker = array_flip($missing['joker']);
|
||||
}
|
||||
$editUser = null;
|
||||
if (isset($_GET['edit_id'])) {
|
||||
$editUser = User::findById((int)$_GET['edit_id']);
|
||||
|
|
|
|||
|
|
@ -84,6 +84,10 @@ require __DIR__ . '/../partials/header.php';
|
|||
<?php if (!empty($currentSeason)): ?>
|
||||
<th>Bezahlt (<?php echo htmlspecialchars($currentSeason['name']); ?>)</th>
|
||||
<?php endif; ?>
|
||||
<?php if ($tippableRound): ?>
|
||||
<th>Tipps (<?php echo htmlspecialchars($tippableRound['name']); ?>)</th>
|
||||
<th>Joker (<?php echo htmlspecialchars($tippableRound['name']); ?>)</th>
|
||||
<?php endif; ?>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -102,6 +106,22 @@ require __DIR__ . '/../partials/header.php';
|
|||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<?php if ($tippableRound): ?>
|
||||
<td class="text-center">
|
||||
<?php if (isset($missingTipps[$user['id']])): ?>
|
||||
<span class="status-no" title="Tipps fehlen" aria-label="Tipps fehlen">✘</span>
|
||||
<?php else: ?>
|
||||
<span class="status-yes" title="Runde komplett getippt" aria-label="Runde komplett getippt">✔</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?php if (isset($missingJoker[$user['id']])): ?>
|
||||
<span class="status-no" title="Joker fehlt" aria-label="Joker fehlt">✘</span>
|
||||
<?php else: ?>
|
||||
<span class="status-yes" title="Joker gesetzt" aria-label="Joker gesetzt">✔</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td>
|
||||
<a href="/index.php?page=admin_users&edit_id=<?php echo $user['id']; ?>">Bearbeiten</a>
|
||||
<form action="/index.php?page=admin_users" method="post" style="display: inline;" onsubmit="return confirm('Sicher, dass du diesen Benutzer löschen willst?');">
|
||||
|
|
@ -139,6 +159,14 @@ require __DIR__ . '/../partials/header.php';
|
|||
text-decoration: underline;
|
||||
font-family: inherit;
|
||||
}
|
||||
.status-yes,
|
||||
.status-no {
|
||||
font-weight: 900;
|
||||
font-size: 1.35em;
|
||||
line-height: 1;
|
||||
}
|
||||
.status-yes { color: var(--pitch); }
|
||||
.status-no { color: var(--col-joker-exact); }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue