funky-framadate-front/src/app/features/administration/stepper/stepper.component.ts

28 lines
818 B
TypeScript

import { Component, Input, OnInit } from '@angular/core';
import { PollService } from '../../../core/services/poll.service';
import { environment } from '../../../../environments/environment';
import { ConfirmationService } from 'primeng/api';
@Component({
selector: 'app-stepper',
templateUrl: './stepper.component.html',
styleUrls: ['./stepper.component.scss'],
})
export class StepperComponent {
@Input()
public step_current: number = 1;
@Input()
public step_max: number = 5;
public show_shortcuts = environment.showStepperShortcuts;
constructor(public pollService: PollService, private confirmationService: ConfirmationService) {}
cancelDialog() {
this.confirmationService.confirm({
message: 'Quitter la création de sondage?',
accept: () => {
this.router.navigate(['/']);
},
});
}
}