Feature: Ignorieren-Button in Bank-Buchungsliste
This commit is contained in:
parent
db831ed244
commit
0e1ce034e4
2 changed files with 17 additions and 2 deletions
|
|
@ -123,7 +123,8 @@ class BankController
|
|||
}
|
||||
|
||||
BankTransaction::updateStatus($id, $status);
|
||||
View::redirect('/bank', 'Status aktualisiert.');
|
||||
$back = $_SERVER['HTTP_REFERER'] ?? '/bank';
|
||||
View::redirect($back);
|
||||
}
|
||||
|
||||
public function linkBeleg(array $params): void
|
||||
|
|
|
|||
|
|
@ -67,12 +67,13 @@ $months = ['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','D
|
|||
<th>Buchungstext</th>
|
||||
<th class="td-right" style="width:130px">Wert</th>
|
||||
<th style="width:100px">Status</th>
|
||||
<th style="width:90px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($rows)): ?>
|
||||
<tr>
|
||||
<td colspan="4" class="text-muted" style="text-align:center;padding:2rem">
|
||||
<td colspan="5" class="text-muted" style="text-align:center;padding:2rem">
|
||||
Keine Buchungen gefunden.
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -103,6 +104,19 @@ $months = ['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','D
|
|||
?>
|
||||
<span class="badge <?= $badgeClass ?>"><?= $h(ucfirst($row['status'])) ?></span>
|
||||
</td>
|
||||
<td onclick="event.stopPropagation()">
|
||||
<?php if ($row['status'] !== 'ignoriert'): ?>
|
||||
<form method="post" action="/bank/<?= (int)$row['id'] ?>/status">
|
||||
<input type="hidden" name="status" value="ignoriert">
|
||||
<button type="submit" class="btn btn-secondary btn-sm">Ignorieren</button>
|
||||
</form>
|
||||
<?php else: ?>
|
||||
<form method="post" action="/bank/<?= (int)$row['id'] ?>/status">
|
||||
<input type="hidden" name="status" value="offen">
|
||||
<button type="submit" class="btn btn-secondary btn-sm">Öffnen</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue