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

26 lines
730 B
TypeScript

import { Component, Input, OnInit } from '@angular/core';
import { PollService } from '../../../../../core/services/poll.service';
import { ApiService } from '../../../../../core/services/api.service';
@Component({
selector: 'app-step-four',
templateUrl: './step-four.component.html',
styleUrls: ['./step-four.component.scss'],
})
export class StepFourComponent implements OnInit {
urlPrefix: any;
advancedDisplayEnabled: boolean = true;
@Input()
step_max: any;
@Input()
form: any;
constructor(public pollService: PollService, private apiService: ApiService) {}
ngOnInit(): void {}
createPoll() {
let apiData = this.pollService.newPollFromForm(this.pollService._poll);
this.apiService.createPoll(apiData);
}
}