public PerformanceMeasuresViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ViewDataForAngularEditor viewDataForAngularEditor, ProposalSectionsStatus proposalSectionsStatus) : base(currentFirmaSession, project, ProjectCreateSection.ReportedAccomplishments.ProjectCreateSectionDisplayName, proposalSectionsStatus) { RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshReportedPerformanceMeasures(project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffReportedPerformanceMeasures(project)); var performanceMeasureActuals = project.GetPerformanceMeasureReportedValues(); var performanceMeasureSubcategoriesCalendarYearReportedValues = PerformanceMeasureSubcategoriesCalendarYearReportedValue.CreateFromPerformanceMeasuresAndCalendarYears(new List <IPerformanceMeasureReportedValue>(performanceMeasureActuals)); PerformanceMeasureReportedValuesSummaryViewData = new PerformanceMeasureReportedValuesSummaryViewData(performanceMeasureSubcategoriesCalendarYearReportedValues, project.GetPerformanceMeasuresExemptReportingYears().Select(x => x.CalendarYear).ToList(), project.PerformanceMeasureActualYearsExemptionExplanation, performanceMeasureActuals.Select(x => x.CalendarYear).Distinct().Select(x => new CalendarYearString(x)).ToList()); ViewDataForAngular = viewDataForAngularEditor; IsImplementationStartYearValid = project.ImplementationStartYear.HasValue && project.ImplementationStartYear < project.CompletionYear; ReportingYearLabel = "Year"; if (new PerformanceMeasureManageFeature().HasPermissionByFirmaSession(currentFirmaSession)) { ConfigurePerformanceMeasuresUrl = SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(pmc => pmc.Manage()); } ShowCommentsSection = project.IsPendingApproval() || (project.ReportedAccomplishmentsComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }
public ProjectCustomAttributesViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus, EditProjectCustomAttributesViewData editCustomAttributesViewData, ProjectCustomAttributesValidationResult projectCustomAttributesValidationResult) : base(currentFirmaSession, project, ProjectCreateSection.CustomAttributes.ProjectCreateSectionDisplayName, proposalSectionsStatus) { EditCustomAttributesViewData = editCustomAttributesViewData; ShowCommentsSection = project.IsPendingApproval() || (project.CustomAttributesComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }
public LocationSimpleViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus, ProjectLocationSimpleViewData projectLocationSimpleViewData) : base(currentFirmaSession, project, ProjectCreateSection.LocationSimple.ProjectCreateSectionDisplayName, proposalSectionsStatus) { ProjectLocationSimpleViewData = projectLocationSimpleViewData; ShowCommentsSection = project.IsPendingApproval() || (project.BasicsComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }
public ExpectedPerformanceMeasureValuesViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus, EditPerformanceMeasureExpectedViewData editPerformanceMeasureExpectedViewData) : base(currentFirmaSession, project, ProjectCreateSection.ExpectedAccomplishments.ProjectCreateSectionDisplayName, proposalSectionsStatus) { EditPerformanceMeasureExpectedViewData = editPerformanceMeasureExpectedViewData; ShowCommentsSection = project.IsPendingApproval() || (project.BasicsComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }
public AttachmentsAndNotesViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus, EntityNotesViewData entityNotesViewData, ProjectAttachmentsDetailViewData projectAttachmentsDetailViewData) : base(currentFirmaSession, project, ProjectCreateSection.AttachmentsAndNotes.ProjectCreateSectionDisplayName, proposalSectionsStatus) { EntityNotesViewData = entityNotesViewData; ProjectAttachmentsDetailViewData = projectAttachmentsDetailViewData; ShowCommentsSection = project.IsPendingApproval() || (project.ContactsComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }
public ExpectedFundingViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus, ViewDataForAngularClass viewDataForAngularClass ) : base(currentFirmaSession, project, ProjectCreateSection.Budget.ProjectCreateSectionDisplayName, proposalSectionsStatus) { RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); ViewDataForAngular = viewDataForAngularClass; ShowCommentsSection = project.IsPendingApproval() || (project.BudgetComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }
public PhotoViewData(FirmaSession currentFirmaSession, string galleryName, IEnumerable <FileResourcePhoto> galleryImages, string addNewPhotoUrl, Func <FileResourcePhoto, object> sortFunction, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus) : base(currentFirmaSession, project, ProjectCreateSection.Photos.ProjectCreateSectionDisplayName, proposalSectionsStatus) { AddNewUrl = addNewPhotoUrl; var selectKeyImageUrl = SitkaRoute <ProjectImageController> .BuildUrlFromExpression(x => x.SetKeyPhoto(UrlTemplate.Parameter1Int)); ImageGalleryViewData = new ImageGalleryViewData(currentFirmaSession, galleryName, galleryImages, true, addNewPhotoUrl, selectKeyImageUrl, true, sortFunction, "Photo"); ShowCommentsSection = project.IsPendingApproval() || (project.PhotosComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }
public EditProposalClassificationsViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, List <ProjectFirmaModels.Models.ClassificationSystem> classificationSystems, string currentSectionDisplayName, ProposalSectionsStatus proposalSectionsStatus) : base(currentFirmaSession, project, currentSectionDisplayName, proposalSectionsStatus) { ProjectName = project.GetDisplayName(); ClassificationSystems = classificationSystems; FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType(); FieldDefinitionForClassification = FieldDefinitionEnum.Classification.ToType(); if (new SitkaAdminFeature().HasPermissionByFirmaSession(currentFirmaSession)) { ConfigureClassificationSystemsUrl = SitkaRoute <TenantController> .BuildUrlFromExpression(tc => tc.Detail()); } ShowCommentsSection = project.IsPendingApproval() || (project.ProposalClassificationsComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }
public BasicsViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus, IEnumerable <ProjectFirmaModels.Models.TaxonomyLeaf> taxonomyLeafs, IEnumerable <FundingType> fundingTypes, TenantAttribute tenantAttribute) : base(currentFirmaSession, project, ProjectCreateSection.Basics.ProjectCreateSectionDisplayName, proposalSectionsStatus) { ShowCommentsSection = project.IsPendingApproval() || (project.BasicsComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; ShowProjectStageDropDown = project.ProjectStage != ProjectStage.Proposal; ProjectDisplayName = project.GetDisplayName(); AssignParameters(taxonomyLeafs, fundingTypes, tenantAttribute); }
public ExpendituresViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ViewDataForAngularClass viewDataForAngularClass, ProposalSectionsStatus proposalSectionsStatus) : base(currentFirmaSession, project, "OBSOLETE Reported Expenditures", proposalSectionsStatus) //: base(currentFirmaSession, project, ProjectCreateSection.ReportedExpenditures.ProjectCreateSectionDisplayName, proposalSectionsStatus) { ProjectID = project.ProjectID; ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpenditures(project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpenditures(project)); RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); ShowCommentsSection = project.IsPendingApproval() || (project.ExpendituresComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }