UI rendberakása
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using WorkFlowCheck.Common.Enums;
|
using WorkFlowCheck.Common.Enums;
|
||||||
|
using WorkFlowCheck.Common.Helper;
|
||||||
|
|
||||||
namespace WorkFlowCheck.Common.DTO
|
namespace WorkFlowCheck.Common.DTO
|
||||||
{
|
{
|
||||||
@@ -17,6 +18,8 @@ namespace WorkFlowCheck.Common.DTO
|
|||||||
[DisplayName("Státusz")]
|
[DisplayName("Státusz")]
|
||||||
public CheckStatus CheckStatus { get; set; }
|
public CheckStatus CheckStatus { get; set; }
|
||||||
|
|
||||||
|
public string StatusName => DisplayNameHelper.GetEnumDisplayName(CheckStatus);
|
||||||
|
|
||||||
[DisplayName("Dátum")]
|
[DisplayName("Dátum")]
|
||||||
public DateTime DateExecution { get; set; }
|
public DateTime DateExecution { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,35 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace WorkFlowCheck.Common.Enums
|
namespace WorkFlowCheck.Common.Enums
|
||||||
{
|
{
|
||||||
public enum CheckStatus
|
public enum CheckStatus
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[Display(Name = "Nyitott")]
|
||||||
Open = 0,
|
Open = 0,
|
||||||
|
|
||||||
|
[Display(Name = "Folyamatban")]
|
||||||
InProgress = 1,
|
InProgress = 1,
|
||||||
|
|
||||||
|
[Display(Name = "Blokkolt")]
|
||||||
Blocked = 2,
|
Blocked = 2,
|
||||||
|
|
||||||
|
[Display(Name = "Sztornózva")]
|
||||||
Storno = 3,
|
Storno = 3,
|
||||||
|
|
||||||
|
[Display(Name = "Beküldött")]
|
||||||
Sent = 4,
|
Sent = 4,
|
||||||
|
|
||||||
|
[Display(Name = "Jóváhagyva")]
|
||||||
Signed = 5,
|
Signed = 5,
|
||||||
|
|
||||||
|
[Display(Name = "Lezárva")]
|
||||||
Closed = 6
|
Closed = 6
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@@ -17,6 +19,15 @@ namespace WorkFlowCheck.Common.Helper
|
|||||||
|
|
||||||
return displayNameAttribute?.DisplayName ?? propertyName;
|
return displayNameAttribute?.DisplayName ?? propertyName;
|
||||||
}
|
}
|
||||||
|
public static string GetEnumDisplayName(this Enum enumValue)
|
||||||
|
{
|
||||||
|
return enumValue
|
||||||
|
.GetType()
|
||||||
|
.GetMember(enumValue.ToString())
|
||||||
|
.First()
|
||||||
|
.GetCustomAttribute<DisplayAttribute>()?
|
||||||
|
.Name ?? enumValue.ToString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,14 +20,17 @@ namespace WorkFlowCheck.MAUI.Mapper
|
|||||||
.ForMember(dest => dest.CheckListTemplateRows, opt => opt.MapFrom(src => src.CheckListTemplateRowDTO));
|
.ForMember(dest => dest.CheckListTemplateRows, opt => opt.MapFrom(src => src.CheckListTemplateRowDTO));
|
||||||
CreateMap<CheckListTemplateHeader, CheckListTemplateHeaderDTO>()
|
CreateMap<CheckListTemplateHeader, CheckListTemplateHeaderDTO>()
|
||||||
.ForMember(dest => dest.CheckListTemplateRowDTO, opt => opt.MapFrom(src => src.CheckListTemplateRows));
|
.ForMember(dest => dest.CheckListTemplateRowDTO, opt => opt.MapFrom(src => src.CheckListTemplateRows));
|
||||||
|
|
||||||
CreateMap<CheckListTemplateRow, CheckListTemplateRowDTO>()
|
CreateMap<CheckListTemplateRow, CheckListTemplateRowDTO>()
|
||||||
.ForMember(dest => dest.CheckPointDTO, opt => opt.MapFrom(src => src.CheckPoint));
|
.ForMember(dest => dest.CheckPointDTO, opt => opt.MapFrom(src => src.CheckPoint));
|
||||||
CreateMap<CheckListTemplateRowDTO, CheckListTemplateRow>();
|
CreateMap<CheckListTemplateRowDTO, CheckListTemplateRow>();
|
||||||
|
|
||||||
CreateMap<CheckListHeader, CheckListHeaderDTO>()
|
CreateMap<CheckListHeader, CheckListHeaderDTO>()
|
||||||
|
.ForMember(dest => dest.CheckListTemplateHeaderDTO, opt => opt.MapFrom(src => src.CheckListTemplateHeader))
|
||||||
.ForMember(dest => dest.CheckListRowDTO, opt => opt.MapFrom(src => src.CheckListRows));
|
.ForMember(dest => dest.CheckListRowDTO, opt => opt.MapFrom(src => src.CheckListRows));
|
||||||
CreateMap<CheckListHeaderDTO, CheckListHeader>()
|
CreateMap<CheckListHeaderDTO, CheckListHeader>()
|
||||||
.ForMember(dest => dest.CheckListRows, opt => opt.MapFrom(src => src.CheckListRowDTO));
|
.ForMember(dest => dest.CheckListRows, opt => opt.MapFrom(src => src.CheckListRowDTO));
|
||||||
|
|
||||||
CreateMap<CheckListRow, CheckListRowDTO>()
|
CreateMap<CheckListRow, CheckListRowDTO>()
|
||||||
.ForMember(dest => dest.CheckListTemplateRowDTO, opt => opt.MapFrom(src => src.CheckListTemplateRow));
|
.ForMember(dest => dest.CheckListTemplateRowDTO, opt => opt.MapFrom(src => src.CheckListTemplateRow));
|
||||||
CreateMap<CheckListRowDTO, CheckListRow>()
|
CreateMap<CheckListRowDTO, CheckListRow>()
|
||||||
|
|||||||
@@ -2,9 +2,43 @@
|
|||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="WorkFlowCheck.MAUI.Pages.BaseStock.BaseStockPage"
|
x:Class="WorkFlowCheck.MAUI.Pages.BaseStock.BaseStockPage"
|
||||||
|
BackgroundColor="#f0f0f0"
|
||||||
Title="Törzs adatok">
|
Title="Törzs adatok">
|
||||||
<VerticalStackLayout Margin="10,0,10,0">
|
<Shell.TitleView>
|
||||||
<Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True">
|
<Grid Padding="2" VerticalOptions="Center">
|
||||||
|
<Label Text="Törzs adatok"
|
||||||
|
FontSize="22"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Start" />
|
||||||
|
<HorizontalStackLayout
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End"
|
||||||
|
Spacing="5">
|
||||||
|
<Frame CornerRadius="1"
|
||||||
|
Padding="5"
|
||||||
|
HasShadow="True"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End">
|
||||||
|
<Label x:Name="DeviceId"
|
||||||
|
FontSize="10"
|
||||||
|
TextColor="Black"/>
|
||||||
|
</Frame>
|
||||||
|
<Frame CornerRadius="1"
|
||||||
|
Padding="5"
|
||||||
|
HasShadow="True"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End">
|
||||||
|
<Label x:Name="UserInfo"
|
||||||
|
FontSize="10"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
TextColor="Black"/>
|
||||||
|
</Frame>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
</Grid>
|
||||||
|
</Shell.TitleView>
|
||||||
|
<VerticalStackLayout Margin="50,50,50,10">
|
||||||
|
<Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True" CornerRadius="10">
|
||||||
<VerticalStackLayout Margin="10,10,10,0">
|
<VerticalStackLayout Margin="10,10,10,0">
|
||||||
<Button
|
<Button
|
||||||
x:Name="ButtonGetCheckPoints"
|
x:Name="ButtonGetCheckPoints"
|
||||||
@@ -13,20 +47,20 @@
|
|||||||
SemanticProperties.Hint="Ellenőrzési pontok"
|
SemanticProperties.Hint="Ellenőrzési pontok"
|
||||||
Clicked="OnButtonGetCheckPoints"
|
Clicked="OnButtonGetCheckPoints"
|
||||||
HorizontalOptions="Fill" />
|
HorizontalOptions="Fill" />
|
||||||
<Button
|
<!--<Button
|
||||||
x:Name="ButtonGetEquipments"
|
x:Name="ButtonGetEquipments"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
Text="Berendezések"
|
Text="Berendezések"
|
||||||
SemanticProperties.Hint="Berendezések"
|
SemanticProperties.Hint="Berendezések"
|
||||||
Clicked="OnButtonGetEquipments"
|
Clicked="OnButtonGetEquipments"
|
||||||
HorizontalOptions="Fill" />
|
HorizontalOptions="Fill" />-->
|
||||||
<Button
|
<!--<Button
|
||||||
x:Name="ButtonGetLocations"
|
x:Name="ButtonGetLocations"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
Text="Lokációk"
|
Text="Lokációk"
|
||||||
SemanticProperties.Hint="Lokációk"
|
SemanticProperties.Hint="Lokációk"
|
||||||
Clicked="OnButtonGetLocations"
|
Clicked="OnButtonGetLocations"
|
||||||
HorizontalOptions="Fill" />
|
HorizontalOptions="Fill" />-->
|
||||||
<Button
|
<Button
|
||||||
x:Name="ButtonGetUsers"
|
x:Name="ButtonGetUsers"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
|
|||||||
@@ -1,15 +1,32 @@
|
|||||||
|
using Android.DeviceLock;
|
||||||
using WorkFlowCheck.Common.DTO;
|
using WorkFlowCheck.Common.DTO;
|
||||||
using WorkFlowCheck.MAUI.Pages.Security;
|
using WorkFlowCheck.MAUI.Pages.Security;
|
||||||
|
using WorkFlowCheck.MAUI.Services.Interfaces;
|
||||||
|
|
||||||
namespace WorkFlowCheck.MAUI.Pages.BaseStock;
|
namespace WorkFlowCheck.MAUI.Pages.BaseStock;
|
||||||
|
|
||||||
public partial class BaseStockPage : ContentPage
|
public partial class BaseStockPage : ContentPage
|
||||||
{
|
{
|
||||||
|
private IUserService _userService;
|
||||||
|
private UserDTO _currentUser;
|
||||||
|
|
||||||
public BaseStockPage()
|
public BaseStockPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
_userService = MauiProgram.ServiceProvider.GetRequiredService<IUserService>();
|
||||||
|
}
|
||||||
|
private void SetInfo()
|
||||||
|
{
|
||||||
|
_currentUser = _userService.GetCurrentUser();
|
||||||
|
DeviceId.Text = _userService.DeviceId;
|
||||||
|
UserInfo.Text = $"{_currentUser?.FirstName} {_currentUser?.LastName}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override protected async void OnAppearing()
|
||||||
|
{
|
||||||
|
base.OnAppearing();
|
||||||
|
SetInfo();
|
||||||
|
}
|
||||||
private async void OnButtonGetCheckPoints(object sender, EventArgs e)
|
private async void OnButtonGetCheckPoints(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//await Shell.Current.GoToAsync("//CheckPointsPage");
|
//await Shell.Current.GoToAsync("//CheckPointsPage");
|
||||||
|
|||||||
@@ -55,8 +55,10 @@
|
|||||||
<Grid ColumnDefinitions="*,Auto">
|
<Grid ColumnDefinitions="*,Auto">
|
||||||
<!-- Bal oldali oszlop: Két Label egymás alatt -->
|
<!-- Bal oldali oszlop: Két Label egymás alatt -->
|
||||||
<StackLayout Grid.Column="0" Spacing="2">
|
<StackLayout Grid.Column="0" Spacing="2">
|
||||||
<Label Text="{Binding DocumentNumber}" FontSize="16" FontAttributes="Bold" />
|
<Label Text="{Binding DocumentNumber}" FontSize="14" FontAttributes="Bold" />
|
||||||
<Label Text="{Binding DateExecution}" FontSize="14" />
|
<Label Text="{Binding DateExecution}" FontSize="12" />
|
||||||
|
<Label Text="{Binding CheckListTemplateHeaderDTO.ShortName}" FontSize="10" />
|
||||||
|
<Label Text="{Binding StatusName}" FontSize="10" />
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
|
|
||||||
<!-- Jobb oldali oszlop: Két gomb egymás mellett -->
|
<!-- Jobb oldali oszlop: Két gomb egymás mellett -->
|
||||||
@@ -64,21 +66,21 @@
|
|||||||
<Button Text="Blokkolás"
|
<Button Text="Blokkolás"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
BackgroundColor="Red"
|
BackgroundColor="Red"
|
||||||
IsVisible="{Binding CheckStatus, Converter={StaticResource BlockedHideConverter}}"
|
IsVisible="{Binding CheckStatus, Converter={StaticResource BlockedConverter}}"
|
||||||
Command="{Binding BindingContext.BlockCommand, Source={x:Reference CheckList}}"
|
Command="{Binding BindingContext.BlockCommand, Source={x:Reference CheckList}}"
|
||||||
CommandParameter="{Binding .}">
|
CommandParameter="{Binding .}">
|
||||||
</Button>
|
</Button>
|
||||||
<Button Text="Feloldás"
|
<Button Text="Feloldás"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
BackgroundColor="Green"
|
BackgroundColor="Green"
|
||||||
IsVisible="{Binding CheckStatus, Converter={StaticResource BlockedVisibleConverter}}"
|
IsVisible="{Binding CheckStatus, Converter={StaticResource UnBlockedConverter}}"
|
||||||
Command="{Binding BindingContext.UnblockCommand, Source={x:Reference CheckList}}"
|
Command="{Binding BindingContext.UnblockCommand, Source={x:Reference CheckList}}"
|
||||||
CommandParameter="{Binding .}">
|
CommandParameter="{Binding .}">
|
||||||
</Button>
|
</Button>
|
||||||
<Button Text="Folytatás"
|
<Button Text="Folytatás"
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
BackgroundColor="Blue"
|
BackgroundColor="Blue"
|
||||||
IsVisible="{Binding CheckStatus, Converter={StaticResource BlockedHideConverter}}"
|
IsVisible="{Binding CheckStatus, Converter={StaticResource ContinueConverter}}"
|
||||||
Command="{Binding BindingContext.ContinueCommand, Source={x:Reference CheckList}}"
|
Command="{Binding BindingContext.ContinueCommand, Source={x:Reference CheckList}}"
|
||||||
CommandParameter="{Binding .}">
|
CommandParameter="{Binding .}">
|
||||||
</Button>
|
</Button>
|
||||||
@@ -142,8 +144,9 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<ContentPage.Resources>
|
<ContentPage.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<local:BlockedVisibleConverter x:Key="BlockedVisibleConverter" />
|
<local:BlockedConverter x:Key="BlockedConverter" />
|
||||||
<local:BlockedHideConverter x:Key="BlockedHideConverter" />
|
<local:UnBlockedConverter x:Key="UnBlockedConverter" />
|
||||||
|
<local:ContinueConverter x:Key="ContinueConverter" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</ContentPage.Resources>
|
</ContentPage.Resources>
|
||||||
</ContentPage>
|
</ContentPage>
|
||||||
@@ -168,13 +168,13 @@ public partial class CheckListPage : ContentPage
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BlockedVisibleConverter : IValueConverter
|
public class BlockedConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
if (value is CheckStatus status)
|
if (value is CheckStatus status)
|
||||||
{
|
{
|
||||||
return status == CheckStatus.Blocked;
|
return status == CheckStatus.InProgress;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -184,13 +184,33 @@ public class BlockedVisibleConverter : IValueConverter
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class BlockedHideConverter : IValueConverter
|
public class UnBlockedConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
{
|
{
|
||||||
if (value is CheckStatus status)
|
if (value is CheckStatus status)
|
||||||
{
|
{
|
||||||
if (status == CheckStatus.Open || status == CheckStatus.InProgress)
|
if (status == CheckStatus.Blocked)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public class ContinueConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
if (value is CheckStatus status)
|
||||||
|
{
|
||||||
|
if (status == CheckStatus.InProgress || status == CheckStatus.Open)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,39 @@
|
|||||||
x:Class="WorkFlowCheck.MAUI.Pages.NFC.NFCTestPage"
|
x:Class="WorkFlowCheck.MAUI.Pages.NFC.NFCTestPage"
|
||||||
BackgroundColor="#f0f0f0"
|
BackgroundColor="#f0f0f0"
|
||||||
Title="NFC teszt ">
|
Title="NFC teszt ">
|
||||||
|
<Shell.TitleView>
|
||||||
|
<Grid Padding="2" VerticalOptions="Center">
|
||||||
|
<Label Text="NFC olvasási teszt"
|
||||||
|
FontSize="22"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Start" />
|
||||||
|
<HorizontalStackLayout
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End"
|
||||||
|
Spacing="5">
|
||||||
|
<Frame CornerRadius="1"
|
||||||
|
Padding="5"
|
||||||
|
HasShadow="True"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End">
|
||||||
|
<Label x:Name="DeviceId"
|
||||||
|
FontSize="10"
|
||||||
|
TextColor="Black"/>
|
||||||
|
</Frame>
|
||||||
|
<Frame CornerRadius="1"
|
||||||
|
Padding="5"
|
||||||
|
HasShadow="True"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End">
|
||||||
|
<Label x:Name="UserInfo"
|
||||||
|
FontSize="10"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
TextColor="Black"/>
|
||||||
|
</Frame>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
</Grid>
|
||||||
|
</Shell.TitleView>
|
||||||
<RefreshView x:Name="refreshView" Command="{Binding RefreshCommand}" IsRefreshing="{Binding IsRefreshing}">
|
<RefreshView x:Name="refreshView" Command="{Binding RefreshCommand}" IsRefreshing="{Binding IsRefreshing}">
|
||||||
<CollectionView x:Name="NFCDataListCollection" ItemsSource="{Binding NFCDataList}">
|
<CollectionView x:Name="NFCDataListCollection" ItemsSource="{Binding NFCDataList}">
|
||||||
<CollectionView.ItemTemplate>
|
<CollectionView.ItemTemplate>
|
||||||
|
|||||||
@@ -3,16 +3,27 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using WorkFlowCheck.Common.DTO;
|
||||||
|
using WorkFlowCheck.MAUI.Services.Interfaces;
|
||||||
|
using Android.DeviceLock;
|
||||||
|
|
||||||
namespace WorkFlowCheck.MAUI.Pages.NFC;
|
namespace WorkFlowCheck.MAUI.Pages.NFC;
|
||||||
|
|
||||||
public partial class NFCTestPage : ContentPage
|
public partial class NFCTestPage : ContentPage
|
||||||
{
|
{
|
||||||
|
private IUserService _userService;
|
||||||
|
private UserDTO _currentUser;
|
||||||
public NFCTestPage()
|
public NFCTestPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
_userService = MauiProgram.ServiceProvider.GetRequiredService<IUserService>();
|
||||||
|
}
|
||||||
|
private void SetInfo()
|
||||||
|
{
|
||||||
|
_currentUser = _userService.GetCurrentUser();
|
||||||
|
DeviceId.Text = _userService.DeviceId;
|
||||||
|
UserInfo.Text = $"{_currentUser?.FirstName} {_currentUser?.LastName}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableCollection<NFCData> NFCDataList { get; set; }
|
public ObservableCollection<NFCData> NFCDataList { get; set; }
|
||||||
public ICommand RefreshCommand { get; set; }
|
public ICommand RefreshCommand { get; set; }
|
||||||
|
|
||||||
@@ -23,6 +34,7 @@ public partial class NFCTestPage : ContentPage
|
|||||||
protected override async void OnAppearing()
|
protected override async void OnAppearing()
|
||||||
{
|
{
|
||||||
base.OnAppearing();
|
base.OnAppearing();
|
||||||
|
SetInfo();
|
||||||
|
|
||||||
CrossNFC.Legacy = false;
|
CrossNFC.Legacy = false;
|
||||||
if (CrossNFC.IsSupported)
|
if (CrossNFC.IsSupported)
|
||||||
|
|||||||
@@ -2,7 +2,41 @@
|
|||||||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
x:Class="WorkFlowCheck.MAUI.Pages.System.DownloadAPKPage"
|
x:Class="WorkFlowCheck.MAUI.Pages.System.DownloadAPKPage"
|
||||||
|
BackgroundColor="#f0f0f0"
|
||||||
Title="Program letöltés">
|
Title="Program letöltés">
|
||||||
|
<Shell.TitleView>
|
||||||
|
<Grid Padding="2" VerticalOptions="Center">
|
||||||
|
<Label Text="Program letöltés"
|
||||||
|
FontSize="22"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Start" />
|
||||||
|
<HorizontalStackLayout
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End"
|
||||||
|
Spacing="5">
|
||||||
|
<Frame CornerRadius="1"
|
||||||
|
Padding="5"
|
||||||
|
HasShadow="True"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End">
|
||||||
|
<Label x:Name="DeviceId"
|
||||||
|
FontSize="10"
|
||||||
|
TextColor="Black"/>
|
||||||
|
</Frame>
|
||||||
|
<Frame CornerRadius="1"
|
||||||
|
Padding="5"
|
||||||
|
HasShadow="True"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End">
|
||||||
|
<Label x:Name="UserInfo"
|
||||||
|
FontSize="10"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
TextColor="Black"/>
|
||||||
|
</Frame>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
</Grid>
|
||||||
|
</Shell.TitleView>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using WorkFlowCheck.Common.DTO;
|
||||||
using WorkFlowCheck.MAUI.Services.Interfaces;
|
using WorkFlowCheck.MAUI.Services.Interfaces;
|
||||||
|
|
||||||
namespace WorkFlowCheck.MAUI.Pages.System;
|
namespace WorkFlowCheck.MAUI.Pages.System;
|
||||||
@@ -5,10 +6,25 @@ namespace WorkFlowCheck.MAUI.Pages.System;
|
|||||||
public partial class DownloadAPKPage : ContentPage
|
public partial class DownloadAPKPage : ContentPage
|
||||||
{
|
{
|
||||||
private ISyncService _syncService;
|
private ISyncService _syncService;
|
||||||
|
private IUserService _userService;
|
||||||
|
private UserDTO _currentUser;
|
||||||
|
|
||||||
public DownloadAPKPage()
|
public DownloadAPKPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_syncService = MauiProgram.ServiceProvider.GetRequiredService<ISyncService>();
|
_syncService = MauiProgram.ServiceProvider.GetRequiredService<ISyncService>();
|
||||||
|
_userService = MauiProgram.ServiceProvider.GetRequiredService<IUserService>();
|
||||||
|
}
|
||||||
|
override protected async void OnAppearing()
|
||||||
|
{
|
||||||
|
base.OnAppearing();
|
||||||
|
SetInfo();
|
||||||
|
}
|
||||||
|
private void SetInfo()
|
||||||
|
{
|
||||||
|
_currentUser = _userService.GetCurrentUser();
|
||||||
|
DeviceId.Text = _userService.DeviceId;
|
||||||
|
UserInfo.Text = $"{_currentUser?.FirstName} {_currentUser?.LastName}";
|
||||||
}
|
}
|
||||||
private async void OnSyncClicked(object sender, EventArgs e)
|
private async void OnSyncClicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,39 @@
|
|||||||
x:Class="WorkFlowCheck.MAUI.Pages.System.SyncPage"
|
x:Class="WorkFlowCheck.MAUI.Pages.System.SyncPage"
|
||||||
Title="Adatok szinkronizálása"
|
Title="Adatok szinkronizálása"
|
||||||
BackgroundColor="#f0f0f0">
|
BackgroundColor="#f0f0f0">
|
||||||
|
<Shell.TitleView>
|
||||||
|
<Grid Padding="2" VerticalOptions="Center">
|
||||||
|
<Label Text="Adatok szinkronizálása"
|
||||||
|
FontSize="22"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Start" />
|
||||||
|
<HorizontalStackLayout
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End"
|
||||||
|
Spacing="5">
|
||||||
|
<Frame CornerRadius="1"
|
||||||
|
Padding="5"
|
||||||
|
HasShadow="True"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End">
|
||||||
|
<Label x:Name="DeviceId"
|
||||||
|
FontSize="10"
|
||||||
|
TextColor="Black"/>
|
||||||
|
</Frame>
|
||||||
|
<Frame CornerRadius="1"
|
||||||
|
Padding="5"
|
||||||
|
HasShadow="True"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="End">
|
||||||
|
<Label x:Name="UserInfo"
|
||||||
|
FontSize="10"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
TextColor="Black"/>
|
||||||
|
</Frame>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
</Grid>
|
||||||
|
</Shell.TitleView>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
using Android.DeviceLock;
|
||||||
|
using WorkFlowCheck.Common.DTO;
|
||||||
using WorkFlowCheck.MAUI.Services.Interfaces;
|
using WorkFlowCheck.MAUI.Services.Interfaces;
|
||||||
|
|
||||||
namespace WorkFlowCheck.MAUI.Pages.System;
|
namespace WorkFlowCheck.MAUI.Pages.System;
|
||||||
@@ -5,12 +7,26 @@ namespace WorkFlowCheck.MAUI.Pages.System;
|
|||||||
public partial class SyncPage : ContentPage
|
public partial class SyncPage : ContentPage
|
||||||
{
|
{
|
||||||
private ISyncService _syncService;
|
private ISyncService _syncService;
|
||||||
|
private IUserService _userService;
|
||||||
|
private UserDTO _currentUser;
|
||||||
|
|
||||||
public SyncPage()
|
public SyncPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_syncService = MauiProgram.ServiceProvider.GetRequiredService<ISyncService>();
|
_syncService = MauiProgram.ServiceProvider.GetRequiredService<ISyncService>();
|
||||||
|
_userService = MauiProgram.ServiceProvider.GetRequiredService<IUserService>();
|
||||||
|
}
|
||||||
|
override protected async void OnAppearing()
|
||||||
|
{
|
||||||
|
base.OnAppearing();
|
||||||
|
SetInfo();
|
||||||
|
}
|
||||||
|
private void SetInfo()
|
||||||
|
{
|
||||||
|
_currentUser = _userService.GetCurrentUser();
|
||||||
|
DeviceId.Text = _userService.DeviceId;
|
||||||
|
UserInfo.Text = $"{_currentUser?.FirstName} {_currentUser?.LastName}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnSyncClicked(object sender, EventArgs e)
|
private async void OnSyncClicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SyncBtn.IsEnabled = false;
|
SyncBtn.IsEnabled = false;
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ namespace WorkFlowCheck.MAUI.Services
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var res = await _dbContext.CheckListHeaders
|
var res = await _dbContext.CheckListHeaders
|
||||||
|
.Include(i=> i.CheckListTemplateHeader)
|
||||||
.Where(w => w.CheckStatus == CheckStatus.Open ||
|
.Where(w => w.CheckStatus == CheckStatus.Open ||
|
||||||
w.CheckStatus == CheckStatus.InProgress ||
|
w.CheckStatus == CheckStatus.InProgress ||
|
||||||
w.CheckStatus == CheckStatus.Blocked)
|
w.CheckStatus == CheckStatus.Blocked)
|
||||||
@@ -116,7 +117,8 @@ namespace WorkFlowCheck.MAUI.Services
|
|||||||
var retVal = new List<CheckListTemplateHeaderDTO>();
|
var retVal = new List<CheckListTemplateHeaderDTO>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var res = await _dbContext.CheckListTemplateHeaders.ToListAsync();
|
var res = await _dbContext.CheckListTemplateHeaders
|
||||||
|
.ToListAsync();
|
||||||
retVal = _mapper.Map<List<CheckListTemplateHeaderDTO>>(res);
|
retVal = _mapper.Map<List<CheckListTemplateHeaderDTO>>(res);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user