Gestite schede nella pagina ispezione e migliorie grafiche

This commit is contained in:
2026-02-23 10:12:36 +01:00
parent b39b7ba751
commit efefd3499b
21 changed files with 253 additions and 37 deletions

View File

@@ -38,7 +38,7 @@
<MudText Typo="Typo.h6">
<b>@Title</b>
</MudText>
<MudIconButton Icon="@Icons.Material.Filled.Close" OnClick="@GoBack" />
<MudIconButton Icon="@Icons.Material.Rounded.Close" OnClick="@GoBack" />
</div>
}
</div>

View File

@@ -1,6 +1,9 @@
@using CommunityToolkit.Mvvm.Messaging
@using SteUp.Shared.Core.Interface.System.Network
@using SteUp.Shared.Core.Messages.Scheda
@inject INetworkService NetworkService
@inject IDialogService Dialog
@inject IMessenger Messenger
<div
class="container animated-navbar @(IsVisible ? "show-nav" : "hide-nav") @(IsVisible ? PlusVisible ? "with-plus" : "without-plus" : "with-plus")">
@@ -30,8 +33,9 @@
{
<MudMenu PopoverClass="custom_popover" AnchorOrigin="Origin.TopLeft" TransformOrigin="Origin.BottomRight">
<ActivatorContent>
<MudFab Class="custom-plus-button" OnClick="OnOpenMenu" Color="Color.Surface" Size="Size.Medium" IconSize="Size.Medium"
IconColor="Color.Primary" StartIcon="@Icons.Material.Filled.Add"/>
<MudFab Class="custom-plus-button" OnClick="OnOpenMenu" Color="Color.Surface" Size="Size.Medium"
IconSize="Size.Medium"
IconColor="Color.Primary" StartIcon="@Icons.Material.Rounded.Add"/>
</ActivatorContent>
<ChildContent>
@if (SchedaVisible)
@@ -84,15 +88,19 @@
_ = ModalHelper.OpenSelectShop(Dialog);
}
private void NewScheda()
private async Task NewScheda()
{
_ = ModalHelper.OpenFormScheda(Dialog);
var ispezione = SteupDataService.InspectionPageState.Ispezione;
var modal = await ModalHelper.OpenFormScheda(Dialog, ispezione.CodMdep, ispezione.Data);
if (modal is { Canceled: false })
Messenger.Send(new NewSchedaMessage());
}
private void OnOpenMenu()
{
var location = NavigationManager.Uri.Remove(0, NavigationManager.BaseUri.Length);
SchedaVisible = new List<string> { "ispezione" }.Contains(location);
StateHasChanged();
}