public IActionResult EditRequestApprovalDecision(int editRequestId) { var editRequest = _materialsService.GetEditRequest(editRequestId); if (editRequest == null) { return(RedirectToAction("ResourceNotFound", "Error", new { error = "sugestia edycji o podanym Id nie istnieje." })); } ConfigureSuggestionBreadcrumbs(editRequestId); var vm = new ChangeRequestApprovalDecision { MaterialViewModel = new MaterialToApproveViewModel { MaterialId = editRequest.MaterialToUpdateId, CreatorUsername = editRequest.MaterialToUpdate.Creator.Username, Name = editRequest.MaterialToUpdate.Name, Description = editRequest.MaterialToUpdate.Description, UploadDate = editRequest.MaterialToUpdate.UploadDate }, EditRequestViewModel = new EditRequestViewModel { EditRequestId = editRequest.EditRequestId, MaterialName = editRequest.NewName, NewDescription = editRequest.NewDescription, Summary = editRequest.Summary, UpdaterName = editRequest.Updater.Username, RequestDate = editRequest.RequestDate, Files = editRequest.Files.Select(f => new FileViewModel { FileId = f.FileId, FileName = f.FileName, RelativePath = f.RelativePath, ContentType = f.ContentType } ).ToList() } }; return(View(vm)); }