public async Task <IActionResult> ShortDescription(ShortDescriptionEditModel m) { var response = await _orchestrator.PostShortDescriptionEditModelAsync(m, User.ToVacancyUser()); if (!response.Success) { response.AddErrorsToModelState(ModelState); } var vm = await _orchestrator.GetShortDescriptionViewModelAsync(m); if (!ModelState.IsValid) { return(View(vm)); } if (_feature.IsFeatureEnabled(FeatureNames.EmployerTaskList)) { if (vm.IsTaskListCompleted) { return(RedirectToRoute(RouteNames.EmployerCheckYourAnswersGet)); } return(RedirectToRoute(RouteNames.VacancyDescription_Index_Get)); } return(RedirectToRoute(RouteNames.Vacancy_Preview_Get)); }
public async Task <IActionResult> ShortDescription(ShortDescriptionEditModel m) { var response = await _orchestrator.PostShortDescriptionEditModelAsync(m, User.ToVacancyUser()); if (!response.Success) { response.AddErrorsToModelState(ModelState); } if (!ModelState.IsValid) { var vm = await _orchestrator.GetShortDescriptionViewModelAsync(m); return(View(vm)); } return(RedirectToRoute(RouteNames.Vacancy_Preview_Get)); }
public async Task <IActionResult> ShortDescription(ShortDescriptionEditModel m, [FromQuery] bool wizard) { var response = await _orchestrator.PostShortDescriptionEditModelAsync(m, User.ToVacancyUser()); if (!response.Success) { response.AddErrorsToModelState(ModelState); } if (!ModelState.IsValid) { var vm = await _orchestrator.GetShortDescriptionViewModelAsync(m); vm.PageInfo.SetWizard(wizard); return(View(vm)); } return(wizard ? RedirectToRoute(RouteNames.Location_Get) : RedirectToRoute(RouteNames.Vacancy_Preview_Get, null, Anchors.ShortDescriptionSection)); }
public async Task PostShortDescriptionEditModelAsync(ShortDescriptionEditModel model) { await Sut.PostShortDescriptionEditModelAsync(model, User); }