Fix display disegno/articolo + fix stile

This commit is contained in:
Samuele Locatelli
2022-04-14 09:20:21 +02:00
parent 84875e5c30
commit 011fbe52d3
7 changed files with 54 additions and 8 deletions
+17 -1
View File
@@ -11,7 +11,23 @@
</div>
<div class="d-flex justify-content-between pt-0 pb-2 px-1 fontSmall">
<div class="px-1 pe-0">Art.</div>
<div class="px-1 ps-0 ui-art">@CurrRecord.CodArticolo</div>
<div class="px-1 ps-0 ui-art">
@if (showArt == "CodArticolo")
{
<span>@CurrRecord.CodArticolo</span>
}
else
{
if (string.IsNullOrEmpty(CurrRecord.Disegno))
{
<span>[@CurrRecord.CodArticolo]</span>
}
else
{
<span>@CurrRecord.Disegno</span>
}
}
</div>
</div>
<div class="d-flex justify-content-between pt-0 pb-2 px-1 fontSmall">
<div class="px-1 text-uppercase"><b>@CurrRecord.DescrizioneStato</b></div>
+3
View File
@@ -28,6 +28,9 @@ namespace MP.Mon.Components
[Parameter]
public bool doAnimate { get; set; } = true;
[Parameter]
public string showArt { get; set; } = "";
[Parameter]
public int keepAliveMin { get; set; } = 5;
[Parameter]
+1 -1
View File
@@ -26,7 +26,7 @@
int currIdx = 0;
foreach (var macchina in ListMSE)
{
<DetailMSE CurrRecord="@macchina" doAnimate="@doAnimate" keepAliveMin="@keepAliveMin"></DetailMSE>
<DetailMSE CurrRecord="@macchina" doAnimate="@doAnimate" keepAliveMin="@keepAliveMin" showArt="@showArt"></DetailMSE>
currIdx++;
if (currIdx >= maxCol)
{
+28 -1
View File
@@ -35,8 +35,12 @@ namespace MP.Mon.Pages
protected bool doAnimate = true;
protected string showArt = "";
protected int slowRefreshSec = 300;
protected int fastRefreshSec = 10;
protected int slowRefreshMs
{
get => 1000 * slowRefreshSec;
@@ -74,6 +78,7 @@ namespace MP.Mon.Pages
doAnimate = intDoAnim == 1;
getConfValInt("pageRefreshSec", ref slowRefreshSec);
getConfValInt("MSE_cacheDuration", ref fastRefreshSec);
getConfVal("sART", ref showArt);
Log.Info($"Effettuato setup parametri | keepAlive: {keepAliveMin} | MaxCol: {maxCol} | doAnimate: {doAnimate} | slowRefreshSec: {slowRefreshSec} | fastRefreshSec: {fastRefreshSec}");
}
@@ -83,7 +88,7 @@ namespace MP.Mon.Pages
/// Recupera il valore e se trovato aggiorna
/// </summary>
/// <param name="chiave">Valore da cercare</param>
/// <param name="varObj">Oggetto in cui salvare il valore se trovato</param>
/// <param name="varObj">Int in cui salvare il valore se trovato</param>
/// <returns></returns>
protected bool getConfValInt(string chiave, ref int varObj)
{
@@ -100,6 +105,28 @@ namespace MP.Mon.Pages
return answ;
}
/// <summary>
/// Recupera il valore e se trovato aggiorna
/// </summary>
/// <param name="chiave">Valore da cercare</param>
/// <param name="varObj">String in cui salvare il valore se trovato</param>
/// <returns></returns>
protected bool getConfVal(string chiave, ref string varObj)
{
bool answ = false;
if (CurrConfig != null && CurrConfig.Count > 0)
{
// sistemo i parametri opzionali...
ConfigModel? risultato = CurrConfig.FirstOrDefault(x => x.Chiave == chiave);
if (risultato != null)
{
varObj = risultato.Valore;
answ = !string.IsNullOrEmpty(risultato.Valore);
}
}
return answ;
}
private async Task ReloadData()
{
ListMSE = await MMDataService.MseGetAll();
+1 -1
View File
@@ -149,7 +149,7 @@ a,
font-size: 0.6em;
}
.statusMap {
background: rgba(255, 255, 255, 0.1);
background: rgba(0, 0, 0, 0.4);
}
.statusMap .ui-title,
.statusMap .ui-li-aside {
+3 -3
View File
@@ -154,7 +154,7 @@ a, .btn-link {
}
.statusMap {
background: rgba(255,255,255,0.1);
background: rgba(0,0,0,0.4);
}
.statusMap .ui-title, .statusMap .ui-li-aside {
@@ -175,8 +175,8 @@ a, .btn-link {
color: #CDCDCD;
background: linear-gradient(270deg, rgba(10,10,10,0.7), rgba(80,80,80,0.7), rgba(10,10,10,0.7));
}
.machBlock
{
.machBlock {
padding: 0 2px 0 2px;
}
/* END: gestione layout dinamico mappa... */
+1 -1
View File
File diff suppressed because one or more lines are too long