using System.Collections.Generic;

using BS.Shared.DataContracts;

namespace BeWo.ViewModel.ListViewModel
{
    public class TaskListVM : AbstractDCListMapperVM<TaskDC, TaskVM>
    {
        public TaskListVM(List<TaskDC> pDCList) : base(pDCList)
        {
        }

        protected override TaskVM CreateVM(TaskDC pDC)
        {
            var vm = base.CreateVM(pDC);
            if (!pDC.TaskOid.HasValue)
            {
                vm.Employees.Add(BeWoApp.LoggedOnUser.Employee);
            }

            return vm;
        }
    }
}