update con listaEv + traduzione in tab
This commit is contained in:
@@ -10,22 +10,22 @@
|
||||
<div class="row">
|
||||
@if (DayMinTot < 1440)
|
||||
{
|
||||
<div class="col-3 my-2">
|
||||
<div class="col-3 my-2 pe-1">
|
||||
<button class="btn btn-success w-100" @onclick="() => AddNew(true)" title="Inserisci produzione"><i class="fa-solid fa-plus"></i> Produzione</button>
|
||||
</div>
|
||||
<div class="col-3 my-2">
|
||||
<div class="col-3 my-2 px-1">
|
||||
<button class="btn btn-warning w-100" @onclick="() => AddNew(false)" title="Inserisci Fermata"><i class="fa-solid fa-plus"></i> Fermata</button>
|
||||
</div>
|
||||
<div class="col-3 my-2">
|
||||
<div class="col-3 my-2 px-1">
|
||||
<button class="btn btn-secondary w-100" @onclick="() => FixMissing()" title="Riempi periodi mancanti"><i class="fa-solid fa-fill-drip"></i> Spenta <i class="fa-solid fa-fill-drip"></i></button>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-9 my-2">
|
||||
<div class="col-9 my-2 px-1">
|
||||
</div>
|
||||
}
|
||||
<div class="col-3 my-2">
|
||||
<div class="col-3 my-2 ps-1">
|
||||
<button class="btn btn-outline-light w-100" @onclick="@CloseDet"><i class="fa-solid fa-xmark"></i> Close</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -77,19 +77,19 @@
|
||||
<label>Articolo</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 col-lg-2 my-2">
|
||||
<div class="col-6 col-lg-2 my-2">
|
||||
<div class="form-floating">
|
||||
<input type="time" class="form-control" @bind="@EditRecord.InizioStato"></input>
|
||||
<label for="floatingComm">Inizio</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 col-lg-2 my-2">
|
||||
<div class="col-3 col-lg-2 my-2">
|
||||
<div class="form-floating">
|
||||
<input type="number" class="form-control" @bind="@EditRecord.PzBuoni"></input>
|
||||
<input type="number" class="form-control" @bind="@EditRecord.PzBuoni" step="1"></input>
|
||||
<label for="floatingComm">Pezzi</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 col-lg-2 my-2">
|
||||
<div class="col-3 col-lg-2 my-2">
|
||||
<div class="form-floating">
|
||||
<input type="number" class="form-control" @bind="@EditRecord.TCiclo"></input>
|
||||
<label for="floatingComm">T.Ciclo</label>
|
||||
@@ -100,13 +100,25 @@
|
||||
else
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-8 my-2">
|
||||
<div class="col-12">
|
||||
<div class="form-floating">
|
||||
<input type="text" class="form-control" @bind="@EditRecord.IdxTipoEv"></input>
|
||||
<select @bind="@EditRecord.IdxTipoEv" class="form-select">
|
||||
@foreach (var item in ListEvents)
|
||||
{
|
||||
<option value="@item.value">@item.label</option>
|
||||
}
|
||||
</select>
|
||||
@* <input type="text" class="form-control" @bind="@EditRecord.IdxTipoEv"></input> *@
|
||||
<label>Tipo Fermata</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 my-2">
|
||||
<div class="col-6 my-2">
|
||||
<div class="form-floating">
|
||||
<input type="time" class="form-control" @bind="@EditRecord.InizioStato"></input>
|
||||
<label for="floatingComm">Inizio</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 my-2">
|
||||
<div class="form-floating">
|
||||
<input type="number" class="form-control" @bind="@EditRecord.MinProd" step="0.01" placeholder="0.0"></input>
|
||||
<label for="floatingComm">Durata (min)</label>
|
||||
@@ -124,7 +136,6 @@
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Macc</th>
|
||||
<th>Comm.</th>
|
||||
<th>Stato</th>
|
||||
<th>Art.</th>
|
||||
<th>Ora</th>
|
||||
@@ -140,9 +151,14 @@
|
||||
<tr>
|
||||
<td><button class="btn btn-sm btn-primary" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pen"></i></button></td>
|
||||
<td>@item.IdxMacchina</td>
|
||||
<td>@item.KeyRichiesta</td>
|
||||
<td>@item.IdxTipoEv</td>
|
||||
<td>@item.CodArticolo</td>
|
||||
<td>@(EvDescript(item.IdxTipoEv))</td>
|
||||
<td>
|
||||
@item.CodArticolo
|
||||
@if (!string.IsNullOrEmpty(item.KeyRichiesta))
|
||||
{
|
||||
<small>@item.KeyRichiesta</small>
|
||||
}
|
||||
</td>
|
||||
<td title="@($"{item.InizioStato:yyyy.MM.dd HH:mm:ss} --> {item.FineStato:yyyy.MM.dd HH:mm:ss}")">@($"{item.InizioStato:HH:mm}")</td>
|
||||
<td class="text-end">@item.PzBuoni</td>
|
||||
<td class="text-end">@($"{item.TCiclo:f2}")</td>
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace MP_TAB3.Components
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
|
||||
[Parameter]
|
||||
public MappaStatoExpl? RecMSE
|
||||
{
|
||||
@@ -75,14 +74,6 @@ namespace MP_TAB3.Components
|
||||
};
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// imposta record x editing
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
protected void DoEdit(InsManualiModel? selRec)
|
||||
{
|
||||
EditRecord = selRec;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// impossta record x eliminazione
|
||||
@@ -100,6 +91,15 @@ namespace MP_TAB3.Components
|
||||
RecalcDayData(dtCurr);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// imposta record x editing
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
protected void DoEdit(InsManualiModel? selRec)
|
||||
{
|
||||
EditRecord = selRec;
|
||||
}
|
||||
|
||||
protected async Task DoSave()
|
||||
{
|
||||
// solo se ho record...
|
||||
@@ -136,6 +136,25 @@ namespace MP_TAB3.Components
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// traduzione evento da lista...
|
||||
/// </summary>
|
||||
/// <param name="idxTipoEv"></param>
|
||||
/// <returns></returns>
|
||||
protected string EvDescript(int idxTipoEv)
|
||||
{
|
||||
string answ = "-";
|
||||
if (ListEvents != null)
|
||||
{
|
||||
var rSel = ListEvents.FirstOrDefault(x => x.value == idxTipoEv);
|
||||
if (rSel != null)
|
||||
{
|
||||
answ = rSel.label;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected async Task FixMissing()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler riempire i periodi mancanti?"))
|
||||
@@ -193,13 +212,10 @@ namespace MP_TAB3.Components
|
||||
|
||||
private bool confProdActive { get; set; } = false;
|
||||
private MappaStatoExpl? currRecMSE { get; set; } = null;
|
||||
|
||||
private DateTime dtCurr { get; set; } = DateTime.Today;
|
||||
|
||||
private List<InsManualiModel>? ListDay { get; set; } = new List<InsManualiModel>();
|
||||
|
||||
private List<InsManDayDto>? ListDTO { get; set; } = new List<InsManDayDto>();
|
||||
|
||||
private List<vSelEventiBCodeModel> ListEvents { get; set; } = new List<vSelEventiBCodeModel>();
|
||||
private List<InsManualiModel>? ListPeriod { get; set; } = new List<InsManualiModel>();
|
||||
|
||||
private bool showDetail { get; set; } = false;
|
||||
@@ -333,9 +349,16 @@ namespace MP_TAB3.Components
|
||||
ListDTO = new List<InsManDayDto>();
|
||||
if (RecMSE != null)
|
||||
{
|
||||
string IdxMacc = RecMSE.IdxMacchina;
|
||||
var eventsAll = TabDServ.AnagEventiGetByMacch(IdxMacc);
|
||||
if (eventsAll != null)
|
||||
{
|
||||
ListEvents = eventsAll.Where(x => x.EventoTablet).ToList();
|
||||
}
|
||||
|
||||
DateTime MeseStart = new DateTime(dtCurr.Year, dtCurr.Month, 1);
|
||||
DateTime MeseEnd = MeseStart.AddMonths(1);
|
||||
ListPeriod = TabDServ.InsManFilt(RecMSE.IdxMacchina, MeseStart, MeseEnd);
|
||||
ListPeriod = TabDServ.InsManFilt(IdxMacc, MeseStart, MeseEnd);
|
||||
ListDTO = TabDServ.InsManDayDto(ListPeriod);
|
||||
DateCheck = new Dictionary<DateTime, string>();
|
||||
DateCFF = new Dictionary<DateTime, string>();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>6.16.2504.218</Version>
|
||||
<Version>6.16.2504.219</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP_TAB3</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -238,7 +238,7 @@ namespace MP_TAB3.Pages
|
||||
{
|
||||
await base.ReloadData();
|
||||
// recupero eventi
|
||||
var eventsAll = await TabDServ.AnagEventiGetByMacch(IdxMacc);
|
||||
var eventsAll = TabDServ.AnagEventiGetByMacch(IdxMacc);
|
||||
if (eventsAll != null)
|
||||
{
|
||||
events2show = eventsAll.Where(x => x.EventoTablet).ToList();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2504.218</h4>
|
||||
<h4>Versione: 6.16.2504.219</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2504.218
|
||||
6.16.2504.219
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2504.218</version>
|
||||
<version>6.16.2504.219</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>
|
||||
|
||||
@@ -262,7 +262,7 @@ namespace MP.Data.Services
|
||||
/// Elenco EVENTI validi x macchina
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<vSelEventiBCodeModel>> AnagEventiGetByMacch(string IdxMacch)
|
||||
public List<vSelEventiBCodeModel> AnagEventiGetByMacch(string IdxMacch)
|
||||
{
|
||||
// setup parametri costanti
|
||||
DateTime startDate = new DateTime(2000, 1, 1);
|
||||
@@ -273,7 +273,7 @@ namespace MP.Data.Services
|
||||
List<vSelEventiBCodeModel>? result = new List<vSelEventiBCodeModel>();
|
||||
// cerco in redis...
|
||||
string currKey = $"{redisBaseKey}:VSEB:{IdxMacch}";
|
||||
RedisValue rawData = await redisDb.StringGetAsync(currKey);
|
||||
RedisValue rawData = redisDb.StringGet(currKey);
|
||||
if (rawData.HasValue)
|
||||
{
|
||||
result = JsonConvert.DeserializeObject<List<vSelEventiBCodeModel>>($"{rawData}");
|
||||
@@ -284,7 +284,7 @@ namespace MP.Data.Services
|
||||
result = dbTabController.AnagEventiGetByMacc(IdxMacch);
|
||||
// serializzo e salvo...
|
||||
rawData = JsonConvert.SerializeObject(result);
|
||||
await redisDb.StringSetAsync(currKey, rawData, LongCache);
|
||||
redisDb.StringSet(currKey, rawData, LongCache);
|
||||
}
|
||||
if (result == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user