using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LHDN.CRM.Models.ViewModels
{
    public class UserRequestProfileUpdateViewModel
    {
        public UserRequestProfileViewModel WFUserProfile { get; set; }
        public List<ChangeHistoryUpdateViewModel> ChangeHistory { get; set; }
    }

    public class UserRequestProfileViewModel
    {
        public long WFUserProfileID { get; set; }
        public long? UserProfileID { get; set; }
        public string LoginID { get; set; }
        public string DisplayName { get; set; }
        public string Email { get; set; }
        public string NRIC { get; set; }
        public string Gred { get; set; }
        public int? UnitID { get; set; }
        public int? AdditionalUnitID { get; set; }
        public string AdditionalUnitIDMultiple { get; set; }
        public string UnitName { get; set; }
        public string AdditionalInfo { get; set; }
        public long? ManagerUserProfileID { get; set; }
        public string ManagerDisplayName { get; set; }
        public string ManagerEmail { get; set; }
        public string Jawatan { get; set; } // CR Jan2020 (Chew)
        public string ShortName { get; set; }
        public string DefaultRolesID { get; set; }
        public string AdditionalRolesID { get; set; }
        public string RemoveDefaultRolesID { get; set; }
        public string RemoveAdditionalRolesID { get; set; }
        public int? RemoveAdditionalUnitID { get; set; }
        public string RemoveUnitAndRoles { get; set; }
        public string ActionType { get; set; }
        public string ActionTypeDesc { get; set; }
        public int? WFStatusID { get; set; }
        public string WFStatusDesc { get; set; }
        public bool IsActive { get; set; }
        public int CurrentUserUnitID { get; set; }
        public string CurrentUserUnitName { get; set; }
        public bool IsCurrentUserLogin { get; set; }
        public bool IsOtherUserLogin { get; set; }
        public bool IsSubmitReviewAction { get; set; }
        public bool IsSubmitApprovalAction { get; set; }
        public bool IsApproveAction { get; set; }
        public bool IsRejectAction { get; set; }
        public bool IsRejectByApprovalAction { get; set; }
        public string CreatedBy { get; set; }
        public string CreatedByName { get; set; }
        public string CreatedByEmail { get; set; }
        public DateTime CreatedDateTime { get; set; }
        public string LastUpdatedBy { get; set; }
        public string LastUpdatedByName { get; set; }
        public string LastUpdatedByEmail { get; set; }
        public DateTime LastUpdatedDateTime { get; set; }
        public string Remarks { get; set; }
        public string ReviewBy { get; set; }
        public string ReviewByName { get; set; }
        public string ReviewByEmail { get; set; }
        public DateTime? ReviewedDateTime { get; set; }
        public string ApprovedBy { get; set; }
        public string ApprovedByName { get; set; }
        public string ApprovedByEmail { get; set; }
        public DateTime? ApprovedDateTime { get; set; }
        public string RequestedBy { get; set; }
        public string RequestedByName { get; set; }
        public string RequestedByEmail { get; set; }
        public DateTime? RequestedDateTime { get; set; }
        public DateTime CreatedUpdatedDateTime { get; set; }
        public string ReviewName { get; set; }
        public DateTime ReviewDateTime { get; set; }
        public string ApproverName { get; set; }
        public DateTime? ExpiryDate { get; set; }
        public DateTime? DormantDateFrom { get; set; }
        public DateTime? DormantDateTo { get; set; }
        public int ActiveCondition { get; set; }
        public string ActiveConditionDesc { get; set; }
        public long WFActivePeriodID { get; set; }
        public long WFUserFunctionalRoleMemberID { get; set; }
        public long? AdditionalManagerID { get; set; }
        public long? ChangeUnitAdditionManagerID { get; set; }
        public int? ChangeUnitAdditionManagerUnitID { get; set; }
        public List<WorkflowUserViewModel> ChangeUnitAdditionManager { get; set; }
        public List<RemoveUserManagerViewModel> RemoveUnitAdditionManager { get; set; }
        public List<UserRole> UserRoles { get; set; }
        public List<WFUserProfileManager> UserProfileManager { get; set; }

        public List<WFUserFunctionalRoleMember> UserFunctionRoles { get; set; }

        public List<WFUserFunctionalRoleMember> UserAdditionalFunctionRoles { get; set; }

        public List<WorkflowUserViewModel> UserAdditionalUnitAndRoles { get; set; }

        public List<UserWorkflowCatatanHistoryViewModel> WorkFlowCatatanHistory { get; set; }
        public List<WFUserProfileManager> AdditionalUnitUserProfileManager { get; set; }

        public UserWorkFlowViewModel UserWorkFlow { get; set; }
        public UserWFActiveConditionViewModel UserWFActiveCondition { get; set; }
        public UserWFAssignNameViewModel UserByName { get; set; }

        public int JenisPermohonanTypeID { get; set; }
        public bool IsSendApproval { get; set; }

        public DateTime? DiagihkanDateTime { get; set; }

        public int JawatanID { get; set; }

        public  bool IsSubmitButtonClick { get; set; }

    }

    public class WFUserProfileManager
    {
        public long UserProfileID { get; set; }
        public string LoginID { get; set; }
        public string DisplayName { get; set; }
        public string Email { get; set; }
        public string AdditionalInfo { get; set; }
        public bool IsActive { get; set; }
        public int UnitID { get; set; }
    }

    public class WFUserFunctionalRoleMember
    {
        public long FunctionalRoleMemberID { get; set; }
        public int FunctionalRoleID { get; set; }
        public string RoleName { get; set; }
        public string RoleCode { get; set; }
        public bool IsActive { get; set; }
        public int UnitID { get; set; }
        public string CreatedBy { get; set; }
        public DateTime CreatedDatetime { get; set; }
        public long? ManagerUserProfileID { get; set; }
    }

    public class UserWorkFlowViewModel
    {
        public long WorkflowID { get; set; }
        public long WFUserProfileID { get; set; }
        public string ActionType { get; set; }
        public string ActionTypeDesc { get; set; }
        public int AssignToTypeID { get; set; }
        public string AssignToLogin { get; set; }
        public string AssignToName { get; set; }
        public string AssignToEmail { get; set; }
        public int WFStatusID { get; set; }
        public string WFStatusDesc { get; set; }
        public int WFPrevStageStatusID { get; set; }
        public DateTime StartDate { get; set; }
        public string Remarks { get; set; }
        public string ClosedRemarks { get; set; }
        public string AssignBy { get; set; }
        public string AssignByName { get; set; }
        public string AssignByEmail { get; set; }
        public string CreatedBy { get; set; }
        public DateTime CreatedDateTime { get; set; }
        public string LastUpdatedBy { get; set; }
        public string LastUpdatedByName { get; set; }
        public string LastUpdatedByEmail { get; set; }
        public DateTime LastUpdatedDateTime { get; set; }  
        public int UnitID { get; set; }
        public string UnitName { get; set; }
        public int DecisionID { get; set; }
        public string DecisionDesc { get; set; }
        public string ReviewBy { get; set; }
        public string ReviewByName { get; set; }
        public string ReviewByEmail { get; set; }
        public DateTime? ReviewedDateTime { get; set; }
        public string ApprovedBy { get; set; }
        public string ApprovedByName { get; set; }
        public string ApprovedByEmail { get; set; }
        public DateTime? ApprovedDateTime { get; set; }
        public string RequestedBy { get; set; }
        public string RequestedByName { get; set; }
        public string RequestedByEmail { get; set; }
        public DateTime RequestedDateTime { get; set; }
        public DateTime CompletedDate { get; set; }
        public bool IsSubmitApproval { get; set; }
        public List<UserWorkFlowViewModel> wfUser { get; set; }
    }

    public class UserWorkflowCatatanHistoryViewModel
    {
        public string Title { get; set; }
        public string Catatan { get; set; }
        public string CreatedByName { get; set; }
        public DateTime LastUpdatedDateTime { get; set; }
    }

    public class UserWFAssignNameViewModel
    {
        public string RequestedByName { get; set; }
        public DateTime CreatedUpdatedDateTime { get; set; }
        public string ReviewName { get; set; }
        public DateTime ReviewDateTime { get; set; }
        public string ApproverName { get; set; }
        public DateTime ApprovedDateTime { get; set; }

    }
    public class UserWFActiveConditionViewModel
    {
        public long WFActivePeriodID { get; set; }
        public long WFUserProfileID { get; set; }
        public int ActiveCondition { get; set; }
        public string ActiveConditionDesc { get; set; }
        public DateTime? DormantDateFrom { get; set; }
        public DateTime? DormantDateTo { get; set; }
        public DateTime? ExpiryDate { get; set; }
        public long ActivePeriodID { get; set; }
        public long UserProfileID { get; set; }
    }

    public class RemoveUserManagerViewModel
    {
        public string ID { get; set; } // Login ID for User, ID for Unit
        public string DisplayName { get; set; }
        public string Email { get; set; }
        public long UserProfileID { get; set; }
        public string ManagerId { get; set; }   // Login ID for Manager, ID for Unit
        public string ManagerName { get; set; }
    }

}
