feat: agregar SyncService y mejorar gestión de asistencia con nuevas funcionalidades
This commit is contained in:
1 parent
fb275508ee
commit
d953afd3b4
15 files changed
+339
-359
No files matched your search
@@ -13,7 +13,10 @@ public partial class LoginViewModel : ViewModelBase
|
||||
private string _rut = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _password = string.Empty;
|
||||
private bool _esTitular = true;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool _esReemplazo;
|
||||
|
||||
[ObservableProperty]
|
||||
private string _errorMessage = string.Empty;
|
||||
@@ -30,13 +33,24 @@ public partial class LoginViewModel : ViewModelBase
|
||||
_mainVm = mainVm;
|
||||
}
|
||||
|
||||
partial void OnEsTitularChanged(bool value)
|
||||
{
|
||||
if (value) EsReemplazo = false;
|
||||
}
|
||||
|
||||
partial void OnEsReemplazoChanged(bool value)
|
||||
{
|
||||
if (value) EsTitular = false;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task LoginAsync()
|
||||
{
|
||||
IsLoading = true;
|
||||
HasError = false;
|
||||
|
||||
var (success, message) = await _authService.LoginAsync(Rut, Password);
|
||||
var tipoAsignacion = EsTitular ? 1 : 4;
|
||||
var (success, message) = await _authService.LoginAsync(Rut, tipoAsignacion);
|
||||
|
||||
if (success)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user