ok pagina fermate

This commit is contained in:
zaccaria.majid
2023-10-04 11:58:19 +02:00
parent 979a79a40d
commit 67e072d1a7
5 changed files with 35 additions and 6 deletions
+10 -3
View File
@@ -1,3 +1,10 @@
<div class="col-2">
d
</div>
<div class="p-2 col-6 col-sm-4 col-md-4 col-lg-2 ">
<div class="@objCss text-center card w-100">
<div class="card-body text-light">
<i class="@objIcon" style="font-size: 10vw"></i>
</div>
<div class="card-footer bg-dark text-light opacity-50">
<span>@objTxt</span>
</div>
</div>
</div>
@@ -1,6 +1,14 @@
using Microsoft.AspNetCore.Components;
namespace MP_TAB_SERV.Components
{
public partial class ProdStopMan
{
[Parameter]
public string objCss { get; set; } = "";
[Parameter]
public string objIcon { get; set; } = "";
[Parameter]
public string objTxt { get; set; } = "";
}
}
+5 -2
View File
@@ -9,8 +9,11 @@ else
<div>
<MachineBlock RecMSE="CurrMSE" FullMode="false"></MachineBlock>
</div>
@for (int x = 0; x > 20; x++)
<div class="d-flex justify-content-between flex-wrap align-items-center">
@foreach(var item in events2show)
{
<ProdStopMan></ProdStopMan>
<ProdStopMan objCss="@item.CssClass" objIcon="@item.Icon" objTxt="@(item.Nome.Split(" - ")[1])"></ProdStopMan>
}
</div>
}
+9
View File
@@ -10,9 +10,12 @@ namespace MP_TAB_SERV.Pages
protected MappaStatoExpl? CurrMSE { get; set; } = null;
protected string IdxMacc { get; set; } = "";
protected List<AnagEventiModel> events2show { get; set; } = new List<AnagEventiModel>();
[Inject]
protected MessageService MsgServ { get; set; } = null!;
[Inject]
protected TabDataService TabSrv { get; set; } = null!;
#endregion Protected Properties
@@ -38,6 +41,12 @@ namespace MP_TAB_SERV.Pages
CurrMSE = await MsgServ.GetMachineMse(IdxMacc);
}
}
var eventsAll = await TabSrv.AnagEventiGetAll();
if(eventsAll != null)
{
events2show = eventsAll.Where(x => x.EventoTablet).OrderBy(x=>x.Nome).ToList();
}
}
#endregion Private Methods
+3 -1
View File
@@ -1,15 +1,17 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MP.Data.DatabaseModels
{
[Table("AnagraficaEventi")]
public class AnagEventiModel
{
[Key]
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxTipo { get; set; } = 0;
public string Nome { get; set; } = "";
public string TabAzione { get; set; } = "";