fix links for the 7 steps of creation

This commit is contained in:
Tykayn 2021-11-18 13:07:01 +01:00 committed by tykayn
parent da42c9e64d
commit a92db69cf6
6 changed files with 28 additions and 25 deletions

View File

@ -38,7 +38,7 @@ export class PollService implements Resolve<Poll> {
public previousRouteName: string = '/administration'; public previousRouteName: string = '/administration';
public nextRouteName: string = '/administration/step/2'; public nextRouteName: string = '/administration/step/2';
public step_current: number = 1; public step_current: number = 1;
public step_max: number = 5; public step_max: number = 7;
public round: Function; public round: Function;
public pass_hash: string; public pass_hash: string;
public admin_key: string; public admin_key: string;

View File

@ -1,13 +1,31 @@
<app-stepper [step_current]="5" [step_max]="5"></app-stepper> <app-stepper [step_current]="5" [step_max]="pollService.step_max"></app-stepper>
<app-errors-list [form]="pollService.form"></app-errors-list> <app-errors-list [form]="pollService.form"></app-errors-list>
<app-success [poll]="pollService.form.value"></app-success> <!--<app-success [poll]="pollService.form.value"></app-success>-->
<section class="supplement container"> <section class="supplement container">
<fieldset class="advanced-config">
<button
class="button is-unchecked-info"
[ngClass]="{ 'is-info': !advancedDisplayEnabled, 'is-primary': advancedDisplayEnabled }"
(click)="advancedDisplayEnabled = !advancedDisplayEnabled"
>
<i class="fa fa-chevron-circle-down" *ngIf="!advancedDisplayEnabled"></i>
<i class="fa fa-chevron-circle-up" *ngIf="advancedDisplayEnabled"></i>
{{ 'creation.advanced' | translate }}
</button>
<fieldset class="complete well" *ngIf="advancedDisplayEnabled">
<app-advanced-config [form]="pollService.form"></app-advanced-config>
</fieldset>
</fieldset>
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<button class="button is-primary is-fullwidth" [routerLink]="['/administration/step/1']"> <button class="button is-default is-fullwidth" [routerLink]="['/administration/step/4']">
<i class="fa fa-pencil"></i> Précédent
modifier le sondage </button>
</div>
<div class="column">
<button class="button is-primary is-fullwidth" [routerLink]="['/administration/step/6']">
Suivant
</button> </button>
</div> </div>
</div> </div>

View File

@ -12,6 +12,7 @@ export class StepFiveComponent implements OnInit {
@Input() step_max: any; @Input() step_max: any;
@Input() public form: FormGroup; @Input() public form: FormGroup;
poll: any; poll: any;
advancedDisplayEnabled = true;
constructor(public pollService: PollService) { constructor(public pollService: PollService) {
this.pollService.step_current = 5; this.pollService.step_current = 5;
} }

View File

@ -31,21 +31,6 @@
required required
/> />
</div> </div>
<fieldset class="advanced-config">
<button
class="button is-unchecked-info"
[ngClass]="{ 'is-info': !advancedDisplayEnabled, 'is-primary': advancedDisplayEnabled }"
(click)="advancedDisplayEnabled = !advancedDisplayEnabled"
>
<i class="fa fa-chevron-circle-down" *ngIf="!advancedDisplayEnabled"></i>
<i class="fa fa-chevron-circle-up" *ngIf="advancedDisplayEnabled"></i>
{{ 'creation.advanced' | translate }}
</button>
<fieldset class="complete well" *ngIf="advancedDisplayEnabled">
<app-advanced-config [form]="pollService.form"></app-advanced-config>
</fieldset>
</fieldset>
</form> </form>
</div> </div>
<div class="columns"> <div class="columns">
@ -60,7 +45,6 @@
[routerLink]="['/administration/step/5']" [routerLink]="['/administration/step/5']"
[disabled]="!pollService.form.valid" [disabled]="!pollService.form.valid"
> >
<i class="fa fa-save"></i>
Suivant Suivant
</button> </button>
</div> </div>

View File

@ -18,7 +18,7 @@
n'a pas été créé :( n'a pas été créé :(
<br /> <br />
<button class="button is-primary" [routerLink]="['/administration/step/4']"> <button class="button is-primary" [routerLink]="['/administration/step/7']">
Revenir en arrière Revenir en arrière
</button> </button>
</span> </span>
@ -33,7 +33,7 @@
<div class="container padded"> <div class="container padded">
<div class=" "> <div class=" ">
<div class="main-block"> <div class="main-block">
<div class="columns"> <div class="hopla">
<div class="column"> <div class="column">
<div class="admin"> <div class="admin">
<div class="no-admin-key padded has-background-danger" *ngIf="!pollService.admin_key"> <div class="no-admin-key padded has-background-danger" *ngIf="!pollService.admin_key">

View File

@ -11,7 +11,7 @@ export const environment = {
frontDomain: 'http://127.0.0.1:4200', frontDomain: 'http://127.0.0.1:4200',
production: false, production: false,
display_routes: false, // demo paths to test polls display_routes: false, // demo paths to test polls
autofill_creation: false, autofill_creation: true,
advanced_options_display: false, advanced_options_display: false,
autofill_participation: false, autofill_participation: false,
showDemoWarning: false, showDemoWarning: false,