2020-04-14 11:28:33 +02:00
|
|
|
import { Component, Input, OnInit } from '@angular/core';
|
2020-04-20 18:11:00 +02:00
|
|
|
import { BaseComponent } from '../../pages/example/base-page/base.component';
|
2020-01-16 10:20:15 +01:00
|
|
|
|
2020-04-14 11:28:33 +02:00
|
|
|
import { Router } from '@angular/router';
|
|
|
|
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',
|
2020-04-14 11:28:33 +02:00
|
|
|
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 {
|
2020-04-11 16:06:56 +02:00
|
|
|
@Input() public step = 'home';
|
2019-12-31 19:08:50 +01:00
|
|
|
|
2020-04-14 11:28:33 +02:00
|
|
|
constructor(public config: ConfigService, public route: Router) {
|
2019-08-10 17:41:01 +02:00
|
|
|
super(config);
|
|
|
|
}
|
2019-08-09 17:43:23 +02:00
|
|
|
|
2020-04-14 11:28:33 +02:00
|
|
|
ngOnInit() {}
|
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
|
|
|
}
|