public async Task <IActionResult> ArrangeTask(EditTaskViewModel viewModel) { if (!ModelState.IsValid) { return(View(viewModel)); } return(await tasksManager.ArrangeTask(viewModel.Description, viewModel.DateDeadline) ? (IActionResult)RedirectToAction("Index", "Tasks").PushAlert("Task was created") : View(viewModel.WithAlert("Arranging task failed"))); }