Gestite schede nella pagina ispezione e migliorie grafiche
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user