public RecordObservationsViewData(Person currentPerson, Models.OnlandVisualTrashAssessment ovta, OVTAObservationsMapInitJson mapInitJson, string geoServerUrl) : base(currentPerson, Models.OVTASection.RecordObservations, ovta) { MapInitJson = mapInitJson; ViewDataForAngular = new ViewDataForAngularClass(mapInitJson, ovta, geoServerUrl, ovta.StormwaterJurisdictionID); }
public ExpectedFundingByCostTypeViewData(FirmaSession currentFiramSession, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectBudgetSummaryViewData projectBudgetSummaryViewData, ProjectBudgetsAnnualByCostTypeViewData projectBudgetsAnnualByCostTypeViewData, ProjectUpdateStatus projectUpdateStatus, ExpectedFundingValidationResult expectedFundingValidationResult ) : base(currentFiramSession, projectUpdateBatch, projectUpdateStatus, expectedFundingValidationResult.GetWarningMessages(), ProjectUpdateSection.Budget.ProjectUpdateSectionDisplayName) { RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpectedFundingByCostType(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpectedFundingByCostType(projectUpdateBatch.Project)); ViewDataForAngular = viewDataForAngularClass; ProjectBudgetSummaryViewData = projectBudgetSummaryViewData; ProjectBudgetsAnnualByCostTypeViewData = projectBudgetsAnnualByCostTypeViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpectedFundingComment, projectUpdateBatch.IsReturned()); FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType(); FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType(); FieldDefinitionForCostType = FieldDefinitionEnum.CostType.ToType(); FieldDefinitionForNoFundingSourceIdentified = FieldDefinitionEnum.NoFundingSourceIdentified.ToType(); FieldDefinitionForSecuredFunding = FieldDefinitionEnum.SecuredFunding.ToType(); FieldDefinitionForTargetedFunding = FieldDefinitionEnum.TargetedFunding.ToType(); FieldDefinitionForPlanningDesignStartYear = FieldDefinitionEnum.PlanningDesignStartYear.ToType(); FieldDefinitionForCompletionYear = FieldDefinitionEnum.CompletionYear.ToType(); }
public ExternalLinksViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ProjectUpdateStatus projectUpdateStatus, ViewDataForAngularClass viewDataForAngular, EntityExternalLinksViewData entityExternalLinksViewData, string refreshUrl, string diffUrl) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, new List <string>(), ProjectUpdateSection.ExternalLinks.ProjectUpdateSectionDisplayName) { ViewDataForAngular = viewDataForAngular; EntityExternalLinksViewData = entityExternalLinksViewData; RefreshUrl = refreshUrl; DiffUrl = diffUrl; }
public ExpectedFundingViewData(Person currentPerson, Models.Project project, ProposalSectionsStatus proposalSectionsStatus, ViewDataForAngularClass viewDataForAngularClass) : base(currentPerson, project, ProjectCreateSection.ExpectedFunding.ProjectCreateSectionDisplayName, proposalSectionsStatus) { ViewDataForAngular = viewDataForAngularClass; RequestGrantAllocationUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingGrantAllocation()); FundingSources = FundingSource.All.ToSelectList(x => x.FundingSourceID.ToString(), y => y.FundingSourceDisplayName).ToList(); }
public AddOrRemoveParcelsViewData(Person currentPerson, Models.OVTASection ovtaSection, Models.OnlandVisualTrashAssessment ovta, AddOrRemoveParcelsMapIntJson ovtaSummaryMapInitJson) : base(currentPerson, ovtaSection, ovta) { OVTASummaryMapInitJson = ovtaSummaryMapInitJson; ViewDataForAngular = new ViewDataForAngularClass(ovtaSummaryMapInitJson, ovta.IsDraftGeometryManuallyRefined.GetValueOrDefault()); RefreshUrl = SitkaRoute <OnlandVisualTrashAssessmentController> .BuildUrlFromExpression( x => x.RefreshParcels(ovta)); RequireRefresh = ovta.IsDraftGeometryManuallyRefined.GetValueOrDefault(); }
private PartialViewResult ViewEditProjectFundingSourceExpenditures(Project project, EditProjectFundingSourceExpendituresViewModel viewModel) { var allFundingSources = HttpRequestStorage.DatabaseEntities.FundingSources.ToList().Select(x => new FundingSourceSimple(x)).OrderBy(p => p.DisplayName).ToList(); var requiredCalendarYearRange = project.CalculateCalendarYearRangeForExpendituresWithoutAccountingForExistingYears(); var viewDataForAngularClass = new ViewDataForAngularClass(project, allFundingSources, requiredCalendarYearRange); var viewData = new EditProjectFundingSourceExpendituresViewData(viewDataForAngularClass); return(RazorPartialView <EditProjectFundingSourceExpenditures, EditProjectFundingSourceExpendituresViewData, EditProjectFundingSourceExpendituresViewModel>(viewData, viewModel)); }
public ExpendituresViewData(Person currentPerson, Models.Project project, ViewDataForAngularClass viewDataForAngularClass, ProjectExpendituresDetailViewData projectExpendituresDetailViewData, ProposalSectionsStatus proposalSectionsStatus) : base(currentPerson, project, "THIS IS BROKEN!" /* 5/15/2019 TK- ProjectCreateSection.ReportedExpenditures.ProjectCreateSectionDisplayName*/, proposalSectionsStatus) { ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpenditures(project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpenditures(project)); RequestGrantAllocationUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingGrantAllocation()); ProjectExpendituresDetailViewData = projectExpendituresDetailViewData; }
public ExpendituresByCostTypeViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ViewDataForAngularClass viewDataForAngularClass, ProposalSectionsStatus proposalSectionsStatus) : base(currentFirmaSession, project, ProjectCreateSection.ReportedExpenditures.ProjectCreateSectionDisplayName, proposalSectionsStatus) { ViewDataForAngular = viewDataForAngularClass; RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); TotalOperatingCostInYearOfExpenditure = project.CalculateTotalRemainingOperatingCost(); StartYearForTotalOperatingCostCalculation = project.StartYearForTotalCostCalculations(); FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType(); FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType(); FieldDefinitionForCostType = FieldDefinitionEnum.CostType.ToType(); }
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 ExpendituresViewData(Person currentPerson, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectExpendituresDetailViewData projectExpendituresDetailViewData, UpdateStatus updateStatus, List <string> expendituresValidationErrors) : base(currentPerson, projectUpdateBatch, updateStatus, expendituresValidationErrors, "THIS IS BROKEN!" /* 5/15/2019 TK- ProjectUpdateSection.Expenditures.ProjectUpdateSectionDisplayName*/) { ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpenditures(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpenditures(projectUpdateBatch.Project)); RequestGrantAllocationUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingGrantAllocation()); ProjectExpendituresDetailViewData = projectExpendituresDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpendituresComment, projectUpdateBatch.IsReturned); }
public IndexViewData(Person currentPerson, NeptunePage neptunePage, MapInitJson ovtaBasedMapInitJson, MapInitJson areaBasedMapInitJson, MapInitJson loadBasedMapInitJson, IEnumerable <Models.TreatmentBMP> treatmentBMPs, List <TrashCaptureStatusType> trashCaptureStatusTypes, List <Models.Parcel> parcels, List <StormwaterJurisdiction> stormwaterJurisdictions, FeatureCollection geoJsonForJurisdictions) : base(currentPerson, neptunePage) { OVTABasedMapInitJson = ovtaBasedMapInitJson; AreaBasedMapInitJson = areaBasedMapInitJson; LoadBasedMapInitJson = loadBasedMapInitJson; var stormwaterJurisdictionIDs = stormwaterJurisdictions.Select(x => x.StormwaterJurisdictionID).ToList(); StormwaterJurisdictionCQLFilter = currentPerson.GetStormwaterJurisdictionCqlFilter(stormwaterJurisdictionIDs); NegativeStormwaterJurisdictionCQLFilter = currentPerson.GetNegativeStormwaterJurisdictionCqlFilter(stormwaterJurisdictionIDs); JurisdictionSelectList = stormwaterJurisdictions.OrderBy(x => x.GetOrganizationDisplayName()) .ToSelectList(x => x.StormwaterJurisdictionID.ToString(CultureInfo.InvariantCulture), x => x.GetOrganizationDisplayName()); var showDropdown = stormwaterJurisdictions.Count > 1; var currentUserIsAnonymousOrUnassigned = CurrentPerson.IsAnonymousOrUnassigned(); ViewDataForAngular = new ViewDataForAngularClass(ovtaBasedMapInitJson, areaBasedMapInitJson, loadBasedMapInitJson, treatmentBMPs, trashCaptureStatusTypes, parcels, StormwaterJurisdictionCQLFilter, showDropdown, NegativeStormwaterJurisdictionCQLFilter, geoJsonForJurisdictions, currentUserIsAnonymousOrUnassigned); EntityName = "Trash Module"; PageTitle = "Welcome"; AllOVTAsUrl = SitkaRoute <OnlandVisualTrashAssessmentController> .BuildAbsoluteUrlHttpsFromExpression(x => x.Index(), NeptuneWebConfiguration.CanonicalHostName); FindBMPUrl = SitkaRoute <TreatmentBMPController> .BuildAbsoluteUrlHttpsFromExpression(x => x.FindABMP(), NeptuneWebConfiguration.CanonicalHostName); BeginOVTAUrl = SitkaRoute <OnlandVisualTrashAssessmentController> .BuildAbsoluteUrlHttpsFromExpression(x => x.Instructions(null), NeptuneWebConfiguration.CanonicalHostName); AddBMPUrl = SitkaRoute <TreatmentBMPController> .BuildAbsoluteUrlHttpsFromExpression(x => x.New(), NeptuneWebConfiguration.CanonicalHostName); RefreshTguUrl = SitkaRoute <HomeController> .BuildUrlFromExpression(x => x.RefreshTrashGeneratingUnits()); ScoreDescriptionsUrl = SitkaRoute <OnlandVisualTrashAssessmentController> .BuildUrlFromExpression(x => x.ScoreDescriptions()); ProgramOverviewPageContentViewData = new ViewPageContentViewData( NeptunePage.GetNeptunePageByPageType(NeptunePageType.TrashModuleProgramOverview), currentPerson); }
public InitiateOVTAViewData(Person currentPerson, Models.OnlandVisualTrashAssessment ovta, List <StormwaterJurisdiction> jurisdictions, SelectOVTAAreaMapInitJson mapInitJson, IEnumerable <Models.OnlandVisualTrashAssessmentArea> onlandVisualTrashAssessmentAreas, StormwaterJurisdiction defaultJurisdiction, string geoServerUrl) : base(currentPerson, Models.OVTASection.InitiateOVTA, ovta) { Jurisdictions = jurisdictions; MapInitJson = mapInitJson; DefaultJurisdiction = defaultJurisdiction; var useDefaultJurisdiction = defaultJurisdiction != null; ViewDataForAngular = new ViewDataForAngularClass(mapInitJson, onlandVisualTrashAssessmentAreas, useDefaultJurisdiction, jurisdictions, geoServerUrl); }
public ExpectedFundingViewData(Person currentPerson, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectFundingDetailViewData projectFundingDetailViewData, UpdateStatus updateStatus, ExpectedFundingValidationResult expectedFundingValidationResult) : base(currentPerson, projectUpdateBatch, updateStatus, expectedFundingValidationResult.GetWarningMessages(), ProjectUpdateSection.ExpectedFunding.ProjectUpdateSectionDisplayName) { ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpectedFunding(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpectedFunding(projectUpdateBatch.Project)); RequestGrantAllocationUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingGrantAllocation()); ProjectFundingDetailViewData = projectFundingDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpectedFundingComment, projectUpdateBatch.IsReturned); ValidationWarnings = expectedFundingValidationResult.GetWarningMessages(); FundingSources = FundingSource.All.ToSelectList(x => x.FundingSourceID.ToString(), y => y.FundingSourceDisplayName).ToList(); }
public ExpectedFundingViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectBudgetSummaryViewData projectBudgetSummaryViewData, ProjectBudgetsAnnualViewData projectBudgetsAnnualViewData, ProjectUpdateStatus projectUpdateStatus, ExpectedFundingValidationResult expectedFundingValidationResult) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, expectedFundingValidationResult.GetWarningMessages(), ProjectUpdateSection.Budget.ProjectUpdateSectionDisplayName) { ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpectedFunding(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpectedFunding(projectUpdateBatch.Project)); RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); ProjectBudgetSummaryViewData = projectBudgetSummaryViewData; ProjectBudgetsAnnualViewData = projectBudgetsAnnualViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpectedFundingComment, projectUpdateBatch.IsReturned()); ValidationWarnings = expectedFundingValidationResult.GetWarningMessages(); FundingTypeDescriptionString = projectUpdateBatch.ProjectUpdate.FundingTypeID == FundingType.BudgetVariesByYear.FundingTypeID ? " varies by year or it's a one-year project." : " is the same each year."; }
public ExpendituresByCostTypeViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectExpendituresByCostTypeDetailViewData projectExpendituresByCostTypeDetailViewData, ProjectUpdateStatus projectUpdateStatus, List <string> expendituresValidationErrors) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, expendituresValidationErrors, ProjectUpdateSection.Expenditures.ProjectUpdateSectionDisplayName) { ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpenditures(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpendituresByCostType(projectUpdateBatch.Project)); RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); ProjectExpendituresByCostTypeDetailViewData = projectExpendituresByCostTypeDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpendituresComment, projectUpdateBatch.IsReturned()); FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType(); FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType(); FieldDefinitionForCompletionYear = FieldDefinitionEnum.CompletionYear.ToType(); FieldDefinitionForCostType = FieldDefinitionEnum.CostType.ToType(); }
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; }
public ExpectedFundingByCostTypeViewData(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; FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType(); FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType(); FieldDefinitionForCostType = FieldDefinitionEnum.CostType.ToType(); FieldDefinitionForNoFundingSourceIdentified = FieldDefinitionEnum.NoFundingSourceIdentified.ToType(); FieldDefinitionForSecuredFunding = FieldDefinitionEnum.SecuredFunding.ToType(); FieldDefinitionForTargetedFunding = FieldDefinitionEnum.TargetedFunding.ToType(); FieldDefinitionForPlanningDesignStartYear = FieldDefinitionEnum.PlanningDesignStartYear.ToType(); FieldDefinitionForCompletionYear = FieldDefinitionEnum.CompletionYear.ToType(); FieldDefinitionForEstimatedTotalCost = FieldDefinitionEnum.EstimatedTotalCost.ToType(); FieldDefinitionForEstimatedAnnualOperatingCost = FieldDefinitionEnum.EstimatedAnnualOperatingCost.ToType(); }
public ExpendituresViewData(FirmaSession currentFirmaSession, ProjectUpdateBatch projectUpdateBatch, ViewDataForAngularClass viewDataForAngularClass, ProjectExpendituresDetailViewData projectExpendituresDetailViewData, ProjectUpdateStatus projectUpdateStatus, List <string> expendituresValidationErrors) : base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, expendituresValidationErrors, "OBSOLETE Expenditures") //: base(currentFirmaSession, projectUpdateBatch, projectUpdateStatus, expendituresValidationErrors, ProjectUpdateSection.Expenditures.ProjectUpdateSectionDisplayName) { ProjectID = projectUpdateBatch.ProjectID; ViewDataForAngular = viewDataForAngularClass; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshExpenditures(projectUpdateBatch.Project)); DiffUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.DiffExpenditures(projectUpdateBatch.Project)); RequestFundingSourceUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(x => x.MissingFundingSource()); ProjectExpendituresDetailViewData = projectExpendituresDetailViewData; SectionCommentsViewData = new SectionCommentsViewData(projectUpdateBatch.ExpendituresComment, projectUpdateBatch.IsReturned()); TotalOperatingCostInYearOfExpenditure = ProjectUpdateBatch.ProjectUpdate.CalculateTotalRemainingOperatingCost(); StartYearForTotalOperatingCostCalculation = projectUpdateBatch.ProjectUpdate.StartYearForTotalCostCalculations(); FieldDefinitionForProject = FieldDefinitionEnum.Project.ToType(); FieldDefinitionForFundingSource = FieldDefinitionEnum.FundingSource.ToType(); FieldDefinitionForCompletionYear = FieldDefinitionEnum.CompletionYear.ToType(); }
public ExternalLinksViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus, ViewDataForAngularClass viewDataForAngular, EntityExternalLinksViewData entityExternalLinksViewData) : base(currentFirmaSession, project, ProjectCreateSection.ExternalLinks.ProjectCreateSectionDisplayName, proposalSectionsStatus) { ViewDataForAngular = viewDataForAngular; EntityExternalLinksViewData = entityExternalLinksViewData; }