public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage, WaterQualityManagementPlanIndexGridSpec indexGridSpec, Models.NeptunePage secondaryNeptunePage, WaterQualityManagementPlanVerificationGridSpec verificationGridSpec) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { var waterQualityManagementPlanPluralized = FieldDefinitionType.WaterQualityManagementPlan.GetFieldDefinitionLabelPluralized(); PageTitle = $"All {waterQualityManagementPlanPluralized}"; EntityName = $"{waterQualityManagementPlanPluralized}"; IndexGridSpec = indexGridSpec; IndexGridName = "waterQualityManagementPlanIndexGrid"; IndexGridDataUrl = SitkaRoute <WaterQualityManagementPlanController> .BuildUrlFromExpression(c => c.WaterQualityManagementPlanIndexGridData()); VerificationNeptunePage = new ViewPageContentViewData(secondaryNeptunePage, currentPerson); VerificationGridSpec = verificationGridSpec; VerificationGridName = "waterQualityManagementPlanVerificationIndexGrid"; VerificationGridDataUrl = SitkaRoute <WaterQualityManagementPlanController> .BuildUrlFromExpression(c => c.WaterQualityManagementPlanVerificationGridData()); NewWaterQualityManagementPlanUrl = SitkaRoute <WaterQualityManagementPlanController> .BuildUrlFromExpression(c => c.New()); CurrentPersonCanCreate = new WaterQualityManagementPlanCreateFeature().HasPermissionByPerson(currentPerson); }
public EditViewData(Person currentPerson, List <MeasurementUnitType> measurementUnitTypes, List <ObservationTypeSpecification> observationTypeSpecifications, List <ObservationThresholdType> observationThresholdTypes, List <ObservationTargetType> observationTargetTypes, List <ObservationTypeCollectionMethod> observationTypeCollectionMethods, string submitUrl, Models.NeptunePage instructionsNeptunePage, Models.NeptunePage observationInstructionsNeptunePage, Models.NeptunePage labelAndUnitsInstructionsNeptunePage, Models.TreatmentBMPAssessmentObservationType treatmentBMPAssessmentObservationType) : base(currentPerson, NeptuneArea.OCStormwaterTools) { EntityName = "Observation Type"; EntityUrl = SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(x => x.Index()); PageTitle = $"{(treatmentBMPAssessmentObservationType != null ? "Edit" : "New")} Observation Type"; if (treatmentBMPAssessmentObservationType != null) { SubEntityName = treatmentBMPAssessmentObservationType.TreatmentBMPAssessmentObservationTypeName; SubEntityUrl = treatmentBMPAssessmentObservationType.GetDetailUrl(); } ViewDataForAngular = new ViewDataForAngular(observationTypeSpecifications, observationTypeCollectionMethods, observationThresholdTypes, observationTargetTypes, measurementUnitTypes); ObservationTypeCancelUrl = treatmentBMPAssessmentObservationType == null ? SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(x => x.Index()) : SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(x => x.Detail(treatmentBMPAssessmentObservationType.TreatmentBMPAssessmentObservationTypeID)); SubmitUrl = submitUrl; PassFailObservationThresholdTypeID = ObservationThresholdType.None.ObservationThresholdTypeID; PassFailObservationTargetTypeID = ObservationTargetType.PassFail.ObservationTargetTypeID; ViewInstructionsNeptunePage = new ViewPageContentViewData(instructionsNeptunePage, currentPerson); ViewObservationInstructionsNeptunePage = new ViewPageContentViewData(observationInstructionsNeptunePage, currentPerson); ViewLabelsAndUnitsInstructionsNeptunePage = new ViewPageContentViewData(labelAndUnitsInstructionsNeptunePage, currentPerson); }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { EntityName = FieldDefinitionType.Organization.GetFieldDefinitionLabelPluralized(); PageTitle = "All Organizations"; var hasOrganizationManagePermissions = new OrganizationManageFeature().HasPermissionByPerson(currentPerson); GridSpec = new IndexGridSpec(currentPerson, hasOrganizationManagePermissions) { ObjectNameSingular = $"{FieldDefinitionType.Organization.GetFieldDefinitionLabel()}", ObjectNamePlural = $"{FieldDefinitionType.Organization.GetFieldDefinitionLabelPluralized()}", SaveFiltersInCookie = true }; GridName = "organizationsGrid"; GridDataUrl = SitkaRoute <OrganizationController> .BuildUrlFromExpression(tc => tc.IndexGridJsonData()); PullOrganizationFromKeystoneUrl = SitkaRoute <OrganizationController> .BuildUrlFromExpression(x => x.PullOrganizationFromKeystone()); UserIsSitkaAdmin = new SitkaAdminFeature().HasPermissionByPerson(currentPerson); UserCanAddOrganization = new OrganizationManageFeature().HasPermissionByPerson(currentPerson); NewOrganizationUrl = SitkaRoute <OrganizationController> .BuildUrlFromExpression(t => t.New()); }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage, int treatmentBmpsInExportCount, int featureClassesInExportCount, string bulkBMPUploadUrl) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { TreatmentBmpsInExportCount = treatmentBmpsInExportCount; FeatureClassesInExportCount = featureClassesInExportCount; PageTitle = "All Treatment BMPs"; EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; var showDelete = new JurisdictionManageFeature().HasPermissionByPerson(currentPerson); var showEdit = new JurisdictionEditFeature().HasPermissionByPerson(currentPerson); GridSpec = new TreatmentBMPGridSpec(currentPerson, showDelete, showEdit) { ObjectNameSingular = "Treatment BMP", ObjectNamePlural = "Treatment BMPs", SaveFiltersInCookie = true }; GridName = "treatmentBMPsGrid"; GridDataUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(j => j.TreatmentBMPGridJsonData()); NewUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.New()); BulkBMPUploadUrl = bulkBMPUploadUrl; HasEditPermissions = new JurisdictionEditFeature().HasPermissionByPerson(currentPerson); HasAdminPermissions = new NeptuneAdminFeature().HasPermissionByPerson(currentPerson); DownloadBMPInventoryUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.BMPInventoryExport()); RefreshLSPCBasinsUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.RefreshLSPCBasinsFromOCSurvey()); RefreshPrecipitationZonesUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.RefreshPrecipitationZonesFromOCSurvey()); }
public ViewTreatmentBMPModelingAttributesViewData(Person currentPerson, Models.NeptunePage neptunePage) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { PageTitle = "Modeling Attributes"; EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; GridSpec = new ViewTreatmentBMPModelingAttributesGridSpec(); GridName = "treatmentBMPModelingAttributeGrid"; GridDataUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(j => j.ViewTreatmentBMPModelingAttributesGridJsonData()); }
public TrainingViewData(Person currentPerson, Models.NeptunePage neptunePage, List <TrainingVideo> trainingVideos) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { PageTitle = "Training"; EntityName = "Stormwater Tools"; TrainingVideos = trainingVideos; }
public ViewPageContentViewData(Models.NeptunePage neptunePage, Person currentPerson) { NeptunePage = neptunePage; ShowEditButton = new NeptunePageManageFeature().HasPermission(currentPerson, neptunePage).HasPermission; NeptunePageContentID = $"neptunePageContent{neptunePage.NeptunePageID}"; NeptunePageEditHoverButtonID = $"editHoverButton{neptunePage.NeptunePageID}"; EditPageContentUrl = SitkaRoute <NeptunePageController> .BuildUrlFromExpression(t => t.EditInDialog(NeptunePage)); }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage, List <Models.TreatmentBMPType> treatmentBMPTypes) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { EntityName = $"{FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabelPluralized()}"; PageTitle = "All BMP Types"; TreatmentBMPTypes = treatmentBMPTypes; }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage, int fieldVisitCount, int treatmentBMPsCount, int bmpDelineationsCount) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { PageTitle = "Manager Dashboard"; EntityName = "Stormwater Tools"; GridName = "ProvisionalFieldVisitGrid"; GridSpec = new ProvisionalFieldVisitGridSpec(currentPerson, GridName) { ObjectNameSingular = "Field Visit", ObjectNamePlural = "Field Visits", SaveFiltersInCookie = true }; GridDataUrl = SitkaRoute <ManagerDashboardController> .BuildUrlFromExpression(j => j.AllFieldVisitsGridJsonData(GridName)); ProvisionalFieldVisitGridCheckAllUrl = $"Sitka.{GridName}.grid.checkAll()"; ProvisionalFieldVisitGridUncheckAllUrl = $"Sitka.{GridName}.grid.uncheckAll()"; FieldVisitCount = fieldVisitCount; FieldVisitsIndexUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(c => c.Index()); ProvisionalTreatmentBMPGridName = "assessmentsGrid"; ProvisionalTreatmentBMPGridSpec = new ProvisionalTreatmentBMPGridSpec(currentPerson, ProvisionalTreatmentBMPGridName) { ObjectNameSingular = "Provisional BMP Record", ObjectNamePlural = "Provisional BMP Records", SaveFiltersInCookie = true }; ProvisionalTreatmentBMPGridDataUrl = SitkaRoute <ManagerDashboardController> .BuildUrlFromExpression(x => x.ProvisionalTreatmentBMPGridJsonData(ProvisionalTreatmentBMPGridName)); ProvisionalTreatmentBMPGridCheckAllUrl = $"Sitka.{ProvisionalTreatmentBMPGridName}.grid.checkAll()"; ProvisionalTreatmentBMPGridUncheckAllUrl = $"Sitka.{ProvisionalTreatmentBMPGridName}.grid.uncheckAll()"; TreatmentBMPsCount = treatmentBMPsCount; TreatmentBMPIndexUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(c => c.Index()); ProvisionalBMPDelineationGridName = "ProvisionalBMPDelineationsGrid"; ProvisionalBMPDelineationsGridSpec = new ProvisionalBMPDelineationsGridSpec(currentPerson, ProvisionalBMPDelineationGridName) { ObjectNameSingular = "Provisional BMP Delineation Record", ObjectNamePlural = "Provisional BMP Delineation Records", SaveFiltersInCookie = true }; ProvisionalBMPDelineationGridDataUrl = SitkaRoute <ManagerDashboardController> .BuildUrlFromExpression(x => x.ProvisionalBMPDelineationsGridJson(ProvisionalBMPDelineationGridName)); ProvisionalBMPDelineationGridCheckAllUrl = $"Sitka.{ProvisionalBMPDelineationGridName}.grid.checkAll()"; ProvisionalBMPDelineationGridUncheckAllUrl = $"Sitka.{ProvisionalBMPDelineationGridName}.gird.uncheckAll()"; BMPDelineationsCount = bmpDelineationsCount; UserCanViewBMPDelineations = new JurisdictionManageFeature().HasPermissionByPerson(CurrentPerson); //DelineationIndexUrl = SitkaRoute<DelineationController>.BuildUrlFromExpression(x => x.Index) }
public TreatmentBMPAssessmentSummaryViewData(Person currentPerson, Models.NeptunePage neptunePage) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { PageTitle = "Recent Treatment BMP Assessments"; EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; GridSpec = new TreatmentBMPAssessmentSummaryGridSpec() { ObjectNameSingular = "Recent Treatment BMP Assessment", ObjectNamePlural = "Recent Treatment BMP Assessments", SaveFiltersInCookie = true }; GridName = "treatmentBMPsGrid"; GridDataUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(j => j.TreatmentBMPAssessmentSummaryGridJsonData()); }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { PageTitle = "All Jurisdictions"; EntityName = $"{FieldDefinitionType.Jurisdiction.GetFieldDefinitionLabelPluralized()}"; GridSpec = new IndexGridSpec { ObjectNameSingular = "Jurisdiction", ObjectNamePlural = "Jurisdictions", SaveFiltersInCookie = true }; GridName = "jurisdictionsGrid"; GridDataUrl = SitkaRoute <JurisdictionController> .BuildUrlFromExpression(j => j.IndexGridJsonData()); }
public SupportFormViewData(Person currentPerson, Models.NeptunePage neptunePage, string successMessage, bool isUserAnonymous, IEnumerable <SelectListItem> supportRequestTypes, List <SupportRequestTypeSimple> supportRequestTypeSimples, string cancelUrl) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { EntityName = "Stormwater Tools"; PageTitle = "Request Support"; SupportRequestTypeSimples = supportRequestTypeSimples; CancelUrl = cancelUrl; SuccessMessage = successMessage; IsUserAnonymous = isUserAnonymous; SupportRequestTypes = supportRequestTypes; }
public DelineationMapViewData(Person currentPerson, Models.NeptunePage neptunePage, StormwaterMapInitJson mapInitJson, Models.TreatmentBMP initialTreatmentBMP, string bulkUploadTreatmentBMPDelineationsUrl) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { MapInitJson = mapInitJson; IsInitialTreatmentBMPProvided = initialTreatmentBMP != null; InitialTreatmentBMPID = initialTreatmentBMP?.TreatmentBMPID; EntityName = FieldDefinitionType.Delineation.FieldDefinitionTypeDisplayName; PageTitle = "Delineation Map"; GeoServerUrl = NeptuneWebConfiguration.ParcelMapServiceUrl; DelineationMapConfig = new DelineationMapConfig(currentPerson.GetStormwaterJurisdictionCqlFilter()); BulkUploadTreatmentBMPDelineationsUrl = bulkUploadTreatmentBMPDelineationsUrl; HasManagePermission = new JurisdictionManageFeature().HasPermissionByPerson(currentPerson); }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage, IEnumerable <Models.TreatmentBMPAssessmentObservationType> treatmentBMPAssessmentObservationTypes) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { EntityName = "Treatment BMP Assessments"; PageTitle = "All Assessments"; BMPAssessmentGridSpec = new TreatmentBMPAssessmentGridSpec(currentPerson, treatmentBMPAssessmentObservationTypes) { ObjectNameSingular = "BMP Assessment", ObjectNamePlural = "BMP Assessments", SaveFiltersInCookie = true }; BMPAssessmentGridName = "bmpAssessmentGrid"; BMPAssessmentGridDataUrl = SitkaRoute <AssessmentController> .BuildUrlFromExpression(j => j.TreatmentBMPAssessmentsGridJsonData()); }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage, string landUseBlockBulkUploadUrl) : base(currentPerson, neptunePage) { EntityName = "Land Use Block"; PageTitle = "Index"; GridSpec = new LandUseBlockGridSpec() { ObjectNameSingular = "Land Use Block", ObjectNamePlural = "Land Use Blocks", SaveFiltersInCookie = true }; GridName = "landUseBlockGrid"; GridDataUrl = SitkaRoute <LandUseBlockController> .BuildUrlFromExpression(j => j.LandUseBlockGridJsonData()); HasManagePermission = new JurisdictionManageFeature().HasPermissionByPerson(currentPerson); LandUseBlockBulkUploadUrl = landUseBlockBulkUploadUrl; }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePageHomePage, Models.NeptunePage neptunePageAdditionalInfo, Models.NeptunePage neptunePageMapInfo, List <Models.NeptuneHomePageImage> neptuneHomePageImages, JurisdictionsMapViewData jurisdictionsMapViewData, JurisdictionsMapInitJson jurisdictionsMapInitJson, LaunchPadViewData launchPadViewData) : base(currentPerson, neptunePageHomePage, true, NeptuneArea.OCStormwaterTools) { PageTitle = "Orange County Stormwater Tools"; CustomHomePageTextViewData = new ViewPageContentViewData(neptunePageHomePage, currentPerson); CustomHomePageAdditionalInfoTextViewData = new ViewPageContentViewData(neptunePageAdditionalInfo, currentPerson); CustomHomePageMapTextViewData = new ViewPageContentViewData(neptunePageMapInfo, currentPerson); JurisdictionsMapViewData = jurisdictionsMapViewData; JurisdictionsMapInitJson = jurisdictionsMapInitJson; NeptuneHomePageCarouselImages = neptuneHomePageImages; LaunchPadViewData = launchPadViewData; }
public ManageViewData(Person currentPerson, Models.NeptunePage neptunePage) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { EntityName = "Observation Type"; PageTitle = "All Observation Types"; NewObservationTypeUrl = SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(t => t.New()); GridSpec = new TreatmentBMPAssessmentObservationTypeGridSpec(currentPerson) { ObjectNameSingular = "Observation Type", ObjectNamePlural = $"Observation Types", SaveFiltersInCookie = true }; GridName = "observationTypeGrid"; GridDataUrl = SitkaRoute <TreatmentBMPAssessmentObservationTypeController> .BuildUrlFromExpression(tc => tc.ObservationTypeGridJsonData()); }
public ManageViewData(Person currentPerson, Models.NeptunePage neptunePage) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { EntityName = $"{FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabelPluralized()}"; PageTitle = $"Manage {FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabelPluralized()}"; NewTreatmentBMPTypeUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(t => t.New()); GridSpec = new TreatmentBMPTypeGridSpec(currentPerson) { ObjectNameSingular = $"{FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabel()}", ObjectNamePlural = $"{FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabelPluralized()}", SaveFiltersInCookie = true }; GridName = "treatmentBMPTypeGrid"; GridDataUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(tc => tc.TreatmentBMPTypeGridJsonData()); }
public ManageViewData(Person currentPerson, Models.NeptunePage neptunePage) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { EntityName = "Attribute Type"; PageTitle = "All Attribute Types"; NewCustomAttributeTypeUrl = SitkaRoute <CustomAttributeTypeController> .BuildUrlFromExpression(t => t.New()); GridSpec = new CustomAttributeTypeGridSpec() { ObjectNameSingular = "Attribute Type", ObjectNamePlural = "Attribute Types", SaveFiltersInCookie = true }; GridName = "customAttributeTypeGrid"; GridDataUrl = SitkaRoute <CustomAttributeTypeController> .BuildUrlFromExpression(tc => tc.CustomAttributeTypeGridJsonData()); }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { PageTitle = $"All {FieldDefinitionType.FundingSource.GetFieldDefinitionLabelPluralized()}"; EntityName = $"{FieldDefinitionType.FundingSource.GetFieldDefinitionLabelPluralized()}"; GridSpec = new IndexGridSpec(currentPerson) { ObjectNameSingular = $"{FieldDefinitionType.FundingSource.GetFieldDefinitionLabel()}", ObjectNamePlural = $"{FieldDefinitionType.FundingSource.GetFieldDefinitionLabelPluralized()}", SaveFiltersInCookie = true }; UserCanAddFundingSource = new FundingSourceCreateFeature().HasPermissionByPerson(currentPerson); GridName = "fundingSourcesGrid"; GridDataUrl = SitkaRoute <FundingSourceController> .BuildUrlFromExpression(tc => tc.IndexGridJsonData()); NewFundingSourceUrl = SitkaRoute <FundingSourceController> .BuildUrlFromExpression(tc => tc.New()); }
public FindABMPViewData(Person currentPerson, MapInitJson mapInitJson, Models.NeptunePage neptunePage, List <Models.TreatmentBMP> treatmentBMPs, List <TreatmentBMPTypeSimple> treatmentBMPTypeSimples, List <StormwaterJurisdictionSimple> jurisdictions) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { PageTitle = "Find a BMP"; EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; EntityUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.Index()); MapInitJson = mapInitJson; FindTreatmentBMPByNameUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.FindByName(null)); NewUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.New()); AllBMPsUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(x => x.Index()); HasManagePermissions = new JurisdictionManageFeature().HasPermissionByPerson(currentPerson); ViewDataForAngular = new ViewDataForAngular(mapInitJson, treatmentBMPs, FindTreatmentBMPByNameUrl, treatmentBMPTypeSimples, jurisdictions); HasEditPermissions = new JurisdictionEditFeature().HasPermissionByPerson(currentPerson); }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage, HtmlString introNarrativeContent, MapInitJson mapInitJson, string findParcelByAddressUrl, string findParcelByApnUrl, string geoserverUrl, string parcelSummaryForMapUrl) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { IntroNarrativeContent = introNarrativeContent; EntityName = "Parcels"; PageTitle = "All Parcels"; MapInitJson = mapInitJson; FindParcelByAddressUrl = findParcelByAddressUrl; FindParcelByApnUrl = findParcelByApnUrl; GeoserverUrl = geoserverUrl; ParcelSummaryForMapUrl = parcelSummaryForMapUrl; }
/// <summary> /// Call for page with associated NeptunePage /// </summary> protected NeptuneViewData(Person currentPerson, Models.NeptunePage neptunePage, bool isHomePage, NeptuneArea neptuneArea) { NeptunePage = neptunePage; CurrentPerson = currentPerson; NeptuneHomeUrl = SitkaRoute <HomeController> .BuildAbsoluteUrlHttpsFromExpression(c => c.Index(), NeptuneWebConfiguration.CanonicalHostNameRoot); LogInUrl = NeptuneHelpers.GenerateLogInUrlWithReturnUrl(); LogOutUrl = NeptuneHelpers.GenerateLogOutUrlWithReturnUrl(); RequestSupportUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(c => c.Support()); LegalUrl = SitkaRoute <HomeController> .BuildUrlFromExpression(c => c.Legal()); MakeNeptuneMenu(currentPerson); NeptuneNavBarViewData = new NeptuneNavBarViewData(currentPerson, LogInUrl, LogOutUrl, RequestSupportUrl, neptuneArea, isHomePage); ViewPageContentViewData = neptunePage != null ? new ViewPageContentViewData(neptunePage, currentPerson) : null; }
public IndexViewData(Person currentPerson, Models.NeptunePage neptunePage, IEnumerable <Models.CustomAttributeType> maintenanceAttributeTypes, IQueryable <Models.TreatmentBMPAssessmentObservationType> allObservationTypes) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { PageTitle = "All Field Records"; EntityName = "Field Records"; GridSpec = new FieldVisitGridSpec(currentPerson, false) { ObjectNameSingular = "Field Visit", ObjectNamePlural = "Field Visits", SaveFiltersInCookie = true }; GridName = "fieldVisitsGrid"; GridDataUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(j => j.AllFieldVisitsGridJsonData()); TreatmentBMPAssessmentGridSpec = new TreatmentBMPAssessmentGridSpec(currentPerson, allObservationTypes) { ObjectNameSingular = "Assessment", ObjectNamePlural = "Assessments", SaveFiltersInCookie = true }; TreatmentBMPAssessmentGridName = "assessmentsGrid"; TreatmentBMPAssessmentGridDataUrl = SitkaRoute <AssessmentController> .BuildUrlFromExpression(x => x.TreatmentBMPAssessmentsGridJsonData()); MaintenanceRecordGridSpec = new MaintenanceRecordGridSpec(currentPerson, maintenanceAttributeTypes) { ObjectNameSingular = "Maintenance Record", ObjectNamePlural = "Maintenance Records", SaveFiltersInCookie = true }; MaintenanceRecordGridName = "maintenanceRecordsGrid"; MaintenanceRecordGridDataUrl = SitkaRoute <MaintenanceRecordController> .BuildUrlFromExpression(x => x.AllMaintenanceRecordsGridJsonData()); HasManagePermissions = new JurisdictionManageFeature().HasPermissionByPerson(currentPerson); BulkUploadTrashScreenVisitUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(x => x.BulkUploadTrashScreenVisit()); }
public LaunchPadViewData(Person currentPerson, Models.NeptunePage launchPadNeptunePage, int numberOfBmpTypes, string managerDashboardDescription) { CurrentPerson = currentPerson; IsLoggedIn = !CurrentPerson.IsAnonymousUser(); IsAdmin = new NeptuneAdminFeature().HasPermissionByPerson(CurrentPerson); IsUnassigned = !CurrentPerson.IsAnonymousUser() && CurrentPerson.Role == Models.Role.Unassigned; IsJurisdictionManager = new JurisdictionManageFeature().HasPermissionByPerson(CurrentPerson); Jurisdictions = CurrentPerson.StormwaterJurisdictionPeople.Select(x => x.StormwaterJurisdiction).ToList(); NumberOfBmpTypes = numberOfBmpTypes; ManagerDashboardDescription = managerDashboardDescription; LaunchPadViewPageContentViewData = new ViewPageContentViewData(launchPadNeptunePage, CurrentPerson); JurisdictionIndexUrl = SitkaRoute <JurisdictionController> .BuildUrlFromExpression(c => c.Index()); RequestSupportUrl = SitkaRoute <HelpController> .BuildUrlFromExpression(c => c.RequestToChangePrivileges()); FindABmpUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(c => c.FindABMP()); ExploreBmpTypesUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(c => c.Index()); AddABmpUrl = SitkaRoute <TreatmentBMPController> .BuildUrlFromExpression(c => c.New()); ViewAssessmentAndMaintenanceRecordsUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(c => c.Index()); ViewWaterQualityManagementPlansUrl = SitkaRoute <WaterQualityManagementPlanController> .BuildUrlFromExpression(c => c.Index()); FieldFieldVisitsUrl = SitkaRoute <FieldVisitController> .BuildUrlFromExpression(c => c.Index()); InviteANewUserUrl = SitkaRoute <UserController> .BuildUrlFromExpression(c => c.Invite()); EditUserRolesUrl = SitkaRoute <UserController> .BuildUrlFromExpression(c => c.Index()); AddAFundingSourceUrl = SitkaRoute <FundingSourceController> .BuildUrlFromExpression(c => c.Index()); ManagerDashboardUrl = SitkaRoute <ManagerDashboardController> .BuildUrlFromExpression(c => c.Index()); ViewDelineationReconciliationReportUrl = SitkaRoute <DelineationController> .BuildUrlFromExpression(c => c.DelineationReconciliationReport()); }
public EditViewData(Person currentPerson, List <MeasurementUnitType> measurementUnitTypes, List <CustomAttributeDataType> customAttributeDataTypes, string submitUrl, Models.NeptunePage instructionsNeptunePage, Models.NeptunePage customAttributeInstructionsNeptunePage, Models.CustomAttributeType customAttributeType) : base(currentPerson, NeptuneArea.OCStormwaterTools) { EntityName = "Attribute Type"; EntityUrl = SitkaRoute <CustomAttributeTypeController> .BuildUrlFromExpression(x => x.Manage()); PageTitle = $"{(customAttributeType != null ? "Edit" : "New")} Attribute Type"; if (customAttributeType != null) { SubEntityName = customAttributeType.CustomAttributeTypeName; SubEntityUrl = customAttributeType.GetDetailUrl(); } YesNos = BooleanFormats.GetYesNoSelectList(); CustomAttributeDataTypes = customAttributeDataTypes.ToSelectListWithDisabledEmptyFirstRow( x => x.CustomAttributeDataTypeID.ToString(), x => x.CustomAttributeDataTypeDisplayName); MeasurementUnitTypes = measurementUnitTypes.OrderBy(x => x.MeasurementUnitTypeDisplayName).ToSelectListWithEmptyFirstRow( x => x.MeasurementUnitTypeID.ToString(), x => x.MeasurementUnitTypeDisplayName, ViewUtilities.NoneString); CustomAttributeTypePurposes = CustomAttributeTypePurpose.All.ToSelectListWithDisabledEmptyFirstRow( x => x.CustomAttributeTypePurposeID.ToString(CultureInfo.InvariantCulture), x => x.CustomAttributeTypePurposeDisplayName); CustomAttributeTypeIndexUrl = SitkaRoute <CustomAttributeTypeController> .BuildUrlFromExpression(x => x.Manage()); SubmitUrl = submitUrl; ViewInstructionsNeptunePage = new ViewPageContentViewData(instructionsNeptunePage, currentPerson); ViewCustomAttributeInstructionsNeptunePage = new ViewPageContentViewData(customAttributeInstructionsNeptunePage, currentPerson); ViewDataForAngular = new ViewDataForAngular(customAttributeDataTypes); }
public EditViewData(Person currentPerson, IEnumerable <TreatmentBMPTypeAssessmentObservationType> observationTypes, string submitUrl, Models.NeptunePage instructionsNeptunePage, Models.TreatmentBMPType treatmentBMPType, IEnumerable <TreatmentBMPTypeCustomAttributeType> customAttributeTypes, IEnumerable <Models.TreatmentBMPAssessmentObservationType> allObservationTypes, IEnumerable <Models.CustomAttributeType> allCustomAttributeTypes) : base(currentPerson, NeptuneArea.OCStormwaterTools) { EntityName = FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabelPluralized(); EntityUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(c => c.Manage()); if (treatmentBMPType != null) { SubEntityName = treatmentBMPType.TreatmentBMPTypeName; SubEntityUrl = treatmentBMPType.GetDetailUrl(); } PageTitle = $"{(treatmentBMPType != null ? "Edit" : "New")} {FieldDefinitionType.TreatmentBMPType.GetFieldDefinitionLabel()}"; ViewDataForAngular = new ViewDataForAngular(observationTypes, customAttributeTypes, allObservationTypes, allCustomAttributeTypes); TreatmentBMPTypeIndexUrl = SitkaRoute <TreatmentBMPTypeController> .BuildUrlFromExpression(x => x.Manage()); SubmitUrl = submitUrl; ViewInstructionsNeptunePage = new ViewPageContentViewData(instructionsNeptunePage, currentPerson); }
public DelineationReconciliationReportViewData(Person currentPerson, Models.NeptunePage neptunePage, DateTime?regionalSubbasinsLastUpdated) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { RegionalSubbasinsLastUpdated = regionalSubbasinsLastUpdated.HasValue ? regionalSubbasinsLastUpdated.ToStringDateTime() : "n/a"; EntityName = FieldDefinitionType.Delineation.FieldDefinitionTypeDisplayName; PageTitle = "Delineation Reconciliation"; HasManagePermission = new JurisdictionManageFeature().HasPermissionByPerson(currentPerson); GridSpec = new MisalignedDelineationGridSpec() { ObjectNameSingular = "Treatment BMP", ObjectNamePlural = "Treatment BMPs", SaveFiltersInCookie = true }; GridName = "misalignedTreatmentBMPsGrid"; GridDataUrl = SitkaRoute <DelineationController> .BuildUrlFromExpression(j => j.DelineationsMisalignedWithRegionalSubbasinsGridJsonData()); OverlappingTreatmentBMPsGridSpec = new DelineationOverlapsDelineationGridSpec() { ObjectNameSingular = "Treatment BMP", ObjectNamePlural = "Treatment BMPs", SaveFiltersInCookie = true }; OverlappingTreatmentBMPsGridName = "overlappingTreatmentBMPsGrid"; OverlappingTreatmentBMPsGridDataUrl = SitkaRoute <DelineationController> .BuildUrlFromExpression(j => j.DelineationsOverlappingEachOtherGridJsonData()); CheckForDiscrepanciesUrl = SitkaRoute <DelineationController> .BuildUrlFromExpression(j => j.CheckForDiscrepancies()); }
public UploadTreatmentBMPsViewData(Person currentPerson, IEnumerable <SelectListItem> treatmentBMPTypes, List <string> errorList, Models.NeptunePage neptunePage, string treatmentBMPsUploadUrl) : base(currentPerson, neptunePage, NeptuneArea.OCStormwaterTools) { PageTitle = "BMP Bulk Upload"; EntityName = $"{FieldDefinitionType.TreatmentBMP.GetFieldDefinitionLabelPluralized()}"; TreatmentBMPsUploadUrl = treatmentBMPsUploadUrl; TreatmentBMPTypes = treatmentBMPTypes; ErrorList = errorList; }
protected NeptuneViewData(Person currentPerson, Models.NeptunePage neptunePage, NeptuneArea neptuneArea) : this(currentPerson, neptunePage, false, neptuneArea) { }