Leaf Chart streamline

This commit is contained in:
2016-03-22 07:38:10 -04:00
parent c761952a8a
commit 4b2757b19a
4 changed files with 36 additions and 12 deletions
@@ -13,6 +13,7 @@ namespace LeafWeb.Web.ViewModels.LeafOutput
public string CurrentStatus { get; set; }
public string[] ErrorMessages { get; set; }
public string[] LeafOutputFilenames { get; set; }
public bool HasLeafChartOutputFile { get; set; }
public string LeafInputName { get; set; }
public string LeafInputIdentifier { get; set; }
public string LeafInputSiteId { get; set; }
@@ -33,6 +34,9 @@ namespace LeafWeb.Web.ViewModels.LeafOutput
.Select(o => o.Filename)
.ToArray()
?? new string[] {}))
.ForMember(dest => dest.HasLeafChartOutputFile,
opt => opt.ResolveUsing(
file => file.LeafOutputFiles?.Any(o => o.IsLeafChartFile)))
.ForMember(dest => dest.LeafInputName, opt => opt.MapFrom(src => src.LeafInput.Name))
.ForMember(dest => dest.LeafInputIdentifier, opt => opt.MapFrom(src => src.LeafInput.Identifier))
.ForMember(dest => dest.LeafInputSiteId, opt => opt.MapFrom(src => src.LeafInput.SiteId))