|
|
@ -4,6 +4,7 @@ import {LevelList} from 'src/app/models/levellist';
|
|
|
|
import { MatSort } from '@angular/material/sort';
|
|
|
|
import { MatSort } from '@angular/material/sort';
|
|
|
|
import { MatTableDataSource } from '@angular/material/table';
|
|
|
|
import { MatTableDataSource } from '@angular/material/table';
|
|
|
|
import { ActivityService } from 'src/app/services/activity/activity.service';
|
|
|
|
import { ActivityService } from 'src/app/services/activity/activity.service';
|
|
|
|
|
|
|
|
import { DatasharingService } from '../../services/datasharing.service';
|
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
@Component({
|
|
|
|
selector: 'app-about',
|
|
|
|
selector: 'app-about',
|
|
|
@ -11,6 +12,7 @@ import {ActivityService} from 'src/app/services/activity/activity.service';
|
|
|
|
styleUrls: ['./about.component.sass']
|
|
|
|
styleUrls: ['./about.component.sass']
|
|
|
|
})
|
|
|
|
})
|
|
|
|
export class AboutComponent implements OnInit {
|
|
|
|
export class AboutComponent implements OnInit {
|
|
|
|
|
|
|
|
loggedIn = false;
|
|
|
|
actionlist: Activitylist = new Activitylist();
|
|
|
|
actionlist: Activitylist = new Activitylist();
|
|
|
|
levellist: LevelList = new LevelList();
|
|
|
|
levellist: LevelList = new LevelList();
|
|
|
|
|
|
|
|
|
|
|
@ -19,12 +21,15 @@ export class AboutComponent implements OnInit {
|
|
|
|
displayedLevelColumns = ['level', 'name'];
|
|
|
|
displayedLevelColumns = ['level', 'name'];
|
|
|
|
levelSource = new MatTableDataSource(this.levellist.levels);
|
|
|
|
levelSource = new MatTableDataSource(this.levellist.levels);
|
|
|
|
|
|
|
|
|
|
|
|
constructor(private activityService: ActivityService) {
|
|
|
|
constructor(private activityService: ActivityService, private data: DatasharingService) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
|
|
|
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
ngOnInit() {
|
|
|
|
|
|
|
|
this.data.currentUser.subscribe(user => {
|
|
|
|
|
|
|
|
this.loggedIn = user.loggedIn;
|
|
|
|
|
|
|
|
});
|
|
|
|
this.activityService.getActivities();
|
|
|
|
this.activityService.getActivities();
|
|
|
|
this.activityService.activitylist.subscribe(response => {
|
|
|
|
this.activityService.activitylist.subscribe(response => {
|
|
|
|
this.actionlist = response;
|
|
|
|
this.actionlist = response;
|
|
|
|