diff --git a/Domain/Entities/EPatient.cs b/Domain/Entities/EPatient.cs index e858c30..29271b6 100644 --- a/Domain/Entities/EPatient.cs +++ b/Domain/Entities/EPatient.cs @@ -8,10 +8,13 @@ namespace Domain.Entities [Required(ErrorMessage = "Debe ingresar un nombre.")] public string Firstname { get; set; } = null!; public string Lastname { get; set; } = null!; + [Required(ErrorMessage = "Debe ingresar un tipo de documento.")] public int? DocumenttypesId { get; set; } + [Required(ErrorMessage = "Debe ingresar un numero de documento.")] public string? DocumentNumber { get; set; } public string? AffiliateNumber { get; set; } public DateOnly? Birthdate { get; set; } + [Required(ErrorMessage = "Debe seleccionar un genero.")] public string? Gender { get; set; } public string? Phone { get; set; } public string? Email { get; set; } diff --git a/phronCare.API/Controllers/Sales/PatientController.cs b/phronCare.API/Controllers/Sales/PatientController.cs index 0dabb5b..398a460 100644 --- a/phronCare.API/Controllers/Sales/PatientController.cs +++ b/phronCare.API/Controllers/Sales/PatientController.cs @@ -90,7 +90,7 @@ namespace phronCare.API.Controllers.Sales catch (Exception ex) { var methodName = MethodBase.GetCurrentMethod()?.Name ?? "UnknownMethod"; - return StatusCode(500, $"{methodName} Message: {ex.Message}"); + return BadRequest($"Error de negocio: {ex.Message}"); } } @@ -112,7 +112,7 @@ namespace phronCare.API.Controllers.Sales catch (Exception ex) { var methodName = MethodBase.GetCurrentMethod()?.Name ?? "UnknownMethod"; - return StatusCode(500, $"{methodName} Message: {ex.Message}"); + return StatusCode(500, $"{ex.Message}"); } } diff --git a/phronCare.UIBlazor/Pages/Sales/CustomerForm.razor b/phronCare.UIBlazor/Pages/Sales/CustomerForm.razor index 7d2709c..32cb2d8 100644 --- a/phronCare.UIBlazor/Pages/Sales/CustomerForm.razor +++ b/phronCare.UIBlazor/Pages/Sales/CustomerForm.razor @@ -10,6 +10,7 @@ @inject AuthenticationStateProvider authenticationStateProvider @inject AccountTypeService accountTypeService @inject TaxConditionService taxConditionService +@inject DocumentTypeService documentTypeService
No hay resultados.
+ } +