Add empty account

This commit is contained in:
Claudio Schaad 2025-05-11 10:36:14 +02:00
parent ff2ef4aba0
commit e76644a122

View file

@ -27,53 +27,63 @@
Cancel Cancel
</FluentButton> </FluentButton>
<table> @if (matchingBankTransactions == null || matchingBankTransactions.Count == 0)
<thead> {
<tr> <p>Keine Transaktionen vorhanden!</p>
<th>Buchungsdatum</th> }
<th>Valutadatum</th> else
<th>Text</th> {
<th>Betrag</th> <table>
<th>Konto</th> <thead>
<th>Zusatzinfo</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var transaction in matchingBankTransactions)
{
<tr> <tr>
<td><div>@transaction.BookingDate.ToString("dd.MM.yyyy")</div></td> <th>Buchungsdatum</th>
<td><div>@transaction.ValueDate.ToString("dd.MM.yyyy")</div></td> <th>Valutadatum</th>
<td> <th>Text</th>
<div class="text-column"> <th>Betrag</th>
<input list="texts" @bind="@transaction.Text" placeholder="Type or select..." /> <th>Konto</th>
<datalist id="texts"> <th>Zusatzinfo</th>
@foreach (var text in bookingTexts.OrderBy(t => t)) <th></th>
{ <th></th>
<option value="@text"></option>
}
</datalist>
</div>
</td>
<td class="betrag-column">
<div>@transaction.Value.ToFormattedString()</div>
</td>
<td>
<select @bind="@transaction.TargetAccountId">
@foreach (var account in accounts.OrderBy(a=> a.Number).ThenBy(a => a.Name))
{
<option value="@account.Id">@($"{account.Number} / {@account.Name}")</option>
}
</select>
</td>
<td class="zusatzinfo-column" title="@transaction.BankTransactionText">
<div>@transaction.BankTransactionText</div>
</td>
<td style="align-content: center"><FluentButton IconEnd="@(new Icons.Regular.Size16.SplitVertical())" Appearance="Appearance.Neutral" OnClick="@(() => SplitBankTransactionAsync(transaction))"/></td>
<td style="align-content: center"><FluentButton IconEnd="@(new Icons.Regular.Size16.Save())" Appearance="Appearance.Neutral" OnClick="@(() => BookBankTransactionAsync(transaction))"/></td>
</tr> </tr>
} </thead>
</tbody> <tbody>
</table> @foreach (var transaction in matchingBankTransactions)
{
<tr>
<td>
<div>@transaction.BookingDate.ToString("dd.MM.yyyy")</div></td>
<td>
<div>@transaction.ValueDate.ToString("dd.MM.yyyy")</div></td>
<td>
<div class="text-column">
<input list="texts" @bind="@transaction.Text" placeholder="Type or select..."/>
<datalist id="texts">
@foreach (var text in bookingTexts.OrderBy(t => t))
{
<option value="@text"></option>
}
</datalist>
</div>
</td>
<td class="betrag-column">
<div>@transaction.Value.ToFormattedString()</div>
</td>
<td>
<select @bind="@transaction.TargetAccountId">
<option value=""></option>
@foreach (var account in accounts.OrderBy(a => a.Number).ThenBy(a => a.Name))
{
<option value="@account.Id">@($"{account.Number} / {@account.Name}")</option>
}
</select>
</td>
<td class="zusatzinfo-column" title="@transaction.BankTransactionText">
<div>@transaction.BankTransactionText</div>
</td>
<td style="align-content: center"><FluentButton IconEnd="@(new Icons.Regular.Size16.SplitVertical())" Appearance="Appearance.Neutral" OnClick="@(() => SplitBankTransactionAsync(transaction))"/></td>
<td style="align-content: center"><FluentButton IconEnd="@(new Icons.Regular.Size16.Save())" Appearance="Appearance.Neutral" OnClick="@(() => BookBankTransactionAsync(transaction))"/></td>
</tr>
}
</tbody>
</table>
}