File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import { ReadmeToHtmlComponent } from './component/readme-to-html/readme-to-html
1919import { UsageComponent } from './component/usage/usage.component' ;
2020import { AboutUsComponent } from './component/about-us/about-us.component' ;
2121import { DependencyGraphComponent } from './component/dependency-graph/dependency-graph.component' ;
22+ import { Teams } from './component/teams/teams.component' ;
2223
2324@NgModule ( {
2425 declarations : [
@@ -34,6 +35,7 @@ import { DependencyGraphComponent } from './component/dependency-graph/dependenc
3435 UsageComponent ,
3536 AboutUsComponent ,
3637 DependencyGraphComponent ,
38+ Teams ,
3739 ] ,
3840 imports : [
3941 BrowserModule ,
Original file line number Diff line number Diff line change @@ -6,40 +6,12 @@ <h2>Team List</h2>
66 </ ul >
77 </ div >
88 < h2 > Team Group</ h2 >
9- < h3 > Group 123</ h3 >
10- < div class ="team-list ">
11- < ul >
12- < li > Team 1</ li >
13- < li > Team 2</ li >
14- < li > Team 3</ li >
15- </ ul >
16- </ div >
17- < h3 > Group 123</ h3 >
18- < div class ="team-list ">
19- < ul >
20- < li > Team 1</ li >
21- < li > Team 2</ li >
22- < li > Team 3</ li >
23- < li > Team 1</ li >
24- < li > Team 2</ li >
25- < li > Team 3</ li >
26- < li > Team 1</ li >
27- < li > Team 2</ li >
28- < li > Team 3</ li >
29- < li > Team 1</ li >
30- < li > Team 2</ li >
31- < li > Team 3</ li >
32- < li > Team 1</ li >
33- < li > Team 2</ li >
34- < li > Team 3</ li >
35- </ ul >
36- </ div >
37- < h3 > Group 123</ h3 >
38- < div class ="team-list ">
39- < ul >
40- < li > Team 1</ li >
41- < li > Team 2</ li >
42- < li > Team 3</ li >
43- </ ul >
9+ < div class ="group-expand " *ngFor ="let group of teamGroups | keyvalue ">
10+ < h3 > {{ group.key }}</ h3 >
11+ < div class ="team-list ">
12+ < ul >
13+ < li *ngFor ="let team of group.value "> {{ team }}</ li >
14+ </ ul >
15+ </ div >
4416 </ div >
4517</ div >
Original file line number Diff line number Diff line change 1+ import { HttpClientModule , HttpHandler } from '@angular/common/http' ;
2+ import { HttpClientTestingModule } from '@angular/common/http/testing' ;
13import { ComponentFixture , TestBed } from '@angular/core/testing' ;
4+ // import { MatAutocomplete } from '@angular/material/autocomplete';
5+ import { RouterTestingModule } from '@angular/router/testing' ;
6+ import { ymlService } from 'src/app/service/yaml-parser/yaml-parser.service' ;
7+ import { MatChip } from '@angular/material/chips' ;
28
39import { Teams } from './teams.component' ;
410
@@ -8,7 +14,9 @@ describe('Teams', () => {
814
915 beforeEach ( async ( ) => {
1016 await TestBed . configureTestingModule ( {
11- declarations : [ Teams ] ,
17+ providers : [ ymlService , HttpClientTestingModule ] ,
18+ imports : [ RouterTestingModule , HttpClientModule ] ,
19+ declarations : [ Teams , MatChip ] ,
1220 } ) . compileComponents ( ) ;
1321 } ) ;
1422
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import * as yaml from 'js-yaml';
1010export class Teams implements OnInit {
1111 YamlObject : any ;
1212 teamList : any ;
13- teamGroups : any ;
13+ teamGroups : Map < string , string [ ] > = new Map ( ) ;
1414
1515 constructor ( private yaml : ymlService ) { }
1616 ngOnInit ( ) : void {
@@ -27,4 +27,7 @@ export class Teams implements OnInit {
2727 console . log ( 'teamGroups' , this . teamGroups ) ;
2828 } ) ;
2929 }
30+ getTeamArray ( key : string ) : string [ ] {
31+ return this . teamGroups . get ( key ) || [ ] ;
32+ }
3033}
You can’t perform that action at this time.
0 commit comments