EnVisageOnline/Main/Source/EnVisage/Views/Scenarios/_gridBottomUp.cshtml

158 lines
8.5 KiB
Plaintext

<tbody ng-controller="scenarioBottomUpController" ng-if="data.Scenario.IsBottomUp">
<tr ng-repeat-start="(teamId, row) in ViewModel.Teams" ng-show="!ViewModel.CalendarFilter.ShowActuals">
<td class="headcol"></td>
<td class="headcol"></td>
<td class="headcol headcol-week">
<div class="restbl">
<div>
<div class="team-name-container" title="{{ row.Name }}">
{{ row.Name }}
</div>
<div>
<button ng-class="{hideView:!row.IsAccessible}" type="button" title="View on Calendar" class="btn btn-primary btn-xs" ng-click="goToTeamBoard(row.Id, $event)"><i class="fa fa-calendar"></i></button>
<button ng-class="{hideView:!row.CanBeDeleted}" type="button" title="Remove this team" class="btn btn-danger btn-xs" ng-click="removeTeam(row)"><i class="fa fa-times"></i></button>
</div>
</div>
</div>
</td>
<td class="headcol">
<span ng-show="ViewModel.CalendarFilter.IsTableModeQuantity">
{{ row.TotalValue || 0 | number:2 }}
</span>
<span ng-show="!ViewModel.CalendarFilter.IsTableModeQuantity">
N/A
</span>
</td>
<td ng-repeat="cell in row.Cells track by $index"
ng-if="data.Calendar.WeekHeaders[$index].Initialized"
ng-show="data.Calendar.WeekHeaders[$index].Show">
<span ng-show="ViewModel.CalendarFilter.IsTableModeQuantity">
{{ cell || 0 | number:2 }}
</span>
<span ng-show="!ViewModel.CalendarFilter.IsTableModeQuantity">
N/A
</span>
</td>
</tr>
<tr ng-show="ViewModel.CalendarFilter.IsTableModeQuantity && !ViewModel.CalendarFilter.ShowActuals && row.HasAvailableResources" class="resRow">
<td class="headcol"></td>
<td class="headcol"></td>
<td class="headcol assign" colspan="2">
<div class="col-sm-8 select2-primary">
<select ng-model="row.ResourceToAssignId" id="assign-resource-select-{{row.Id}}">
<option></option>
<option ng-repeat="(resourceId, resource) in row.AvailableResources track by $index" value="{{resource.id}}" ng-if="resource.isVisible">
{{resource.name}}
</option>
</select>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-success"
ng-disabled="!row.ResourceToAssignId"
ng-click="assignResource(row, $event)"
target="assign-resource-select-{{row.Id}}">
Assign
</button>
</div>
</td>
<td colspan="{{ data.VisibleCellCount }}"></td>
</tr>
<tr ng-repeat-end
ng-show="row.AssignedResources && !ViewModel.CalendarFilter.ShowActuals"
ng-repeat="(resourceId, resource) in row.AssignedResources">
<td class="headcol"></td>
<td class="headcol">
<div ng-controller="noteController" ng-init="initView(data.Scenario.Id, resource.Id,3,(data.Scenario.Id != GuidEmpty),(NotesToAdd.length == 0))">
<a href="#" ng-click="openNoteModal()" data-toggle="modal" data-target="#editNote{{ParentId}}" title="Notes"><i class="fa fa-file-text-o icon black"></i></a>
<span id="NoteLabel" ng-hide="(Notes.length == 0)" ng-cloak class="button__badge label">{{Notes.length}}</span>
@Html.Partial("~/Views/Note/_index.cshtml")
</div>
</td>
<td class="headcol">
<div class="restbl" style="padding-left:40px;">
<div>
<div class="resource-name-container" title="{{ resource.Name }}">{{ resource.Name }}</div>
<div>
<button type="button" title="Zero this resource" class="btn btn-success btn-xs" ng-disabled="!ViewModel.CalendarFilter.IsTableModeQuantity" ng-click="zeroResource(resource)"><i class="fa fa-minus"></i></button>
<button type="button" title="Remove this resource" class="btn btn-danger btn-xs" ng-disabled="!resource.CanBeDeleted" ng-click="removeResource(resource, $event)" target="assign-resource-select-{{teamId}}"><i class="fa fa-times"></i></button>
</div>
</div>
</div>
</td>
<td class="headcol">
<a href="#" editable-text="resource.TotalValue" e-name="ColValue" e-ng-blur="onTxtBlur(this);" onshow="watchKeyInput(this)" buttons="no"
blur="submit" onbeforesave="checkResourceTotalValue(resource, $data)" e-required
ng-show="ViewModel.CalendarFilter.IsTableModeQuantity && !ViewModel.CalendarFilter.ShowActuals">
{{ resource.TotalValue || 0 | number:2 }}
</a>
<span ng-show="ViewModel.CalendarFilter.IsTableModeQuantity && ViewModel.CalendarFilter.ShowActuals">
{{ resource.TotalValue || 0 | number:2 }}
</span>
<span ng-show="!ViewModel.CalendarFilter.IsTableModeQuantity">
N/A
</span>
</td>
<td ng-repeat="cell in resource.Cells track by $index"
ng-if="data.Calendar.WeekHeaders[$index].Initialized"
ng-show="data.Calendar.WeekHeaders[$index].Show"
ng-class="resource.CSSClass[$index]">
<a href="#" editable-text="cell" e-name="ColValue" e-ng-blur="onTxtBlur(this);" onshow="watchKeyInput(this)" buttons="no"
blur="submit" onbeforesave="checkResourceValue(resource, $index, $data)" e-required
ng-show="ViewModel.CalendarFilter.IsTableModeQuantity && !resource.ReadOnly[$index]">
{{ cell || 0 | number:2 }}
</a>
<span ng-show="ViewModel.CalendarFilter.IsTableModeQuantity && resource.ReadOnly[$index]">
{{ cell || 0 | number:2 }}
</span>
<span ng-show="!ViewModel.CalendarFilter.IsTableModeQuantity">
N/A
</span>
</td>
</tr>
<tr ng-show="ViewModel.Total">
<td class="headcol"></td>
<td class="headcol"></td>
<td class="headcol headcol-week" ng-click="toggleTotalRow()">
<a>
<i class="fa" ng-class="ViewModel.Total.CollapsedClass" style="margin-right: 5px;"
ng-attr-title="{{ViewModel.Total.Expanded ? 'Collapse' : 'Expand'}}">
</i>
Total
</a>
</td>
<td class="headcol">
<a href="#" editable-text="ViewModel.Total.TotalValue" e-name="ColValue" e-ng-blur="onTxtBlur(this);" onshow="watchKeyInput(this)" buttons="no"
blur="submit" onbeforesave="checkGrandTotalValue($data)" e-required
ng-show="ViewModel.Total.IsEditable">
{{ ViewModel.Total.TotalValue || 0 | number:2 }}
</a>
<span ng-show="!ViewModel.Total.IsEditable">
{{ ViewModel.CalendarFilter.IsTableModeQuantity ? (ViewModel.Total.TotalValue || 0 | number:2) : (ViewModel.Total.TotalValue || 0 | currency) }}
</span>
</td>
<td ng-repeat="cell in ViewModel.Total.Cells track by $index"
ng-if="data.Calendar.WeekHeaders[$index].Initialized"
ng-show="data.Calendar.WeekHeaders[$index].Show">
{{ ViewModel.CalendarFilter.IsTableModeQuantity ? (cell || 0 | number:2) : (cell || 0 | currency) }}
</td>
</tr>
<tr ng-show="ViewModel.Total && ViewModel.Total.Expenditures && ViewModel.Total.Expanded"
ng-repeat="(categoryId, category) in ViewModel.Total.Expenditures">
<td class="headcol"></td>
<td class="headcol"></td>
<td class="headcol">
<div class="restbl" style="padding-left:40px;">
{{ category.Name }}
</div>
</td>
<td class="headcol">
{{ ViewModel.CalendarFilter.IsTableModeQuantity ? (category.TotalValue || 0 | number:2) : (category.TotalValue || 0 | currency) }}
</td>
<td ng-repeat="cell in category.Cells track by $index"
ng-if="data.Calendar.WeekHeaders[$index].Initialized"
ng-show="data.Calendar.WeekHeaders[$index].Show">
{{ ViewModel.CalendarFilter.IsTableModeQuantity ? (cell || 0 | number:2) : (cell || 0 | currency) }}
</td>
</tr>
</tbody>