public ActionResult ExportNavigation(Guid id, ExportNavigationSection section) { var data = Task.Run(() => mediator.SendAsync(new GetNotificationAssessmentSummaryInformation(id))).Result; var showAssessmentDecision = Task.Run(() => authorizationService.AuthorizeActivity( ExportNotificationPermissions.CanMakeExportNotificationAssessmentDecision)) .Result; var showKeyDatesOverride = Task.Run(() => authorizationService.AuthorizeActivity( UserAdministrationPermissions.CanOverrideKeyDates)) .Result; var showFinancialGuaranteeDatesOverride = Task.Run(() => authorizationService.AuthorizeActivity( UserAdministrationPermissions.CanOverrideFinancialGuaranteeDates)) .Result; var hasComments = Task.Run(() => mediator.SendAsync(new CheckNotificationHasComments(id))).Result; var model = new ExportNavigationViewModel { Data = data, ActiveSection = section, AdminLinksModel = CreateAdminLinksViewModel(), ShowAssessmentDecision = showAssessmentDecision, ShowKeyDatesOverride = showKeyDatesOverride, ShowFinancialGuaranteeDatesOverride = showFinancialGuaranteeDatesOverride, HasComments = hasComments }; return(PartialView("_ExportNavigation", model)); }
public ActionResult ExportNavigation(Guid id, ExportNavigationSection section) { var data = Task.Run(() => mediator.SendAsync(new GetNotificationAssessmentSummaryInformation(id))).Result; var showAssessmentDecision = Task.Run(() => authorizationService.AuthorizeActivity( ExportNotificationPermissions.CanMakeExportNotificationAssessmentDecision)) .Result; var showKeyDatesOverride = Task.Run(() => authorizationService.AuthorizeActivity( UserAdministrationPermissions.CanOverrideKeyDates)) .Result; var showDeleteMovementLink = Task.Run(() => authorizationService.AuthorizeActivity( UserAdministrationPermissions.CanDeleteMovements)) .Result; var model = new ExportNavigationViewModel { Data = data, ActiveSection = section, AdminLinksModel = CreateAdminLinksViewModel(), ShowAssessmentDecision = showAssessmentDecision, ShowKeyDatesOverride = showKeyDatesOverride, ShowDeleteMovementLink = showDeleteMovementLink }; return PartialView("_ExportNavigation", model); }