Im Mobilklienten wird der Zeiterfassungseintragszeitraumdropdown für "Ohne Hilfeplan" wieder angezeigt.
63 lines
2.4 KiB
C#
63 lines
2.4 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Web.Mvc;
|
|
using BeWoPlanerMobil.Controllers;
|
|
using BeWoPlanerMobil.Service;
|
|
using BS.Shared.DataContracts;
|
|
using BS.Shared.DataContracts.Compact;
|
|
using BS.Shared.Extensions;
|
|
|
|
namespace BeWoPlanerMobil.Models
|
|
{
|
|
public class DevelopmentModel : AbstractModel
|
|
{
|
|
public List<UserRightGroup> UserRightGroups { get; set; } = new List<UserRightGroup>();
|
|
public List<SupportConceptDC> SupportConcepts { get; set; }
|
|
public List<CompactCustomerDC> AllCustomers { get; set; } = new List<CompactCustomerDC>();
|
|
public List<CompactEmployeeDC> AllEmployees { get; set; } = new List<CompactEmployeeDC>();
|
|
|
|
[Display(Name = "Ersteller")]
|
|
public long? SelectedEmployeeOid => SelectedEmployee?.EmployeeOid;
|
|
|
|
public CompactEmployeeDC SelectedEmployee { get; set; }
|
|
|
|
// TODO: name und oid
|
|
public List<SelectListItem> AvailableEmployees {
|
|
get
|
|
{
|
|
var result = new List<SelectListItem>();
|
|
result.AddRange(AllEmployees.Select(item => new SelectListItem { Value = item.EmployeeOid.ToString(), Text = $"{item.LastName}, {item.FirstName}", Selected = item.Equals(MobileSessionFacade.LoggedInCompactEmployee) }).OrderBy(s => s.Text).ToList());
|
|
|
|
return result;
|
|
}
|
|
}
|
|
|
|
public List<SelectListItem> AvailableCostbearerRelations { get; set; } = new List<SelectListItem>();
|
|
|
|
public List<CompactCustomerDC> SelectedCustomers { get; set; } = new List<CompactCustomerDC>();
|
|
|
|
public List<SelectListItem> AvailableCustomers { get; set; } = new List<SelectListItem>();
|
|
|
|
public List<ResourceDC> SelectedResources { get; set; } = new List<ResourceDC>();
|
|
|
|
public Dictionary<ValueListEntryDC, List<ResourceDC>> ResourceCategories2Resources { get; set; } = new Dictionary<ValueListEntryDC, List<ResourceDC>>();
|
|
|
|
public List<ResourceDC> AvailableResources
|
|
{
|
|
get
|
|
{
|
|
var result = new List<ResourceDC>();
|
|
|
|
ResourceCategories2Resources.DoForEach(rc2R =>
|
|
{
|
|
result.AddRangeIfElementsNotIn(rc2R.Value);
|
|
});
|
|
|
|
return result;
|
|
}
|
|
}
|
|
|
|
public List<CompactEmployeeDC> SelectedEmployees { get; set; } = new List<CompactEmployeeDC>();
|
|
}
|
|
} |