Skip to content

Commit 1286f21

Browse files
committed
Changing name from task to activity
1 parent 176c94a commit 1286f21

14 files changed

+481
-331
lines changed

src/app/app-routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ 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';
99
import { Teams } from './component/teams/teams.component';
1010

1111
const routes: Routes = [
1212
{ path: '', component: MatrixComponent },
1313
{ path: 'circular-heatmap', component: CircularHeatmapComponent },
14-
{ path: 'task-description', component: TaskDescriptionComponent },
14+
{ path: 'activity-description', component: ActivityDescriptionComponent },
1515
{ path: 'mapping', component: MappingComponent },
1616
{ path: 'usage', component: UsageComponent },
1717
{ path: 'teams', component: Teams },

src/app/app.module.ts

Lines changed: 2 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';
@@ -28,7 +28,7 @@ import { Teams } from './component/teams/teams.component';
2828
MatrixComponent,
2929
SidenavButtonsComponent,
3030
TopHeaderComponent,
31-
TaskDescriptionComponent,
31+
ActivityDescriptionComponent,
3232
CircularHeatmapComponent,
3333
MappingComponent,
3434
ReadmeToHtmlComponent,

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

File renamed without changes.

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

Lines changed: 31 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>
@@ -184,22 +186,22 @@ <h1>
184186
</mat-expansion-panel-header>
185187
<div
186188
*ngIf="
187-
currentTask.teamsImplemented;
189+
currentActivity.teamsImplemented;
188190
then thenBlock;
189191
else elseBlock
190192
"></div>
191193
<ng-template #thenBlock>
192194
<ul class="teams-implemented-list">
193-
<li *ngFor="let item of currentTask.teamsImplemented | keyvalue">
195+
<li *ngFor="let item of currentActivity.teamsImplemented | keyvalue">
194196
<b>{{ item.key }}</b
195197
>:{{ item.value }}
196198
</li>
197199
</ul>
198200
</ng-template>
199201
<ng-template #elseBlock
200202
>teamsImplemented variable not present <br />
201-
<p *ngIf="currentTask.isImplemented === false">Not Implemented</p>
202-
<p *ngIf="currentTask.isImplemented === true">Implemented</p>
203+
<p *ngIf="currentActivity.isImplemented === false">Not Implemented</p>
204+
<p *ngIf="currentActivity.isImplemented === true">Implemented</p>
203205
</ng-template>
204206
</mat-expansion-panel>
205207
<mat-expansion-panel>
@@ -209,9 +211,11 @@ <h1>
209211
</mat-panel-title>
210212
</mat-expansion-panel-header>
211213
<app-dependency-graph
212-
dimension="{{ currentTask.dimension }}"
213-
subDimension="{{ currentTask.subDimension }}"
214-
taskName="{{ currentTask.taskName }}"></app-dependency-graph>
214+
dimension="{{ currentActivity.dimension }}"
215+
subDimension="{{ currentActivity.subDimension }}"
216+
activityName="{{
217+
currentActivity.activityName
218+
}}"></app-dependency-graph>
215219
</mat-expansion-panel>
216220

217221
<mat-expansion-panel>
@@ -220,7 +224,7 @@ <h1>
220224
<b>Comments</b>
221225
</mat-panel-title>
222226
</mat-expansion-panel-header>
223-
<p [innerHTML]="currentTask.comments"></p>
227+
<p [innerHTML]="currentActivity.comments"></p>
224228
</mat-expansion-panel>
225229
</mat-accordion>
226230

@@ -230,6 +234,6 @@ <h1>
230234
<b>Tags</b>
231235
</mat-panel-title>
232236
</mat-expansion-panel-header>
233-
<p [innerHTML]="currentTask.tags"></p>
237+
<p [innerHTML]="currentActivity.tags"></p>
234238
</mat-expansion-panel>
235239
</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)