public async Task <IActionResult> Dashboard([FromRoute] string employerAccountId, [FromQuery] string filter, [FromQuery] int page = 1, [FromQuery] string searchTerm = "")
        {
            if (string.IsNullOrWhiteSpace(filter) && string.IsNullOrWhiteSpace(searchTerm))
            {
                TryGetFiltersFromCookie(out filter, out searchTerm);
            }

            if (string.IsNullOrWhiteSpace(filter) == false || string.IsNullOrWhiteSpace(searchTerm) == false)
            {
                SaveFiltersInCookie(filter, searchTerm);
            }

            var vm = await _orchestrator.GetDashboardViewModelAsync(employerAccountId, filter, page, User.ToVacancyUser(), searchTerm);

            if (TempData.ContainsKey(TempDataKeys.DashboardErrorMessage))
            {
                vm.WarningMessage = TempData[TempDataKeys.DashboardErrorMessage].ToString();
            }

            if (TempData.ContainsKey(TempDataKeys.DashboardInfoMessage))
            {
                vm.InfoMessage = TempData[TempDataKeys.DashboardInfoMessage].ToString();
            }

            return(View(vm));
        }
Esempio n. 2
0
        public async Task <IActionResult> Dashboard([FromRoute] string employerAccountId)
        {
            var vm = await _orchestrator.GetDashboardViewModelAsync(employerAccountId, User.ToVacancyUser());

            vm.FromMaHome = ShowReferredFromMaBackLink();
            return(View(vm));
        }
        public async Task <IActionResult> Index([FromQuery] string searchTerm)
        {
            var vm = await _orchestrator.GetDashboardViewModelAsync(searchTerm, User);

            vm.DashboardMessage = TempData[TempDataKeys.DashboardMessage]?.ToString();

            return(View(vm));
        }
Esempio n. 4
0
        public async Task <IActionResult> Dashboard([FromRoute] string employerAccountId)
        {
            var vm = await _orchestrator.GetDashboardViewModelAsync(employerAccountId);

            if (TempData.ContainsKey(TempDataKeys.DashboardErrorMessage))
            {
                vm.WarningMessage = TempData[TempDataKeys.DashboardErrorMessage].ToString();
            }

            if (TempData.ContainsKey(TempDataKeys.DashboardInfoMessage))
            {
                vm.InfoMessage = TempData[TempDataKeys.DashboardInfoMessage].ToString();
            }

            return(View(vm));
        }
        public async Task <IActionResult> Dashboard([FromRoute] long ukprn)
        {
            var vm = await _orchestrator.GetDashboardViewModelAsync(ukprn);

            return(View(vm));
        }
        public async Task <IActionResult> Dashboard()
        {
            var vm = await _orchestrator.GetDashboardViewModelAsync(User.ToVacancyUser());

            return(View(vm.HasEmployerReviewPermission ? ViewNames.DashboardWithReview : ViewNames.DashboardNoReview, vm));
        }
Esempio n. 7
0
        public async Task <IActionResult> Dashboard()
        {
            var vm = await _orchestrator.GetDashboardViewModelAsync(User.ToVacancyUser());

            return(View(vm));
        }