diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index f46997b84..19adf30a9 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -178,6 +178,8 @@ namespace IRaCIS.Core.Application.Contracts public Guid? PreliminaryAuditUserId { get; set; } public Guid? CurrentActionUserId { get; set; } + public string? CurrentActionUserName { get; set; } + public bool IsBaseLine { get; set; } public bool IsUrgent { get; set; } public Guid? ClinicalDataSignUserId { get; set; } diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 44cf91e5f..6c2627e68 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -204,6 +204,8 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUser.UserName)) .ForMember(d => d.PreliminaryAuditUserId, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUserId)) .ForMember(d => d.CurrentActionUserId, u => u.MapFrom(s => s.SubjectVisit.CurrentActionUserId)) + .ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.SubjectVisit .CurrentActionUser.UserName)) + .ForMember(d => d.SiteId, u => u.MapFrom(s => s.SubjectVisit.SiteId)) .ForMember(d => d.AuditState, u => u.MapFrom(s => s.SubjectVisit.AuditState)) .ForMember(d => d.IsUrgent, u => u.MapFrom(s => s.SubjectVisit.IsUrgent)) diff --git a/IRaCIS.Core.Infra.EFCore/Interceptor/AuditInterceptor.cs b/IRaCIS.Core.Infra.EFCore/Interceptor/AuditInterceptor.cs index b8f242d01..efa8f6c9c 100644 --- a/IRaCIS.Core.Infra.EFCore/Interceptor/AuditInterceptor.cs +++ b/IRaCIS.Core.Infra.EFCore/Interceptor/AuditInterceptor.cs @@ -141,7 +141,8 @@ public class AuditingInterceptor : ISaveChangesInterceptor return audit; string CreateAddedMessage(EntityEntry entry) - => entry.Properties.Aggregate( + => + entry.Properties.Aggregate( $"Inserting {entry.Metadata.DisplayName()} with ", (auditString, property) => auditString + $"{property.Metadata.Name}: '{property.CurrentValue}' ");