Ez most félig kész ...

This commit is contained in:
2025-03-03 13:24:23 +01:00
parent dca4f3ba73
commit 499daa0e17
12 changed files with 1803 additions and 67 deletions
File diff suppressed because it is too large Load Diff
+3
View File
@@ -8,6 +8,7 @@
xmlns:nfc="clr-namespace:WorkFlowCheck.MAUI.Pages.NFC" xmlns:nfc="clr-namespace:WorkFlowCheck.MAUI.Pages.NFC"
xmlns:system="clr-namespace:WorkFlowCheck.MAUI.Pages.System" xmlns:system="clr-namespace:WorkFlowCheck.MAUI.Pages.System"
xmlns:base="clr-namespace:WorkFlowCheck.MAUI.Pages.BaseStock" xmlns:base="clr-namespace:WorkFlowCheck.MAUI.Pages.BaseStock"
xmlns:checklist="clr-namespace:WorkFlowCheck.MAUI.Pages.CheckList"
Shell.FlyoutBehavior="Disabled" Shell.FlyoutBehavior="Disabled"
Title="WorkFlowCheck.MAUI"> Title="WorkFlowCheck.MAUI">
@@ -21,5 +22,7 @@
<ShellContent Title="Equipments" ContentTemplate="{DataTemplate base:EquipmentsPage}" Route="EquipmentsPage" /> <ShellContent Title="Equipments" ContentTemplate="{DataTemplate base:EquipmentsPage}" Route="EquipmentsPage" />
<ShellContent Title="Locations" ContentTemplate="{DataTemplate base:LocationsPage}" Route="LocationsPage" /> <ShellContent Title="Locations" ContentTemplate="{DataTemplate base:LocationsPage}" Route="LocationsPage" />
<ShellContent Title="CheckList" ContentTemplate="{DataTemplate checklist:CheckListPage}" Route="CheckListPage" />
</Shell> </Shell>
+56 -57
View File
@@ -4,64 +4,63 @@
x:Class="WorkFlowCheck.MAUI.MainPage" x:Class="WorkFlowCheck.MAUI.MainPage"
Title="Főmenü"> Title="Főmenü">
<ScrollView> <Grid RowDefinitions="Auto, * , Auto" Padding="30,0">
<VerticalStackLayout
Padding="30,0"
Spacing="25">
<!--<Image
Source="dotnet_bot.png"
HeightRequest="185"
Aspect="AspectFit"
SemanticProperties.Description="dot net bot in a race car number eight" />-->
<!--<Label <ScrollView Grid.Row="1">
Text="Hello, World!" <VerticalStackLayout Spacing="25">
x:Name="WelcomeLabel" <Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True">
Style="{StaticResource Headline}" <VerticalStackLayout>
SemanticProperties.HeadingLevel="Level1" />--> <Label Text="Alapműveletek" FontAttributes="Bold" FontSize="Medium" HorizontalOptions="Center" />
<Button
x:Name="ButtonSync" Margin="5"
Text="Adatok szinkronizálása"
SemanticProperties.Hint="Adatok szinkronizálása"
Clicked="OnButtonSync"
HorizontalOptions="Fill" />
<Button
x:Name="ButtonBase" Margin="5"
Text="Törzsadatok"
SemanticProperties.Hint="Törzsadatok"
Clicked="OnButtonBaseStock"
HorizontalOptions="Fill" />
<Button
x:Name="NFCTestBtn" Margin="5"
Text="NFC olvasó teszt"
SemanticProperties.Hint="NFC olvasó teszt"
Clicked="OnButtonNFCTest"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</Frame>
<Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True">
<VerticalStackLayout>
<Label Text="Ellenőrzés" FontAttributes="Bold" FontSize="Medium" HorizontalOptions="Center" />
<Button
x:Name="ButtonCheckList" Margin="5"
Text="Ellenőrzési feladatok"
SemanticProperties.Hint="Ellenőrzési feadatok"
Clicked="OnButtonCheckList"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</Frame>
<!--<Label </VerticalStackLayout>
Text="Welcome to &#10;.NET Multi-platform App UI" </ScrollView>
Style="{StaticResource SubHeadline}"
SemanticProperties.HeadingLevel="Level2" <Frame Grid.Row="2" BorderColor="Gray" Padding="5" Margin="1" HasShadow="True">
SemanticProperties.Description="Welcome to dot net Multi platform App U I" />--> <Button
<!--<Button x:Name="LogoutBtn" Margin="5"
x:Name="CounterBtn" BackgroundColor="DarkRed"
Text="Hahó II." Text="Kijelentkezés"
SemanticProperties.Hint="Counts the number of times you click" SemanticProperties.Hint="Kijelentkezés"
Clicked="OnCounterClicked" Clicked="OnButtonLogout"
HorizontalOptions="Fill" />--> HorizontalOptions="Fill"
<Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True"> VerticalOptions="Center">
<VerticalStackLayout> <Button.ImageSource>
<Button <FontImageSource FontFamily="FontAwesome" Glyph="" Size="20" />
x:Name="ButtonSync" Margin="5" </Button.ImageSource>
Text="Adatok szinkronizálása" </Button>
SemanticProperties.Hint="Adatok szinkronizálása" </Frame>
Clicked="OnButtonSync"
HorizontalOptions="Fill" /> </Grid>
<Button
x:Name="ButtonBase" Margin="5"
Text="Törzsadatok"
SemanticProperties.Hint="Törzsadatok"
Clicked="OnButtonBaseStock"
HorizontalOptions="Fill" />
<Button
x:Name="NFCTestBtn" Margin="5"
Text="NFC olvasó teszt"
SemanticProperties.Hint="NFC olvasó teszt"
Clicked="OnButtonNFCTest"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</Frame>
<Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True">
<Button
x:Name="LogoutBtn" Margin="5"
Text="Kijelentkezés"
SemanticProperties.Hint="Kijelentkezés"
Clicked="OnButtonLogout"
HorizontalOptions="Fill" />
</Frame>
</VerticalStackLayout>
</ScrollView>
</ContentPage> </ContentPage>
+4 -1
View File
@@ -63,7 +63,10 @@ namespace WorkFlowCheck.MAUI
{ {
Shell.Current.GoToAsync("//SyncPage"); Shell.Current.GoToAsync("//SyncPage");
} }
private async void OnButtonCheckList(object sender, EventArgs e)
{
await Shell.Current.GoToAsync("//CheckListPage");
}
} }
} }
+1
View File
@@ -57,6 +57,7 @@ namespace WorkFlowCheck.MAUI
{ {
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
fonts.AddFont("FontAwesome.ttf", "FontAwesome");
}) })
.UseMauiCommunityToolkitCore() .UseMauiCommunityToolkitCore()
.UseMauiCommunityToolkit(); .UseMauiCommunityToolkit();
@@ -2,11 +2,33 @@
<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.CheckList.CheckListPage" x:Class="WorkFlowCheck.MAUI.Pages.CheckList.CheckListPage"
Title="CheckListPage"> Title="Ellenőrzések">
<VerticalStackLayout> <Grid RowDefinitions="Auto, * , Auto" Padding="30,0">
<Label
Text="Welcome to .NET MAUI!" <ScrollView Grid.Row="1">
VerticalOptions="Center" <Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True">
HorizontalOptions="Center" /> <VerticalStackLayout>
</VerticalStackLayout> <Label Text="Megkezdett ellenőrzések" FontAttributes="Bold" FontSize="Medium" HorizontalOptions="Center" />
</VerticalStackLayout>
</Frame>
</ScrollView>
<ScrollView Grid.Row="2">
<Frame BorderColor="Gray" Padding="5" Margin="1" HasShadow="True">
<VerticalStackLayout>
<Label Text="Új ellenőrzés" FontAttributes="Bold" FontSize="Medium" HorizontalOptions="Center" />
<Button
x:Name="ButtonNewCheck" Margin="5"
BackgroundColor="Green"
Text="Új indítása"
SemanticProperties.Hint="Új indítása"
Clicked="OnButtonNewCheck"
HorizontalOptions="Fill" />
</VerticalStackLayout>
</Frame>
</ScrollView>
</Grid>
</ContentPage> </ContentPage>
@@ -6,4 +6,14 @@ public partial class CheckListPage : ContentPage
{ {
InitializeComponent(); InitializeComponent();
} }
protected override bool OnBackButtonPressed()
{
Shell.Current.GoToAsync("//MainPage");
return true;
}
public async void OnButtonNewCheck(object sender, EventArgs e)
{
}
} }
@@ -6,6 +6,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using WorkFlowCheck.MAUI.DataLayer; using WorkFlowCheck.MAUI.DataLayer;
using WorkFlowCheck.MAUI.Services.Interfaces;
namespace WorkFlowCheck.MAUI.Services namespace WorkFlowCheck.MAUI.Services
{ {
@@ -0,0 +1,27 @@
using AutoMapper;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.Common.DTO;
using WorkFlowCheck.MAUI.DataLayer;
using WorkFlowCheck.MAUI.Services.Interfaces;
namespace WorkFlowCheck.MAUI.Services
{
public class CheckListService : BaseService, ICheckListService
{
private readonly IUserService _userService;
public CheckListService(HttpClient httpClient, IConfiguration configuration, AppDbContext dbContext, IMapper mapper, IUserService userService ) : base(httpClient, configuration, dbContext, mapper)
{
_userService = userService;
}
public async Task StartNew(UserDTO userDTO)
{
}
}
}
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.Common.DTO;
namespace WorkFlowCheck.MAUI.Services.Interfaces
{
public interface ICheckListService
{
Task<CheckListHeaderDTO> StartNew();
}
}
@@ -110,8 +110,6 @@ namespace WorkFlowCheck.MAUI.Services
} }
} }
public async Task SyncCheckListTemplates() public async Task SyncCheckListTemplates()
{ {
try try