From de496d824b95112ea83c40a620e3667071357007 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 23 Jul 2024 08:54:55 +0200 Subject: [PATCH] Update pagina config --- MP.Land/Components/CompareAnagKeyVal.razor | 4 ++-- MP.Land/Components/CompareAnagKeyVal.razor.cs | 4 ++-- MP.Land/Components/CompareConfig.razor | 17 ++++++++++------- MP.Land/Components/CompareConfig.razor.cs | 6 ++++-- MP.Land/Components/CompareVocabolario.razor | 4 ++-- MP.Land/Components/CompareVocabolario.razor.cs | 4 ++-- 6 files changed, 22 insertions(+), 17 deletions(-) diff --git a/MP.Land/Components/CompareAnagKeyVal.razor b/MP.Land/Components/CompareAnagKeyVal.razor index 6f8008ac..d5c5402c 100644 --- a/MP.Land/Components/CompareAnagKeyVal.razor +++ b/MP.Land/Components/CompareAnagKeyVal.razor @@ -24,13 +24,13 @@ - + - + diff --git a/MP.Land/Components/CompareAnagKeyVal.razor.cs b/MP.Land/Components/CompareAnagKeyVal.razor.cs index 8107099b..b77f97a1 100644 --- a/MP.Land/Components/CompareAnagKeyVal.razor.cs +++ b/MP.Land/Components/CompareAnagKeyVal.razor.cs @@ -98,8 +98,8 @@ namespace MP.Land.Components protected async Task LocalUpd(CompAnagKeyVal currItem) { - //if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler aggiungere il record?")) - // return; + if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler aggiungere il record?")) + return; bool fatto = false; if (currItem != null) diff --git a/MP.Land/Components/CompareConfig.razor b/MP.Land/Components/CompareConfig.razor index 39adc9a0..a3a8df58 100644 --- a/MP.Land/Components/CompareConfig.razor +++ b/MP.Land/Components/CompareConfig.razor @@ -24,12 +24,12 @@
RemRemoto Nome Val. Int Val. Float Val. String DescrizioneLocLocale
- + - + @@ -41,11 +41,11 @@ { if (!item.DestExist) { - + } else if (item.SrcExist) { - + } } @@ -59,7 +59,8 @@ } @if (!item.IsEqual && item.DestExist) { -
@item.Dest.Valore
+ string locCss = item.Source.Valore.Equals(item.Dest.Valore) ? "text-secondary" : "text-danger"; +
@item.Dest.Valore
}
RemRemoto Chiave Valore Valore Std NoteLocLocale
@@ -69,7 +70,8 @@ } @if (!item.IsEqual && item.DestExist) { -
@item.Dest.ValoreStd
+ string locCss = item.Source.ValoreStd.Equals(item.Dest.ValoreStd) ? "text-secondary" : "text-danger"; +
@item.Dest.ValoreStd
}
@@ -79,7 +81,8 @@ } @if (!item.IsEqual && item.DestExist) { -
@item.Dest.Note
+ string locCss = item.Source.Note.Equals(item.Dest.Note) ? "text-secondary" : "text-danger"; +
@item.Dest.Note
}
diff --git a/MP.Land/Components/CompareConfig.razor.cs b/MP.Land/Components/CompareConfig.razor.cs index a66a2456..7bdf3f56 100644 --- a/MP.Land/Components/CompareConfig.razor.cs +++ b/MP.Land/Components/CompareConfig.razor.cs @@ -97,12 +97,14 @@ namespace MP.Land.Components protected async Task LocalUpd(CompConfig currItem) { - //if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler aggiungere il record?")) - // return; + if (!await JSRuntime.InvokeAsync("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) diff --git a/MP.Land/Components/CompareVocabolario.razor b/MP.Land/Components/CompareVocabolario.razor index dc76d06d..e0927cf8 100644 --- a/MP.Land/Components/CompareVocabolario.razor +++ b/MP.Land/Components/CompareVocabolario.razor @@ -24,10 +24,10 @@ - + - + diff --git a/MP.Land/Components/CompareVocabolario.razor.cs b/MP.Land/Components/CompareVocabolario.razor.cs index 045769fa..180c2c23 100644 --- a/MP.Land/Components/CompareVocabolario.razor.cs +++ b/MP.Land/Components/CompareVocabolario.razor.cs @@ -95,8 +95,8 @@ namespace MP.Land.Components protected async Task LocalUpd(CompVocabolario currItem) { - //if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler aggiungere il record?")) - // return; + if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler aggiungere il record?")) + return; bool fatto = false; if (currItem != null)
RemRemoto Termine TraduzioneLocLocale