public IndexViewData(Person currentPerson, Models.FirmaPage firmaPage) : base(currentPerson, firmaPage) { PageTitle = MultiTenantHelpers.GetPerformanceMeasureNamePluralized(); var hasPerformanceMeasureManagePermissions = new PerformanceMeasureManageFeature().HasPermissionByPerson(currentPerson); HasPerformanceMeasureManagePermissions = hasPerformanceMeasureManagePermissions; PerformanceMeasureGridSpec = new PerformanceMeasureGridSpec(currentPerson) { ObjectNameSingular = MultiTenantHelpers.GetPerformanceMeasureName(), ObjectNamePlural = MultiTenantHelpers.GetPerformanceMeasureNamePluralized(), SaveFiltersInCookie = true }; if (HasPerformanceMeasureManagePermissions) { var contentUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(c => c.New()); PerformanceMeasureGridSpec.CreateEntityModalDialogForm = new ModalDialogForm(contentUrl, $"Create a new {Models.FieldDefinition.PerformanceMeasure.GetFieldDefinitionLabel()}"); } PerformanceMeasureGridSpec.CustomExcelDownloadLinkText = $"Download with {Models.FieldDefinition.PerformanceMeasureSubcategory.GetFieldDefinitionLabelPluralized()}"; PerformanceMeasureGridSpec.CustomExcelDownloadUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(tc => tc.IndexExcelDownload()); PerformanceMeasureGridName = "performanceMeasuresGrid"; PerformanceMeasureGridDataUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(c => c.PerformanceMeasureGridJsonData()); EditSortOrderUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(x => x.EditSortOrder()); }
public IndexViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.FirmaPage firmaPage) : base(currentFirmaSession, firmaPage) { PageTitle = MultiTenantHelpers.GetPerformanceMeasureNamePluralized(); HasPerformanceMeasureManagePermissions = new PerformanceMeasureManageFeature().HasPermissionByFirmaSession(CurrentFirmaSession); PerformanceMeasureGridSpec = new PerformanceMeasureGridSpec(currentFirmaSession) { ObjectNameSingular = MultiTenantHelpers.GetPerformanceMeasureName(), ObjectNamePlural = MultiTenantHelpers.GetPerformanceMeasureNamePluralized(), SaveFiltersInCookie = true }; NewUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(c => c.New()); PerformanceMeasureGridSpec.CustomExcelDownloadLinkText = $"Download with {FieldDefinitionEnum.PerformanceMeasureSubcategory.ToType().GetFieldDefinitionLabelPluralized()}"; PerformanceMeasureGridSpec.CustomExcelDownloadUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(tc => tc.IndexExcelDownload()); PerformanceMeasureGridName = "performanceMeasuresGrid"; PerformanceMeasureGridDataUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(c => c.PerformanceMeasureGridJsonData()); EditSortOrderUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(x => x.EditSortOrder()); }