Skip to content

Commit 527d1fa

Browse files
committed
WIP Team section, added button and accessing variables
1 parent 1a62a37 commit 527d1fa

6 files changed

Lines changed: 89 additions & 1 deletion

File tree

src/app/app-routing.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { MappingComponent } from './component/mapping/mapping.component';
66
import { MatrixComponent } from './component/matrix/matrix.component';
77
import { TaskDescriptionComponent } from './component/task-description/task-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 },
@@ -14,6 +15,7 @@ const routes: Routes = [
1415
{ path: 'mapping', component: MappingComponent },
1516
{ path: 'usage', component: UsageComponent },
1617
{ path: 'about', component: AboutUsComponent },
18+
{ path: 'teams', component: Teams },
1719
];
1820

1921
@NgModule({

src/app/component/sidenav-buttons/sidenav-buttons.component.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,23 @@ export class SidenavButtonsComponent {
1212
'Mappings',
1313
'Usage',
1414
'About Us',
15+
'Teams',
16+
];
17+
Icons: string[] = [
18+
'table_chart',
19+
'pie_chart',
20+
'timeline',
21+
'info',
22+
'people',
23+
'people',
1524
];
16-
Icons: string[] = ['table_chart', 'pie_chart', 'timeline', 'info', 'people'];
1725
Routing: string[] = [
1826
'/',
1927
'/circular-heatmap',
2028
'/mapping',
2129
'/usage',
2230
'/about',
31+
'/teams',
2332
];
2433
constructor() {}
2534
}

src/app/component/teams/teams.component.css

Whitespace-only changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<div id="team-section">
2+
<div id="individual-teams">
3+
<h2>Teams</h2>
4+
<ul>
5+
<li>A</li>
6+
<li>B</li>
7+
<li>C</li>
8+
</ul>
9+
</div>
10+
<div id="groups-teams">
11+
<h2>Team Groups</h2>
12+
<h4>AB</h4>
13+
<ul>
14+
<li>A</li>
15+
<li>B</li>
16+
</ul>
17+
<h4>BC</h4>
18+
<ul>
19+
<li>B</li>
20+
<li>C</li>
21+
</ul>
22+
</div>
23+
</div>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { Teams } from './teams.component';
4+
5+
describe('Teams', () => {
6+
let component: Teams;
7+
let fixture: ComponentFixture<Teams>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
declarations: [Teams],
12+
}).compileComponents();
13+
});
14+
15+
beforeEach(() => {
16+
fixture = TestBed.createComponent(Teams);
17+
component = fixture.componentInstance;
18+
fixture.detectChanges();
19+
});
20+
21+
it('should create', () => {
22+
expect(component).toBeTruthy();
23+
});
24+
});
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Component, OnInit } from '@angular/core';
2+
import { ymlService } from 'src/app/service/yaml-parser/yaml-parser.service';
3+
import * as yaml from 'js-yaml';
4+
5+
@Component({
6+
selector: 'app-teams',
7+
templateUrl: './Teams.component.html',
8+
styleUrls: ['./Teams.component.css'],
9+
})
10+
export class Teams implements OnInit {
11+
YamlObject: any;
12+
teamList: string[] = [];
13+
teamGroups: any;
14+
15+
constructor(private yaml: ymlService) {}
16+
ngOnInit(): void {
17+
this.yaml.setURI('./assets/YAML/teams.yaml');
18+
// Function sets column header
19+
this.yaml.getJson().subscribe(data => {
20+
this.YamlObject = data;
21+
22+
console.log(this.YamlObject);
23+
this.teamList = this.YamlObject['teams'];
24+
this.teamGroups = this.YamlObject['teamGroups'];
25+
26+
console.log('teamList', this.teamList);
27+
console.log('teamGroups', this.teamGroups);
28+
});
29+
}
30+
}

0 commit comments

Comments
 (0)