Aggiunto tasto per il suggerimento della descrizione attvità in base al tipo

This commit is contained in:
2025-10-30 10:12:10 +01:00
parent a593141185
commit b7522fb116
6 changed files with 108 additions and 8 deletions

View File

@@ -0,0 +1,32 @@
@using salesbook.Shared.Core.Entity
<MudDialog OnBackdropClick="Cancel">
<DialogContent>
@if (!ActivityTypers.IsNullOrEmpty())
{
<MudList T="string" SelectedValueChanged="OnClickItem">
@foreach (var item in ActivityTypers!)
{
<MudListItem Text="@item.ActivityTypeDescription" Value="item.ActivityTypeDescription"/>
}
</MudList>
}
else
{
<div class="spinner-container">
<MudIcon Size="Size.Large" Color="Color.Error" Icon="@Icons.Material.Rounded.Close"/>
<MudText>Nessuna descrizione consigliata</MudText>
</div>
}
</DialogContent>
</MudDialog>
@code {
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; }
[Parameter] public List<StbActivityTyper>? ActivityTypers { get; set; }
private void Cancel() => MudDialog.Cancel();
private void OnClickItem(string? selectedValue) =>
MudDialog.Close(DialogResult.Ok(selectedValue));
}