public EditPerformanceMeasureTargetsViewData(ProjectFirmaModels.Models.PerformanceMeasure performanceMeasure, EditPerformanceMeasureTargetsViewDataForAngular viewDataForAngular, PerformanceMeasureTargetType performanceMeasureTargetType) { PerformanceMeasure = performanceMeasure; ViewDataForAngular = viewDataForAngular; PerformanceMeasureFieldDefinition = FieldDefinitionEnum.PerformanceMeasure.ToType(); ShowGeoSpatialAreaInstructions = performanceMeasureTargetType == PerformanceMeasureTargetType.TargetByGeospatialArea; }
private ActionResult ViewEditPerformanceMeasureReportedValues(PerformanceMeasure performanceMeasure, EditPerformanceMeasureTargetsViewModel viewModel) { var performanceMeasureTargetValueTypes = PerformanceMeasureTargetValueType.All.ToList(); var reportingPeriods = performanceMeasure.GetPerformanceMeasureReportingPeriodsFromTargetsAndActuals(); var defaultReportingPeriodYear = reportingPeriods.Any() ? reportingPeriods.Max(x => x.PerformanceMeasureReportingPeriodCalendarYear) + 1 : DateTime.Now.Year; var viewDataForAngular = new EditPerformanceMeasureTargetsViewDataForAngular(performanceMeasure, defaultReportingPeriodYear, performanceMeasureTargetValueTypes, false); var viewData = new EditPerformanceMeasureTargetsViewData(performanceMeasure, viewDataForAngular, EditPerformanceMeasureTargetsViewData.PerformanceMeasureTargetType.TargetByYear); return(RazorPartialView <EditPerformanceMeasureTargets, EditPerformanceMeasureTargetsViewData, EditPerformanceMeasureTargetsViewModel>(viewData, viewModel)); }