2020-07-13 10:52:10 +02:00
|
|
|
import { Component, isDevMode} from '@angular/core';
|
2020-06-19 08:43:22 +02:00
|
|
|
import {LoginService} from './services/login.service';
|
2020-07-14 09:39:37 +02:00
|
|
|
import {Router} from '@angular/router';
|
2020-06-19 08:43:22 +02:00
|
|
|
|
|
|
|
// TODO: add multiple samples at once
|
2020-07-30 14:23:51 +02:00
|
|
|
// TODO: validation: DPT: filename
|
2020-06-19 08:43:22 +02:00
|
|
|
// TODO: filter by not completely filled/no measurements
|
2020-07-30 14:23:51 +02:00
|
|
|
// TODO: validation of samples
|
2020-07-27 17:52:03 +02:00
|
|
|
|
|
|
|
// TODO: get rid of chart.js (+moment.js) and lodash
|
2020-01-14 13:41:28 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-root',
|
|
|
|
templateUrl: './app.component.html',
|
|
|
|
styleUrls: ['./app.component.scss']
|
|
|
|
})
|
|
|
|
export class AppComponent {
|
2020-05-22 12:52:17 +02:00
|
|
|
|
|
|
|
constructor(
|
2020-07-14 09:39:37 +02:00
|
|
|
public loginService: LoginService,
|
|
|
|
private router: Router
|
2020-05-22 12:52:17 +02:00
|
|
|
) {
|
|
|
|
}
|
2020-07-13 10:52:10 +02:00
|
|
|
|
|
|
|
get devMode() {
|
|
|
|
return isDevMode();
|
|
|
|
}
|
2020-07-14 09:39:37 +02:00
|
|
|
|
|
|
|
logout() {
|
|
|
|
this.loginService.logout();
|
|
|
|
this.router.navigate(['/']);
|
|
|
|
}
|
2020-01-14 13:41:28 +01:00
|
|
|
}
|