Merge branch 'Release/AddTab3PodlAlwaysDisp_01'

This commit is contained in:
Samuele Locatelli
2024-12-23 10:13:01 +01:00
18 changed files with 303 additions and 207 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ else
}
</div>
<div class="px-1">
@if (item.ReqNotify != 0)
@if (item.ReqNotify != 0 || item.Duration > alarmMinDuration)
{
<button class="btn btn-sm btn-primary py-0" @onclick="() => SendNotify(item)">Invia&nbsp;<i class="fa fa-envelope" aria-hidden="true"></i></button>
}
+8 -1
View File
@@ -102,7 +102,8 @@ namespace MP_TAB3.Components
DateTime inizio = fine.AddDays(-8);
CurrPeriodo = new Periodo(inizio, fine);
}
var rawDest = config.GetValue<string>("AlarmDest");
// gestione conf allarmi
var rawDest = config.GetValue<string>("OptConf:AlarmDest");
if (!string.IsNullOrEmpty(rawDest))
{
AlarmsDest = rawDest.Split(",").ToList();
@@ -111,6 +112,7 @@ namespace MP_TAB3.Components
{
AlarmsDest = new List<string>() { "samuele@steamware.net" };
}
alarmMinDuration = config.GetValue<decimal>("OptConf:AlarmMinDuration");
}
protected override async Task OnParametersSetAsync()
@@ -210,6 +212,11 @@ namespace MP_TAB3.Components
private static Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// durata minima allarmi x abilitare invio email di notifica
/// </summary>
private decimal alarmMinDuration = 1;
#endregion Private Fields
#region Private Properties
+161
View File
@@ -0,0 +1,161 @@
<div class="col-12 my-1">
<div class="card">
<div class="card-header @cssDetailOdl d-flex justify-content-between">
<div>
<h4>@titleOdlDetail</h4>
</div>
@if (IdxPOdlSel == 0)
{
<div class="d-flex text-end">
<div class="form-check form-switch px-2">
<label class="form-check-label">@txtShowXDL</label>
<input class="form-check-input" type="checkbox" @bind="@showPOdlData">
</div>
@if (!InAttr)
{
<div>
<button class="btn btn-dark w-100" @onclick="ToggleOdlDetail"><i class="fa-solid fa-chevron-up"></i> @txtBtnOdlDetail</button>
</div>
}
</div>
}
</div>
<div class="card-body">
<div class="row">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
@if (!showPOdlData)
{
<b>ODL:</b>
}
else
{
<b>P.ODL:</b>
}
</div>
<div class="px-0 text-end fw-bold">
@if (CurrOdl != null && !showPOdlData)
{
@CurrOdl.IdxOdl
}
else
{
@CurrPodl.IdxPromessa
}
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Rif:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.KeyRichiesta
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Cod:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.CodArticolo
</div>
</div>
</div>
<div class="row border-top border-bottom border-secondary">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Articolo:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.DescArticolo
</div>
</div>
</div>
<div class="row">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Pezzi:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.NumPezzi.ToString("N0")
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
TCiclo:
</div>
<div class="px-0 text-end fw-bold">
@if (CurrOdl != null && CurrOdl.Tcassegnato > 0 && !showPOdlData)
{
@CurrOdl.Tcassegnato.ToString("N2")
}
else
{
@CurrPodl.Tcassegnato.ToString("N2")
}
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Pz/pallet:
</div>
<div class="px-0 text-end fw-bold">
@if (CurrOdl != null && !showPOdlData)
{
@CurrOdl.PzPallet
}
else
{
@CurrPodl.PzPallet
}
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col text-start fw-bold">
@if (CurrOdl != null && !showPOdlData)
{
@CurrOdl.Nome
}
else
{
@CurrPodl.Nome
}
</div>
<div class="col d-flex justify-content-between">
@if (!showPOdlData)
{
}
else
{
<div class="px-0 small">
Priorita:
</div>
<div class="px-0 text-end fw-bold">
@CurrPodl.Priorita
</div>
}
</div>
<div class="col d-flex justify-content-between">
@if (!showPOdlData)
{
}
else
{
<div class="px-0 small">
Data:
</div>
<div class="px-0 text-end fw-bold">
@($"{CurrPodl.DueDate:yyyy.MM.dd}")
</div>
}
</div>
</div>
</div>
</div>
</div>
+93
View File
@@ -0,0 +1,93 @@
using Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using System;
namespace MP_TAB3.Components
{
public partial class CurrOdlDetail
{
#region Public Properties
[Parameter]
public ODLExpModel CurrOdl { get; set; } = null!;
[Parameter]
public PODLExpModel CurrPodl { get; set; } = null!;
[Parameter]
public EventCallback<bool> EC_ToggleOdlDetail { get; set; }
[Parameter]
public EventCallback<bool> EC_TogglePOdl { get; set; }
[Parameter]
public bool ForceCloseOdl { get; set; }
[Parameter]
public int IdxPOdlSel { get; set; }
[Parameter]
public bool InAttr { get; set; }
[Parameter]
public bool ShowOdlDetail { get; set; }
#endregion Public Properties
#region Protected Properties
[Inject]
protected MessageService MsgServ { get; set; } = null!;
[Inject]
protected SharedMemService SMServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected async Task ToggleOdlDetail()
{
await EC_ToggleOdlDetail.InvokeAsync(true);
}
protected string Traduci(string lemma)
{
return SMServ.Traduci($"{baseLang}_{lemma}".ToUpper());
}
#endregion Protected Methods
#region Private Properties
private string baseLang
{
get => MsgServ.UserPrefGet("Lang");
}
private string cssDetailOdl
{
get => IdxPOdlSel > 0 ? "bg-info text-light" : "bg-warning";
}
private bool showPOdlData { get; set; } = true;
private string titleOdlDetail
{
get => IdxPOdlSel > 0 ? "Verifica parametri attrezzaggio NUOVO PODL" : InAttr ? "Parametri PODL in Attrezzaggio" : "Parametri PODL Corrente";
}
private string txtBtnOdlDetail
{
get => ShowOdlDetail ? "Nascondi Dettaglio PODL" : "MOSTRA Dettaglio ODL Corrente";
}
private string txtShowXDL
{
get => showPOdlData ? "PODL" : "ODL";
}
#endregion Private Properties
}
}
+13 -158
View File
@@ -65,6 +65,18 @@
<FixOdl IdxMaccCurr="@IdxMaccSel" E_RefreshData="refreshAfterFixOdl"></FixOdl>
</div>
}
@if (!inAttr && !showOdlDetail)
{
<div class="col-12 my-1">
<button class="btn btn-lg btn-warning w-100" disabled="@inAttr" @onclick="ToggleOdlDetail"><i class="fa-solid fa-chevron-down"></i> @txtBtnOdlDetail</button>
</div>
}
if (showOdlDetail)
{
<CurrOdlDetail CurrOdl="@currOdl" CurrPodl="@currPodl" IdxPOdlSel="@IdxPOdlSel" ShowOdlDetail="@showOdlDetail" ForceCloseOdl="@forceCloseOdl" InAttr="@inAttr" EC_ToggleOdlDetail="ToggleOdlDetail"></CurrOdlDetail>
}
}
else
{
@@ -104,164 +116,7 @@
@if (showOdlDetail || inAttr)
{
<div class="col-12 my-1">
<div class="card">
<div class="card-header @cssDetailOdl d-flex justify-content-between">
<div>
<h4>@titleOdlDetail</h4>
</div>
@if (idxPOdlSel == 0)
{
<div class="d-flex text-end">
<div class="form-check form-switch px-2">
<label class="form-check-label">@txtShowXDL</label>
<input class="form-check-input" type="checkbox" @bind="@showPOdlData">
</div>
@if (!inAttr)
{
<div>
<button class="btn btn-dark w-100" @onclick="ToggleOdlDetail"><i class="fa-solid fa-chevron-up"></i> @txtBtnOdlDetail</button>
</div>
}
</div>
}
</div>
<div class="card-body">
<div class="row">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
@if (!showPOdlData)
{
<b>ODL:</b>
}
else
{
<b>P.ODL:</b>
}
</div>
<div class="px-0 text-end fw-bold">
@if (currOdl != null && !showPOdlData)
{
@currOdl.IdxOdl
}
else
{
@currPodl.IdxPromessa
}
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Rif:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.KeyRichiesta
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Cod:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.CodArticolo
</div>
</div>
</div>
<div class="row border-top border-bottom border-secondary">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Articolo:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.DescArticolo
</div>
</div>
</div>
<div class="row">
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Pezzi:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.NumPezzi.ToString("N0")
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
TCiclo:
</div>
<div class="px-0 text-end fw-bold">
@if (currOdl != null && currOdl.Tcassegnato > 0 && !showPOdlData)
{
@currOdl.Tcassegnato.ToString("N2")
}
else
{
@currPodl.Tcassegnato.ToString("N2")
}
</div>
</div>
<div class="col d-flex justify-content-between">
<div class="px-0 small">
Pz/pallet:
</div>
<div class="px-0 text-end fw-bold">
@if (currOdl != null && !showPOdlData)
{
@currOdl.PzPallet
}
else
{
@currPodl.PzPallet
}
</div>
</div>
</div>
</div>
<div class="card-footer">
<div class="row">
<div class="col text-start fw-bold">
@if (currOdl != null && !showPOdlData)
{
@currOdl.Nome
}
else
{
@currPodl.Nome
}
</div>
<div class="col d-flex justify-content-between">
@if (!showPOdlData)
{
}
else
{
<div class="px-0 small">
Priorita:
</div>
<div class="px-0 text-end fw-bold">
@currPodl.Priorita
</div>
}
</div>
<div class="col d-flex justify-content-between">
@if (!showPOdlData)
{
}
else
{
<div class="px-0 small">
Data:
</div>
<div class="px-0 text-end fw-bold">
@($"{currPodl.DueDate:yyyy.MM.dd}")
</div>
}
</div>
</div>
</div>
</div>
</div>
<CurrOdlDetail CurrOdl="@currOdl" CurrPodl="@currPodl" IdxPOdlSel="@IdxPOdlSel" ShowOdlDetail="@showOdlDetail" ForceCloseOdl="@forceCloseOdl" InAttr="@inAttr" EC_ToggleOdlDetail="ToggleOdlDetail"></CurrOdlDetail>
}
@if (!inAttr && !showSplitOdlRiattr)
+4 -31
View File
@@ -429,7 +429,6 @@ namespace MP_TAB3.Components
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"PODL: {currPodl.IdxPromessa}{Environment.NewLine}Art: [{currPodl.CodArticolo}] {currPodl.DescArticolo}{Environment.NewLine}Pezzi: {currPodl.NumPezzi} * TCiclo: {tcRichAttr:N3}min{Environment.NewLine}Tempo stimato: {stima}{Environment.NewLine}{Environment.NewLine}Confermi la chiusura della fase di attrezzaggio?"))
return;
// prima di tutto svuoto dati prod
SDService.MachProdStRem(IdxMaccSel);
@@ -791,7 +790,7 @@ namespace MP_TAB3.Components
}
IdxMaccParent = getIdxMaccParent();
checkAll();
// verifica stato inAttr
// verifica stato InAttr
await CheckAttr();
//salvo lastRec...
lastRecMSE = RecMSE;
@@ -1259,15 +1258,10 @@ namespace MP_TAB3.Components
private bool cancelSetupEnabled
{
//get => inAttr && enableSchedaTecnica && enableAnnullaSetup;
//get => InAttr && enableSchedaTecnica && enableAnnullaSetup;
get => inAttr && enableAnnullaSetup;
}
private string cssDetailOdl
{
get => IdxPOdlSel > 0 ? "bg-info text-light" : "bg-warning";
}
private ODLExpModel currOdl { get; set; } = new ODLExpModel();
private PODLExpModel currPodl { get; set; } = new PODLExpModel();
@@ -1446,11 +1440,6 @@ namespace MP_TAB3.Components
private decimal tcRichAttr { get; set; } = 0;
private string titleOdlDetail
{
get => IdxPOdlSel > 0 ? "Verifica parametri attrezzaggio NUOVO PODL" : inAttr ? "Parametri PODL in Attrezzaggio" : "Parametri PODL Corrente";
}
private string txtBtnOdlDetail
{
get => showOdlDetail ? "Nascondi Dettaglio PODL" : "MOSTRA Dettaglio ODL Corrente";
@@ -1461,11 +1450,6 @@ namespace MP_TAB3.Components
get => forceCloseOdl ? Traduci("ForceCloseODL") : Traduci("SplitCurrODL");
}
private string txtShowXDL
{
get => showPOdlData ? "PODL" : "ODL";
}
#endregion Private Properties
#region Private Methods
@@ -1527,14 +1511,9 @@ namespace MP_TAB3.Components
{
// recupero pz da confermare
datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccSel, adesso);
#if false
var rawData = await TabDServ.PezziProdMacchina(IdxMaccSel);
prodMacchina = rawData.FirstOrDefault() ?? new PzProdModel();
#endif
checkConfProd();
#if false
if (prodMacchina.pezziNonConfermati > 0)
#endif
if (datiProdAct.Pz2RecTot > 0)
{
// confermo produzione ZERO pezzi (in setup)
@@ -1542,16 +1521,10 @@ namespace MP_TAB3.Components
{
// confermo al netto dei pezzi lasciati...
fatto = TabDServ.ConfermaProdMacchinaFull(IdxMaccSel, modoConfProd, datiProdAct.Pz2RecTot, 0, 0, adesso, MatrOpr);
#if false
fatto = TabDServ.ConfermaProdMacchinaFull(IdxMaccSel, modoConfProd, prodMacchina.pezziNonConfermati, 0, 0, adesso, MatrOpr);
#endif
}
else
{
fatto = TabDServ.ConfermaProdMacchina(IdxMaccSel, modoConfProd, datiProdAct.Pz2RecTot, 0, adesso, MatrOpr);
#if false
fatto = TabDServ.ConfermaProdMacchina(IdxMaccSel, modoConfProd, prodMacchina.pezziNonConfermati, 0, adesso, MatrOpr);
#endif
}
}
}
+7 -3
View File
@@ -44,7 +44,7 @@
<td>
<div class="row">
<div class="col text-start">
<div class="fw-bold text-uppercase">
<div class="text-uppercase fw-bold">
@item.description
</div>
<div class="smaller lh-sm">
@@ -66,8 +66,12 @@
</div>
}
<div class="col-12">
<div class="fw-bold">
@item.value &nbsp;
<div class="">
<span class="fw-bold">@item.value</span>
@if (!string.IsNullOrEmpty(item.UM))
{
<span class="small">&nbsp;(@item.UM)</span>
}
</div>
</div>
</div>
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2411.1415</Version>
<Version>6.16.2412.2310</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2411.1415</h4>
<h4>Versione: 6.16.2412.2310</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2411.1415
6.16.2412.2310
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2411.1415</version>
<version>6.16.2412.2310</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>
+3 -1
View File
@@ -17,7 +17,9 @@
},
"OptConf": {
"msRefresh": "1500",
"CodModulo": "MP-TAB3"
"CodModulo": "MP-TAB3",
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net",
"AlarmMinDuration": 2
},
"ServerConf": {
"BaseAddr": "https://iis04.egalware.com/MP/TAB3/",
+3 -2
View File
@@ -58,7 +58,6 @@
}
]
},
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net",
"MailKitMailSettings": {
"DisplayName": "MAPO EgalWare Email BOT",
"From": "steamwarebot@outlook.it",
@@ -70,7 +69,9 @@
"UseStartTls": true
},
"OptConf": {
"msRefresh": "1001"
"msRefresh": "1001",
"AlarmDest": "samuele.locatelli@egalware.com, ceo@steamware.net",
"AlarmMinDuration": 0.45
},
"ServerConf": {
"BaseAddr": "https://localhost:7295/MP/TAB3/",
+1 -1
View File
@@ -84,7 +84,7 @@
</div>
<div class="col-2">
<div class="btn-group w-100">
<button class="btn btn-warning w-100" title="Data Cleanup" @onclick="IdxRebuild"><i class="fa-solid fa-database"></i> Maint</button>
<button class="btn btn-warning w-100" title="Data Cleanup" @onclick="IdxRebuild"><i class="fa-solid fa-database"></i> Index Maint</button>
</div>
</div>
<div class="col-2">
+2 -2
View File
@@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Stats</RootNamespace>
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
<Version>6.16.2411.0408</Version>
<Version>6.16.2411.0408</Version>
<Version>6.16.2412.1915</Version>
<Version>6.16.2412.1915</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo statistiche MAPO</i>
<h4>Versione: 6.16.2411.0408</h4>
<h4>Versione: 6.16.2412.1915</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.16.2411.0408
6.16.2412.1915
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2411.0408</version>
<version>6.16.2412.1915</version>
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>