funky-framadate-front/src/app/features/administration/form/steps/step-four/step-four.component.ts

29 lines
897 B
TypeScript
Raw Normal View History

2021-11-07 14:52:49 +01:00
import { Component, Input, OnInit } from '@angular/core';
import { PollService } from '../../../../../core/services/poll.service';
import { ApiService } from '../../../../../core/services/api.service';
2021-11-12 12:50:21 +01:00
import { environment } from '../../../../../../environments/environment';
2021-11-12 15:59:44 +01:00
import { Router } from '@angular/router';
2021-11-07 14:52:49 +01:00
@Component({
selector: 'app-step-four',
templateUrl: './step-four.component.html',
styleUrls: ['./step-four.component.scss'],
})
export class StepFourComponent implements OnInit {
urlPrefix: any;
2021-11-12 12:50:21 +01:00
advancedDisplayEnabled: boolean = environment.advanced_options_display;
2021-11-07 14:52:49 +01:00
@Input()
step_max: any;
@Input()
form: any;
2021-11-12 15:59:44 +01:00
constructor(private router: Router, public pollService: PollService, private apiService: ApiService) {}
2021-11-07 14:52:49 +01:00
ngOnInit(): void {}
createPoll() {
this.pollService.createPoll().then((resp) => {
2021-11-12 15:59:44 +01:00
this.router.navigate(['administration/success']);
});
}
2021-11-07 14:52:49 +01:00
}