Update pagina config

This commit is contained in:
Samuele Locatelli
2024-07-23 08:54:55 +02:00
parent 57ac22d400
commit de496d824b
6 changed files with 22 additions and 17 deletions
+2 -2
View File
@@ -24,13 +24,13 @@
<table class="table table-striped table-sm text-start">
<thead>
<tr class="">
<th>Rem</th>
<th>Remoto</th>
<th class="text-nowrap">Nome</th>
<th class="text-nowrap">Val. Int</th>
<th class="text-nowrap">Val. Float</th>
<th class="text-nowrap">Val. String</th>
<th class="text-nowrap">Descrizione</th>
<th class="text-nowrap">Loc</th>
<th class="text-nowrap">Locale</th>
</tr>
</thead>
<tbody>
@@ -98,8 +98,8 @@ namespace MP.Land.Components
protected async Task LocalUpd(CompAnagKeyVal currItem)
{
//if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler aggiungere il record?"))
// return;
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler aggiungere il record?"))
return;
bool fatto = false;
if (currItem != null)
+10 -7
View File
@@ -24,12 +24,12 @@
<table class="table table-striped table-sm text-start">
<thead>
<tr class="">
<th>Rem</th>
<th>Remoto</th>
<th class="text-nowrap">Chiave</th>
<th class="text-nowrap">Valore</th>
<th class="text-nowrap">Valore Std</th>
<th class="text-nowrap">Note</th>
<th class="text-nowrap">Loc</th>
<th class="text-nowrap">Locale</th>
</tr>
</thead>
<tbody>
@@ -41,11 +41,11 @@
{
if (!item.DestExist)
{
<button class="btn w-100 btn-success btn-sm py-0" @onclick="() => LocalAdd(item)">Add</button>
<button class="btn w-100 btn-success btn-sm py-0" @onclick="() => LocalAdd(item)" title="Aggiunta record std">Add</button>
}
else if (item.SrcExist)
{
<button class="btn w-100 btn-primary btn-sm py-0" @onclick="() => LocalUpd(item)">Mod</button>
<button class="btn w-100 btn-primary btn-sm py-0" @onclick="() => LocalUpd(item)" title="Aggiorna ValoreStd e Note">Mod</button>
}
}
</td>
@@ -59,7 +59,8 @@
}
@if (!item.IsEqual && item.DestExist)
{
<div class="text-secondary textTrim max10Char" title="@item.Dest.Valore">@item.Dest.Valore</div>
string locCss = item.Source.Valore.Equals(item.Dest.Valore) ? "text-secondary" : "text-danger";
<div class="@locCss textTrim max10Char" title="@item.Dest.Valore">@item.Dest.Valore</div>
}
</td>
<td>
@@ -69,7 +70,8 @@
}
@if (!item.IsEqual && item.DestExist)
{
<div class="text-secondary textTrim max10Char" title="@item.Dest.ValoreStd">@item.Dest.ValoreStd</div>
string locCss = item.Source.ValoreStd.Equals(item.Dest.ValoreStd) ? "text-secondary" : "text-danger";
<div class="@locCss textTrim max10Char" title="@item.Dest.ValoreStd">@item.Dest.ValoreStd</div>
}
</td>
<td>
@@ -79,7 +81,8 @@
}
@if (!item.IsEqual && item.DestExist)
{
<div class="text-secondary">@item.Dest.Note</div>
string locCss = item.Source.Note.Equals(item.Dest.Note) ? "text-secondary" : "text-danger";
<div class="@locCss">@item.Dest.Note</div>
}
</td>
<td>
+4 -2
View File
@@ -97,12 +97,14 @@ namespace MP.Land.Components
protected async Task LocalUpd(CompConfig currItem)
{
//if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler aggiungere il record?"))
// return;
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler aggiungere il record?"))
return;
bool fatto = false;
if (currItem != null)
{
// attenzione: preservo il valore LOCALE
currItem.Source.Valore = currItem.Dest.Valore;
fatto = await DataService.ConfigUpd(currItem.Source);
}
if (fatto)
+2 -2
View File
@@ -24,10 +24,10 @@
<table class="table table-striped table-sm text-start">
<thead>
<tr class="">
<th>Rem</th>
<th>Remoto</th>
<th class="text-nowrap">Termine</th>
<th class="text-nowrap">Traduzione</th>
<th class="text-nowrap">Loc</th>
<th class="text-nowrap">Locale</th>
</tr>
</thead>
<tbody>
@@ -95,8 +95,8 @@ namespace MP.Land.Components
protected async Task LocalUpd(CompVocabolario currItem)
{
//if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler aggiungere il record?"))
// return;
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Sicuro di voler aggiungere il record?"))
return;
bool fatto = false;
if (currItem != null)