Login, NFCWaiter

This commit is contained in:
2025-03-24 14:02:25 +01:00
parent d55dee91e9
commit ebe33abf69
11 changed files with 308 additions and 62 deletions
@@ -5,10 +5,12 @@ namespace WorkFlowCheck.MAUI.Pages.Security;
public partial class LoginPage : ContentPage
{
private IUserService _userService;
private ISyncService _syncService;
public LoginPage()
{
InitializeComponent();
_userService = MauiProgram.ServiceProvider.GetRequiredService<IUserService>();
_syncService = MauiProgram.ServiceProvider.GetRequiredService<ISyncService>();
}
private async void OnLoginClicked(object sender, EventArgs e)
{
@@ -24,6 +26,7 @@ public partial class LoginPage : ContentPage
if (response != null && response.IsSuccess)
{
_userService.SetCurrentUser(response.Data);
await _syncService.SyncDatas();
var wFCUser = Newtonsoft.Json.JsonConvert.SerializeObject(response.Data);
await SecureStorage.Default.SetAsync("WFCUser", "wFCUser");