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

33 lines
893 B
TypeScript
Raw Normal View History

import { Component, Input, OnInit } from '@angular/core';
2021-11-14 15:26:26 +01:00
import { PollService } from '../../../core/services/poll.service';
import { environment } from '../../../../environments/environment';
2021-11-17 15:06:36 +01:00
import { ConfirmationService } from 'primeng/api';
2021-11-17 15:16:47 +01:00
import { Router } from '@angular/router';
2020-05-01 19:10:17 +02:00
@Component({
selector: 'app-stepper',
templateUrl: './stepper.component.html',
styleUrls: ['./stepper.component.scss'],
})
2021-11-07 14:52:49 +01:00
export class StepperComponent {
@Input()
2021-11-07 14:52:49 +01:00
public step_current: number = 1;
@Input()
public step_max: number = 5;
2021-11-14 15:26:26 +01:00
public show_shortcuts = environment.showStepperShortcuts;
2021-11-17 15:16:47 +01:00
constructor(
public pollService: PollService,
private confirmationService: ConfirmationService,
private router: Router
) {}
2021-11-17 15:06:36 +01:00
cancelDialog() {
this.confirmationService.confirm({
message: 'Quitter la création de sondage?',
accept: () => {
this.router.navigate(['/']);
},
});
}
2020-05-01 19:10:17 +02:00
}