diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs index 2b448a868..2a37c712e 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserTypeRoleModel.cs @@ -95,6 +95,7 @@ namespace IRaCIS.Core.Application.Contracts public class UserTypeSelectDto { + public bool IsDeleted { get; set; } public Guid UserTypeId { get; set; } public string UserTypeShortName { get; set; } = string.Empty; } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs index 6a8657487..68fba3f4a 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/UserTrialViewModel.cs @@ -139,6 +139,11 @@ namespace IRaCIS.Application.Contracts public DateTime? JoinTime { get; set; } + + public string Roles => string.Join(',', TrialUserRoleList.Select(t => t.UserTypeShortName)); + public string JoinTimeStr => JoinTime?.ToString("yyyy-MM-dd") ?? string.Empty; + public string RemoveTimeStr => RemoveTime?.ToString("yyyy-MM-dd") ?? string.Empty; + } public class TrialMaintenanceDTO : UserTrialCommand diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs index 4bc8f2624..bdcd78907 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs @@ -50,7 +50,7 @@ namespace IRaCIS.Core.Application.Service IsDeleted = t.IsDeleted, JoinTime = t.JoinTime, RemoveTime = t.RemoveTime, - TrialUserRoleList = t.TrialUserRoleList.Select(t => new UserTypeSelectDto() { UserTypeId = t.UserRole.UserTypeRole.Id, UserTypeShortName = t.UserRole.UserTypeRole.UserTypeShortName }).ToList(), + TrialUserRoleList = t.TrialUserRoleList.Select(t => new UserTypeSelectDto() { IsDeleted = t.IsDeleted, UserTypeId = t.UserRole.UserTypeRole.Id, UserTypeShortName = t.UserRole.UserTypeRole.UserTypeShortName }).ToList(), }).ToPagedListAsync(inQuery);