Skip to content

Commit d350d7c

Browse files
Restyled by prettier
1 parent 8b25094 commit d350d7c

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

Phonebook.Frontend/src/app/pages/dashboard/components/team/team.component.ts

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,29 @@ export class TeamComponent implements OnInit, OnDestroy {
2323
public layouts: string[] = Object.values(Layout);
2424
public layout: typeof Layout = Layout;
2525

26-
constructor(private organigramService: OrganigramService) { }
26+
constructor(private organigramService: OrganigramService) {}
2727

2828
public ngOnInit() {
2929
if (this.currentUser != null) {
30-
this.organigramService.getOrganigramTree()
31-
.subscribe(organigram => {
32-
if (this.currentUser != null) {
33-
let orgUnitOfUser = this.organigramService.getNodeForUser(this.currentUser, organigram, 0)
34-
if (orgUnitOfUser != null) {
35-
this.teamPersons = [
36-
...orgUnitOfUser.supervisors,
37-
...orgUnitOfUser.assistents,
38-
...orgUnitOfUser.employees,
39-
...orgUnitOfUser.learners,
40-
];
41-
}
30+
this.organigramService.getOrganigramTree().subscribe((organigram) => {
31+
if (this.currentUser != null) {
32+
let orgUnitOfUser = this.organigramService.getNodeForUser(
33+
this.currentUser,
34+
organigram,
35+
0
36+
);
37+
if (orgUnitOfUser != null) {
38+
this.teamPersons = [
39+
...orgUnitOfUser.supervisors,
40+
...orgUnitOfUser.assistents,
41+
...orgUnitOfUser.employees,
42+
...orgUnitOfUser.learners,
43+
];
4244
}
43-
});
45+
}
46+
});
4447
}
4548
}
4649

47-
public ngOnDestroy(): void { }
50+
public ngOnDestroy(): void {}
4851
}

0 commit comments

Comments
 (0)