Skip to content
Snippets Groups Projects
Commit 2cb9f1cb authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #13671 TIME 0:15 auto next step if verify ok

parent 203ca4fa
No related branches found
No related tags found
No related merge requests found
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { FormBuilder, FormGroup, Validators, ValidationErrors, ValidatorFn } from '@angular/forms';
import { NotificationService } from '../../../service/notification/notification.service';
import { HttpClient } from '@angular/common/http';
......@@ -25,6 +25,8 @@ export class DatabaseComponent implements OnInit {
dataFiles: string[] = [];
@Output() nextStep = new EventEmitter<string>();
constructor(
public http: HttpClient,
private _formBuilder: FormBuilder,
......@@ -103,6 +105,7 @@ export class DatabaseComponent implements OnInit {
this.dbExist = data.status === 200;
this.notify.success(this.lang.rightInformations);
this.stepFormGroup.controls['stateStep'].setValue('success');
this.nextStep.emit();
}),
catchError((err: any) => {
this.dbExist = false;
......
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, EventEmitter, Output } from '@angular/core';
import { FormBuilder, FormGroup, Validators, ValidatorFn } from '@angular/forms';
import { NotificationService } from '../../../service/notification/notification.service';
import { tap } from 'rxjs/internal/operators/tap';
......@@ -17,6 +17,8 @@ export class DocserversComponent implements OnInit {
lang: any = LANG;
stepFormGroup: FormGroup;
@Output() nextStep = new EventEmitter<string>();
constructor(
private _formBuilder: FormBuilder,
private notify: NotificationService,
......@@ -66,6 +68,7 @@ export class DocserversComponent implements OnInit {
tap((data: any) => {
this.notify.success(this.lang.rightInformations);
this.stepFormGroup.controls['stateStep'].setValue('success');
this.nextStep.emit();
}),
catchError((err: any) => {
this.notify.error(this.lang.pathUnreacheable);
......
......@@ -36,7 +36,7 @@
<ng-template matStepLabel>{{lang.database}}</ng-template>
<div class="stepContainer">
<div class="stepContent">
<app-database #appDatabase #stepContent></app-database>
<app-database #appDatabase #stepContent (nextStep)="nextStep()"></app-database>
</div>
<button mat-fab matStepperPrevious [title]="lang.previous" class="previousStepButton" color="primary">
<mat-icon class="fa fa-arrow-left"></mat-icon>
......@@ -50,7 +50,7 @@
<ng-template matStepLabel>{{lang.docserver}}</ng-template>
<div class="stepContainer">
<div class="stepContent">
<app-docservers #appDocservers #stepContent></app-docservers>
<app-docservers #appDocservers #stepContent (nextStep)="nextStep()"></app-docservers>
</div>
<button mat-fab matStepperPrevious [title]="lang.previous" class="previousStepButton" color="primary">
<mat-icon class="fa fa-arrow-left"></mat-icon>
......
......@@ -34,6 +34,7 @@ export class InstallerComponent implements OnInit, AfterViewInit {
lang: any = LANG;
@ViewChildren('stepContent') stepContent: any;
@ViewChild('stepper', { static: true }) stepper: MatStepper;
constructor(
private http: HttpClient,
......@@ -71,6 +72,10 @@ export class InstallerComponent implements OnInit, AfterViewInit {
this.stepContent.toArray()[ev.selectedIndex].initStep();
}
nextStep() {
this.stepper.next();
}
endInstall() {
let installContent: StepAction[] = [];
this.stepContent.toArray().forEach((component: any) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment