36 lines
899 B
TypeScript
36 lines
899 B
TypeScript
import { Component, Input, OnInit } from '@angular/core';
|
|
import { PollService } from '../../../../../core/services/poll.service';
|
|
import { environment } from '../../../../../../environments/environment';
|
|
import { Router } from '@angular/router';
|
|
|
|
@Component({
|
|
selector: 'app-step-four',
|
|
templateUrl: './step-four.component.html',
|
|
styleUrls: ['./step-four.component.scss'],
|
|
})
|
|
export class StepFourComponent implements OnInit {
|
|
urlPrefix: any;
|
|
advancedDisplayEnabled: boolean = environment.advanced_options_display;
|
|
@Input()
|
|
step_max: any;
|
|
@Input()
|
|
form: any;
|
|
|
|
constructor(private router: Router, public pollService: PollService) {
|
|
this.pollService.step_current = 4;
|
|
}
|
|
|
|
ngOnInit(): void {}
|
|
|
|
createPoll() {
|
|
this.pollService.createPoll().then(
|
|
(resp) => {
|
|
this.router.navigate(['administration/success']);
|
|
},
|
|
(err) => {
|
|
console.error('oops err', err);
|
|
}
|
|
);
|
|
}
|
|
}
|