Modifica SPEC x gestione fase libera vs lista

This commit is contained in:
Samuele Locatelli
2023-04-05 09:15:23 +02:00
parent 39d4a548c1
commit 20d6c6cd36
15 changed files with 47 additions and 36 deletions
+2 -2
View File
@@ -232,8 +232,8 @@ namespace MP.SPEC.Components
await MDService.ConfigResetCache();
ListGruppiFase = await MDService.ElencoGruppiFase();
ListStati = await MDService.AnagStatiComm();
selAzienda = await MDService.tryGetConfig("AZIENDA");
giacenzeConf = await MDService.tryGetConfig("SPEC_ShowGiacenze");
selAzienda = await MDService.ConfigTryGet("AZIENDA");
giacenzeConf = await MDService.ConfigTryGet("SPEC_ShowGiacenze");
ListArticoli = await MDService.ArticoliGetSearch(100000, selAzienda, "");
ListMacchine = await MDService.MacchineGetFilt("*");
await ReloadData(true);
+4 -4
View File
@@ -44,14 +44,14 @@ else
<button @onclick="() => cloneRecord(record)" class="btn btn-info btn-sm mx-1" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>
@if (record.IdxOdl == 0)
{
@if (canStartOdl(record.IdxMacchina))
<button @onclick="() => selRecord(record)" class="btn btn-primary btn-sm mx-1" title="Modifica Record"><i class="bi bi-pencil-square"></i></button>
@*@if (canStartOdl(record.IdxMacchina))
{
<button @onclick="() => selRecord(record)" class="btn btn-primary btn-sm mx-1" title="Modifica Record"><i class="bi bi-pencil-square"></i></button>
}
else
{
<button class="btn btn-secondary btn-sm mx-1 disabled" title="Impossibile modificare"><i class="bi bi-pencil-square"></i></button>
}
<button class="btn btn-secondary btn-sm mx-1 disabled" title="Impossibile modificare"><i class="bi bi-pencil-square"></i></button>
}*@
@if (canStartOdl(record.IdxMacchina))
{
<button @onclick="() => startOdl(record)" class="btn btn-success btn-sm mx-1" title="Avvia PODL">
+1 -1
View File
@@ -127,7 +127,7 @@ namespace MP.SPEC.Components
protected override async Task OnInitializedAsync()
{
ListStati = await MDService.AnagStatiComm();
var strMachRecipe = await MDService.tryGetConfig("MachineWithRecipe");
var strMachRecipe = await MDService.ConfigTryGet("MachineWithRecipe");
bool.TryParse(strMachRecipe, out MachineWithRecipe);
}
+1 -1
View File
@@ -172,7 +172,7 @@ namespace MP.SPEC.Components
{
SelFilter = new SelectFluxParams();
await MDService.ConfigResetCache();
var result = await MDService.tryGetConfig("SPEC_ParamTempoAgg");
var result = await MDService.ConfigTryGet("SPEC_ParamTempoAgg");
if (result != null)
{
refreshRate = int.Parse(result);
+2 -2
View File
@@ -679,7 +679,7 @@ namespace MP.SPEC.Data
rawData = JsonConvert.SerializeObject(result);
if (string.IsNullOrEmpty(canCacheParametri))
{
canCacheParametri = await tryGetConfig("SPEC_ParametriEnableRedisCache");
canCacheParametri = await ConfigTryGet("SPEC_ParametriEnableRedisCache");
}
if (canCacheParametri != "false")
{
@@ -1516,7 +1516,7 @@ namespace MP.SPEC.Data
/// </summary>
/// <param name="keyName"></param>
/// <returns></returns>
public async Task<string> tryGetConfig(string keyName)
public async Task<string> ConfigTryGet(string keyName)
{
string answ = "";
// preselezione valori
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>6.16.2304.419</Version>
<Version>6.16.2304.509</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -137,7 +137,7 @@ namespace MP.SPEC.Pages
selAzienda = currRec.Valore;
}
#endif
selAzienda = await MDService.tryGetConfig("AZIENDA");
selAzienda = await MDService.ConfigTryGet("AZIENDA");
ListAziende = await MDService.ElencoAziende();
ListTipoArt = await MDService.AnagTipoArtLV();
}
+2 -2
View File
@@ -27,9 +27,9 @@ namespace MP.SPEC.Pages
protected override async Task OnInitializedAsync()
{
await MDService.ConfigResetCache();
giacenzeConf = await MDService.tryGetConfig("SPEC_ShowGiacenze");
giacenzeConf = await MDService.ConfigTryGet("SPEC_ShowGiacenze");
await Task.Delay(1);
padCodXdl = await MDService.tryGetConfig("padCodXdl");
padCodXdl = await MDService.ConfigTryGet("padCodXdl");
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("IdxOdl", out var _idxOdl))
{
+1 -1
View File
@@ -40,7 +40,7 @@ namespace MP.SPEC.Pages
}
}
#endif
currAzienda = await MDService.tryGetConfig("AZIENDA");
currAzienda = await MDService.ConfigTryGet("AZIENDA");
await Task.Delay(1);
}
+1 -1
View File
@@ -112,7 +112,7 @@ namespace MP.SPEC.Pages
}
ListStati = await MDService.AnagStatiComm();
ListMacchine = await MDService.MacchineGetFilt(selReparto);
padCodXdl = await MDService.tryGetConfig("padCodXdl");
padCodXdl = await MDService.ConfigTryGet("padCodXdl");
}
protected async Task pgResetReq(bool doReset)
+22 -14
View File
@@ -97,24 +97,32 @@
</div>
<div class="col-3">
<div class="input-group input-group-sm">
<span class="input-group-text" id="inputGroup-sizing-sm">Fase</span>
<select @bind="@currRecord.KeyRichiesta" class="form-select">
@if (ListStati != null)
{
foreach (var item in ListStati)
@if (useFasi4KeyRich == "FASE")
{
<span class="input-group-text" id="inputGroup-sizing-sm">Fase</span>
<select @bind="@currRecord.KeyRichiesta" class="form-select">
@if (ListStati != null)
{
@if (item.value == currRecordControlli.KeyRichiesta)
foreach (var item in ListStati)
{
<option value="@item.value" selected>@item.label</option>
}
else
{
<option value="@item.value">@item.label</option>
}
@if (item.value == currRecordControlli.KeyRichiesta)
{
<option value="@item.value" selected>@item.label</option>
}
else
{
<option value="@item.value">@item.label</option>
}
}
}
}
</select>
</select>
}
else
{
<span class="input-group-text" id="inputGroup-sizing-sm">Fase/Richiesta</span>
<input type="text" class="form-control" aria-label="Fase/Richiesta" aria-describedby="inputGroup-sizing-sm" @bind-value="@currRecord.KeyRichiesta">
}
</div>
</div>
</div>
+6 -3
View File
@@ -111,10 +111,13 @@ namespace MP.SPEC.Pages
ListGruppiFase = allGruppiData.Where(x => x.SelEnabled).ToList();
}
ListStati = await MDService.AnagStatiComm();
currAzienda = await MDService.tryGetConfig("AZIENDA");
padCodXdl = await MDService.tryGetConfig("padCodXdl");
currAzienda = await MDService.ConfigTryGet("AZIENDA");
padCodXdl = await MDService.ConfigTryGet("padCodXdl");
useFasi4KeyRich = await MDService.ConfigTryGet("SPEC_KeyRichiesta");
}
protected string useFasi4KeyRich { get; set; } = "";
protected override async Task OnParametersSetAsync()
{
// carico dati
@@ -185,7 +188,7 @@ namespace MP.SPEC.Pages
protected async Task selRecord(PODLExpModel selRec)
{
currRecord = selRec;
await Task.Delay(1);
}
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2304.419</h4>
<h4>Versione: 6.16.2304.509</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2304.419
6.16.2304.509
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2304.419</version>
<version>6.16.2304.509</version>
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>