2019-12-31 19:08:50 +01:00
|
|
|
import {Component, Input, OnInit} from '@angular/core';
|
2019-08-10 17:41:01 +02:00
|
|
|
import {BaseComponent} from '../../pages/base-page/base.component';
|
2020-01-16 10:20:15 +01:00
|
|
|
|
2019-12-31 19:08:50 +01:00
|
|
|
import {Router} from '@angular/router';
|
2019-12-03 17:20:57 +01:00
|
|
|
import {ConfigService} from '../../services/config.service';
|
2019-08-09 17:43:23 +02:00
|
|
|
|
|
|
|
@Component({
|
2019-08-10 17:41:01 +02:00
|
|
|
selector: 'framadate-navigation',
|
|
|
|
templateUrl: './navigation.component.html',
|
|
|
|
styleUrls: ['./navigation.component.scss']
|
2019-08-09 17:43:23 +02:00
|
|
|
})
|
2019-08-10 17:41:01 +02:00
|
|
|
export class NavigationComponent extends BaseComponent implements OnInit {
|
2019-08-09 17:43:23 +02:00
|
|
|
|
2020-01-22 11:18:55 +01:00
|
|
|
@Input() public step: string = 'home';
|
2019-12-31 19:08:50 +01:00
|
|
|
|
|
|
|
constructor(public config: ConfigService,
|
|
|
|
public route: Router) {
|
2019-08-10 17:41:01 +02:00
|
|
|
super(config);
|
2019-12-31 19:08:50 +01:00
|
|
|
|
2019-08-10 17:41:01 +02:00
|
|
|
}
|
2019-08-09 17:43:23 +02:00
|
|
|
|
2019-08-10 17:41:01 +02:00
|
|
|
ngOnInit() {
|
2019-12-31 19:08:50 +01:00
|
|
|
|
2019-08-10 17:41:01 +02:00
|
|
|
}
|
2019-08-09 17:43:23 +02:00
|
|
|
|
2019-08-10 17:41:01 +02:00
|
|
|
nextPage() {
|
|
|
|
if (this.checkValidity()) {
|
|
|
|
if (this.config.step < this.config.stepMax) {
|
|
|
|
this.config.step++;
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
this.displayErrorMessage();
|
|
|
|
}
|
|
|
|
}
|
2019-08-09 17:43:23 +02:00
|
|
|
}
|