diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index db9cb010..bccf0fb7 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2606.0416 + 1.1.2606.0817 diff --git a/Lux.UI/Components/Compo/Admin/VocabMan.razor.cs b/Lux.UI/Components/Compo/Admin/VocabMan.razor.cs index 09c3c226..e51d4c6a 100644 --- a/Lux.UI/Components/Compo/Admin/VocabMan.razor.cs +++ b/Lux.UI/Components/Compo/Admin/VocabMan.razor.cs @@ -85,7 +85,9 @@ namespace Lux.UI.Components.Compo.Admin private async Task DoFixMissing() { if (!string.IsNullOrEmpty(SelLingua)) + { await EC_ReqFixMissing.InvokeAsync(SelLingua); + } } private async Task DoSave() diff --git a/Lux.UI/Components/Pages/Vocabulary.razor b/Lux.UI/Components/Pages/Vocabulary.razor index 094eb81d..0bdfe3f6 100644 --- a/Lux.UI/Components/Pages/Vocabulary.razor +++ b/Lux.UI/Components/Pages/Vocabulary.razor @@ -41,10 +41,10 @@ {
- +
- +
} diff --git a/Lux.UI/Components/Pages/Vocabulary.razor.cs b/Lux.UI/Components/Pages/Vocabulary.razor.cs index 59fddd0f..b56ac330 100644 --- a/Lux.UI/Components/Pages/Vocabulary.razor.cs +++ b/Lux.UI/Components/Pages/Vocabulary.razor.cs @@ -120,5 +120,58 @@ namespace Lux.UI.Components.Pages private Dictionary modalOpt = new Dictionary(); #endregion Private Methods + /// + /// Aggiunge i missing agli altri vocabolari + /// + /// + /// + private async Task DoFixMissing(string srcLang) + { + mTitle = "Attenzione"; + mMessage = $"Confermi di voler inserire i valori mancanti negli altri dizionari di lingua?\n" + + $"Sorgente: {srcLang}"; + mMode = BootstrapModal.ModalMode.Confirm; + modalOpt = new(); + modalOpt.Add(true, "Si"); + modalOpt.Add(false, "No"); + if (!await Modal!.ShowAsync()) + return; + + // FixMe: fare davero + List listOther = new List() { "EN" }; + List rec2ins = new(); + // prendo l'elenco lingua src... FIX IT + var listSrc = FullVocab.Where(x => x.Lingua == srcLang).ToList(); + + // prendo elenco altre lingue + foreach (var otherLang in listOther) + { + var listDest = FullVocab.Where(x => x.Lingua == otherLang).ToList(); + + // hastSet lemmi presenti + var destLemmas = new HashSet(listDest.Select(x => x.Lemma)); + + var missing = listSrc + .Where(x => !destLemmas.Contains(x.Lemma)) + .ToList(); + + var projected = missing + .Select(x => new VocabolarioModel + { + Lemma = x.Lemma, + Lingua = otherLang, + Traduzione = x.Traduzione + }) + .ToList(); + + // aggiungo a lista! + rec2ins.AddRange(projected); + } + + // ora chiamo update many + await VService.UpsertManyAsync(rec2ins); + // rileggo + await ReloadDataAsync(); + } } } \ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 9b6366bd..a9a1ce85 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 1.1.2606.0416 + 1.1.2606.0817 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 2b72e73e..501b9ee4 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 1.1.2606.0416

+

Versione: 1.1.2606.0817


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 9f5f7a85..d6adb478 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2606.0416 +1.1.2606.0817 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 2bdc13cb..beae1411 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2606.0416 + 1.1.2606.0817 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false