From c71d7291a2d069f1b59b1822da862ba3bf825089 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Thu, 3 Nov 2022 17:21:44 +0100 Subject: [PATCH 1/3] Prima bozza aggiunta nuovo dossier --- MP.SPEC/Components/ListDossiers.razor | 96 +++++++++++++++++++++++- MP.SPEC/Components/ListDossiers.razor.cs | 57 ++++++++++++++ MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 6 files changed, 156 insertions(+), 5 deletions(-) diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 5e031017..7956ff01 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -14,6 +14,7 @@ else if (totalCount == 0) } else { + @if (currFluxLogDto != null) {
@@ -78,6 +79,97 @@ else
} + + + + @if (currRecordClone != null) + { +
+
+
+
+
+ Modifica Parametro +
+
+ @if (isEditing) + { + PENDING CHANGES... + } +
+
+
+ +
+
+
+ ARTICOLO + +
+
+
+
+ FASE + +
+
+ +
+
+ MACCHINA + +
+
+
+
+ DATA + +
+
+
+ + + +
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ } + + + + + + + + + +
@@ -101,8 +193,10 @@ else
@if (isEditing == false) { - + + + } else { diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index 127d76b4..bd70cbc7 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -171,8 +171,47 @@ namespace MP.SPEC.Components } + protected async Task newDossier(Dossiers selRec) + { + var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler salvare TUTTE le modifiche? queste saranno parte del dossier inviato all'impianto"); + + if (alert) + { + + await Task.Delay(1); + if (currRecordClone != null) + { + // serializzo valore x flux log... + DossierFluxLogDTO updatedResult = new DossierFluxLogDTO() { ODL = listaFlux }; + string newVal = JsonConvert.SerializeObject(updatedResult); + currRecordClone.DataType = selRec.DataType; + currRecordClone.DtRif = DateTime.Now; + currRecordClone.IdxMacchina = selRec.DataType; + currRecordClone.CodArticolo = selRec.CodArticolo; + currRecordClone.IdxODL = selRec.IdxODL; + currRecordClone.Valore = newVal; + // METODO PER UPDATE FLUX + await MDService.DossiersInsert(currRecordClone); + currRecordClone = null; + isEditing = false; + await Task.Delay(1); + StateHasChanged(); + } + return; + } + else + { + currFluxLogDto = null; + await Task.Delay(1); + await JSRuntime.InvokeAsync("location.reload"); + + } + + } + protected override async Task OnInitializedAsync() { + ListGruppiFase = await MDService.ElencoGruppiFase(); ListStati = await MDService.AnagStatiComm(); await reloadData(true); } @@ -193,6 +232,23 @@ namespace MP.SPEC.Components listaFlux = MDService.getFluxLog(selRec.Valore); await toggleTableFlux(); } + protected async Task cloneRecord(Dossiers selRec) + { + // creo record duplicato... + Dossiers newRec = new Dossiers() + { + IdxDossier = selRec.IdxDossier, + DataType = selRec.DataType, + DtRif = selRec.DtRif, + IdxMacchina = selRec.IdxMacchina, + CodArticolo = selRec.CodArticolo, + IdxODL = selRec.IdxODL, + Valore = selRec.Valore, + }; + currRecordClone = selRec; + await Task.Delay(1); + } + private List? ListGruppiFase; protected async Task UpdateData() { @@ -220,6 +276,7 @@ namespace MP.SPEC.Components private int _totalCount = 0; private Dossiers? currRecord = null; + private Dossiers? currRecordClone = null; private FluxLogDTO? currRecordFlux; private List? ListRecords; diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 4eed2b81..4ef75a36 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2211.311 + 6.16.2211.317 diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 0fb5f0b8..28accc8f 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2211.311

+

Versione: 6.16.2211.317


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 22639881..bb9c4c74 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2211.311 +6.16.2211.317 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 33dd5804..6b590bc7 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2211.311 + 6.16.2211.317 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 55187eda96ac2d44811e3b3ac32faf795f19e024 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 4 Nov 2022 09:11:55 +0100 Subject: [PATCH 2/3] dismiss nuovo dossier --- MP.SPEC/Components/ListDossiers.razor | 4 ++-- MP.SPEC/Components/ListDossiers.razor.cs | 13 ++++++++++++- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 7956ff01..51726205 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -139,14 +139,14 @@ else -
    +
    - +
    diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index bd70cbc7..25f0a47b 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -137,6 +137,17 @@ namespace MP.SPEC.Components StateHasChanged(); } } + protected async Task cancelNewDoss() + { + var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler annullare l'aggiunta di un nuovo dossier? i dati saranno ricaricati."); + if (alert) + { + currRecordClone = null; + isEditing = false; + await Task.Delay(1); + StateHasChanged(); + } + } protected async Task update(FluxLogDTO selRec) { @@ -189,7 +200,7 @@ namespace MP.SPEC.Components currRecordClone.IdxMacchina = selRec.DataType; currRecordClone.CodArticolo = selRec.CodArticolo; currRecordClone.IdxODL = selRec.IdxODL; - currRecordClone.Valore = newVal; + currRecordClone.Valore = selRec.Valore; // METODO PER UPDATE FLUX await MDService.DossiersInsert(currRecordClone); currRecordClone = null; diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 4ef75a36..674aaf3b 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2211.317 + 6.16.2211.408 diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 28accc8f..f9e33275 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

    Versione: 6.16.2211.317

    +

    Versione: 6.16.2211.408


    Note di rilascio:
    • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index bb9c4c74..768380ef 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2211.317 +6.16.2211.408 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 6b590bc7..80a41b02 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2211.317 + 6.16.2211.408 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 4f7ac21f419103221a7526e76f9b109bd646b473 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 4 Nov 2022 09:20:53 +0100 Subject: [PATCH 3/3] new dossier --- MP.SPEC/Components/ListDossiers.razor | 3 +++ MP.SPEC/Components/ListDossiers.razor.cs | 4 ++-- MP.SPEC/Data/MpDataService.cs | 2 +- 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, 10 insertions(+), 7 deletions(-) diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor index 51726205..46df94e2 100644 --- a/MP.SPEC/Components/ListDossiers.razor +++ b/MP.SPEC/Components/ListDossiers.razor @@ -81,6 +81,9 @@ else } + + + @if (currRecordClone != null) { diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index 25f0a47b..213cb4dd 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -197,7 +197,7 @@ namespace MP.SPEC.Components string newVal = JsonConvert.SerializeObject(updatedResult); currRecordClone.DataType = selRec.DataType; currRecordClone.DtRif = DateTime.Now; - currRecordClone.IdxMacchina = selRec.DataType; + currRecordClone.IdxMacchina = selRec.IdxMacchina; currRecordClone.CodArticolo = selRec.CodArticolo; currRecordClone.IdxODL = selRec.IdxODL; currRecordClone.Valore = selRec.Valore; @@ -212,7 +212,7 @@ namespace MP.SPEC.Components } else { - currFluxLogDto = null; + currRecordClone = null; await Task.Delay(1); await JSRuntime.InvokeAsync("location.reload"); diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index 146ff727..9fd4bf2f 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -400,7 +400,7 @@ namespace MP.SPEC.Data public async Task DossiersInsert(Dossiers currDoss) { // aggiorno record sul DB - bool answ = await dbController.DossiersUpdateValore(currDoss); + bool answ = await dbController.DossiersInsert(currDoss); return answ; } diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 674aaf3b..7b05c1a1 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2211.408 + 6.16.2211.409 diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index f9e33275..383b221f 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

      Versione: 6.16.2211.408

      +

      Versione: 6.16.2211.409


      Note di rilascio:
      • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 768380ef..289a3afe 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2211.408 +6.16.2211.409 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 80a41b02..9becd7e2 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2211.408 + 6.16.2211.409 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