From 5bcc32023a905a19471be7789b45f699974c5e46 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Mon, 10 Oct 2022 17:55:53 +0200 Subject: [PATCH 01/17] fix plot --- MP.SPEC/Components/ListODL.razor | 72 ++++++++++++++++++----------- MP.SPEC/Components/ListODL.razor.cs | 30 +++++------- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 6 +-- MP.SPEC/Resources/manifest.xml | 2 +- 6 files changed, 60 insertions(+), 54 deletions(-) diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index 08e70a35..f540c4cf 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -98,43 +98,46 @@ else {

ODL @currRecord.IdxOdl

-
+
- +
- - - - - - - - - - - - - -
Articolo Descrizione Art. Fase Note
@currRecord.CodArticolo@currRecord.ArticoloNav.DescArticolo@currRecord.KeyRichiesta@currRecord.Note
-
-
- - - - - + - - + + + + +
Macchina Info macchina Info ciclo Periodo
@currRecord.IdxMacchina@currRecord.MachineNav.CodMacchina + @record.CodArticolo +
@record.ArticoloNav.DescArticolo
+
+
+ @tradFase(record.KeyRichiesta) +
+ @if (record.Note != "") + { +
+ @record.Note +
+ } +
+ @record.IdxMacchina +
@record.MachineNav.Descrizione
+
+
N° pezzi: @record.NumPezzi
+
T. Ciclo: @record.Tcassegnato.ToString("N3")
+ +
@@ -165,8 +168,23 @@ else
-
-
+
+ @if (currRecord != null) + { + + @if (ListOdlStats != null) + { +
    + @foreach (var statRecord in ListOdlStats) + { +
  • @statRecord.Descrizione - @($"{statRecord.TotDurata.ToString().Substring(0, 2)}%")
  • + } +
+ } + } +
+
+
diff --git a/MP.SPEC/Components/ListODL.razor.cs b/MP.SPEC/Components/ListODL.razor.cs index f1c3a419..5edb4645 100644 --- a/MP.SPEC/Components/ListODL.razor.cs +++ b/MP.SPEC/Components/ListODL.razor.cs @@ -181,26 +181,18 @@ namespace MP.SPEC.Components } return answ; } - private double[] addODLData() - { - var eleStats = ListOdlStats.Where(x => x.IdxStato == currRecord.IdxOdl).ToList(); - foreach (var item in eleStats) - { - - ListOdlStatsData.Add(item.TotDurata); - } - return ListOdlStatsData.ToArray(); - } - private string[] addODLLabels() - { - var eleStats = ListOdlStats.Where(x => x.IdxStato == currRecord.IdxOdl).ToList(); - foreach (var item in eleStats) - { - ListOdlStatsLabels.Add(item.Descrizione); - } - return ListOdlStatsLabels.ToArray(); - } + //private string calcolaPerc(double durata) + //{ + // string answ = ""; + + // double tot = 0; + + // foreach + + // double perc = (durata/(double)currRecord.DurataMinuti)*100; + //} + #endregion Private Methods } } \ No newline at end of file diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 56f475a3..1b081b1f 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.1016 + 6.16.2210.1017 diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 5be76064..8e7e3686 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2210.1016

+

Versione: 6.16.2210.1017


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 81eaf43f..83cba27c 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1,5 +1 @@ -<<<<<<< HEAD -6.16.2210.1016 -======= -6.16.2210.1011 ->>>>>>> 91174a2f6752f9d3cf06484367ebf4b92a2b8d69 +6.16.2210.1017 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index a0442336..a5e4fb84 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.1016 + 6.16.2210.1017 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false From 16278b6ae02175cf231e13419b8ead19b3cf1f9f Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 11 Oct 2022 13:03:56 +0200 Subject: [PATCH 02/17] pescaggio e clonazione flusso scelto --- MP.Data/DTO/DossierFluxLogDTO.cs | 2 + MP.SPEC/Components/ListDossiers.razor | 12 +++- MP.SPEC/Components/ListDossiers.razor.cs | 18 ++++++ MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/DOSS.razor | 74 ++++++++++++++++++++---- MP.SPEC/Pages/DOSS.razor.cs | 22 ++++++- MP.SPEC/Pages/PODL.razor | 2 +- MP.SPEC/Pages/_Layout.cshtml | 22 +++---- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 11 files changed, 129 insertions(+), 31 deletions(-) diff --git a/MP.Data/DTO/DossierFluxLogDTO.cs b/MP.Data/DTO/DossierFluxLogDTO.cs index 67cecb73..c7f389cd 100644 --- a/MP.Data/DTO/DossierFluxLogDTO.cs +++ b/MP.Data/DTO/DossierFluxLogDTO.cs @@ -14,5 +14,7 @@ namespace MP.Data.DTO public class DossierFluxLogDTO { public List ODL { get; set; } = new List(); + + public List OdlClone { get; set; } = new List(); } } diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 3fe9e652..57d1918a 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -53,10 +53,11 @@ else @record.IdxODL @* - @record.DataType - *@ + @record.DataType + *@ - + + } @@ -74,6 +75,7 @@ else + @@ -84,6 +86,7 @@ else @foreach (var record in listaFlux) { + @@ -98,6 +101,7 @@ else } +
    Macchina Data Data Type
    @record.IdxMacchina
@@ -110,3 +114,5 @@ else + + diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index fdb5c4e4..d9cae22c 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; using MP.Data.DatabaseModels; +using MP.Data.DTO; using MP.SPEC.Data; namespace MP.SPEC.Components @@ -11,6 +12,8 @@ namespace MP.SPEC.Components [Parameter] public EventCallback RecordSel { get; set; } + [Parameter] + public EventCallback RecordSelFlux { get; set; } [Parameter] public SelectDossierParams SelFilter { get; set; } = null!; @@ -69,6 +72,19 @@ namespace MP.SPEC.Components await reloadData(true); await Task.Delay(1); } + protected async Task cloneRecord(FluxLog selRec) + { + // creo record duplicato... + FluxLog newRec = new FluxLog() + { + IdxMacchina = selRec.IdxMacchina, + dtEvento = selRec.dtEvento, + CodFlux = $"DUPLICATED - {selRec.CodFlux}", + Valore = selRec.Valore + }; + currRecordFlux = selRec; + await RecordSelFlux.InvokeAsync(newRec); + } protected override async Task OnInitializedAsync() { @@ -117,6 +133,8 @@ namespace MP.SPEC.Components private List? ListRecords; + private FluxLog? currRecordFlux; + private List? ListStati; private List? SearchRecords; diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 1b081b1f..4849ba4e 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.1017 + 6.16.2210.1112 diff --git a/MP.SPEC/Pages/DOSS.razor b/MP.SPEC/Pages/DOSS.razor index 9c17c17b..5e83e819 100644 --- a/MP.SPEC/Pages/DOSS.razor +++ b/MP.SPEC/Pages/DOSS.razor @@ -14,25 +14,79 @@ } else { - + }
- @if (isLoading) + @if (currRecord != null) { - - } - else - { - +
+
+
+
Modifica Parametro
+
+
+
+
+ MACCHINA + +
+
+
+
+ DATA + +
+
+
+
+ DATA TYPE + +
+
+
+
+ VALORE + +
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
}
- + @if (isLoading) + { + + } + else + { + + } + + diff --git a/MP.SPEC/Pages/DOSS.razor.cs b/MP.SPEC/Pages/DOSS.razor.cs index 65c77aa6..2960b0b1 100644 --- a/MP.SPEC/Pages/DOSS.razor.cs +++ b/MP.SPEC/Pages/DOSS.razor.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Components; +using MP.Data.DatabaseModels; using MP.SPEC.Components; using MP.SPEC.Data; @@ -31,7 +32,20 @@ namespace MP.SPEC.Pages currPage = newNum; StateHasChanged(); } - + private FluxLog? _currRecord = null; + private FluxLog? currRecord + { + get => _currRecord; + set + { + _currRecord = value; + } + } + protected async Task cancel() + { + currRecord = null; + await Task.Delay(1); + } protected override async Task OnInitializedAsync() { isLoading = true; @@ -47,7 +61,11 @@ namespace MP.SPEC.Pages await Task.Delay(1); isFiltering = false; } - + protected async Task selRecordFlux(FluxLog selRec) + { + currRecord = selRec; + await Task.Delay(1); + } protected void updateTotal(int newTotCount) { totalCount = newTotCount; diff --git a/MP.SPEC/Pages/PODL.razor b/MP.SPEC/Pages/PODL.razor index a890faa2..884921cd 100644 --- a/MP.SPEC/Pages/PODL.razor +++ b/MP.SPEC/Pages/PODL.razor @@ -148,7 +148,7 @@
Attivabile
-
+
diff --git a/MP.SPEC/Pages/_Layout.cshtml b/MP.SPEC/Pages/_Layout.cshtml index 4b0f428f..e1d1070d 100644 --- a/MP.SPEC/Pages/_Layout.cshtml +++ b/MP.SPEC/Pages/_Layout.cshtml @@ -44,19 +44,19 @@ retryIntervalMilliseconds: 2000 } }).then(() => { - Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', { - get() { - return this.__reconnectionDisplay; - }, - set(value) { - this.__reconnectionDisplay = { - show: () => value.show(), - update: (d) => value.update(d), - rejected: (d) => document.location.reload() - } + Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', { + get() { + return this.__reconnectionDisplay; + }, + set(value) { + this.__reconnectionDisplay = { + show: () => value.show(), + update: (d) => value.update(d), + rejected: (d) => document.location.reload() } - }); + } }); + }); diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 8e7e3686..98e38e02 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2210.1017

+

Versione: 6.16.2210.1112


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 83cba27c..c649beb4 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.1017 +6.16.2210.1112 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index a5e4fb84..ae05905c 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.1017 + 6.16.2210.1112 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false From d108b74f7ddc60810eeff1d3e4b5145c5882c184 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 11 Oct 2022 16:52:11 +0200 Subject: [PATCH 03/17] test grafico x valori modificati --- MP.SPEC/Components/ListDossiers.razor | 6 +++++- MP.SPEC/Components/ListDossiers.razor.cs | 20 ++++++++++++++++++-- MP.SPEC/Data/MpDataService.cs | 2 +- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/DOSS.razor.cs | 12 ++++++++++++ MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 8 files changed, 40 insertions(+), 8 deletions(-) diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 57d1918a..33f7fc74 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -98,10 +98,14 @@ else @record.Valore + @if (ListRecordsMod != null) + { +
    @findRec(record)
    + + } } - diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index d9cae22c..33268dc6 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -79,13 +79,27 @@ namespace MP.SPEC.Components { IdxMacchina = selRec.IdxMacchina, dtEvento = selRec.dtEvento, - CodFlux = $"DUPLICATED - {selRec.CodFlux}", - Valore = selRec.Valore + CodFlux = selRec.CodFlux, + Valore = $"{selRec.Valore} - OLD" }; currRecordFlux = selRec; + if (selRec != null) + { + ListRecordsMod.Add(newRec); + } await RecordSelFlux.InvokeAsync(newRec); } + protected string findRec(FluxLog record) + { + string answ = ""; + if (ListRecordsMod != null) + { + answ = ListRecordsMod.Where(l => l.IdxMacchina == record.IdxMacchina && l.CodFlux == record.CodFlux).Select(x => x.Valore).SingleOrDefault(); + } + return answ; + } + protected override async Task OnInitializedAsync() { MessageService.EA_PageUpdated += MessageService_EA_PageUpdated; @@ -133,6 +147,8 @@ namespace MP.SPEC.Components private List? ListRecords; + private List? ListRecordsMod { get; set; } = new List(); + private FluxLog? currRecordFlux; private List? ListStati; diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index 76c82b81..1ec656dd 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -283,7 +283,7 @@ namespace MP.SPEC.Data if (result.ODL != null) { answ = result - .ODL + .ODL .OrderBy(x => x.CodFlux) .ToList(); } diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 4849ba4e..751c18b4 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.1112 + 6.16.2210.1116 diff --git a/MP.SPEC/Pages/DOSS.razor.cs b/MP.SPEC/Pages/DOSS.razor.cs index 2960b0b1..53001b1e 100644 --- a/MP.SPEC/Pages/DOSS.razor.cs +++ b/MP.SPEC/Pages/DOSS.razor.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; using MP.Data.DatabaseModels; using MP.SPEC.Components; using MP.SPEC.Data; @@ -46,6 +47,17 @@ namespace MP.SPEC.Pages currRecord = null; await Task.Delay(1); } + //protected async Task update(FluxLog selRec) + //{ + // //if (!await JSRuntime.InvokeAsync("confirm", "Confermi di voler salvare le modifiche?")) + // // return; + // await Task.Delay(1); + // var done = await MDService.POdlUpdateRecord(selRec); + // await callSyncDb(selRec); + // currRecord = null; + // await reloadData(); + // await Task.Delay(1); + //} protected override async Task OnInitializedAsync() { isLoading = true; diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 98e38e02..8888c982 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

    Versione: 6.16.2210.1112

    +

    Versione: 6.16.2210.1116


    Note di rilascio:
    • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index c649beb4..22b4ea8e 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.1112 +6.16.2210.1116 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index ae05905c..a1c2e1ad 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.1112 + 6.16.2210.1116 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false From 7f3a73ba0e6fc730f7e5b5a3243c56c438856cca Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 11 Oct 2022 17:34:02 +0200 Subject: [PATCH 04/17] bozza Metodo Update --- MP.SPEC/Pages/DOSS.razor | 10 +++++----- MP.SPEC/Pages/DOSS.razor.cs | 25 ++++++++++++++----------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/MP.SPEC/Pages/DOSS.razor b/MP.SPEC/Pages/DOSS.razor index 5e83e819..b11873af 100644 --- a/MP.SPEC/Pages/DOSS.razor +++ b/MP.SPEC/Pages/DOSS.razor @@ -32,25 +32,25 @@
      MACCHINA - +
      DATA - +
      DATA TYPE - +
      VALORE - +
      @@ -66,7 +66,7 @@
      - +
      diff --git a/MP.SPEC/Pages/DOSS.razor.cs b/MP.SPEC/Pages/DOSS.razor.cs index 53001b1e..b9555b5f 100644 --- a/MP.SPEC/Pages/DOSS.razor.cs +++ b/MP.SPEC/Pages/DOSS.razor.cs @@ -47,17 +47,20 @@ namespace MP.SPEC.Pages currRecord = null; await Task.Delay(1); } - //protected async Task update(FluxLog selRec) - //{ - // //if (!await JSRuntime.InvokeAsync("confirm", "Confermi di voler salvare le modifiche?")) - // // return; - // await Task.Delay(1); - // var done = await MDService.POdlUpdateRecord(selRec); - // await callSyncDb(selRec); - // currRecord = null; - // await reloadData(); - // await Task.Delay(1); - //} + protected async Task update(FluxLog selRec) + { + //if (!await JSRuntime.InvokeAsync("confirm", "Confermi di voler salvare le modifiche?")) + // return; + await Task.Delay(1); + //METODO PER UPDATE FLUX +#if false + var done = await + await callSyncDb(selRec); + currRecord = null; +# endif + + await Task.Delay(1); + } protected override async Task OnInitializedAsync() { isLoading = true; From a4810826f85ef9873bcbf2b9e2934a952fb964ae Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 11 Oct 2022 20:56:51 +0200 Subject: [PATCH 05/17] Aggiunta metodo x copiare ODL in SEND + trad valori --- MP.Data/DTO/DossierFluxLogDTO.cs | 2 +- MP.SPEC/Components/ListDossiers.razor.cs | 2 +- MP.SPEC/Data/MpDataService.cs | 29 ++++++++++++++++++++++-- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 7 files changed, 33 insertions(+), 8 deletions(-) diff --git a/MP.Data/DTO/DossierFluxLogDTO.cs b/MP.Data/DTO/DossierFluxLogDTO.cs index c7f389cd..8476b851 100644 --- a/MP.Data/DTO/DossierFluxLogDTO.cs +++ b/MP.Data/DTO/DossierFluxLogDTO.cs @@ -15,6 +15,6 @@ namespace MP.Data.DTO { public List ODL { get; set; } = new List(); - public List OdlClone { get; set; } = new List(); + public List SEND { get; set; } = new List(); } } diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index 33268dc6..64c5d3a9 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -127,7 +127,7 @@ namespace MP.SPEC.Components { currRecord = selRec; await RecordSel.InvokeAsync(selRec); - listaFlux = MDService.convertToFluxLog(selRec.Valore); + listaFlux = MDService.getOrigToFluxLog(selRec.Valore); await toggleTableFlux(); } diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index 1ec656dd..4f3b41d7 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -274,7 +274,7 @@ namespace MP.SPEC.Data return await Task.FromResult(dbController.ConfigUpdate(updRec)); } - public List convertToFluxLog(string Valore) + public List getOrigToFluxLog(string Valore) { List answ = new List(); DossierFluxLogDTO? result = JsonConvert.DeserializeObject(Valore); @@ -283,7 +283,32 @@ namespace MP.SPEC.Data if (result.ODL != null) { answ = result - .ODL + .ODL + .OrderBy(x => x.CodFlux) + .ToList(); + } + } + return answ; + } + public List getSendFluxLog(string Valore) + { + List answ = new List(); + DossierFluxLogDTO? result = JsonConvert.DeserializeObject(Valore); + if (result != null) + { + // se NON avessi SEND --> duplico da ODL... + if (result.SEND == null) + { + result.SEND = new List(); + foreach (var item in result.ODL) + { + result.SEND.Add(item); + } + } + if (result.SEND != null) + { + answ = result + .SEND .OrderBy(x => x.CodFlux) .ToList(); } diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 751c18b4..1df9cac6 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.1116 + 6.16.2210.1120 diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 8888c982..ad5b535b 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

      Versione: 6.16.2210.1116

      +

      Versione: 6.16.2210.1120


      Note di rilascio:
      • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 22b4ea8e..0eb0f716 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.1116 +6.16.2210.1120 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index a1c2e1ad..d7f0f040 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.1116 + 6.16.2210.1120 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false From d5f5cf9b11651fcd8fbf37beaca2d3ce6d7f1954 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 12 Oct 2022 06:20:54 +0200 Subject: [PATCH 06/17] FluxLogDTO: - Update modello dati x gestione nuovo DTO - bozza udpatre DB e servizio --- MP.Data/Controllers/MpSpecController.cs | 37 +++++++++++ MP.Data/DTO/DossierFluxLogDTO.cs | 6 +- MP.Data/DTO/FluxLogDTO.cs | 23 +++++++ MP.SPEC/Components/ListDossiers.razor | 12 ++-- MP.SPEC/Components/ListDossiers.razor.cs | 33 ++++------ MP.SPEC/Data/MpDataService.cs | 46 ++++++++------ MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/DOSS.razor | 14 ++--- MP.SPEC/Pages/DOSS.razor.cs | 79 +++++++++++++++--------- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 12 files changed, 169 insertions(+), 89 deletions(-) create mode 100644 MP.Data/DTO/FluxLogDTO.cs diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs index f5cc5192..1eddded3 100644 --- a/MP.Data/Controllers/MpSpecController.cs +++ b/MP.Data/Controllers/MpSpecController.cs @@ -403,6 +403,43 @@ namespace MP.Data.Controllers return answ; } + /// + /// Update ddel campo VALORE di un dossier (che contiene json flux log serializzati) + /// + /// record dossier da modificare + /// + public async Task DossiersUpdateValore(Dossiers editRec) + { + bool fatto = false; + using (var dbCtx = new MoonProContext(_configuration)) + { + try + { + var currRec = dbCtx + .DbSetDossiers + .Where(x => x.IdxDossier == editRec.IdxDossier) + .FirstOrDefault(); + if (currRec != null) + { + currRec.Valore= editRec.Valore; + dbCtx.Entry(currRec).State = EntityState.Modified; + } + else + { + dbCtx + .DbSetDossiers + .Add(editRec); + } + await dbCtx.SaveChangesAsync(); + fatto = true; + } + catch (Exception exc) + { + Log.Error($"Eccezione durante DossiersUpdateRecord{Environment.NewLine}{exc}"); + } + } + return fatto; + } /// /// Elenco valori link (x home e navMenu laterale) /// diff --git a/MP.Data/DTO/DossierFluxLogDTO.cs b/MP.Data/DTO/DossierFluxLogDTO.cs index 8476b851..ed804309 100644 --- a/MP.Data/DTO/DossierFluxLogDTO.cs +++ b/MP.Data/DTO/DossierFluxLogDTO.cs @@ -13,8 +13,10 @@ namespace MP.Data.DTO { public class DossierFluxLogDTO { - public List ODL { get; set; } = new List(); + /// + /// Elenco valori FluxLogDTO serializzato (compreso valori edit) + /// + public List ODL { get; set; } = new List(); - public List SEND { get; set; } = new List(); } } diff --git a/MP.Data/DTO/FluxLogDTO.cs b/MP.Data/DTO/FluxLogDTO.cs new file mode 100644 index 00000000..b36a12bb --- /dev/null +++ b/MP.Data/DTO/FluxLogDTO.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MP.Data.DTO +{ + public class FluxLogDTO + { + public string IdxMacchina { get; set; } + + public DateTime dtEvento { get; set; } + + public string CodFlux { get; set; } + + public string Valore { get; set; } + + public string ValoreEdit { get; set; } + + } +} diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 33f7fc74..6c05ad1b 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -86,7 +86,9 @@ else @foreach (var record in listaFlux) { - + + + @record.IdxMacchina @@ -97,12 +99,12 @@ else @record.CodFlux - @record.Valore - @if (ListRecordsMod != null) +
        @record.Valore
        +
        @record.Valore
        + @*@if (ListRecordsMod != null) {
        @findRec(record)
        - - } + }*@ } diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index 64c5d3a9..a5f3f6e0 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -13,7 +13,7 @@ namespace MP.SPEC.Components [Parameter] public EventCallback RecordSel { get; set; } [Parameter] - public EventCallback RecordSelFlux { get; set; } + public EventCallback RecordSelFlux { get; set; } [Parameter] public SelectDossierParams SelFilter { get; set; } = null!; @@ -72,31 +72,22 @@ namespace MP.SPEC.Components await reloadData(true); await Task.Delay(1); } - protected async Task cloneRecord(FluxLog selRec) + protected async Task editRecord(FluxLogDTO selRec) { - // creo record duplicato... - FluxLog newRec = new FluxLog() - { - IdxMacchina = selRec.IdxMacchina, - dtEvento = selRec.dtEvento, - CodFlux = selRec.CodFlux, - Valore = $"{selRec.Valore} - OLD" - }; - currRecordFlux = selRec; - if (selRec != null) - { - ListRecordsMod.Add(newRec); - } - await RecordSelFlux.InvokeAsync(newRec); + + // indico record selezionato + await RecordSelFlux.InvokeAsync(selRec); } protected string findRec(FluxLog record) { string answ = ""; +#if false if (ListRecordsMod != null) { answ = ListRecordsMod.Where(l => l.IdxMacchina == record.IdxMacchina && l.CodFlux == record.CodFlux).Select(x => x.Valore).SingleOrDefault(); - } + } +#endif return answ; } @@ -127,7 +118,7 @@ namespace MP.SPEC.Components { currRecord = selRec; await RecordSel.InvokeAsync(selRec); - listaFlux = MDService.getOrigToFluxLog(selRec.Valore); + listaFlux = MDService.getFluxLog(selRec.Valore); await toggleTableFlux(); } @@ -147,9 +138,7 @@ namespace MP.SPEC.Components private List? ListRecords; - private List? ListRecordsMod { get; set; } = new List(); - - private FluxLog? currRecordFlux; + private FluxLogDTO? currRecordFlux; private List? ListStati; @@ -167,7 +156,7 @@ namespace MP.SPEC.Components private bool isLoading { get; set; } = false; - private List? listaFlux { get; set; } = null; + private List? listaFlux { get; set; } = null; private int MaxRecord { diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index 4f3b41d7..f09d8334 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -274,9 +274,9 @@ namespace MP.SPEC.Data return await Task.FromResult(dbController.ConfigUpdate(updRec)); } - public List getOrigToFluxLog(string Valore) + public List getFluxLog(string Valore) { - List answ = new List(); + List answ = new List(); DossierFluxLogDTO? result = JsonConvert.DeserializeObject(Valore); if (result != null) { @@ -286,33 +286,39 @@ namespace MP.SPEC.Data .ODL .OrderBy(x => x.CodFlux) .ToList(); + // inizializzo SE necessario + foreach (var item in answ) + { + item.ValoreEdit = String.IsNullOrEmpty(item.ValoreEdit) ? item.Valore : item.ValoreEdit; + } } } return answ; } - public List getSendFluxLog(string Valore) + + public async Task updateDossierValue(Dossiers currDoss, FluxLogDTO editFL) { - List answ = new List(); - DossierFluxLogDTO? result = JsonConvert.DeserializeObject(Valore); - if (result != null) + bool answ = false; + // recupero intero set valori dossier deserializzando... + var fluxLogList = getFluxLog(currDoss.Valore); + await Task.Delay(1); + + // se tutto ok + if (fluxLogList != null) { - // se NON avessi SEND --> duplico da ODL... - if (result.SEND == null) + // aggiorno recordo corrente + var currRec = fluxLogList.FirstOrDefault(x => x.CodFlux == editFL.CodFlux && x.dtEvento == editFL.dtEvento); + if (currRec != null) { - result.SEND = new List(); - foreach (var item in result.ODL) - { - result.SEND.Add(item); - } - } - if (result.SEND != null) - { - answ = result - .SEND - .OrderBy(x => x.CodFlux) - .ToList(); + currRec = editFL; } + // serializzo nuovamente valore + string rawVal = JsonConvert.SerializeObject(fluxLogList); + currDoss.Valore = rawVal; + // aggiorno record sul DB + await dbController.DossiersUpdateValore(currDoss); } + return answ; } diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 1df9cac6..bdfe044b 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.1120 + 6.16.2210.1206 diff --git a/MP.SPEC/Pages/DOSS.razor b/MP.SPEC/Pages/DOSS.razor index b11873af..8fba837a 100644 --- a/MP.SPEC/Pages/DOSS.razor +++ b/MP.SPEC/Pages/DOSS.razor @@ -21,7 +21,7 @@
        - @if (currRecord != null) + @if (currDetFluxLogRecord != null) {
        @@ -32,25 +32,25 @@
        MACCHINA - +
        DATA - +
        DATA TYPE - +
        VALORE - +
        @@ -66,7 +66,7 @@
        - +
        @@ -82,7 +82,7 @@ } else { - + } diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index afc8d3f7..196b7af4 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

        Versione: 6.16.2210.1206

        +

        Versione: 6.16.2210.1210


        Note di rilascio:
        • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index eb9b1182..5c9a452b 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.1206 +6.16.2210.1210 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 7a1c0a7e..ea4be891 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.1206 + 6.16.2210.1210 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false From 330e20886686c0465ef3b2321c5a14139370d32e Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Wed, 12 Oct 2022 15:27:10 +0200 Subject: [PATCH 09/17] Minor fix --- MP.SPEC/Components/ListDossiers.razor | 4 ++-- MP.SPEC/Components/ListDossiers.razor.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 165d0493..75a19797 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -81,7 +81,7 @@ else Data Type
          - Valore + Valore
          @@ -104,7 +104,7 @@ else @record.CodFlux - +
          Modificato: @record.ValoreEdit
          Originale: @record.Valore
          @*@if (ListRecordsMod != null) diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index a5f3f6e0..903e5c0a 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -70,6 +70,7 @@ namespace MP.SPEC.Components var done = await MDService.DossiersDeleteRecord(selRec); currRecord = null; await reloadData(true); + visualizzaFlux = true; await Task.Delay(1); } protected async Task editRecord(FluxLogDTO selRec) From fba6eca9cc0ee1c05172aa39b091dc13c3295720 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 13 Oct 2022 09:30:43 +0200 Subject: [PATCH 10/17] Minor fix --- MP.SPEC/Components/ListDossiers.razor | 4 ---- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/DOSS.razor.cs | 1 + MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 75a19797..34db3df1 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -107,10 +107,6 @@ else
          Modificato: @record.ValoreEdit
          Originale: @record.Valore
          - @*@if (ListRecordsMod != null) - { -
          @findRec(record)
          - }*@ } diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 01230682..5987cfad 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.1210 + 6.16.2210.1309 diff --git a/MP.SPEC/Pages/DOSS.razor.cs b/MP.SPEC/Pages/DOSS.razor.cs index 49084ce7..4cc91662 100644 --- a/MP.SPEC/Pages/DOSS.razor.cs +++ b/MP.SPEC/Pages/DOSS.razor.cs @@ -86,6 +86,7 @@ namespace MP.SPEC.Pages // METODO PER UPDATE FLUX await MDService.updateDossierValue(currRecordDoss, selRec); } + currDetFluxLogRecord = null; await Task.Delay(1); } diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 196b7af4..90867b8e 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

          Versione: 6.16.2210.1210

          +

          Versione: 6.16.2210.1309


          Note di rilascio:
          • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 5c9a452b..532c5790 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.1210 +6.16.2210.1309 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index ea4be891..a76b4680 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.1210 + 6.16.2210.1309 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false From 6c88e2687a2ada6d059d68423f5daeb89d64a809 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 14 Oct 2022 12:39:43 +0200 Subject: [PATCH 11/17] fix plot odl + modifiche grafiche --- MP.SPEC/Components/Chart/Doughnut.razor.cs | 14 +- MP.SPEC/Components/ListODL.razor | 231 +++++++++++---------- MP.SPEC/Components/ListODL.razor.cs | 29 ++- MP.SPEC/Components/ODLPlot.razor | 7 +- MP.SPEC/Components/ODLPlot.razor.cs | 5 + MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- MP.SPEC/wwwroot/lib/chartBoot.js | 16 +- 10 files changed, 168 insertions(+), 142 deletions(-) diff --git a/MP.SPEC/Components/Chart/Doughnut.razor.cs b/MP.SPEC/Components/Chart/Doughnut.razor.cs index 49abb269..cf897f44 100644 --- a/MP.SPEC/Components/Chart/Doughnut.razor.cs +++ b/MP.SPEC/Components/Chart/Doughnut.razor.cs @@ -17,8 +17,8 @@ namespace MP.SPEC.Components.Chart Doughnut } - [Parameter] - public string Id { get; set; } + //[Parameter] + public string Id { get; set; } = "myChart"; [Parameter] public ChartType Type { get; set; } @@ -40,15 +40,7 @@ namespace MP.SPEC.Components.Chart Options = new { Responsive = true, - Scales = new - { - YAxes = new[] - { - new { Ticks = new { - BeginAtZero=true - } } - } - } + }, Data = new { diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index f540c4cf..1680b31b 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -86,119 +86,134 @@ else - } + } diff --git a/MP.SPEC/Components/ListODL.razor.cs b/MP.SPEC/Components/ListODL.razor.cs index 5edb4645..3bf6b132 100644 --- a/MP.SPEC/Components/ListODL.razor.cs +++ b/MP.SPEC/Components/ListODL.razor.cs @@ -182,16 +182,31 @@ namespace MP.SPEC.Components return answ; } - //private string calcolaPerc(double durata) - //{ - // string answ = ""; + private string calcolaPerc(double durata) + { + string answ = ""; - // double tot = 0; + double tot = 0; + if (ListOdlStats != null) + { - // foreach + foreach (var item in ListOdlStats) + { + tot += item.TotDurata; + } - // double perc = (durata/(double)currRecord.DurataMinuti)*100; - //} + double perc = (durata / tot) * 100; + if (perc > 1) + { + answ = perc.ToString("N2"); + } + else + { + answ = perc.ToString("N4"); + } + } + return answ; + } #endregion Private Methods } diff --git a/MP.SPEC/Components/ODLPlot.razor b/MP.SPEC/Components/ODLPlot.razor index 9a5234b8..5e01d0ba 100644 --- a/MP.SPEC/Components/ODLPlot.razor +++ b/MP.SPEC/Components/ODLPlot.razor @@ -1,10 +1,5 @@ @if (@SelectedOdl != -1) { -
            -
            - @SelectedOdl -
            -
            @if (isLoading) @@ -13,7 +8,7 @@ } else { - + }
            diff --git a/MP.SPEC/Components/ODLPlot.razor.cs b/MP.SPEC/Components/ODLPlot.razor.cs index e62b9dd2..b4a33260 100644 --- a/MP.SPEC/Components/ODLPlot.razor.cs +++ b/MP.SPEC/Components/ODLPlot.razor.cs @@ -49,14 +49,19 @@ namespace MP.SPEC.Components public List Data = new List(); public List Labels = new List(); + public List colors = new List(); protected async Task ReloadData() { + Data.Clear(); + Labels.Clear(); + colors.Clear(); ListRecords = await MDService.StatOdl(SelectedOdl); foreach (var record in ListRecords) { Data.Add(record.TotDurata); Labels.Add($"{record.Descrizione} - {record.TotDurata:N1}min"); + colors.Add(record.Css); } await Task.Delay(1); isLoading = false; diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 5987cfad..d55fb8a2 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.1309 + 6.16.2210.1411 diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 90867b8e..6053acb5 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

            Versione: 6.16.2210.1309

            +

            Versione: 6.16.2210.1411


            Note di rilascio:
            • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 532c5790..baa7c949 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.1309 +6.16.2210.1411 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index a76b4680..a0e756a0 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.1309 + 6.16.2210.1411 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false diff --git a/MP.SPEC/wwwroot/lib/chartBoot.js b/MP.SPEC/wwwroot/lib/chartBoot.js index 95c7466d..50401512 100644 --- a/MP.SPEC/wwwroot/lib/chartBoot.js +++ b/MP.SPEC/wwwroot/lib/chartBoot.js @@ -4,13 +4,17 @@ window.setup = (id, config) => { //let currentDate = new Date(); //console.log(currentDate + " - Calling setup..."); console.log(id); - if (window['chart-' + id] instanceof Chart) { + if (window['myChart'] instanceof Chart) { //window.myChart.destroy(); - window['chart-' + id].destroy(); - //console.log("Chart " + id + " destroyed!"); + window['myChart'].destroy(); + console.log("Chart " + id + " destroyed!"); + window['myChart'] = new Chart(ctx, config); + } + else + { + window['myChart'] = new Chart(ctx, config); + //console.log("Chart " + id + " created!"); + console.log(window['myChart']); } - window['chart-' + id] = new Chart(ctx, config); - //console.log("Chart " + id + " created!"); - console.log(window['chart-' + id]); } \ No newline at end of file From e438fa3930ee11d4826a3d06e1e6517f72537553 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 14 Oct 2022 12:47:13 +0200 Subject: [PATCH 12/17] minor fix --- MP.SPEC/Components/ListODL.razor | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index 1680b31b..b9c8fff6 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -148,11 +148,12 @@ else Info ciclo Periodo + Durata - +
              N° pezzi: @currRecord.NumPezzi
              T. Ciclo: @currRecord.Tcassegnato.ToString("N3")
              @@ -181,7 +182,12 @@ else - + +
              + @currRecord.DurataMinuti +
              + + @@ -196,7 +202,7 @@ else {
              -

              @statRecord.Descrizione - @($"{calcolaPerc(statRecord.TotDurata)}%")

              +
              @statRecord.Descrizione - @($"{calcolaPerc(statRecord.TotDurata)}%")
              From 1cc90d245929317aa4833fc46f6a686735ddb92d Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 14 Oct 2022 13:08:32 +0200 Subject: [PATCH 13/17] minor fix --- MP.SPEC/Components/ListODL.razor | 6 +++--- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index b9c8fff6..ac790442 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -148,7 +148,7 @@ else Info ciclo Periodo - Durata + Durata @@ -157,7 +157,7 @@ else
              N° pezzi: @currRecord.NumPezzi
              T. Ciclo: @currRecord.Tcassegnato.ToString("N3")
              - +
              @($"{@currRecord.DataInizio:yyyy/MM/dd}")
              @@ -183,7 +183,7 @@ else
              -
              +
              @currRecord.DurataMinuti
              diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index d55fb8a2..5c755372 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.1411 + 6.16.2210.1412 diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 6053acb5..5bc51e66 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

              Versione: 6.16.2210.1411

              +

              Versione: 6.16.2210.1412


              Note di rilascio:
              • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index baa7c949..3a7f512e 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.1411 +6.16.2210.1412 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index a0e756a0..c3398cc3 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.1411 + 6.16.2210.1412 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false From c4b6f289af17ab664863cc182862a15c47570eba Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 14 Oct 2022 16:54:41 +0200 Subject: [PATCH 14/17] modifiche grafiche richieste --- MP.SPEC/Components/Chart/Doughnut.razor.cs | 7 +- MP.SPEC/Components/ListODL.razor | 96 ++++++++++------------ MP.SPEC/Components/ListODL.razor.cs | 8 +- MP.SPEC/Components/ODLPlot.razor | 4 +- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 8 files changed, 58 insertions(+), 65 deletions(-) diff --git a/MP.SPEC/Components/Chart/Doughnut.razor.cs b/MP.SPEC/Components/Chart/Doughnut.razor.cs index cf897f44..52b21dc9 100644 --- a/MP.SPEC/Components/Chart/Doughnut.razor.cs +++ b/MP.SPEC/Components/Chart/Doughnut.razor.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; using MP.Data; +using static System.Net.Mime.MediaTypeNames; namespace MP.SPEC.Components.Chart { @@ -40,14 +41,14 @@ namespace MP.SPEC.Components.Chart Options = new { Responsive = true, - }, Data = new { Datasets = new[] { - new { Data = Data, BackgroundColor = BackgroundColor} - }, + new { Data = Data, BackgroundColor = BackgroundColor + } +}, Labels = Labels } }; diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index ac790442..7691df00 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -94,12 +94,23 @@ else