//need a method that allows user to edit user information this would override user in the database


        //need a method that allows the user to remove all expense records and user profile //need a method that displays company profile

        //need a method that displays user information

        //need a method that calls edit user

        //************** USER DASHBOARD**************
        #region User Dashboard
        public IActionResult Dashboard()
        {
            EmployerDB employerDB = new EmployerDB(_configuration);
            User       user       = _accessor.HttpContext.Session.GetObjectFromJson <User>("LoggedInUser");

            ViewBag.Role = user.RoleId;
            DashboardViewModel dashboardVM = new DashboardViewModel()
            {
                User     = user,
                Employer = employerDB.GetEmployerById(user.EmployerId)
            };

            return(View(dashboardVM));
        }
Beispiel #2
0
 public EmployerController(IHttpContextAccessor httpContextAccessor, IConfiguration configuration)
 {
     _accessor      = httpContextAccessor;
     _configuration = configuration;
     _employerDB    = new EmployerDB(_configuration);
 }