display the /HairCut/Brush profile
This commit is contained in:
40
Yavsc/ViewModels/FrontOffice/PerformerProfileViewModel.cs
Normal file
40
Yavsc/ViewModels/FrontOffice/PerformerProfileViewModel.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.ViewModels.FrontOffice
|
||||
{
|
||||
public class PerformerProfileViewModel
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string PerformerId { get; set; }
|
||||
public bool Active { get; set; }
|
||||
public bool AcceptNotifications { get; set; }
|
||||
public bool AcceptPublicContact { get; set; }
|
||||
public UserActivity Context { get; set; }
|
||||
|
||||
public object Settings { get; set; }
|
||||
public UserActivity[] Extra { get; set; }
|
||||
|
||||
public string WebSite { get; set; }
|
||||
public string SettingsClassName { get; set; }
|
||||
|
||||
public PerformerProfileViewModel(PerformerProfile profile, string activityCode, object settings)
|
||||
{
|
||||
UserName = profile.Performer.UserName;
|
||||
PerformerId = profile.PerformerId;
|
||||
Active = profile.Active;
|
||||
AcceptNotifications = profile.AcceptNotifications;
|
||||
AcceptPublicContact = profile.AcceptPublicContact;
|
||||
Context = profile.Activity.FirstOrDefault(a => a.DoesCode == activityCode);
|
||||
SettingsClassName = Context.Does.SettingsClassName;
|
||||
|
||||
Settings = settings;
|
||||
WebSite = profile.WebSite;
|
||||
Extra = profile.Activity.Where(a => a.DoesCode != activityCode).ToArray();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user