From ab1de236be6c988c116e1000aa3a6c94d87bc4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Szab=C3=B3?= Date: Mon, 24 Mar 2025 20:40:38 +0100 Subject: [PATCH] =?UTF-8?q?Na=20most=20j=C3=B3=20a=20bek=C3=BCld=C3=A9shez?= =?UTF-8?q?=20a=20Binding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DTO/CheckListRowDTO.cs | 2 + .../Pages/CheckList/CheckListPage.xaml | 16 ++++- .../Pages/CheckList/CheckListPage.xaml.cs | 16 +++++ .../Pages/CheckList/CheckListWorkPage.xaml | 72 +++++++++++++------ .../Pages/CheckList/CheckListWorkPage.xaml.cs | 32 ++++++++- .../Pages/NFC/NFCWaiter.xaml | 8 +-- .../Services/CheckListService.cs | 15 ++++ .../Services/Interfaces/ICheckListService.cs | 1 + .../AnswerTypeTemplateSelector.cs | 1 + 9 files changed, 134 insertions(+), 29 deletions(-) diff --git a/src/WorkFlowCheck.Common/DTO/CheckListRowDTO.cs b/src/WorkFlowCheck.Common/DTO/CheckListRowDTO.cs index 88038c9..12b4eea 100644 --- a/src/WorkFlowCheck.Common/DTO/CheckListRowDTO.cs +++ b/src/WorkFlowCheck.Common/DTO/CheckListRowDTO.cs @@ -14,6 +14,8 @@ namespace WorkFlowCheck.Common.DTO public CheckListTemplateRowDTO CheckListTemplateRowDTO { get; set; } public string GroupName => $"AnswerGroup_{CheckListTemplateRowDTO.RowIndex}"; public string Answer { get; set; } = null!; + public string AnswerYes { get; set; } = null!; + public string AnswerNo { get; set; } = null!; public byte[] Photo { get; set; } = null!; public Guid GuidNumber { get; set; } } diff --git a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml index 7561581..54e8106 100644 --- a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml +++ b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml @@ -31,7 +31,6 @@ - @@ -58,7 +57,20 @@ - + + + \ No newline at end of file diff --git a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml.cs b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml.cs index 9011d31..7cec108 100644 --- a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml.cs +++ b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListPage.xaml.cs @@ -10,9 +10,21 @@ public partial class CheckListPage : ContentPage { private readonly ICheckListService _checkListService; private readonly IUserService _userService; + private bool _isLoading; + public ICommand NewCommand { get; set; } public ICommand ContinueCommand { get; set; } + public bool IsLoading + { + get => _isLoading; + set + { + _isLoading = value; + OnPropertyChanged(nameof(IsLoading)); + } + } + public CheckListPage() { @@ -55,13 +67,17 @@ public partial class CheckListPage : ContentPage } private async Task LoadCheckListTemplate() { + IsLoading = true; var userId = _userService.GetCurrentUser()?.Id; CheckListTemplate.ItemsSource = await _checkListService.GetCheckListTemplates(userId ?? 1); + IsLoading = false; } private async Task LoadCheckList() { + IsLoading = true; var userId = _userService.GetCurrentUser()?.Id; CheckList.ItemsSource = await _checkListService.GetCheckLists(userId ?? 1); + IsLoading = false; } } \ No newline at end of file diff --git a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml index 4a11819..4b8c604 100644 --- a/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml +++ b/src/WorkFlowCheck.MAUI/Pages/CheckList/CheckListWorkPage.xaml @@ -4,20 +4,48 @@ x:Class="WorkFlowCheck.MAUI.Pages.CheckList.CheckListWorkPage" xmlns:templateselectors="clr-namespace:WorkFlowCheck.MAUI.TemplateSelectors" xmlns:local="clr-namespace:WorkFlowCheck.MAUI.Pages.CheckList" - Title="CheckListWorkPage"> - -