Gestite azioni in pagina ispezione

This commit is contained in:
2026-02-23 15:40:59 +01:00
parent efefd3499b
commit aaffaa3a2a
122 changed files with 307 additions and 1265 deletions

View File

@@ -1,6 +1,7 @@
using MudBlazor;
using SteUp.Shared.Components.SingleElements.Modal;
using SteUp.Shared.Core.Dto;
using SteUp.Shared.Core.Entities;
namespace SteUp.Shared.Core.Helpers;
@@ -23,14 +24,19 @@ public abstract class ModalHelper
return await modal.Result;
}
public static async Task<DialogResult?> OpenFormScheda(IDialogService dialog, string codMdep, DateOnly data)
public static async Task<DialogResult?> OpenFormScheda(IDialogService dialog, string codMdep, DateOnly data,
Scheda? scheda = null, bool isNew = false)
{
scheda = isNew && scheda == null ? new Scheda() : scheda;
var modal = await dialog.ShowAsync<ModalFormScheda>(
"ModalFormScheda",
new DialogParameters<ModalFormScheda>
{
{ x => x.CodMdep, codMdep },
{ x => x.Data, data },
{ x => x.IsNew, isNew },
{ x => x.Scheda, scheda }
},
new DialogOptions
{
@@ -39,10 +45,10 @@ public abstract class ModalHelper
NoHeader = true
}
);
return await modal.Result;
}
public static async Task<DialogResult?> OpenAddAttached(IDialogService dialog)
{
var modal = await dialog.ShowAsync<ModalAddAttached>(
@@ -59,8 +65,9 @@ public abstract class ModalHelper
return await modal.Result;
}
public static async Task<DialogResult?> OpenSuggestActivityDescription(IDialogService dialog, List<StbActivityTyperDto>? activityTypers)
public static async Task<DialogResult?> OpenSuggestActivityDescription(IDialogService dialog,
List<StbActivityTyperDto>? activityTypers)
{
var modal = await dialog.ShowAsync<ModalSuggestDescription>(
"Suggest activity description",
@@ -76,7 +83,7 @@ public abstract class ModalHelper
BackdropClick = true
}
);
return await modal.Result;
}
}