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

34 lines
906 B
TypeScript

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;
constructor(public pollService: PollService) {
this.pollService.step_current = 3;
}
ngOnInit(): void {}
drop(event: CdkDragDrop<string[]>) {
// moveItemInArray(this.pollService.choices, event.previousIndex, event.currentIndex);
}
changeDateInputMode() {
this.pollService.mode_calendar
? this.pollService.convertCalendarToText()
: this.pollService.convertTextToCalendar();
this.pollService.mode_calendar = !this.pollService.mode_calendar;
}
}