From 24c49567aa714f3b0ad091be969b2b7731e8d835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Szab=C3=B3?= Date: Mon, 7 Jul 2025 14:57:40 +0200 Subject: [PATCH] =?UTF-8?q?BUGFIX=20valu=20ment=C3=A9s=C3=A9re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs | 2 +- .../Pages/CheckList/CheckListWorkPage.xaml | 1 + .../Pages/CheckList/CheckListWorkPage.xaml.cs | 18 ++++++++++++++++-- .../Services/CheckListService.cs | 7 ++++--- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs b/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs index 8c5683e..ca68ad1 100644 --- a/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs +++ b/src/WorkFlowCheck.MAUI/Helper/SystemHelper.cs @@ -19,7 +19,7 @@ namespace WorkFlowCheck.MAUI.Helper public static string DatabaseName = ""; public static bool Syncronised = false; public static UserDTO SystemUserDTO; - public static string ProgramVersion = "v1.1.038"; + public static string ProgramVersion = "v1.1.039"; #if DEBUG //public static string ApiBaseUrl = $"http://10.0.2.2:59027/"; diff --git a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml index 6e7421f..2dceb8c 100644 --- a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml +++ b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml @@ -162,6 +162,7 @@ diff --git a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml.cs b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml.cs index 537d61d..072632a 100644 --- a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml.cs +++ b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml.cs @@ -124,14 +124,19 @@ public partial class CheckListWorkPage : ContentPage if (checkListRowDTO != null) { + checkListRowDTO.Answer = checkListRowCS.Answer; if (checkListRowCS.AnswerYes == true) { checkListRowDTO.Answer = "Igen"; } - if (checkListRowCS.AnswerNo == true) + else if (checkListRowCS.AnswerNo == true) { checkListRowDTO.Answer = "Nem"; } + else + { + checkListRowDTO.Answer = checkListRowCS.Answer; + } await _checkListService.UpdateCheckListRow(checkListRowDTO, withReload); } } @@ -192,7 +197,7 @@ public partial class CheckListWorkPage : ContentPage var checkListRowDTO = CheckListRowDTOs.FirstOrDefault(w => w.Id == checkListRowCS.Id); if (checkListRowDTO != null) { - checkListRowDTO.Photo = checkListRowCS.PhotoBytes; + checkListRowDTO.Photo = checkListRowCS.PhotoBytes; checkListRowDTO.Answer = "Igen"; await _checkListService.UpdateCheckListRow(checkListRowDTO, true); @@ -249,6 +254,15 @@ public partial class CheckListWorkPage : ContentPage IsLoading = false; } + private void V_Entry_Text_Changed(object sender, TextChangedEventArgs e) + { + var entry = sender as Entry; + var model = entry?.BindingContext as CheckListRowCS; + if (model != null) + { + model.Answer = e.NewTextValue; + } + } } public class BindableRadioButton : RadioButton { diff --git a/src/WorkFlowCheck.MAUI/Services/CheckListService.cs b/src/WorkFlowCheck.MAUI/Services/CheckListService.cs index aa7cf01..f0853e6 100644 --- a/src/WorkFlowCheck.MAUI/Services/CheckListService.cs +++ b/src/WorkFlowCheck.MAUI/Services/CheckListService.cs @@ -170,8 +170,8 @@ namespace WorkFlowCheck.MAUI.Services if (checkListRow.Answer != checkListRowDTO.Answer) { checkListRow.Answer = checkListRowDTO.Answer; - } - + } + if (checkListRowDTO.Photo != null && checkListRowDTO.Photo.Length > 0 && withPhoto) { if (!checkListRow.Photo.SequenceEqual(checkListRowDTO.Photo ?? Array.Empty())) @@ -328,7 +328,8 @@ namespace WorkFlowCheck.MAUI.Services .Include(i => i.CheckListTemplateRow) .ThenInclude(i => i.CheckPoint) .Where(w => w.CheckListHeaderId == checkListHeaderDTO.Id - && string.IsNullOrEmpty(w.Answer.Trim())) + && string.IsNullOrEmpty(w.Answer.Trim()) + && w.CheckListTemplateRow.AnswerType != "PN") .Select(w => w.CheckListTemplateRow.CheckPoint) .OrderBy(cp => cp.ShortName) .FirstOrDefaultAsync();