Leaf Input Status display

This commit is contained in:
2016-12-18 15:43:12 -05:00
parent 75d01a197d
commit 8f5399e746
2 changed files with 11 additions and 4 deletions
+5
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using AutoMapper;
using LeafWeb.Core.Entities;
using LeafWeb.Core.Utility;
namespace LeafWeb.WebCms.Models
{
@@ -41,8 +42,12 @@ namespace LeafWeb.WebCms.Models
[UIHint("LeafInputStatusViewModels")]
public List<LeafInputStatusViewModel> StatusHistory { get; set; }
public string OutputErrorMessage { get; set; }
static LeafInputDetails()
{
Mapper.CreateMap<LeafInputFile, string>().ConvertUsing(file => file?.Contents.GetString());
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<LeafInputStatus, LeafInputStatusViewModel>();