52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
import { Component, OnInit } from '@angular/core';
|
|
import { MenuItem } from 'primeng/api';
|
|
import { WorkflowStep } from '../../../core/enums/workflow-step.enum';
|
|
import { WorkflowService } from '../../../core/services/workflow.service';
|
|
import { Observable } from 'rxjs';
|
|
|
|
@Component({
|
|
selector: 'app-stepper',
|
|
templateUrl: './stepper.component.html',
|
|
styleUrls: ['./stepper.component.scss'],
|
|
})
|
|
export class StepperComponent implements OnInit {
|
|
public items: MenuItem[];
|
|
public itemDescription: MenuItem = {
|
|
id: '1',
|
|
label: WorkflowStep.DESCRIPTION,
|
|
title: 'Je donne une description générale du sondage',
|
|
routerLink: './description',
|
|
command: () => {},
|
|
state: { isStepCompleteAndValid: true },
|
|
disabled: false,
|
|
};
|
|
public itemOptions: MenuItem = {
|
|
id: '2',
|
|
label: WorkflowStep.CHOICES,
|
|
title: 'Je renseigne les différentes options sur lesquelles les gens vont donner leur avis',
|
|
routerLink: './options',
|
|
command: () => {},
|
|
state: { isStepCompleteAndValid: true },
|
|
disabled: false,
|
|
};
|
|
public itemConfiguration: MenuItem = {
|
|
id: '3',
|
|
label: WorkflowStep.CONFIGURATION,
|
|
title: 'Je configure le sondage',
|
|
routerLink: './configuration',
|
|
command: () => {},
|
|
state: { isStepCompleteAndValid: true },
|
|
disabled: false,
|
|
};
|
|
public activeIndex: number;
|
|
public activeStep: Observable<WorkflowStep>;
|
|
|
|
constructor(private workflowService: WorkflowService) {}
|
|
|
|
ngOnInit(): void {
|
|
// this.activeStep = this.workflowService.currentStep;
|
|
|
|
this.items = [this.itemDescription, this.itemOptions, this.itemConfiguration];
|
|
}
|
|
}
|