Add details for search

This commit is contained in:
2020-07-23 21:16:26 -04:00
parent 25b5d8ebc6
commit 733ed01100
7 changed files with 45 additions and 16 deletions
+4 -1
View File
@@ -21,11 +21,14 @@ namespace LeafWeb.WebCms.App_Start
Mapper.CreateMap<LeafOutputFile, string>().ConvertUsing(file => file?.FileContents.Contents.GetString());
Mapper.CreateMap<LeafInputStatusType, string>().ConvertUsing(st => st.ToString());
Mapper.CreateMap<LeafInputStatusType, LeafInputStatus>().ConvertUsing(st => new LeafInputStatus());
Mapper.CreateMap<LeafInput, LeafInputDetails_Admin>()
Mapper.CreateMap<LeafInput, LeafInputDetails>()
.Include<LeafInput, LeafInputDetails_Admin>()
.ForMember(dest => dest.LeafInputId, opt => opt.MapFrom(src => src.Id))
.ForMember(dest => dest.HasLeafChart,
opt => opt.ResolveUsing(src => src.OutputFiles.Any(o => o.IsLeafChartFile)));
Mapper.CreateMap<LeafInput, LeafInputDetails_Admin>();
// LeafInputData
Mapper.CreateMap<LeafInputData, LeafInputDataViewModel>()
.ForMember(dest => dest.Filename, opt => opt.MapFrom(src => src.LeafOutputFile.Filename));