Skip to content

Commit 88bb029

Browse files
authored
Merge pull request #238 from wurstbrot/feat/teamAssessment
Team Based Assessment
2 parents 6c33c2d + aec86ce commit 88bb029

28 files changed

+1023
-483
lines changed

src/app/app-routing.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ import { AboutUsComponent } from './component/about-us/about-us.component';
44
import { CircularHeatmapComponent } from './component/circular-heatmap/circular-heatmap.component';
55
import { MappingComponent } from './component/mapping/mapping.component';
66
import { MatrixComponent } from './component/matrix/matrix.component';
7-
import { TaskDescriptionComponent } from './component/task-description/task-description.component';
7+
import { ActivityDescriptionComponent } from './component/activity-description/activity-description.component';
88
import { UsageComponent } from './component/usage/usage.component';
9+
import { Teams } from './component/teams/teams.component';
910

1011
const routes: Routes = [
1112
{ path: '', component: MatrixComponent },
1213
{ path: 'circular-heatmap', component: CircularHeatmapComponent },
13-
{ path: 'task-description', component: TaskDescriptionComponent },
14+
{ path: 'activity-description', component: ActivityDescriptionComponent },
1415
{ path: 'mapping', component: MappingComponent },
1516
{ path: 'usage', component: UsageComponent },
17+
{ path: 'teams', component: Teams },
1618
{ path: 'about', component: AboutUsComponent },
1719
];
1820

src/app/app.module.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { LogoComponent } from './component/logo/logo.component';
1010
import { MatrixComponent } from './component/matrix/matrix.component';
1111
import { SidenavButtonsComponent } from './component/sidenav-buttons/sidenav-buttons.component';
1212
import { TopHeaderComponent } from './component/top-header/top-header.component';
13-
import { TaskDescriptionComponent } from './component/task-description/task-description.component';
13+
import { ActivityDescriptionComponent } from './component/activity-description/activity-description.component';
1414
import { ymlService } from './service/yaml-parser/yaml-parser.service';
1515
import { HttpClientModule } from '@angular/common/http';
1616
import { CircularHeatmapComponent } from './component/circular-heatmap/circular-heatmap.component';
@@ -19,6 +19,7 @@ import { ReadmeToHtmlComponent } from './component/readme-to-html/readme-to-html
1919
import { UsageComponent } from './component/usage/usage.component';
2020
import { AboutUsComponent } from './component/about-us/about-us.component';
2121
import { DependencyGraphComponent } from './component/dependency-graph/dependency-graph.component';
22+
import { Teams } from './component/teams/teams.component';
2223

2324
@NgModule({
2425
declarations: [
@@ -27,13 +28,14 @@ import { DependencyGraphComponent } from './component/dependency-graph/dependenc
2728
MatrixComponent,
2829
SidenavButtonsComponent,
2930
TopHeaderComponent,
30-
TaskDescriptionComponent,
31+
ActivityDescriptionComponent,
3132
CircularHeatmapComponent,
3233
MappingComponent,
3334
ReadmeToHtmlComponent,
3435
UsageComponent,
3536
AboutUsComponent,
3637
DependencyGraphComponent,
38+
Teams,
3739
],
3840
imports: [
3941
BrowserModule,
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.content-box {
2+
margin: 20px;
3+
width: 95%;
4+
/*height: 100%;*/
5+
/*background-color: paleturquoise;*/
6+
}
7+
8+
.mat-form-field + .mat-form-field {
9+
margin-left: 8px;
10+
}
11+
12+
.mat-raised-button {
13+
margin-right: 8px;
14+
}
15+
.teams-implemented-list {
16+
list-style: none;
17+
}

src/app/component/task-description/task-description.component.html renamed to src/app/component/activity-description/activity-description.component.html

Lines changed: 46 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="content-box">
22
<h1>
3-
{{ currentTask.dimension }} -> {{ currentTask.subDimension }}:
4-
{{ currentTask.taskName }}
3+
{{ currentActivity.dimension }} -> {{ currentActivity.subDimension }}:
4+
{{ currentActivity.activityName }}
55
</h1>
66

77
<div class="example-action-buttons">
@@ -16,7 +16,7 @@ <h1>
1616
<b>Description</b>
1717
</mat-panel-title>
1818
</mat-expansion-panel-header>
19-
<p [innerHTML]="currentTask.description"></p>
19+
<p [innerHTML]="currentActivity.description"></p>
2020
</mat-expansion-panel>
2121

2222
<mat-expansion-panel>
@@ -25,7 +25,7 @@ <h1>
2525
<b>Risk</b>
2626
</mat-panel-title>
2727
</mat-expansion-panel-header>
28-
<p [innerHTML]="currentTask.risk"></p>
28+
<p [innerHTML]="currentActivity.risk"></p>
2929
</mat-expansion-panel>
3030

3131
<mat-expansion-panel>
@@ -34,16 +34,16 @@ <h1>
3434
<b>Measure</b>
3535
</mat-panel-title>
3636
</mat-expansion-panel-header>
37-
<p [innerHTML]="currentTask.measure"></p>
37+
<p [innerHTML]="currentActivity.measure"></p>
3838
</mat-expansion-panel>
3939

40-
<mat-expansion-panel *ngIf="currentTask.implementatonGuide">
40+
<mat-expansion-panel *ngIf="currentActivity.implementatonGuide">
4141
<mat-expansion-panel-header>
4242
<mat-panel-title>
4343
<b>Implementation Guide</b>
4444
</mat-panel-title>
4545
</mat-expansion-panel-header>
46-
<p [innerHTML]="currentTask.implementatonGuide"></p>
46+
<p [innerHTML]="currentActivity.implementatonGuide"></p>
4747
</mat-expansion-panel>
4848

4949
<mat-expansion-panel>
@@ -52,18 +52,20 @@ <h1>
5252
<b>Difficulty of Implementation</b>
5353
</mat-panel-title>
5454
</mat-expansion-panel-header>
55-
<p>Knowledge: {{ this.KnowledgeLabels[this.currentTask.knowledge] }}</p>
56-
<p>Time: {{ this.GeneralLabels[this.currentTask.time] }}</p>
57-
<p>Resources: {{ this.GeneralLabels[this.currentTask.resources] }}</p>
55+
<p>
56+
Knowledge: {{ this.KnowledgeLabels[this.currentActivity.knowledge] }}
57+
</p>
58+
<p>Time: {{ this.GeneralLabels[this.currentActivity.time] }}</p>
59+
<p>Resources: {{ this.GeneralLabels[this.currentActivity.resources] }}</p>
5860
</mat-expansion-panel>
5961

60-
<mat-expansion-panel *ngIf="currentTask.usefulness !== -1">
62+
<mat-expansion-panel *ngIf="currentActivity.usefulness !== -1">
6163
<mat-expansion-panel-header>
6264
<mat-panel-title>
6365
<b>Usefulness</b>
6466
</mat-panel-title>
6567
</mat-expansion-panel-header>
66-
<p>{{ this.GeneralLabels[this.currentTask.usefulness] }}</p>
68+
<p>{{ this.GeneralLabels[this.currentActivity.usefulness] }}</p>
6769
</mat-expansion-panel>
6870

6971
<mat-expansion-panel>
@@ -72,7 +74,7 @@ <h1>
7274
<b>Evidence</b>
7375
</mat-panel-title>
7476
</mat-expansion-panel-header>
75-
<p [innerHTML]="currentTask.evidence"></p>
77+
<p [innerHTML]="currentActivity.evidence"></p>
7678
</mat-expansion-panel>
7779

7880
<mat-expansion-panel>
@@ -81,7 +83,7 @@ <h1>
8183
<b>Assessment</b>
8284
</mat-panel-title>
8385
</mat-expansion-panel-header>
84-
<p [innerHTML]="currentTask.assessment"></p>
86+
<p [innerHTML]="currentActivity.assessment"></p>
8587
</mat-expansion-panel>
8688

8789
<mat-expansion-panel>
@@ -93,7 +95,7 @@ <h1>
9395
<p>
9496
<mat-accordion multi="true">
9597
<mat-expansion-panel
96-
*ngFor="let implement of this.currentTask.implementation">
98+
*ngFor="let implement of this.currentActivity.implementation">
9799
<mat-expansion-panel-header>
98100
<mat-panel-title>
99101
<b [innerHTML]="implement['name']"></b>
@@ -148,7 +150,7 @@ <h1>
148150
<b>{{ SAMMVersion }}</b>
149151
</mat-panel-title>
150152
</mat-expansion-panel-header>
151-
<ul *ngFor="let samm of currentTask.samm">
153+
<ul *ngFor="let samm of currentActivity.samm">
152154
<li>{{ samm }}</li>
153155
</ul>
154156
</mat-expansion-panel>
@@ -158,7 +160,7 @@ <h1>
158160
<b>{{ ISOVersion }}</b>
159161
</mat-panel-title>
160162
</mat-expansion-panel-header>
161-
<ul *ngFor="let iso of currentTask.iso">
163+
<ul *ngFor="let iso of currentActivity.iso">
162164
<li>{{ iso }}</li>
163165
</ul>
164166
</mat-expansion-panel>
@@ -168,7 +170,7 @@ <h1>
168170
<b>{{ ISO22Version }}</b>
169171
</mat-panel-title>
170172
</mat-expansion-panel-header>
171-
<ul *ngFor="let iso22 of currentTask.iso22">
173+
<ul *ngFor="let iso22 of currentActivity.iso22">
172174
<li>{{ iso22 }}</li>
173175
</ul>
174176
</mat-expansion-panel>
@@ -179,13 +181,28 @@ <h1>
179181
<mat-expansion-panel>
180182
<mat-expansion-panel-header>
181183
<mat-panel-title>
182-
<b>Implemented</b>
184+
<b>Implemented By</b>
183185
</mat-panel-title>
184186
</mat-expansion-panel-header>
185187
<div
186-
*ngIf="currentTask.isImplemented; then thenBlock; else elseBlock"></div>
187-
<ng-template #thenBlock> Implemented </ng-template>
188-
<ng-template #elseBlock> Not Implemented </ng-template>
188+
*ngIf="
189+
currentActivity.teamsImplemented;
190+
then thenBlock;
191+
else elseBlock
192+
"></div>
193+
<ng-template #thenBlock>
194+
<ul class="teams-implemented-list">
195+
<li *ngFor="let item of currentActivity.teamsImplemented | keyvalue">
196+
<b>{{ item.key }}</b
197+
>:{{ item.value }}
198+
</li>
199+
</ul>
200+
</ng-template>
201+
<ng-template #elseBlock
202+
>teamsImplemented variable not present <br />
203+
<p *ngIf="currentActivity.isImplemented === false">Not Implemented</p>
204+
<p *ngIf="currentActivity.isImplemented === true">Implemented</p>
205+
</ng-template>
189206
</mat-expansion-panel>
190207
<mat-expansion-panel>
191208
<mat-expansion-panel-header>
@@ -194,9 +211,11 @@ <h1>
194211
</mat-panel-title>
195212
</mat-expansion-panel-header>
196213
<app-dependency-graph
197-
dimension="{{ currentTask.dimension }}"
198-
subDimension="{{ currentTask.subDimension }}"
199-
taskName="{{ currentTask.taskName }}"></app-dependency-graph>
214+
dimension="{{ currentActivity.dimension }}"
215+
subDimension="{{ currentActivity.subDimension }}"
216+
activityName="{{
217+
currentActivity.activityName
218+
}}"></app-dependency-graph>
200219
</mat-expansion-panel>
201220

202221
<mat-expansion-panel>
@@ -205,7 +224,7 @@ <h1>
205224
<b>Comments</b>
206225
</mat-panel-title>
207226
</mat-expansion-panel-header>
208-
<p [innerHTML]="currentTask.comments"></p>
227+
<p [innerHTML]="currentActivity.comments"></p>
209228
</mat-expansion-panel>
210229
</mat-accordion>
211230

@@ -215,6 +234,6 @@ <h1>
215234
<b>Tags</b>
216235
</mat-panel-title>
217236
</mat-expansion-panel-header>
218-
<p [innerHTML]="currentTask.tags"></p>
237+
<p [innerHTML]="currentActivity.tags"></p>
219238
</mat-expansion-panel>
220239
</div>

src/app/component/task-description/task-description.component.spec.ts renamed to src/app/component/activity-description/activity-description.component.spec.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ import { RouterTestingModule } from '@angular/router/testing';
44
import { sample } from 'rxjs';
55
import { ymlService } from 'src/app/service/yaml-parser/yaml-parser.service';
66

7-
import { TaskDescriptionComponent } from './task-description.component';
7+
import { ActivityDescriptionComponent } from './activity-description.component';
88

9-
describe('TaskDescriptionComponent', () => {
10-
let component: TaskDescriptionComponent;
11-
let fixture: ComponentFixture<TaskDescriptionComponent>;
9+
describe('ActivityDescriptionComponent', () => {
10+
let component: ActivityDescriptionComponent;
11+
let fixture: ComponentFixture<ActivityDescriptionComponent>;
1212

1313
beforeEach(async () => {
1414
await TestBed.configureTestingModule({
1515
providers: [ymlService, HttpClient, HttpHandler],
1616
imports: [RouterTestingModule],
17-
declarations: [TaskDescriptionComponent],
17+
declarations: [ActivityDescriptionComponent],
1818
}).compileComponents();
1919
});
2020

2121
beforeEach(() => {
22-
fixture = TestBed.createComponent(TaskDescriptionComponent);
22+
fixture = TestBed.createComponent(ActivityDescriptionComponent);
2323
component = fixture.componentInstance;
2424
fixture.detectChanges();
2525
});
@@ -31,8 +31,8 @@ describe('TaskDescriptionComponent', () => {
3131
it('check if header is being genenrated', () => {
3232
const testDimension = 'Sample Dimension';
3333
const testSubDimension = 'Sample subDimension';
34-
component.currentTask.dimension = testDimension;
35-
component.currentTask.subDimension = testSubDimension;
34+
component.currentActivity.dimension = testDimension;
35+
component.currentActivity.subDimension = testSubDimension;
3636
fixture.detectChanges();
3737
const HTMLElement: HTMLElement = fixture.nativeElement;
3838
const heading = HTMLElement.querySelector('h1')!;
@@ -42,7 +42,7 @@ describe('TaskDescriptionComponent', () => {
4242

4343
it('check if description is being genenrated', () => {
4444
const testDescription = 'Sample Description';
45-
component.currentTask.description = testDescription;
45+
component.currentActivity.description = testDescription;
4646
fixture.detectChanges();
4747
const HTMLElement: HTMLElement = fixture.nativeElement;
4848
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
@@ -53,7 +53,7 @@ describe('TaskDescriptionComponent', () => {
5353

5454
it('check if risk is being genenrated', () => {
5555
const testRisk = 'Sample Risk';
56-
component.currentTask.risk = testRisk;
56+
component.currentActivity.risk = testRisk;
5757
fixture.detectChanges();
5858
const HTMLElement: HTMLElement = fixture.nativeElement;
5959
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
@@ -62,7 +62,7 @@ describe('TaskDescriptionComponent', () => {
6262

6363
it('check if measure is being genenrated', () => {
6464
const testMeasure = 'Sample Measure';
65-
component.currentTask.measure = testMeasure;
65+
component.currentActivity.measure = testMeasure;
6666
fixture.detectChanges();
6767
const HTMLElement: HTMLElement = fixture.nativeElement;
6868
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
@@ -73,7 +73,7 @@ describe('TaskDescriptionComponent', () => {
7373

7474
it('check if implementation guide is being genenrated', () => {
7575
const testImplementationGuide = 'Sample Implementation Guide';
76-
component.currentTask.implementatonGuide = testImplementationGuide;
76+
component.currentActivity.implementatonGuide = testImplementationGuide;
7777
fixture.detectChanges();
7878
const HTMLElement: HTMLElement = fixture.nativeElement;
7979
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
@@ -84,7 +84,7 @@ describe('TaskDescriptionComponent', () => {
8484

8585
it('check if evidence is being genenrated', () => {
8686
const testEvidence = 'Sample Evidence';
87-
component.currentTask.evidence = testEvidence;
87+
component.currentActivity.evidence = testEvidence;
8888
fixture.detectChanges();
8989
const HTMLElement: HTMLElement = fixture.nativeElement;
9090
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
@@ -95,7 +95,7 @@ describe('TaskDescriptionComponent', () => {
9595

9696
it('check if assessment is being genenrated', () => {
9797
const testAssessment = 'Sample Assessment';
98-
component.currentTask.assessment = testAssessment;
98+
component.currentActivity.assessment = testAssessment;
9999
fixture.detectChanges();
100100
const HTMLElement: HTMLElement = fixture.nativeElement;
101101
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
@@ -106,7 +106,7 @@ describe('TaskDescriptionComponent', () => {
106106

107107
it('check if comments is being genenrated', () => {
108108
const testComments = 'Sample Comments';
109-
component.currentTask.comments = testComments;
109+
component.currentActivity.comments = testComments;
110110
fixture.detectChanges();
111111
const HTMLElement: HTMLElement = fixture.nativeElement;
112112
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;
@@ -119,9 +119,9 @@ describe('TaskDescriptionComponent', () => {
119119
const testSAMM = [' Sample SAMM '];
120120
const testISO = [' Sample ISO'];
121121
const testISO22 = [' Sample ISO22'];
122-
component.currentTask.samm = testSAMM;
123-
component.currentTask.iso = testISO;
124-
component.currentTask.iso22 = testISO22;
122+
component.currentActivity.samm = testSAMM;
123+
component.currentActivity.iso = testISO;
124+
component.currentActivity.iso22 = testISO22;
125125
fixture.detectChanges();
126126
const HTMLElement: HTMLElement = fixture.nativeElement;
127127
const contentDisplayedinParagraphTag = HTMLElement.querySelectorAll('p')!;

0 commit comments

Comments
 (0)