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

34 lines
928 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';
import { Router } from '@angular/router';
@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 environment = environment;
public show_shortcuts = environment.showStepperShortcuts;
constructor(
public pollService: PollService,
private confirmationService: ConfirmationService,
private router: Router
) {}
cancelDialog() {
this.confirmationService.confirm({
message: 'Quitter la création de sondage?',
accept: () => {
this.router.navigate(['/']);
},
});
}
}