-
-
Notifications
You must be signed in to change notification settings - Fork 350
Expand file tree
/
Copy pathteams.component.html
More file actions
105 lines (98 loc) · 3.88 KB
/
teams.component.html
File metadata and controls
105 lines (98 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<app-top-header
[section]="
settings.getTeamLabelPlural() + ' & ' + settings.getGroupLabelPlural()
"></app-top-header>
<div class="team-section">
<app-teams-groups-editor
[teams]="teams"
[teamGroups]="teamGroups"
[canEdit]="canEdit"
(selectionChanged)="onSelectionChanged($event)"
(namesChanged)="onTeamsChanged($event)"
(click)="$event.stopPropagation()"></app-teams-groups-editor>
<div class="button-container" *ngIf="dataStore?.meta?.hasLocalStorage">
<button mat-raised-button (click)="onExportTeamGroups()">
Download {{ settings.getTeamLabel() | lowercase }} setup
</button>
<button mat-raised-button (click)="onResetTeamGroups()">
Reset {{ settings.getTeamLabel() | lowercase }} setup
</button>
</div>
<div class="team-info">
<h2>{{ infoTitle }}</h2>
<div class="subheader" *ngIf="infoTeams.length > 1">
{{ info[infoTitle]?.teams?.join(', ') }}
</div>
<div class="info-content">
<div class="info-kpis">
<app-kpi
[title]="progressTitleImplemented"
[value]="info[infoTitle]?.uniqueActivitiesCompletedCount"
[suffix]="'activities'"></app-kpi>
<app-kpi
[title]="'In progress'"
[value]="info[infoTitle]?.uniqueActivitiesInProgressCount"
[suffix]="'activities'"></app-kpi>
<app-kpi
[title]="'Last updated:'"
[value]="dateFormat(info[infoTitle]?.lastUpdated)"
[suffix]="info[infoTitle]?.lastUpdated ? '' : 'No activity registered'"></app-kpi>
</div>
</div>
<h3>Activities in progress</h3>
<table mat-table matSort [dataSource]="dataSource || []" class="mat-elevation-z8 teams-table">
<ng-container matColumnDef="Team">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="table-small-width">
{{ settings.getTeamLabel() }}
</th>
<td mat-cell *matCellDef="let element" class="table-small-width">
{{ element?.team }}
</td>
</ng-container>
<ng-container matColumnDef="Activity">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="table-small-width">
Activity
</th>
<td mat-cell *matCellDef="let element" class="table-small-width">
{{ element?.activity?.name }}
</td>
</ng-container>
<ng-container matColumnDef="SubDimension">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="table-small-width">
Dimension
</th>
<td mat-cell *matCellDef="let element" class="table-small-width">
<div class="dimension-cell">
<mat-icon
class="dimension-icon"
*ngIf="dataStore?.meta?.getIcon(element?.activity?.category || '')">
{{ dataStore?.meta?.getIcon(element?.activity?.category || '') }}
</mat-icon>
<span>{{ element?.activity?.dimension }}</span>
</div>
</td>
</ng-container>
<ng-container
matColumnDef="{{ progressColumn }}"
*ngFor="let progressColumn of progressColumnNames">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="progress-col">
{{ progressColumn }}
</th>
<td mat-cell *matCellDef="let element" class="progress-col">
<span *ngIf="element?.progress?.[progressColumn]">
{{ dateFormat(element?.progress?.[progressColumn]) }}
</span>
</td>
</ng-container>
<!-- No data message -->
<tr class="mat-row" *matNoDataRow>
<td class="mat-cell" [attr.colspan]="allColumnNames.length">
<em>Currently no activities in progress for {{ info[infoTitle]?.teams?.join(', ') }}</em>
</td>
</tr>
<tr mat-header-row *matHeaderRowDef="allColumnNames"></tr>
<tr mat-row *matRowDef="let row; columns: allColumnNames"></tr>
<tr mat-footer-row></tr>
</table>
</div>
</div>