Migliorie al form schede

This commit is contained in:
2026-02-19 09:52:18 +01:00
parent c6e6480cd2
commit eef5055bfa
12 changed files with 155 additions and 96 deletions

View File

@@ -1,5 +1,6 @@
@using SteUp.Shared.Components.Layout
@using SteUp.Shared.Components.Layout.Overlay
@using SteUp.Shared.Components.SingleElements.Card.ModalForm
@using SteUp.Shared.Core.Dto
@using SteUp.Shared.Core.Entities
@using SteUp.Shared.Core.Interface.IntegryApi
@@ -10,58 +11,35 @@
<MudDialog Class="customDialog-form">
<DialogContent>
<HeaderLayout Cancel="true" OnCancel="@(() => MudDialog.Cancel())" LabelSave="@LabelSave"
OnSave="Save" Title="Scheda"/>
<div class="content">
<div class="input-card">
<div class="form-container">
<span class="disable-full-width">Reparto</span>
@if (SteupDataService.Reparti.IsNullOrEmpty())
<CardFormModal Title="Reparto" Loading="SteupDataService.Reparti.IsNullOrEmpty()">
<MudSelectExtended ReadOnly="IsView" T="JtbFasiDto?" Variant="Variant.Text"
@bind-Value="Scheda.Reparto" ToStringFunc="@(x => x?.Descrizione)"
@bind-Value:after="OnAfterChangeValue">
@foreach (var fasi in SteupDataService.Reparti)
{
<MudSkeleton/>
<MudSelectItemExtended Class="custom-item-select" Value="@fasi">
@fasi.Descrizione
</MudSelectItemExtended>
}
else
{
<MudSelectExtended ReadOnly="IsView" FullWidth="true" T="JtbFasiDto?" Variant="Variant.Text"
@bind-Value="Scheda.Reparto" AdornmentIcon="@Icons.Material.Filled.Code"
ToStringFunc="@(x => x?.Descrizione)"
@bind-Value:after="OnAfterChangeValue" Class="customIcon-select">
@foreach (var fasi in SteupDataService.Reparti)
{
<MudSelectItemExtended Class="custom-item-select" Value="@fasi">
@fasi.Descrizione
</MudSelectItemExtended>
}
</MudSelectExtended>
}
</div>
</MudSelectExtended>
</CardFormModal>
<div class="divider"></div>
<div class="form-container">
<span class="disable-full-width">Motivo</span>
@if (SteupDataService.TipiAttività.IsNullOrEmpty())
<CardFormModal Title="Motivo" Loading="SteupDataService.TipiAttività.IsNullOrEmpty()">
<MudSelectExtended ReadOnly="IsView" T="string?" Variant="Variant.Text"
@bind-Value="Scheda.ActivityTypeId" @bind-Value:after="OnAfterChangeValue">
@foreach (var type in SteupDataService.TipiAttività)
{
<MudSkeleton/>
<MudSelectItemExtended Class="custom-item-select"
Value="@type.ActivityTypeId">@type.ActivityTypeId</MudSelectItemExtended>
}
else
{
<MudSelectExtended ReadOnly="IsView" FullWidth="true" T="string?" Variant="Variant.Text"
@bind-Value="Scheda.ActivityTypeId" Class="customIcon-select"
AdornmentIcon="@Icons.Material.Filled.Code"
@bind-Value:after="OnAfterChangeValue">
@foreach (var type in SteupDataService.TipiAttività)
{
<MudSelectItemExtended Class="custom-item-select"
Value="@type.ActivityTypeId">@type.ActivityTypeId</MudSelectItemExtended>
}
</MudSelectExtended>
}
</div>
</div>
</MudSelectExtended>
</CardFormModal>
@* <div class="container-chip-attached"> *@
@* @if (!AttachedList.IsNullOrEmpty()) *@
@@ -114,37 +92,32 @@
Size="Size.Medium"
OnClick="@OpenAddAttached"
Variant="Variant.Outlined">
Aggiungi allegati
Aggiungi foto
</MudButton>
</div>
}
<div class="input-card">
<div class="form-container">
<span class="disable-full-width">Scadenza</span>
<MudSelectExtended FullWidth="true" ReadOnly="@IsView" T="int" Variant="Variant.Text"
@bind-Value="@Scheda.Scadenza" @bind-Value:after="OnAfterChangeValue"
Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code">
<MudSelectItemExtended Class="custom-item-select" Text="24H" Value="24" />
<MudSelectItemExtended Class="custom-item-select" Text="1 Settimana" Value="168" />
<MudSelectItemExtended Class="custom-item-select" Text="1 Mese" Value="730" />
<MudSelectItemExtended Class="custom-item-select" Text="2 Mesi" Value="1460" />
</MudSelectExtended>
</div>
<div class="divider"></div>
<MudTextField ReadOnly="IsView" T="string?" Placeholder="Responsabile" Variant="Variant.Text"
<CardFormModal Title="Scadenza">
<MudSelectExtended FullWidth="true" ReadOnly="@IsView" T="int" Variant="Variant.Text"
@bind-Value="@Scheda.Scadenza" @bind-Value:after="OnAfterChangeValue">
<MudSelectItemExtended Class="custom-item-select" Text="24H" Value="24"/>
<MudSelectItemExtended Class="custom-item-select" Text="1 Settimana" Value="168"/>
<MudSelectItemExtended Class="custom-item-select" Text="1 Mese" Value="730"/>
<MudSelectItemExtended Class="custom-item-select" Text="2 Mesi" Value="1460"/>
</MudSelectExtended>
</CardFormModal>
<CardFormModal Title="Responsabile">
<MudTextField FullWidth="true" ReadOnly="IsView" T="string?" Variant="Variant.Text"
@bind-Value="Scheda.Responsabile" @bind-Value:after="OnAfterChangeValue"
DebounceInterval="500" OnDebounceIntervalElapsed="OnAfterChangeValue"/>
<div class="divider"></div>
<MudTextField ReadOnly="IsView" T="string?" Placeholder="Note" Variant="Variant.Text" Lines="3"
</CardFormModal>
<CardFormModal Title="Note">
<MudTextField ReadOnly="IsView" T="string?" Variant="Variant.Text" Lines="3"
@bind-Value="Scheda.Note" @bind-Value:after="OnAfterChangeValue"
DebounceInterval="500" OnDebounceIntervalElapsed="OnAfterChangeValue"/>
</div>
</CardFormModal>
<div class="container-button">
<MudButton Class="button-settings blue-icon"