diff --git a/phronCare.API/Controllers/AccountController.cs b/phronCare.API/Controllers/AccountController.cs index 853d6b7..af9e9cd 100644 --- a/phronCare.API/Controllers/AccountController.cs +++ b/phronCare.API/Controllers/AccountController.cs @@ -142,7 +142,13 @@ namespace phronCare.API.Controllers user.NormalizedEmail = model.Email.ToUpper(); user.TwoFactorEnabled = model.TwoFactorEnabled; user.LockoutEnabled = model.LockoutEnabled; - + // Campos personalizados + user.FirstName = model.FirstName; + user.LastName = model.LastName; + user.PhoneNumber = model.PhoneNumber; + user.CompanyName = model.CompanyName; + user.Department = model.Department; + user.BirthDate = model.BirthDate; var result = await _userManager.UpdateAsync(user); if (result.Succeeded) diff --git a/phronCare.API/Models/Account/UserUpdate.cs b/phronCare.API/Models/Account/UserUpdate.cs index c991b1a..ef71b30 100644 --- a/phronCare.API/Models/Account/UserUpdate.cs +++ b/phronCare.API/Models/Account/UserUpdate.cs @@ -7,6 +7,14 @@ public string Email { get; set; } = string.Empty; public bool TwoFactorEnabled { get; set; } public bool LockoutEnabled { get; set; } + + // Nuevos campos + public string? FirstName { get; set; } + public string? LastName { get; set; } + public string? PhoneNumber { get; set; } + public string? CompanyName { get; set; } + public string? Department { get; set; } + public DateTime? BirthDate { get; set; } } public class User { @@ -24,5 +32,12 @@ public DateTimeOffset? LockoutEnd { get; set; } public bool LockoutEnabled { get; set; } public int AccessFailedCount { get; set; } + + // Nuevos campos + public string? FirstName { get; set; } + public string? LastName { get; set; } + public string? Company { get; set; } + public string? Department { get; set; } + public DateTime? BirthDate { get; set; } } } diff --git a/phronCare.UIBlazor/Pages/Accounts/Registration.razor b/phronCare.UIBlazor/Pages/Accounts/Registration.razor index 6b9dc5c..9415e68 100644 --- a/phronCare.UIBlazor/Pages/Accounts/Registration.razor +++ b/phronCare.UIBlazor/Pages/Accounts/Registration.razor @@ -1,71 +1,104 @@ @page "/registration" -@using System.Text.Json; -@using System.Collections.Generic -@using System.ComponentModel.DataAnnotations; +@using System.Text.Json +@using System.ComponentModel.DataAnnotations @inject HttpClient httpClient @inject IToastService toastService @inject NavigationManager navigation -
| Id | -Username | -Confirmed | -2FA | -Access Failed | -Lockout | -Actions | +Nombre completo | +Usuario | +Teléfono | +Empresa | +Departamento | +Verificado | +2FA | +#Intentos | +Lockout | +Acciones | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @user.Id | +@user.FullName | @user.UserName | @user.Email | -@user.EmailConfirmed | -@user.TwoFactorEnabled | -@user.AccessFailedCount | -@user.LockoutEnabled | +@user.PhoneNumber | +@user.CompanyName | +@user.Department | +@(user.EmailConfirmed ? "✅" : "❌") | +@(user.TwoFactorEnabled ? "✅" : "❌") | +@user.AccessFailedCount | +@(user.LockoutEnabled ? "✅" : "❌") | - + @if (user.UserName.ToLower() != "superdmin") { - + } - + |