Replace the native <input list="texts"> + <datalist> pattern in PendingBookings and TransactionSplitDialog with FluentCombobox + Autocomplete=Both so the booking-text autocomplete matches the rest of the Fluent-driven forms. Sort the suggestions once via a sortedBookingTexts computed getter per codebehind rather than sorting inside each row's foreach. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
74 lines
3 KiB
Text
74 lines
3 KiB
Text
@rendermode InteractiveServer
|
|
|
|
@if (matchingBankTransactions is null || matchingBankTransactions.Count == 0)
|
|
{
|
|
<p>Keine Transaktionen vorhanden!</p>
|
|
<FluentEmoji Value="@(new Emojis.SmileysEmotion.Color.Default.MoneyMouthFace())" />
|
|
}
|
|
else
|
|
{
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Buchungsdatum</th>
|
|
<th>Valutadatum</th>
|
|
<th>Zusatzinfo</th>
|
|
<th>Text</th>
|
|
<th>Konto</th>
|
|
<th>Betrag</th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@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 class="zusatzinfo-column" title="@transaction.BankTransactionText">
|
|
<div>@transaction.BankTransactionText</div>
|
|
</td>
|
|
<td>
|
|
<div class="text-column">
|
|
<FluentCombobox TOption="string"
|
|
Items="@sortedBookingTexts"
|
|
OptionText="@(t => t)"
|
|
OptionValue="@(t => t)"
|
|
@bind-Value="@transaction.Text"
|
|
Autocomplete="ComboboxAutocomplete.Both"
|
|
Placeholder="Text…"
|
|
Disabled="@transaction.ReadOnly"/>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
@if (transaction.Value > 0)
|
|
{
|
|
<AccountSelector Accounts="accounts" @bind-AccountId="@transaction.OriginAccountId" />
|
|
}
|
|
else
|
|
{
|
|
<AccountSelector Accounts="accounts" @bind-AccountId="@transaction.TargetAccountId" />
|
|
}
|
|
</td>
|
|
<td>
|
|
<div>@Math.Abs(transaction.Value).ToFormattedString()</div>
|
|
</td>
|
|
<td style="align-content: center">
|
|
<FluentButton IconEnd="@(new Icons.Regular.Size16.SplitVertical())" Appearance="Appearance.Neutral"
|
|
OnClick="@(() => SplitBankTransactionAsync(transaction))" Disabled="@(transaction.Value > 0 || transaction.ReadOnly)" />
|
|
</td>
|
|
<td style="align-content: center">
|
|
<FluentButton IconEnd="@(new Icons.Regular.Size16.Save())" Appearance="Appearance.Neutral"
|
|
OnClick="@(() => BookBankTransactionAsync(transaction))"
|
|
Disabled="@transaction.ReadOnly" />
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|