@using EnVisage.Code @using EnVisage.Models @using EnVisage.Controllers @model PeopleResourceModel @{ ViewBag.Title = "People Resource Details"; var acModel = new { DisplayMode = new { MenuId = "visibilitydropdown_calendar", DataSection = "capacityManagementView", PageKey = "/PeopleResource/Details", BackUrlTitle = "dashboard", GroupBy = new { Hide = true, Disabled = false, Value = '0' }, CapacityMode = new { Hide = true, Disabled = false, Value = '1' }, ShowUpper = new { Hide = true, Disabled = false, Value = true }, ShowLower = new { Hide = true, Disabled = false, Value = false }, IsCapacityModeActuals = new { Hide = true, Disabled = false, Value = true } }, Filter = new { EntityType = CapacityPageInitOption.CalendarEntityType.Resource, EntityId = Model.Id, ShowFilters = false }, TargetPage = "ResourceDetails" }; } @{ string userIdAsText = User.Identity.GetID(); string skillsMatrixJson = String.Empty; using (var dbContext = new EnVisageEntities()) { // Create and fill model for initial Skills Matrix loading SkillsMatrixPageLoadModel skillsMatrixLoadModel = SkillsController.GetPageLoadModel(userIdAsText, ApplicationDashboards.ResourceBoard, dbContext); skillsMatrixLoadModel.OpenerType = ApplicationDashboards.ResourceBoard; skillsMatrixLoadModel.OpenerId = Model != null && !Model.Id.Equals(Guid.Empty) ? Model.Id.ToString() : String.Empty; skillsMatrixLoadModel.ReadOnly = !SecurityManager.CheckSecurityObjectPermission(Areas.RD_ResourceSkills, AccessLevel.Write); skillsMatrixJson = Newtonsoft.Json.JsonConvert.SerializeObject(new { prefs = "", model = skillsMatrixLoadModel }); } } @{ // Check if resource has any type of allocations: scenario or actuals // Variables will be used in html below var resourceIsAllocatedToScenarios = (Model.ResourceScenarioAllocationsInfo != null) && (Model.ResourceScenarioAllocationsInfo.HasAllocations); var resourceHasActuals = (Model.ResourceActualsInfo != null) && (Model.ResourceActualsInfo.HasAllocations); var resourceHasMixAllocations = (Model.ResourceMixAllocationsInfo != null) && (Model.ResourceMixAllocationsInfo.HasAllocations); var resourceHasAnyAllocations = resourceIsAllocatedToScenarios || resourceHasActuals || resourceHasMixAllocations; } @section stylesheets { @Styles.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-acstyles")) @Styles.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_STYLES_BASE_PATH, "prevu-skillmatrixstyles")) } @section scripts { @Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-angularservices")) @Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-activitycalendar")) @Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-scenariodetails")) @Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-skillsmatrix")) @Scripts.Render(String.Format("{0}/{1}", Constants.C_BUNDLE_SCRIPTS_BASE_PATH, "prevu-resourcepage")) }