Implentata scansione barcode e lista articoli nel form scheda

This commit is contained in:
2026-02-26 15:46:49 +01:00
parent a5e27bcf06
commit e027d8e5cf
20 changed files with 770 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
using MudBlazor;
using SteUp.Shared.Components.SingleElements.Modal;
using SteUp.Shared.Components.SingleElements.Modal.ExceptionModal;
using SteUp.Shared.Core.Dto;
using SteUp.Shared.Core.Entities;
@@ -86,4 +87,48 @@ public abstract class ModalHelper
return await modal.Result;
}
public static async Task<DialogResult?> OpenSelectArt(IDialogService dialog, List<ArticoliInGrigliaDto>? articoli)
{
var modal = await dialog.ShowAsync<ModalSelectArt>(
"ModalSelectArt",
new DialogParameters<ModalSelectArt>
{
{ x => x.Articoli, articoli }
},
new DialogOptions
{
FullScreen = false,
CloseButton = false,
NoHeader = true,
BackdropClick = true,
FullWidth = true,
MaxWidth = MaxWidth.ExtraLarge
}
);
return await modal.Result;
}
public static async Task ShowError(IDialogService dialog, string message)
{
var modal = await dialog.ShowAsync<ModalError>(
"ModalError",
new DialogParameters<ModalError>
{
{ x => x.ErrorMessage, message }
},
new DialogOptions
{
FullScreen = false,
CloseButton = false,
NoHeader = true,
BackdropClick = true,
FullWidth = true,
MaxWidth = MaxWidth.ExtraLarge
}
);
await modal.Result;
}
}