feat(cashbox): book a catalog penalty directly as a transaction

Adds a catalog picker to the member-booking form in the cashbox (prefills
amount/note/type, stays editable) and a "Buchen" button on each penalty
catalog entry that jumps to the cashbox with that entry preselected via a
penaltyId query param. No backend changes — reuses the existing POST
/transactions flow, the catalog only supplies starting values.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bastian Wagner
2026-08-01 18:50:58 +02:00
parent 9664187049
commit 5dae4362b2
6 changed files with 154 additions and 7 deletions

View File

@@ -20,6 +20,18 @@
</mat-card-header>
<mat-card-content>
<form [formGroup]="playerForm" (ngSubmit)="submitPlayerBooking()">
@if (penalties().length > 0) {
<mat-form-field appearance="outline" class="wide">
<mat-label>Aus Strafenkatalog übernehmen (optional)</mat-label>
<mat-select (selectionChange)="onPenaltySelect($event.value)">
@for (penalty of penalties(); track penalty.id) {
<mat-option [value]="penalty.id"
>{{ penalty.description }} · {{ penalty.amount | currency: 'EUR' }}</mat-option
>
}
</mat-select>
</mat-form-field>
}
<mat-form-field appearance="outline" class="wide">
<mat-label>Mitglieder</mat-label>
<mat-select formControlName="playerIds" multiple>