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

@@ -92,7 +92,7 @@
var puntoVendita = SteupDataService.PuntiVenditaList.Find(x =>
x.CodMdep != null && x.CodMdep.EqualsIgnoreCase(Ispezione.CodMdep)
);
await Task.Delay(750);
await Task.Delay(500);
PuntoVendita = puntoVendita ?? throw new Exception("Punto vendita non trovato");
OnLoading = false;

View File

@@ -24,6 +24,11 @@
line-height: normal;
}
.inspection-info{
display: flex;
flex-direction: column;
}
.info-title {
color: var(--mud-palette-text-primary);
font-weight: 800;
@@ -40,7 +45,6 @@
.info-title.compactView{
font-size: medium;
font-weight: 600;
}
.section-info {

View File

@@ -0,0 +1,23 @@
<div class="card-form-modal">
<div class="card-form-modal-title @ClassTitle">
<MudText Style="font-weight: 800" Typo="Typo.subtitle1">@Title</MudText>
</div>
<div class="card-form-modal-body @ClassBody">
@if (Loading)
{
<MudSkeleton/>
}
else
{
@ChildContent
}
</div>
</div>
@code {
[Parameter] public string Title { get; set; } = "";
[Parameter] public bool Loading { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
[Parameter] public string ClassTitle { get; set; } = "";
[Parameter] public string ClassBody { get; set; } = "";
}

View File

@@ -0,0 +1,23 @@
.card-form-modal {
background: var(--mud-palette-table-striped);
border-radius: 1em;
padding: .5rem 1rem;
width: -webkit-fill-available;
}
.is-dark .card-form-modal {
background: var(--mud-palette-background); !important;
}
.card-form-modal-body ::deep .file-upload-input {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 10;
opacity: 0;
}
small ::deep {
color: var(--mud-palette-text-primary) !important;
}

View File

@@ -3,7 +3,7 @@
@using SteUp.Shared.Core.Interface.System
@inject IAttachedService AttachedService
<MudDialog Class="customDialog-form disable-safe-area">
<MudDialog Class="disable-safe-area">
<DialogContent>
<HeaderLayout SmallHeader="true" Cancel="true" OnCancel="@(() => MudDialog.Cancel())" Title="@TitleModal"/>

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"

View File

@@ -4,8 +4,7 @@
}
.container-button {
background: var(--mud-palette-background-gray) !important;
box-shadow: unset;
margin-bottom: unset !important;
}
.input-card {