Üzenetküldés frontenden
This commit is contained in:
@@ -5,6 +5,39 @@
|
||||
x:Class="WorkFlowCheck.MAUI.Pages.CheckList.CheckListPage"
|
||||
Title="Ellenőrzések"
|
||||
BackgroundColor="#f0f0f0">
|
||||
<Shell.TitleView>
|
||||
<Grid Padding="2" VerticalOptions="Center">
|
||||
<Label Text="Ellenőrzések"
|
||||
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>
|
||||
<Grid RowDefinitions="*,*" Padding="30,30">
|
||||
<Frame Grid.Row="0"
|
||||
BorderColor="Gray"
|
||||
|
||||
@@ -14,7 +14,7 @@ public partial class CheckListPage : ContentPage
|
||||
private readonly ICheckListService _checkListService;
|
||||
private readonly IUserService _userService;
|
||||
private bool _isLoading;
|
||||
|
||||
private UserDTO _currentUser;
|
||||
|
||||
public ICommand NewCommand { get; set; }
|
||||
public ICommand ContinueCommand { get; set; }
|
||||
@@ -42,6 +42,12 @@ public partial class CheckListPage : ContentPage
|
||||
BlockCommand = new Command<CheckListHeaderDTO>(OnBlockItem);
|
||||
|
||||
}
|
||||
private void SetInfo()
|
||||
{
|
||||
_currentUser = _userService.GetCurrentUser();
|
||||
DeviceId.Text = _userService.DeviceId;
|
||||
UserInfo.Text = $"{_currentUser?.FirstName} {_currentUser?.LastName}";
|
||||
}
|
||||
protected override bool OnBackButtonPressed()
|
||||
{
|
||||
Shell.Current.GoToAsync("//MainPage");
|
||||
@@ -50,7 +56,7 @@ public partial class CheckListPage : ContentPage
|
||||
protected override async void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
|
||||
SetInfo();
|
||||
BindingContext = this;
|
||||
await LoadCheckListTemplate();
|
||||
await LoadCheckList();
|
||||
@@ -90,15 +96,15 @@ public partial class CheckListPage : ContentPage
|
||||
private async Task LoadCheckListTemplate()
|
||||
{
|
||||
IsLoading = true;
|
||||
var userId = _userService.GetCurrentUser()?.Id;
|
||||
CheckListTemplate.ItemsSource = await _checkListService.GetCheckListTemplates(userId ?? 1);
|
||||
|
||||
CheckListTemplate.ItemsSource = await _checkListService.GetCheckListTemplates(_currentUser.Id);
|
||||
IsLoading = false;
|
||||
}
|
||||
private async Task LoadCheckList()
|
||||
{
|
||||
IsLoading = true;
|
||||
var userId = _userService.GetCurrentUser()?.Id;
|
||||
CheckList.ItemsSource = await _checkListService.GetCheckLists(userId ?? 1);
|
||||
|
||||
CheckList.ItemsSource = await _checkListService.GetCheckLists(_currentUser.Id);
|
||||
IsLoading = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,39 @@
|
||||
xmlns:local="clr-namespace:WorkFlowCheck.MAUI.Pages.CheckList"
|
||||
BackgroundColor="#f0f0f0"
|
||||
Title="">
|
||||
<Shell.TitleView>
|
||||
<Grid Padding="2" VerticalOptions="Center">
|
||||
<Label Text=""
|
||||
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>
|
||||
<Grid>
|
||||
<StackLayout Padding="20">
|
||||
<Label x:Name="progressLabel" Text="Folyamatjelző" FontSize="Default" HorizontalOptions="Center" />
|
||||
|
||||
Reference in New Issue
Block a user