From 74b671586f4e43bf31f73a3786f863336078aafc Mon Sep 17 00:00:00 2001 From: MarcoE Date: Wed, 22 Jul 2026 13:06:49 +0200 Subject: [PATCH] Fix duplicazione scheda quando si modificava --- .../Components/SingleElements/Modal/ModalFormScheda.razor | 3 +-- SteUp.Shared/Core/Dto/SaveRequestDto.cs | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SteUp.Shared/Components/SingleElements/Modal/ModalFormScheda.razor b/SteUp.Shared/Components/SingleElements/Modal/ModalFormScheda.razor index 06cf54d..1d12fb1 100644 --- a/SteUp.Shared/Components/SingleElements/Modal/ModalFormScheda.razor +++ b/SteUp.Shared/Components/SingleElements/Modal/ModalFormScheda.razor @@ -288,6 +288,7 @@ new SaveRequestDto { LocalIdScheda = Scheda.Id, + ActivityId = Scheda.ActivityId, ActivityTypeId = Scheda.ActivityTypeId, CodJfas = Scheda.CodJfas, CodMdep = CodMdep, @@ -296,8 +297,6 @@ PersonaRif = Scheda.Responsabile, Barcodes = Scheda.Articoli.ConvertAll(x => x.Barcode), Scandeza = (ScadenzaEnum)Scheda.Scadenza, - // Aggancia la scheda all'ispezione GIA esistente sul server (se sincronizzata), - // altrimenti null e il server la crea. Evita di creare una nuova ispezione a ogni salvataggio. ParentActivityId = SteupDataService.InspectionPageState.Ispezione.ActivityId } ); diff --git a/SteUp.Shared/Core/Dto/SaveRequestDto.cs b/SteUp.Shared/Core/Dto/SaveRequestDto.cs index 7abc596..7b46e21 100644 --- a/SteUp.Shared/Core/Dto/SaveRequestDto.cs +++ b/SteUp.Shared/Core/Dto/SaveRequestDto.cs @@ -8,6 +8,9 @@ public class SaveRequestDto [JsonPropertyName("localIdScheda")] public int? LocalIdScheda { get; set; } + [JsonPropertyName("activityId")] + public string? ActivityId { get; set; } + [JsonPropertyName("codMdep")] public string? CodMdep { get; set; }