Esempio n. 1
0
        public FinalizeOVTAViewData(Person currentPerson,
                                    Models.OnlandVisualTrashAssessment ovta, OVTASummaryMapInitJson ovtaSummaryMapInitJson, IEnumerable <SelectListItem> scores, string geoServerUrl)
            : base(currentPerson, Models.OVTASection.FinalizeOVTA, ovta)
        {
            Scores                    = scores;
            ConductedByPerson         = ovta.CreatedByPerson;
            Jurisdiction              = ovta.StormwaterJurisdiction;
            CreatedDate               = ovta.CreatedDate.ToShortDateString();
            IsProgressAssessment      = ovta.IsProgressAssessment;
            AssessmentAreaDescription = ovta.OnlandVisualTrashAssessmentArea?.AssessmentAreaDescription ??
                                        ovta.DraftAreaDescription;
            ScoreDescriptionsUrl =
                SitkaRoute <OnlandVisualTrashAssessmentController> .BuildUrlFromExpression(x => x.ScoreDescriptions());

            PreliminarySourceIdentificationTypeOthers = PreliminarySourceIdentificationType.All.Where(x => x.IsOther());

            TrashAssessmentSummaryMapViewData = new TrashAssessmentSummaryMapViewData(ovtaSummaryMapInitJson, ovta.OnlandVisualTrashAssessmentObservations, geoServerUrl);
        }
Esempio n. 2
0
        public DetailViewData(Person currentPerson, Models.OnlandVisualTrashAssessment onlandVisualTrashAssessment, TrashAssessmentSummaryMapViewData trashAssessmentSummaryMapViewData, string returnToEditUrl, bool userHasReturnToEditPermission) : base(currentPerson)
        {
            OnlandVisualTrashAssessment       = onlandVisualTrashAssessment;
            IsProgressAssessment              = onlandVisualTrashAssessment.ToBaselineProgress();
            TrashAssessmentSummaryMapViewData = trashAssessmentSummaryMapViewData;
            EntityName = "On-land Visual Trash Assessment";
            EntityUrl  = SitkaRoute <OnlandVisualTrashAssessmentController> .BuildUrlFromExpression(x => x.Index());

            SubEntityName = onlandVisualTrashAssessment.OnlandVisualTrashAssessmentArea
                            .OnlandVisualTrashAssessmentAreaName;
            SubEntityUrl = SitkaRoute <OnlandVisualTrashAssessmentAreaController> .BuildUrlFromExpression(x =>
                                                                                                          x.Detail(onlandVisualTrashAssessment.OnlandVisualTrashAssessmentArea));

            // ReSharper disable once PossibleInvalidOperationException
            PageTitle       = OnlandVisualTrashAssessment.CompletedDate.Value.ToShortDateString();
            ReturnToEditUrl = returnToEditUrl;
            UserHasReturnToEditPermission = userHasReturnToEditPermission;
        }