using System.Collections.Generic; namespace Neo.Afx.ViewModels { /// /// Base workflow console viewModel /// public class WorkflowConsoleViewModelBase { /// /// The name of the controller to be used on completion of all for workflow actions as ewll as on the console back button click /// public string DashboardControllerName { get; set; } /// /// The name of the controller to be used for workflow actions. Usually Workflows.FriendlyName /// public string ControllerName { get; set; } /// /// The logged in user's id /// public long UserID { get; set; } /// /// The logged in user's roles /// public IEnumerable UserRoles { get; set; } /// /// Indicates whether a user is an administrator /// public bool UserIsAdmin { get; set; } /// /// The System.Entities EntityID for the data record the workflow instance relates to /// public long EntityID { get; set; } /// /// The System.Entities Primary key value for the related entity /// public string EntityKey { get; set; } /// /// The actual item i.e. record id for the data records the workflow instance relates to /// public long ItemID { get; set; } /// /// The Workflows.WorkflowID /// public long WorkflowID { get; set; } /// /// The WorkflowTemplates.DocumentStoreLocationID /// public long DocumentStoreLocationID { get; set; } /// /// The Workflows.FriendlyName /// public string WorkflowFriendlyName { get; set; } /// /// The workflow template to be used for the workflow /// public object WorkflowTemplate { get; set; } /// /// List of workflow template defaults /// public object WorkflowTemplateDefaults { get; set; } /// /// The actual workflow instance record with steps and tasks /// public object WorkflowInstance { get; set; } /// /// The workflow instance route object /// public object WorkflowInstanceRoute { get; set; } /// /// List of all checklist results as sourced from Form.ChecklistResults /// public object FormChecklistResults { get; set; } /// /// The full entity framework object for the data record /// public object Value { get; set; } /// /// A list of LookupLists /// public object Lookups { get; set; } /// /// Properties to be used on the UI /// public WorkflowConsoleUIProperties Ui { get; set; } } /// /// Defines a lookup list /// public class LookupList { /// /// Default lookup list constructor /// /// What you would like to reference your list as on the client side /// The actual list object public LookupList(string listName, object list) { ListName = listName; List = list; } /// /// The list name /// public string ListName { get; set; } /// /// The actual list /// public object List { get; set; } } /// /// Properties to be used on the UI /// public class WorkflowConsoleUIProperties { /// /// Indicates whether a user can view the workflow form /// public bool canViewForm { get; set; } /// /// Indicates whether a user can save a record /// public bool canSave { get; set; } /// /// Indicates whether a user can delete a record /// public bool canDelete { get; set; } /// /// Indicates whether a user can print a record /// public bool canPrint { get; set; } /// /// Indicates whether a user can submit a workflow /// public bool canSubmit { get; set; } /// /// Indicates whether a user can approve or reject a workflow /// public bool canApproveReject { get; set; } /// /// Indicates whether a user can approve only /// public bool canApprove { get; set; } /// /// Indicates whether a user can request correction for a workflow /// public bool canRequestCorrection { get; set; } /// /// Indicates whether a user can escalate a workflow /// public bool canEscalate { get; set; } /// /// Indicates whether a user can send an escalation task back to the originating user /// public bool canSendEscalationBack { get; set; } /// /// Indicates whether a user can add a comment to a record /// public bool canAddComment { get; set; } /// /// Indicates whether a user can upload a document to a record /// public bool canUploadDocument { get; set; } /// /// Indicates whether a user can view documents related to a record /// public bool canViewDocuments { get; set; } /// /// Indicates whether a user can view comments related to a record /// public bool canViewComments { get; set; } /// /// Indicates whether a user can view tasks related to a record /// public bool canViewTasks { get; set; } /// /// Indicates whether a user can reassign tasks related to a record /// public bool canReAssignTasks { get; set; } /// /// Indicates whether a user can view correspondence related to a record /// public bool canViewCorrespondence { get; set; } /// /// Indicates whether a user can view queries related to a record /// public bool canViewQueries { get; set; } /// /// Indicates whether a user can view the route indicator /// public bool canViewRouteIndicator { get; set; } } }