2020-04-14 11:28:33 +02:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
2020-04-22 12:56:18 +02:00
|
|
|
|
2020-04-20 18:11:00 +02:00
|
|
|
import { ConfigService } from '../../../services/config.service';
|
2019-08-09 15:14:23 +02:00
|
|
|
|
|
|
|
@Component({
|
2020-04-22 12:56:18 +02:00
|
|
|
selector: 'app-base-page',
|
2020-04-21 10:50:26 +02:00
|
|
|
templateUrl: './base.component.html',
|
|
|
|
styleUrls: ['./base.component.scss'],
|
2019-08-09 15:14:23 +02:00
|
|
|
})
|
2019-08-09 17:43:23 +02:00
|
|
|
/**
|
|
|
|
* base page is aware of the state of the filling
|
|
|
|
*/
|
2019-08-10 16:57:36 +02:00
|
|
|
export class BaseComponent implements OnInit {
|
2020-04-21 10:50:26 +02:00
|
|
|
constructor(public config: ConfigService) {}
|
2019-08-09 15:14:23 +02:00
|
|
|
|
2020-04-22 12:56:18 +02:00
|
|
|
ngOnInit(): void {}
|
2019-08-10 17:41:01 +02:00
|
|
|
|
2020-04-22 12:56:18 +02:00
|
|
|
public checkValidity(): boolean {
|
2020-04-21 10:50:26 +02:00
|
|
|
// TODO with form controls
|
|
|
|
this.config.todo();
|
|
|
|
return true;
|
|
|
|
}
|
2019-08-10 17:41:01 +02:00
|
|
|
|
2020-04-22 12:56:18 +02:00
|
|
|
public displayErrorMessage(): boolean {
|
2020-04-21 10:50:26 +02:00
|
|
|
// TODO
|
|
|
|
this.config.todo();
|
|
|
|
return true;
|
|
|
|
}
|
2019-08-09 15:14:23 +02:00
|
|
|
}
|