diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index 67054d8f4..31330da10 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -1,5 +1,6 @@ using IRaCIS.Core.Domain.Share; using Newtonsoft.Json; +using static IRaCIS.Application.Contracts.UserHospitalGroupInfoWithName; namespace IRaCIS.Application.Contracts @@ -175,7 +176,7 @@ namespace IRaCIS.Application.Contracts public List HospitalGroupIdList => HospitalGroupList.Select(t => t.HospitalGroupId).ToList(); - public List HospitalGroupList { get; set; } = new List(); + public List HospitalGroupList { get; set; } = new List(); } public class UserInfo @@ -265,6 +266,11 @@ namespace IRaCIS.Application.Contracts } + public class UserHospitalGroupInfoWithName : UserHospitalGroupInfo + { + public string Name { get; set; } + } + public class UserHospitalGroupInfo { public Guid HospitalGroupId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs index bbac2a38c..eabc93639 100644 --- a/IRaCIS.Core.Application/Service/Management/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Management/_MapConfig.cs @@ -74,7 +74,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.UserType, u => u.MapFrom(t => t.UserTypeName)); CreateMap() - .ForMember(d => d.HospitalGroupList, u => u.MapFrom(s => s.IdentityUserHospitalGroupList.Select(t => new UserHospitalGroupInfo() { HospitalGroupId = t.HospitalGroupId, IsDisabled = t.IsDisabled }))); + .ForMember(d => d.HospitalGroupList, u => u.MapFrom(s => s.IdentityUserHospitalGroupList.Select(t => new UserHospitalGroupInfoWithName() { HospitalGroupId = t.HospitalGroupId, IsDisabled = t.IsDisabled, Name = t.HospitalGroup.Name }))); CreateMap()