Correzioni interfaccia e traduzioni

This commit is contained in:
Annamaria Sassi
2026-06-22 17:35:05 +02:00
parent 82a79256d4
commit e209835dce
23 changed files with 163 additions and 49 deletions
@@ -55,7 +55,7 @@
// 2. Trovo quelle da sistemare
var list2fix = rows
.Where(x => x.ImgType == ImageType.ND)
.Where(x => x.ImgType == ImageType.ND && x.CalcEnabled)
.ToList();
// 3. Se non c'è nulla da fare → ritorno (nessun cambio necessario)
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>1.1.2606.1112</Version>
<Version>1.1.2606.2217</Version>
</PropertyGroup>
<ItemGroup>
@@ -14,7 +14,7 @@ else
{
@* <ItemEdit CurrRecord="editRecord" ListItemGroup="ListItemGroup" EC_Updated="DoSave" EC_Close="DoCancel"></ItemEdit> *@
}
<table class="table table-sm table-striped">
<table class="table table-sm table-striped align-middle">
<thead>
<tr>
<th>
@@ -48,10 +48,10 @@ else
{
<div class="px-0 d-flex">
<div class="px-1">
<button class="btn btn-sm btn-success" @onclick="() => DoSelectItem()">@Traduci("prodCatalogo") <i class="fa-solid fa-plus"></i></button>
<button class="btn btn-sm btn-success" @onclick="() => DoSelectItem()"><i class="fa-solid fa-plus"></i> @Traduci("prodCatalogo")</button>
</div>
<div class="px-1">
<button class="btn btn-sm @noteCss" @onclick="() => DoAddNote()">@Traduci("nota") <i class="fa-solid fa-plus"></i></button>
<button class="btn btn-sm @noteCss" @onclick="() => DoAddNote()"><i class="fa-solid fa-plus"></i> @Traduci("nota")</button>
</div>
</div>
}
@@ -233,7 +233,55 @@ else
</td>
}
<td>
<ul class="list-group">
<div class="row justify-content-between align-items-center">
<div class="col">@item.OfferRowUID</div>
@if (ShowBom(item))
{
<div class="col">
@if (CurrEditMode == EditMode.None)
{
<button class="btn btn-sm btn-primary" @onclick="() => RequestBom(item)" title="Richiesta ricalcolo BOM">
BOM <i class="fa-solid fa-arrow-right-arrow-left pe-2"></i>
@if (item.AwaitBom)
{
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
}
</button>
}
else
{
<button class="btn btn-sm btn-secondary disabled">
BOM <i class="fa-solid fa-arrow-right-arrow-left pe-2"></i>
@if (item.AwaitBom)
{
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
}
</button>
}
</div>
}
</div>
<div class="row w-75">
<div class="col">
@if (item.CalcEnabled)
{
@if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName))
{
<div class="list-group-item d-flex justify-content-between align-items-start px-2 py-1 small">
<div class="mx-0">
<div class="">@item.FileName</div>
</div>
<span class="small">@fSize(item.FileSize)</span>
</div>
}
}
@if (DisplayMode != DisplayMode.Preview && item.CalcEnabled)
{
<div class="list-group-item py-1 small"><a href="@(DownloadUrl(item.OfferRowUID))" target="_blank" class="btn btn-sm btn-success">Download <i class="fa-solid fa-download"></i></a></div>
}
</div>
</div>
@* <ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-start align-items-center px-2 py-1">
<div class="fw-bold">@item.OfferRowUID</div>
@if (ShowBom(item))
@@ -276,7 +324,7 @@ else
{
<li class="list-group-item px-2 py-1 small"><a href="@(DownloadUrl(item.OfferRowUID))" target="_blank" class="btn btn-sm btn-success">Download <i class="fa-solid fa-download"></i></a></li>
}
</ul>
</ul> *@
</td>
@if (CurrEditMode == EditMode.RecData && EditRecord != null && EditRecord.OfferRowID == item.OfferRowID)
{
@@ -312,16 +360,14 @@ else
</td>
@if (DisplayMode == DisplayMode.Edit)
{
<td class="text-center">
<td class="text-end">
@if (!string.IsNullOrEmpty(item.ItemBOM))
{
<div>
<button class="btn btn-sm btn-info" title="Cambio materiali assegnati" @onclick="() => DoSwapMat(item)"><i class="fa-solid fa-arrow-right-arrow-left"></i></button>
</div>
}
<diiv class="small">
@item.ProdItemQty
</diiv>
<span class="small">@item.ProdItemQty</span>
</td>
<td class="text-center">
@if (!string.IsNullOrEmpty(item.ItemSteps))
@@ -13,7 +13,7 @@ else
else
{
<div class="d-flex w-100 justify-content-between align-items-center pb-2">
<h5 class="ps-1"><b>Ordini disponibili</b></h5>
<h5 class="ps-1"><b>@Traduci("fabbisogno_ordDisp")</b></h5>
<div class="d-flex align-items-center gap-2 px-0">
<button class="btn btn-primary border-0" @onclick="ToggleDetail">
<i class="fa-solid @CssDetail"></i> @ButtonEspandi()
@@ -117,7 +117,7 @@ else
}
</td>
<td>
<ul class="list-group">
@* <ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-start align-items-center px-2 py-1 condensed fw-bold">
@item.Name
</li>
@@ -139,7 +139,10 @@ else
</li>
}
}
</ul>
</ul> *@
<b>@item.Name</b>
<div class="small text-secondary">@item.SellingItemNav?.Description</div>
<div class="condensed mt-1">@item.TemplateRowUID</div>
</td>
<td class="text-end">
<button class="btn btn-sm btn-danger" title="@Traduci("elimina")" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash"></i></button>
@@ -8,11 +8,11 @@ else
{
<div class="p-2 shadow">
<div class="d-flex justify-content-between">
<div class="px-0 fs-4">
<div class="ps-2 fs-4">
<b>@Traduci("fabbisogno_fornitoreOrd")</b>
</div>
<div class="px-0 d-flex justify-content-between">
<div class="input-group input-group-sm" style="width:12em;" title="@Traduci("ricerca")">
<div class="align-items-center">
<div class="input-group input-group-sm" title="@Traduci("ricerca")">
<span class="input-group-text">@Traduci("stato")</span>
<select class="form-select" @bind="@SearchVal">
@foreach (var item in OrderStateList)
@@ -27,7 +27,7 @@ else
@* <span class="pe-2">@item.Key</span> *@
@* <span class="badge rounded-pill bg-dark me-2">@item.Value.Count</span> *@
<span class="">Send Order</span>
<span class="rounded py-0 px-1 text-light bg-dark text-center mx-2" style="width: 2.0rem;">@item.Value.Count</span>
<span class="rounded-4 py-0 px-1 text-light bg-dark text-center mx-2" style="width: 2.0rem;">@item.Value.Count</span>
<i class="fa-solid fa-angles-right"></i>
</div>
</button>
@@ -62,7 +62,7 @@ else
@if (ListSelected.Contains(item.MatReqID))
{
<div class="">
<i class="fa-solid fa-square-check text-secondary opacity-50 fa-lg"></i>
<i class="fa-solid fa-square-check text-primary opacity-75 fa-lg"></i>
</div>
}
else
@@ -1,13 +1,12 @@
@inherits BaseComp
<div class="p-2 shadow">
<div class="d-flex justify-content-between">
<div class="px-0 fs-4">
<div class="d-flex align-items-center justify-content-between">
<div class="ps-2 fs-4">
<b>@Traduci("fabbisogno_fabbisogni")</b>
</div>
<div class="row px-0">
<div class="col-2"></div>
<div class="col-4">
<div class="row align-items-center pe-2">
<div class="col-6 px-1">
<div class="input-group input-group-sm">
<span class="input-group-text">Ord</span>
<select @bind="@SelOrder" class="form-select form-select-sm">
@@ -19,8 +18,8 @@
</select>
</div>
</div>
<div class="col-4">
<div class="input-group input-group-sm" style="width:15em;" title="@Traduci("ricerca")">
<div class="col-6 px-1">
<div class="input-group input-group-sm" title="@Traduci("ricerca")">
<span class="input-group-text"><i class="fas fa-search"></i></span>
<input type="text" class="form-control" accesskey="/" placeholder="Cerca [/] (3+ char)" @bind="@SearchVal">
<button class="btn @btnResetCss" @onclick="ResetSearch"><i class="fas fa-ban"></i></button>
@@ -51,7 +51,7 @@
}
else
{
<span class="input-group-text" id="inputGroup-sizing-default">@item.PlantListJoin</span>
<span class="input-group-text">@item.PlantListJoin</span>
<input type="number" class="form-control">
}
}
@@ -160,7 +160,7 @@
# Parts
</th>
<th class="text-end">
Hour
Time
</th>
</tr>
</thead>
@@ -205,10 +205,12 @@
@item.PlantListJoin
</td>
<td class="text-end">
@item.NumParts / @($"{NumPartRatio(item.NumParts):P1}")
@NumParts(item)
@* @item.NumParts / @($"{NumPartRatio(item.NumParts):P1}") *@
</td>
<td class="text-end">
@item.TotalEstimTime / @($"{TotMaxTimeRatio(item.TotalEstimTime):P1}")
@DisplayDurata(item)
@* @DisplayDurata(item) / @($"{TotMaxTimeRatio(item.TotalEstimTime):P1}") *@
</td>
</tr>
}
@@ -1,5 +1,6 @@
using EgwCoreLib.Lux.Core.Generic;
using EgwCoreLib.Razor;
using Lux.UI.Components.Pages;
namespace Lux.UI.Components.Compo.WorkLoad
{
@@ -38,12 +39,12 @@ namespace Lux.UI.Components.Compo.WorkLoad
protected enum SetMode
{
/// <summary>
/// Modalità non definita
/// Modalit non definita
/// </summary>
None = 0,
/// <summary>
/// Modalità preparazione richiesta balance
/// Modalit preparazione richiesta balance
/// </summary>
Balance,
@@ -129,7 +130,7 @@ namespace Lux.UI.Components.Compo.WorkLoad
protected void ToggleAssignMode(List<string> listTag, SetMode reqMode)
{
// se era già attivo --> chiude... altrimenti assegna!
// se era gi attivo --> chiude... altrimenti assegna!
CurrMode = CurrMode == reqMode ? SetMode.None : reqMode;
// ora imposto secondo modo...
if (CurrMode == reqMode)
@@ -146,7 +147,7 @@ namespace Lux.UI.Components.Compo.WorkLoad
private BalanceReqDto cBalanceReq = new BalanceReqDto();
/// <summary>
/// Gestione modalità assegnazione Parts a macchine
/// Gestione modalit assegnazione Parts a macchine
/// </summary>
private SetMode CurrMode = SetMode.None;
@@ -264,6 +265,37 @@ namespace Lux.UI.Components.Compo.WorkLoad
return DetailRecord.TotMaxTime > 0 ? currTime / DetailRecord.TotMaxTime : (decimal)0.0;
}
public string DisplayDurata(ProductionGroupModel prodGroup)
{
string ans = "";
if (prodGroup.PlantListJoin.Equals("Manual"))
{
ans = "-";
}
else
{
int ore = (int)prodGroup.TotalEstimTime / 3600;
int min = (int)(prodGroup.TotalEstimTime % 3600) / 60;
int sec = (int)prodGroup.TotalEstimTime % 60;
// Tempo in formato HH:MM:SS
ans = $"{ore:D2}:{min:D2}:{sec:D2}";
if (AllProdGroup != null && AllProdGroup.Count > 1)
ans = ans + " / " + ($"{TotMaxTimeRatio(prodGroup.TotalEstimTime):P1}");
}
return ans;
}
private string NumParts(ProductionGroupModel prodGroup)
{
string ans = prodGroup.NumParts.ToString();
if(AllProdGroup != null && AllProdGroup.Count > 1)
ans = ans + " / " + ($"{NumPartRatio(prodGroup.NumParts):P1}");
return ans;
}
#endregion Private Methods
}
}
+2 -2
View File
@@ -189,8 +189,8 @@ else
<td>@item.OfferID</td>
}
<td>
<div class="small" title="Inserita"><i class="fa-solid fa-circle"></i> @($"{item.Inserted:yyyy-MM-dd}")</div>
<div class="small text-secondary" title="Scadenza"><i class="fa-solid fa-hourglass-half"></i> @($"{item.ValidUntil:yyyy-MM-dd}")</div>
<div class="small" title="@Traduci("inserita")"><i class="fa-solid fa-circle"></i> @($"{item.Inserted:yyyy-MM-dd}")</div>
<div class="small text-secondary" title="@Traduci("scadenza")"><i class="fa-solid fa-hourglass-half"></i> @($"{item.ValidUntil:yyyy-MM-dd}")</div>
</td>
@if (SelRecord == null)
{
+4 -5
View File
@@ -115,7 +115,6 @@ else
<option value="">-- @Traduci("tutti") --</option>
@foreach (var sType in Enum.GetValues(typeof(EgwCoreLib.Lux.Core.Enums.OrderStates)))
{
@* <option value="@sType">@Traduci("ordine_" + sType.ToString().ToLower())</option> *@
<option value="@sType">@Traduci($"ordine_{sType}".ToLower())</option>
}
</select>
@@ -158,7 +157,7 @@ else
</th>
<th>@Traduci("id")</th>
<th>@Traduci("data")</th>
<th>@Traduci("stato")</th>
<th class="text-center">@Traduci("stato")</th>
<th>@Traduci("materiali")</th>
<th>@Traduci("codice")</th>
@if (SelRecord == null)
@@ -191,11 +190,11 @@ else
</td>
<td>@item.OrderID</td>
<td>
<div class="small" title="Inserita"><i class="fa-solid fa-circle"></i> @($"{item.Inserted:yyyy-MM-dd}")</div>
<div class="small text-secondary" title="Scadenza"><i class="fa-solid fa-hourglass-half"></i> @($"{item.ValidUntil:yyyy-MM-dd}")</div>
<div class="small" title="@Traduci("inserito")"><i class="fa-solid fa-circle"></i> @($"{item.Inserted:yyyy-MM-dd}")</div>
<div class="small text-secondary" title="@Traduci("scadenza")"><i class="fa-solid fa-hourglass-half"></i> @($"{item.ValidUntil:yyyy-MM-dd}")</div>
</td>
<td>
<button class="btn btn-sm bg-@ButtonStateCss(item) bg-gradient bg-opacity-25 text-dark rounded-pill" @onclick="() => ManageCalcReq(item)">
<button class="btn btn-sm w-100 bg-@ButtonStateCss(item) bg-gradient bg-opacity-25 text-dark rounded-pill" @onclick="() => ManageCalcReq(item)">
@Traduci("ordine_"+@item.OrderState.ToString().ToLower())
</button>
</td>
+3 -1
View File
@@ -1,8 +1,10 @@
@page "/ProdPlanner"
@inherits BaseComp
<div class="p-2 shadow">
<div class="d-flex justify-content-end">
<div class="px-0">
<PeriodoSel E_PeriodoSel="SetPeriodo" CurrPeriodo="PeriodoSel"></PeriodoSel>
<PeriodoSel E_PeriodoSel="SetPeriodo" CurrPeriodo="PeriodoSel" PeriodoLabel="@Traduci("periodo")" DictSelect="CustomSelDict"></PeriodoSel>
</div>
</div>
<div class="my-2 py-1">
+18 -1
View File
@@ -4,12 +4,29 @@ namespace Lux.UI.Components.Pages
{
public partial class ProdPlanner
{
#region Protected Methods
protected override void OnParametersSet()
{
// preparo sel periodo custom (traduzioni)...
CustomSelDict = Enum.GetValues(typeof(DtUtils.PeriodSet))
.Cast<DtUtils.PeriodSet>()
.ToDictionary(e => e, e => Traduci("periodo_" + e.ToString()));
}
#endregion Protected Methods
#region Private Fields
/// <summary>
/// Periodo selezionato attuale
/// </summary>
private EgwCoreLib.Utils.DtUtils.Periodo PeriodoSel = new EgwCoreLib.Utils.DtUtils.Periodo(EgwCoreLib.Utils.DtUtils.PeriodSet.ThisYear);
private DtUtils.Periodo PeriodoSel = new DtUtils.Periodo(DtUtils.PeriodSet.ThisYear);
/// <summary>
/// Periodo custom selezione valori
/// </summary>
private Dictionary<DtUtils.PeriodSet, string>? CustomSelDict = new();
#endregion Private Fields
+1 -1
View File
@@ -31,7 +31,7 @@
}
else
{
<TemplateList CurrSearchVal="@searchVal" EC_Edit="DoEdit" EC_Selected="DoSelect" SelRecord="@SelRecord"></TemplateList>
<TemplateList CurrSearchVal="@searchVal" EC_Edit="DoEdit" EC_Selected="DoSelect" SelRecord="@SelRecord"></TemplateList>
}
</div>
</div>
@@ -109,6 +109,7 @@ namespace Lux.UI.Components.Pages
private void DoEdit(TemplateModel editrec)
{
EditRecord = editrec;
SelRecord = null;
}
private void ResetSearch()
@@ -20,7 +20,7 @@
</div>
</div>
<div class="col-8">
<PeriodoSel E_PeriodoSel="SetPeriodo" CurrPeriodo="PeriodoSel"></PeriodoSel>
<PeriodoSel E_PeriodoSel="SetPeriodo" CurrPeriodo="PeriodoSel" PeriodoLabel="@Traduci("periodo")" DictSelect="CustomSelDict"></PeriodoSel>
</div>
</div>
</div>
@@ -29,6 +29,14 @@ namespace Lux.UI.Components.Pages
DLService.PipeProd.EA_NewMessage += PipeProd_EA_NewMessage;
}
protected override void OnParametersSet()
{
// preparo sel periodo custom (traduzioni)...
CustomSelDict = Enum.GetValues(typeof(DtUtils.PeriodSet))
.Cast<DtUtils.PeriodSet>()
.ToDictionary(e => e, e => Traduci("periodo_" + e.ToString()));
}
#endregion Protected Methods
#region Private Fields
@@ -69,6 +77,11 @@ namespace Lux.UI.Components.Pages
private BootstrapModal.ModalMode mMode = BootstrapModal.ModalMode.ND;
private Dictionary<bool, string> modalOpt = new Dictionary<bool, string>();
/// <summary>
/// Periodo custom selezione valori
/// </summary>
private Dictionary<DtUtils.PeriodSet, string>? CustomSelDict = new();
#endregion Private Fields
#region Private Properties
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
<Version>1.1.2606.1112</Version>
<Version>1.1.2606.2217</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>LUX - Web Windows MES</i>
<h4>Versione: 1.1.2606.1112</h4>
<h4>Versione: 1.1.2606.2217</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
1.1.2606.1112
1.1.2606.2217
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.1.2606.1112</version>
<version>1.1.2606.2217</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>