2021-11-07 14:52:49 +01:00
|
|
|
import { Component, Input, OnInit } from '@angular/core';
|
|
|
|
import { PollService } from '../../../../../core/services/poll.service';
|
|
|
|
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-step-three',
|
|
|
|
templateUrl: './step-three.component.html',
|
|
|
|
styleUrls: ['./step-three.component.scss'],
|
|
|
|
})
|
|
|
|
export class StepThreeComponent implements OnInit {
|
|
|
|
@Input()
|
|
|
|
step_max: any;
|
|
|
|
@Input()
|
|
|
|
form: any;
|
|
|
|
|
2021-11-16 16:16:30 +01:00
|
|
|
constructor(public pollService: PollService) {
|
|
|
|
this.pollService.step_current = 3;
|
|
|
|
}
|
2021-11-07 14:52:49 +01:00
|
|
|
|
|
|
|
ngOnInit(): void {}
|
|
|
|
|
|
|
|
drop(event: CdkDragDrop<string[]>) {
|
|
|
|
// moveItemInArray(this.pollService.choices, event.previousIndex, event.currentIndex);
|
|
|
|
}
|
2021-11-17 16:25:24 +01:00
|
|
|
|
|
|
|
changeDateInputMode() {
|
2021-11-22 10:09:50 +01:00
|
|
|
this.pollService.mode_calendar
|
|
|
|
? this.pollService.convertCalendarToText()
|
|
|
|
: this.pollService.convertTextToCalendar();
|
2021-11-17 16:25:24 +01:00
|
|
|
|
2021-11-22 10:09:50 +01:00
|
|
|
this.pollService.mode_calendar = !this.pollService.mode_calendar;
|
2021-11-17 16:25:24 +01:00
|
|
|
}
|
2021-11-07 14:52:49 +01:00
|
|
|
}
|