@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")) }
@if (SecurityManager.CheckSecurityObjectPermission(Areas.RD_ResourceInformation, AccessLevel.Read)) {
@Html.LabelFor(model => model.FirstName, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.FirstName, new { @class = "form-control", @readonly = "true" }) @Html.ValidationMessageFor(model => model.FirstName)
@Html.LabelFor(model => model.LastName, new { @class = "col-sm-2 control-label" })
@Html.TextBoxFor(model => model.LastName, new { @class = "form-control", @readonly = "true" }) @Html.ValidationMessageFor(model => model.LastName)
@Html.LabelFor(model => model.IsActiveEmployee, new { @class = "col-sm-2 control-label" })
@Html.CheckBoxFor(model => model.IsActiveEmployee, new { @class = "switcher-disabled-default", disabled = "disabled" }) @Html.ValidationMessageFor(model => model.IsActiveEmployee)
@Html.LabelFor(model => model.StartDate, new { @class = "col-sm-2 control-label" })
@Html.EditorFor(model => model.StartDate, new { @class = "form-control", Disabled = true }) @Html.ValidationMessageFor(model => model.StartDate)
@Html.LabelFor(model => model.EndDate, new { @class = "col-sm-2 control-label" })
@Html.EditorFor(model => model.EndDate, new { @class = "form-control", Disabled = true }) @Html.ValidationMessageFor(model => model.EndDate)
@if (Model.TeamChangeQueued != null) {
From @(Model.TeamChangeQueued.ChangeDate.ToShortDateString()) this resource will be a member of the Team '@(Model.TeamChangeQueued.Name)' }
@Model.ExpenditureCategory.GetView().ExpCategoryWithCcName @if (SecurityManager.CheckSecurityObjectPermission(Areas.RD_ResourceInformation, AccessLevel.Write)) {  Change
Expenditure Category cannot be changed because this Resource has @(resourceIsAllocatedToScenarios && resourceHasActuals && resourceHasMixAllocations ? "Allocations in Projects, Mixes and has Actuals." : "") @(resourceIsAllocatedToScenarios && resourceHasActuals && !resourceHasMixAllocations ? "Allocations in Projects and Actuals." : "") @(resourceIsAllocatedToScenarios && !resourceHasActuals && resourceHasMixAllocations ? "Allocations in Projects and Mixes." : "") @(!resourceIsAllocatedToScenarios && resourceHasActuals && resourceHasMixAllocations ? "Allocations in Mixes and Actuals." : "") @(resourceIsAllocatedToScenarios && !resourceHasActuals && !resourceHasMixAllocations ? "Allocations in Projects." : "") @(!resourceIsAllocatedToScenarios && resourceHasActuals && !resourceHasMixAllocations ? "Actuals." : "") @(!resourceIsAllocatedToScenarios && !resourceHasActuals && resourceHasMixAllocations ? "Allocations in Mixes." : "")
Please remove them manually prior to changing the Expenditure Category
}
@if (SecurityManager.CheckSecurityObjectPermission(Areas.RD_ResourceInformation, AccessLevel.Write)) {
}
} @if (SecurityManager.CheckSecurityObjectPermission(Areas.RD_ResourceSkills, AccessLevel.Read)) {
@Html.Partial("../Skills/_personalSkillsMatrix", skillsMatrixJson)
}
@Html.Partial("~/Views/ActivityCalendar/_capacityManagement.cshtml", acModel)
@if (SecurityManager.CheckSecurityObjectPermission(Areas.RD_ResourceNonProjectTime, AccessLevel.Read)) {
@if (SecurityManager.CheckSecurityObjectPermission(Areas.RD_ResourceNonProjectTime, AccessLevel.Write)) { }

Upcoming

@Html.Partial("../PeopleResource/_NPTimeList")

Permanent

@Html.Partial("../PeopleResource/_NPTimeList")

History

@Html.Partial("../PeopleResource/_NPTimeList")
}
@if (SecurityManager.CheckSecurityObjectPermission(Areas.Teams, AccessLevel.Read)) {
}