EnVisageOnline/Main/Source/EnVisage/Content/templates/ActivityCalendar/_resourceCalendar.html

260 lines
16 KiB
HTML

<div ng-controller="resourceCalendarController" class="ac-container">
<div class="ac-control" ng-show="ViewModel.DataLoaded" ng-cloak ng-init-widget>
<!--Left Frozen Block-->
<div class="ac-left-col">
<!--Header section-->
<div class="freezeTable1 ac-left-col-header">
<table class="table1 table-light">
<thead>
<tr>
<th class="firstcol">
<div>Project</div>
</th>
<th class="firstcol">
<div>Total</div>
</th>
</tr>
</thead>
</table>
</div>
<!--Section with project names-->
<div class="freezeTable1 ac-left-col-content height-container">
<!-- ac-left-table class uses only for ngMovable directive to identify right place to move body from the bottom part -->
<table class="table table1 vertical-scroll-target watch-resizing ac-left-table ng-popup-menu-container" data-scrollcontainerclass="table-light" data-menuclass="menuGroup">
<tbody ng-if="ViewModel.DisplayMode.ShowUpper.Value">
<!-- Projects -->
<tr ng-repeat="row in ViewModel.Rows" grid-row templateUrl="{{row.Templates.Main}}"></tr>
<!-- Currently Assigned total Row -->
<tr>
<td class="headcol1 headcol-week ac-row-name">
<strong title="Currently Assigned">Currently Assigned</strong>
</td>
<td class="ac-row-total">
<div class="ac-total">
<strong>{{ (ViewModel.CurrentlyAssignedRow.TotalValue || 0 | number:2) }}</strong>
</div>
</td>
</tr>
<!-- Non Project Time rows -->
<!-- Non Project Time total row-->
<tr>
<td class="headcol1 headcol-week ac-row-name" ng-click="toggleRow(ViewModel.NonProjectTimeTotalRow, $event);">
<a ng-if="ViewModel.NonProjectTimeTotalRow.Children">
<i class="fa" ng-if="ViewModel.NonProjectTimeTotalRow.Children" ng-attr-title="{{ViewModel.NonProjectTimeTotalRow.Collapsed ? 'Expand' : 'Collapse'}}" ng-class="{'fa-plus-square':ViewModel.NonProjectTimeTotalRow.Collapsed, 'fa-minus-square':!ViewModel.NonProjectTimeTotalRow.Collapsed}"></i>
<div class="shortName ac-name" title="{{ ViewModel.NonProjectTimeTotalRow.Name }}">{{ ViewModel.NonProjectTimeTotalRow.Name }}</div>
</a>
<span ng-if="!ViewModel.NonProjectTimeTotalRow.Children" title="{{ ViewModel.NonProjectTimeTotalRow.Name || 'empty' }}">{{ ViewModel.NonProjectTimeTotalRow.Name || 'empty' }}</span>
</td>
<td class="ac-row-total">
<div class="ac-total">
{{ (ViewModel.NonProjectTimeTotalRow.TotalValue || 0 | number:2) }}
</div>
</td>
</tr>
<!-- Non Project Time Category row-->
<tr ng-if="nptCat.Initialized" ng-show="nptCat.Show" ng-repeat-start="nptCat in (ViewModel.NonProjectTimeTotalRow.Children) track by $index" class="ac-level-2">
<td class="headcol1 headcol-week expCat ac-row-name" ng-click="toggleRow(nptCat, $event);">
<a title="{{ nptCat.Name }}">
<i class="fa" ng-attr-title="{{nptCat.Collapsed ? 'Expand' : 'Collapse'}}" ng-class="{'fa-plus-square':nptCat.Collapsed, 'fa-minus-square':!nptCat.Collapsed}"></i>
<div class="shortName ac-name">{{ nptCat.Name }}</div>
</a>
</td>
<td class="ac-row-total">
<div class="ac-total">
{{ (nptCat.TotalValue || 0 | number:2) }}
</div>
</td>
</tr>
<!-- Non Project Time Item row -->
<tr ng-if="nptItem.Initialized" ng-show="nptItem.Show" ng-repeat="nptItem in (nptCat.Children) track by $index" class="ac-level-3">
<td class="headcol1 headcol-week expCat ac-row-name" style="height: 31px;">
<div class="shortName ac-name">{{ nptItem.Name }}</div>
</td>
<td class="ac-row-total">
<div class="ac-total">
{{ (nptItem.TotalValue || 0 | number:2) }}
</div>
</td>
</tr>
<tr ng-repeat-end ng-if="false"></tr>
<!-- Total row -->
<tr ng-if="ViewModel.Visibility.ShowForecast">
<td class="headcol1 headcol-week ac-row-name" ng-click="toggleRow(ViewModel.TotalRow, $event);">
<a ng-if="ViewModel.TotalRow.Children && ViewModel.TotalRow.Children.length">
<i class="fa" ng-attr-title="{{ViewModel.TotalRow.Collapsed ? 'Expand' : 'Collapse'}}" ng-class="{'fa-plus-square':ViewModel.TotalRow.Collapsed, 'fa-minus-square':!ViewModel.TotalRow.Collapsed}"></i>
<div class="shortName ac-name" title="Total"><string>Total</string></div>
</a>
<div ng-if="!ViewModel.TotalRow.Children || !ViewModel.TotalRow.Children.length" title="Total"><strong>Total</strong></div>
</td>
<td class="ac-row-total">
<div class="ac-total">
<strong>{{ (ViewModel.TotalRow.TotalValue || 0 | number:2) }}</strong>
</div>
</td>
</tr>
<!-- Actuals total row -->
<tr ng-if="ViewModel.TotalRow.Children && ViewModel.TotalRow.Children.length" ng-show="ViewModel.TotalRow.Children[0].Show" class="ac-level-2">
<td class="headcol1 headcol-week expCat ac-row-name">
<span class="shortName ac-name" ng-attr-title="{{ViewModel.TotalRow.Children[0].Name}}">{{ViewModel.TotalRow.Children[0].Name}}</span>
</td>
<td class="ac-row-total">
<div class="ac-total">
{{ (ViewModel.TotalRow.Children[0].TotalValue || 0 | number:2) }}
</div>
</td>
</tr>
</tbody>
<tbody>
<tr class="remaining-capacity-row">
<td class="headcol1 headcol-week">
<strong title="Remaining Capacity">Remaining Capacity</strong>
</td>
<td class="ac-row-total">
<div class="ac-total">
<strong>{{ (ViewModel.RemainingCapacityRow.TotalValue || 0 | number:2) }}</strong>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="header-container width-container">
<div class="freezeTable1 horizontal-scroll-target" style="margin-left: -400px">
<table class="table ac-table-header table-light">
<thead class="watch-resizing">
<tr>
<th style="width:400px" class="firstcol"></th>
<!-- years -->
<th ng-repeat="header in (ViewModel.Header.Years) track by $index" colspan="{{ header.Colspan }}" class="ac-normal-header-cell">
{{ header.Title }}
</th>
</tr>
<tr>
<th class="headcol" style="visibility: hidden;"></th>
<!-- months -->
<th ng-repeat="header in (ViewModel.Header.Months) track by $index" ng-click="toggleMonth($index)"
colspan="{{ header.Colspan }}" class="ac-normal-header-cell headcol-month">
<i class="fa" ng-class="header.CollapsedClass" style="margin-right: 5px;"></i>
{{ header.ShortTitle }}
</th>
</tr>
<tr>
<th class="headcol" style="visibility: hidden;"></th>
<!-- days -->
<th ng-repeat="header in (ViewModel.Header.Weeks) track by $index"
ng-if="header.Initialized"
ng-show="header.Show" class="ac-normal-header-cell">
{{ header.ShortTitle }}
</th>
</tr>
</thead>
</table>
</div>
</div>
<div class="table-light table-responsive very-big-table freezeTable freezeTable1 main-table-container height-container width-container watch-scroll">
<!-- ac-right-table class uses only for ngMovable directive to identify right place to move body from the bottom part -->
<table class="table table-striped table-bordered main-table ac-right-table"
ng-attr-data-visible-cells="{{ ViewModel.Header.Colspan }}"
ng-class="{'bar-mode':ViewModel.DisplayMode.IsBarMode}">
<tbody ng-if="ViewModel.DisplayMode.ShowUpper.Value">
<!-- Projects -->
<tr ng-repeat="row in ViewModel.Rows" grid-row templateUrl="{{row.Templates.Numbers}}"></tr>
<!-- Currently Assigned total row -->
<tr>
<td ng-repeat="header in (ViewModel.Header.Weeks) track by $index"
ng-if="header.Initialized"
ng-show="header.Show"
ng-attr-style="{{ ViewModel.CurrentlyAssignedRow.CSSStyle[$index] }}"
ng-class="ViewModel.CurrentlyAssignedRow.CSSClass[$index]">
<strong>{{ (ViewModel.CurrentlyAssignedRow.Cells[$index] | number:2) }}</strong>
</td>
</tr>
<!-- Non Project Time rows -->
<!-- Non Project Time total row -->
<tr>
<td ng-repeat="header in (ViewModel.Header.Weeks) track by $index"
ng-if="header.Initialized"
ng-show="header.Show"
ng-attr-style="{{ ViewModel.NonProjectTimeTotalRow.CSSStyle[$index] }}"
ng-class="ViewModel.NonProjectTimeTotalRow.CSSClass[$index]">
{{ (ViewModel.NonProjectTimeTotalRow.Cells[$index] | number:2) }}
</td>
</tr>
<!-- Non Project Time Category row -->
<tr ng-if="nptCat.Initialized" ng-show="nptCat.Show" ng-repeat-start="nptCat in (ViewModel.NonProjectTimeTotalRow.Children) track by $index">
<td ng-repeat="header in (ViewModel.Header.Weeks) track by $index"
ng-if="header.Initialized"
ng-show="header.Show"
ng-class="nptCat.CSSClass[$index]">
{{ (nptCat.Cells[$index] | number:2) }}
</td>
</tr>
<!-- Non Project Time Item row -->
<tr ng-if="nptItem.Initialized" ng-show="nptItem.Show" ng-repeat="nptItem in (nptCat.Children) track by $index">
<td ng-repeat="header in (ViewModel.Header.Weeks) track by $index"
ng-if="header.Initialized"
ng-show="header.Show"
ng-class="nptItem.CSSClass[$index]"
style="height: 31px;">
<a href="javascript:void(0)" editable-text="nptItem.Children[0].Cells[$index]" e-name="ColValue" e-ng-blur="onTxtBlur(this);" onshow="watchKeyInput(this)" buttons="no"
blur="submit" onbeforesave="checkNptResourceValue(nptCat, nptItem, $index, $data)" e-required
ng-if="!nptItem.IsTeamWide && nptItem.Children[0].EditableNptWeeks[$index] && (nptItem.Children[0].Cells[$index] != 0)">
{{ nptItem.Children[0].Cells[$index] | number:2 }}
</a>
<span ng-if="!nptItem.IsTeamWide && !nptItem.Children[0].EditableNptWeeks[$index] && (nptItem.Children[0].Cells[$index] != 0)">
{{ (nptItem.Children[0].Cells[$index] | number:2) }}
</span>
<span ng-if="nptItem.IsTeamWide && (nptItem.Cells[$index] != 0)">
{{ (nptItem.Cells[$index] | number:2) }}
</span>
</td>
</tr>
<tr ng-repeat-end ng-if="false"></tr>
<!-- Total row -->
<tr ng-if="ViewModel.Visibility.ShowForecast">
<td ng-repeat="header in (ViewModel.Header.Weeks) track by $index"
ng-if="header.Initialized"
ng-show="header.Show"
ng-attr-style="{{ ViewModel.TotalRow.CSSStyle[$index] }}"
ng-class="ViewModel.TotalRow.CSSClass[$index]">
<strong>{{ (ViewModel.TotalRow.Cells[$index] | number:2) }}</strong>
</td>
</tr>
<!-- Actuals total row -->
<tr ng-if="ViewModel.TotalRow.Children[0].Initialized" ng-show="ViewModel.TotalRow.Children[0].Show">
<td ng-repeat="header in (ViewModel.Header.Weeks) track by $index"
ng-if="ViewModel.TotalRow.Children && ViewModel.TotalRow.Children.length && header.Initialized"
ng-show="header.Show"
ng-attr-style="{{ ViewModel.TotalRow.Children[0].CSSStyle[$index] }}"
ng-class="ViewModel.TotalRow.Children[0].CSSClass[$index]">
{{ (ViewModel.TotalRow.Children[0].Cells[$index] | number:2) }}
</td>
</tr>
</tbody>
<tbody>
<tr class="remaining-capacity-row">
<td ng-repeat="header in (ViewModel.Header.Weeks) track by $index"
ng-if="header.Initialized"
ng-show="header.Show"
ng-attr-style="{{ ViewModel.RemainingCapacityRow.CSSStyle[$index] }}"
ng-class="ViewModel.RemainingCapacityRow.CSSClass[$index]">
<strong>{{ (ViewModel.RemainingCapacityRow.Cells[$index] | number:2) }}</strong>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="ac-control" ng-show="!ViewModel.DataLoaded">
<table class="table" style="width: 100%">
<tbody>
<tr>
<td style="text-align: center;">
There is no data available.
</td>
</tr>
</tbody>
</table>
</div>
</div>