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

26 lines
730 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-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-08 10:56:03 +01:00
advancedDisplayEnabled: boolean = true;
2021-11-07 14:52:49 +01:00
@Input()
step_max: any;
@Input()
form: any;
constructor(public pollService: PollService, private apiService: ApiService) {}
2021-11-07 14:52:49 +01:00
ngOnInit(): void {}
createPoll() {
let apiData = this.pollService.newPollFromForm(this.pollService._poll);
this.apiService.createPoll(apiData);
}
2021-11-07 14:52:49 +01:00
}