TAB3:
- inizio gestione modifiche x caso manuale (con disabilitazione menù e caricamento dato isManual)
This commit is contained in:
@@ -21,7 +21,11 @@ else
|
||||
<div class="card-img-overlay p-0 d-flex flex-row-reverse align-items-start">
|
||||
<div class="labelTop px-2 w-100">
|
||||
<div class="text-center fs-2 fw-bold">
|
||||
@CRecMSE.Nome
|
||||
@CRecMSE.Nome
|
||||
@if(isManual)
|
||||
{
|
||||
<i class="ps-1 text-light fs-3 fa-solid fa-puzzle-piece"></i>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,6 +90,10 @@ else
|
||||
<div class="labelTop px-2 py-0 w-100">
|
||||
<div class="text-center fs-2 fw-bold">
|
||||
@CRecMSE.Nome
|
||||
@if (isManual)
|
||||
{
|
||||
<i class="ps-1 text-light fs-3 fa-solid fa-puzzle-piece"></i>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -151,6 +159,10 @@ else
|
||||
<div class="col-12">
|
||||
<h4 class="text-center mb-0 fw-bold">
|
||||
@CRecMSE.Nome
|
||||
@if (isManual)
|
||||
{
|
||||
<i class="ps-1 text-light fs-3 fa-solid fa-puzzle-piece"></i>
|
||||
}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="col-4 fs-4">
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace MP_TAB3.Components
|
||||
private bool inAttr = false;
|
||||
private bool isLoading = false;
|
||||
private bool isMulti = false;
|
||||
private bool isManual = false;
|
||||
private bool LastFullMode = true;
|
||||
private string LastIdxMacchSub = "";
|
||||
private int LastKeepAliveMin = 5;
|
||||
@@ -441,7 +442,24 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
datiProdAct = SDService.MachProdStGet(IdxMaccCur);
|
||||
}
|
||||
isMulti = SMServ.DictMacchMulti[IdxMaccMain] == 1;
|
||||
// fix multi
|
||||
if (SMServ.DictMacchMulti.ContainsKey(IdxMaccMain))
|
||||
{
|
||||
isMulti = SMServ.DictMacchMulti[IdxMaccMain] == 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
isMulti = false;
|
||||
}
|
||||
// fix manual
|
||||
if (SMServ.DictMacchManual.ContainsKey(IdxMaccMain))
|
||||
{
|
||||
isManual = SMServ.DictMacchManual[IdxMaccMain];
|
||||
}
|
||||
else
|
||||
{
|
||||
isManual = false;
|
||||
}
|
||||
// verificare
|
||||
if (!FullMode || !detailLoaded || doForce)
|
||||
{
|
||||
@@ -504,6 +522,8 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
// salvo idxMacch
|
||||
await MServ.IdxMaccSet(RecMSE!.IdxMacchina);
|
||||
// salvo se sia manuale...
|
||||
|
||||
await MServ.LastOpenedPageSet("machine-detail");
|
||||
// navigo!
|
||||
NavMan.NavigateTo($"machine-detail");
|
||||
|
||||
@@ -28,7 +28,14 @@
|
||||
<div class="list-group">
|
||||
@foreach (var item in MenuItems)
|
||||
{
|
||||
<button class="p-2 list-group-item list-group-item-action @cssActive(item.NavigateUrl) link-underline link-underline-opacity-0 link-underline-opacity-75-hover" @onclick="() => SetPage(item.NavigateUrl)" data-bs-dismiss="offcanvas"><i class="fa fa-lg @item.icona pe-2"></i> @item.Testo</button>
|
||||
if (IsManual && item.ordine > 20)
|
||||
{
|
||||
<button class="p-2 list-group-item list-group-item-action @cssActive(item.NavigateUrl) link-underline link-underline-opacity-0 link-underline-opacity-75-hover disabled" data-bs-dismiss="offcanvas"><i class="fa fa-lg @item.icona pe-2"></i> @item.Testo</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="p-2 list-group-item list-group-item-action @cssActive(item.NavigateUrl) link-underline link-underline-opacity-0 link-underline-opacity-75-hover" @onclick="() => SetPage(item.NavigateUrl)" data-bs-dismiss="offcanvas"><i class="fa fa-lg @item.icona pe-2"></i> @item.Testo</button>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,9 @@ namespace MP_TAB3.Components
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected SharedMemService MStor { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager navManager { get; set; } = null!;
|
||||
|
||||
@@ -30,6 +33,19 @@ namespace MP_TAB3.Components
|
||||
return navManager.Uri.Contains(currUri) ? "bg-dark text-light" : "";
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
idxMaccSel = await MsgServ.IdxMaccGet();
|
||||
if (!string.IsNullOrEmpty(idxMaccSel) && MStor.DictMacchManual.ContainsKey(idxMaccSel))
|
||||
{
|
||||
IsManual = MStor.DictMacchManual[idxMaccSel];
|
||||
}
|
||||
else
|
||||
{
|
||||
IsManual = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
var rawVers = typeof(Program).Assembly.GetName().Version;
|
||||
@@ -51,6 +67,8 @@ namespace MP_TAB3.Components
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private string idxMaccSel = "";
|
||||
private bool IsManual = false;
|
||||
private Version version = null!;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>6.16.2503.3107</Version>
|
||||
<Version>6.16.2503.3120</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2503.3107</h4>
|
||||
<h4>Versione: 6.16.2503.3120</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2503.3107
|
||||
6.16.2503.3120
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2503.3107</version>
|
||||
<version>6.16.2503.3120</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace MP_TAB3.Shared
|
||||
{
|
||||
// Logger.LogInformation("URL of new location: {Location}", e.Location);
|
||||
CurrLevel = MStor.PageLevel(NavMan.Uri);
|
||||
// recupero men�
|
||||
// recupero menu
|
||||
if (MStor.DictMenu.ContainsKey(CurrLevel))
|
||||
{
|
||||
CurrMenuItems = MStor.DictMenu[CurrLevel];
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@inject NavigationManager NavMan
|
||||
@inject ListSelectDataSrv MDataService
|
||||
@inject ListSelectDataSrv MDataService
|
||||
|
||||
|
||||
|
||||
@@ -22,9 +21,19 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<NavLink class="nav-link px-2" @onclick="()=>SetPage(item.NavigateUrl)">
|
||||
<i class="fa fa-lg @item.icona pe-2" aria-hidden="true"></i> @item.Testo
|
||||
</NavLink>
|
||||
if (IsManual && item.ordine > 20)
|
||||
{
|
||||
<NavLink class="nav-link px-2 disabled text-secondary">
|
||||
<i class="fa fa-lg @item.icona pe-2" aria-hidden="true"></i> @item.Testo
|
||||
</NavLink>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<NavLink class="nav-link px-2" @onclick="()=>SetPage(item.NavigateUrl)">
|
||||
<i class="fa fa-lg @item.icona pe-2" aria-hidden="true"></i> @item.Testo
|
||||
</NavLink>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -40,19 +49,36 @@
|
||||
|
||||
[Inject]
|
||||
protected MessageService MsgServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager navManager { get; set; } = null!;
|
||||
protected SharedMemService MStor { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
|
||||
protected bool linkActive(string objUrl)
|
||||
{
|
||||
bool answ = false;
|
||||
if (navManager.Uri.Contains(objUrl))
|
||||
if (NavMan.Uri.Contains(objUrl))
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
idxMaccSel = await MsgServ.IdxMaccGet();
|
||||
if (!string.IsNullOrEmpty(idxMaccSel) && MStor.DictMacchManual.ContainsKey(idxMaccSel))
|
||||
{
|
||||
IsManual = MStor.DictMacchManual[idxMaccSel];
|
||||
}
|
||||
else
|
||||
{
|
||||
IsManual = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task SetPage(string tgtUrl)
|
||||
{
|
||||
if (tgtUrl.Contains("status-map"))
|
||||
@@ -61,6 +87,9 @@
|
||||
}
|
||||
await MsgServ.LastOpenedPageSet(tgtUrl);
|
||||
// navManager.NavigateTo(tgtUrl, true);
|
||||
navManager.NavigateTo(tgtUrl, false);
|
||||
NavMan.NavigateTo(tgtUrl, false);
|
||||
}
|
||||
|
||||
private string idxMaccSel = "";
|
||||
private bool IsManual = false;
|
||||
}
|
||||
|
||||
@@ -8,14 +8,15 @@ namespace MP.Data.DbModels
|
||||
// </Auto-Generated>
|
||||
public partial class VMSFDModel
|
||||
{
|
||||
public string IdxMacchina { get; set; }
|
||||
public string Codmacchina { get; set; }
|
||||
public bool PalletChange { get; set; }
|
||||
public string CodArticoloA { get; set; }
|
||||
public string CodArticoloB { get; set; }
|
||||
public bool SimplePallet { get; set; }
|
||||
public bool InsEnabled { get; set; }
|
||||
public bool SLogEnabled { get; set; }
|
||||
public string IdxMacchina { get; set; } = "ND";
|
||||
public string Codmacchina { get; set; } = "000";
|
||||
public bool PalletChange { get; set; } = false;
|
||||
public string CodArticoloA { get; set; } = "ND";
|
||||
public string CodArticoloB { get; set; } = "ND";
|
||||
public bool SimplePallet { get; set; } = true;
|
||||
public bool InsEnabled { get; set; } = true;
|
||||
public bool SLogEnabled { get; set; } = false;
|
||||
public bool IsManual { get; set; } = false;
|
||||
public int IdxFamigliaIngresso { get; set; }
|
||||
public int Multi { get; set; }
|
||||
public int BitFilt { get; set; }
|
||||
|
||||
@@ -42,10 +42,15 @@ namespace MP.Data.Services
|
||||
public Dictionary<string, string> DictMacchine { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario macchine con info multi(bool)
|
||||
/// Dizionario macchine con info multi(int)
|
||||
/// </summary>
|
||||
public Dictionary<string, int> DictMacchMulti { get; set; } = new Dictionary<string, int>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario macchine con info manual(bool)
|
||||
/// </summary>
|
||||
public Dictionary<string, bool> DictMacchManual { get; set; } = new Dictionary<string, bool>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario Menu
|
||||
/// </summary>
|
||||
@@ -224,6 +229,7 @@ namespace MP.Data.Services
|
||||
ListMSFD = newList ?? new List<VMSFDModel>();
|
||||
// salvo dizionario MULTI
|
||||
DictMacchMulti = ListMSFD.ToDictionary(x => x.IdxMacchina, x => x.Multi);
|
||||
DictMacchManual = ListMSFD.ToDictionary(x => x.IdxMacchina, x => x.IsManual);
|
||||
Log.Info("SharedMemService | SetMsfd executed!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user