Gestite azioni in pagina ispezione
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
@using SteUp.Shared.Components.Layout
|
||||
@using SteUp.Shared.Components.Layout.Overlay
|
||||
@using SteUp.Shared.Components.Layout.Spinner
|
||||
@using SteUp.Shared.Components.SingleElements.Card.ModalForm
|
||||
@using SteUp.Shared.Components.SingleElements.MessageBox
|
||||
@using SteUp.Shared.Core.Dto
|
||||
@@ -132,11 +131,9 @@
|
||||
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; } = null!;
|
||||
[Parameter] public required string CodMdep { get; set; }
|
||||
[Parameter] public required DateOnly Data { get; set; }
|
||||
|
||||
private Scheda Scheda { get; set; } = new();
|
||||
|
||||
private bool IsNew { get; set; }
|
||||
private bool IsLoading { get; set; }
|
||||
[Parameter] public bool IsNew { get; set; }
|
||||
[Parameter] public Scheda Scheda { get; set; } = new();
|
||||
|
||||
private bool IsView => !NetworkService.ConnectionAvailable;
|
||||
|
||||
//Overlay
|
||||
@@ -162,7 +159,10 @@
|
||||
VisibleOverlay = true;
|
||||
StateHasChanged();
|
||||
|
||||
await IspezioniService.AddSchedaAsync(CodMdep, Data, UserSession.User.Username, Scheda);
|
||||
if (IsNew)
|
||||
await IspezioniService.AddSchedaAsync(CodMdep, Data, UserSession.User.Username, Scheda);
|
||||
else
|
||||
await IspezioniService.UpdateSchedaAsync(Scheda);
|
||||
|
||||
SuccessAnimation = true;
|
||||
StateHasChanged();
|
||||
|
||||
Reference in New Issue
Block a user