Merge branch 'thierry' of ssh://git.marbelium.com:10023/Viiciouss/XJC into anis

thierry
Viiciouss 7 years ago
commit bcdbe730aa

@ -1,6 +1,6 @@
<div class="card">
<div class="well">
<p class="h5 text-center mb-4">Login</p>
<p class="h5 text-center mb-4">Connection</p>
<form (keydown)="keyDownFunction($event)">
<!--<div> ID: {{ (user | async)?.uid }} </div>
<div> Email: {{ (user | async)?.email }} </div>-->
@ -9,7 +9,7 @@
<i class="fa fa-envelope prefix grey-text"></i>
<input type="email" [(ngModel)]="email" placeholder="Email" name="mail" required pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$" #mail="ngModel">
<div *ngIf="mail.errors && mail.errors.pattern && (mail.dirty || mail.touched)" class="alert alert-danger">
Email is required and format should be <strong><i>john@parrain.fr</i></strong>.
Votre <strong>email</strong> est requis et doit avoir ce format : <strong><i>john@gmail.fr</i></strong>.
</div>
</div>
@ -17,12 +17,12 @@
<i class="fa fa-lock prefix grey-text"></i>
<input type="password" [(ngModel)]="password" placeholder="Password" name="pass" #pass= "ngModel" required minlength="5">
<div *ngIf="pass.errors && (pass.dirty || pass.touched)" class="alert alert-danger">
<strong>Password</strong> must have more than 5 caracteres
Votre <strong>mot de passe</strong> doit être sur 5 caractères au minimum.
</div>
</div>
<div class="text-center" style="margin-top:5%">
<button type="submit" class="btn btn-dark-green" [disabled]="mail.errors || pass.errors" (click)="login()">Login <i class="fa fa-paper-plane-o ml-1"></i></button>
<button type="submit" class="btn btn-dark-green" [disabled]="mail.errors || pass.errors" (click)="login()">Se connecter<i class="fa fa-paper-plane-o ml-1"></i></button>
<!--<button class="btn btn-cyan" (click)="loadHomeComponent()">Back</button>-->
</div>

@ -33,7 +33,7 @@
<div class="card" style="margin-bottom: 5%" *ngIf="modifiermdp">
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-passC" type="password" [(ngModel)]="confirmOldPassword" placeholder="Tapez votre ancien mot de passe" name="confirmOldPasswordPar" #confirmOldPasswordPar="ngModel">
<input id="orangeForm-passC" type="password" [(ngModel)]="confirmOldPassword" placeholder="Ancien mot de passe" name="confirmOldPasswordPar" #confirmOldPasswordPar="ngModel">
<div *ngIf="(parrain.password != confirmOldPassword) && (confirmOldPasswordPar.touched)" class="alert alert-danger">
Mot de passe <strong><i>incorrect</i></strong>.
</div>
@ -43,21 +43,21 @@
<i class="fa fa-envelope prefix grey-text"></i>
<input type="email" id="orangeForm-email" [(ngModel)]="parrain.email" placeholder="{{parrain.email}}" name="email" required pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$" #email="ngModel">
<div *ngIf="email.errors && email.errors.pattern && (email.dirty || email.touched)" class="alert alert-danger">
Email is required and format should be <strong><i>john@parrain.fr</i></strong>.
Votre <strong>email</strong> est requis et doit avoir ce format : <strong><i>john@parrain.fr</i></strong>.
</div>
</div>
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-pass" type="password" [(ngModel)]="newPassword" placeholder="Nouveau mot de passe" name="password" #password= "ngModel" required minlength="5">
<div *ngIf="password.errors && (password.dirty || password.touched)" class="alert alert-danger">
Le<strong> mot de passe</strong> doit avoir au moins 5 caractéres
Votre <strong>nouveau mot de passe</strong> doit être sur 5 caractères au minimum.
</div>
</div>
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-passC" type="password" [(ngModel)]="ConfirmPassword" placeholder="Confirmer le nouveau mot de passe" name="confirmPassword" #confirmPassword="ngModel">
<input id="orangeForm-passC" type="password" [(ngModel)]="ConfirmPassword" placeholder="Confirmer votre nouveau mot de passe" name="confirmPassword" #confirmPassword="ngModel">
<div *ngIf="(parrain.password != ConfirmPassword) && (confirmPassword.touched)" class="alert alert-danger">
Tapez le méme <strong><i>mot de passe</i></strong>.
Ecrivez le même <strong><i>nouveau mot de passe</i></strong>.
</div>
</div>
</div>
@ -96,9 +96,13 @@
</div>
<div class="md-form">
<i class="fa fa-user prefix grey-text"></i>
<input type="text" id="orangeForm-Familyname" [(ngModel)]="parrain.telephone" placeholder="{{parrain.telephone}}">
<i class="fa fa-tty prefix grey-text"></i>
<input type="tel" id="orangeForm-Username" required pattern=".{9,}\w[0-9]*" [(ngModel)]="parrain.telephone" placeholder="{{parrain.telephone}}" name="telephone" #telephone="ngModel">
<div *ngIf="telephone.errors && telephone.errors.pattern && (telephone.dirty || telephone.touched)" class="alert alert-danger">
Votre <strong>téléphone</strong> doit être sur 10 chiffres au minimum
</div>
</div>
<div class="btn-block">
<button class="btn btn-green btn-rounded waves-light" [disabled]="(newPassword != '') && (newPassword != ConfirmPassword)" (click)="modifyProfile()">Modifier Profil</button>
<button class="btn btn-default btn-rounded waves-light" (click)="goToProfil()">Retour</button>
@ -151,7 +155,7 @@
<div class="card" style="margin-bottom: 5%" *ngIf="modifiermdp">
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-passC" type="password" [(ngModel)]="confirmOldPassword" placeholder="Tapez votre ancien mot de passe" name="confirmOldPasswordPar" #confirmOldPasswordCommer="ngModel">
<input id="orangeForm-passC" type="password" [(ngModel)]="confirmOldPassword" placeholder="Ancien mot de passe" name="confirmOldPasswordPar" #confirmOldPasswordCommer="ngModel">
<div *ngIf="(commercant.password != confirmOldPassword) && (confirmOldPasswordCommer.touched)" class="alert alert-danger">
Mot de passe <strong><i>incorrect</i></strong>.
</div>
@ -161,21 +165,21 @@
<i class="fa fa-envelope prefix grey-text"></i>
<input type="email" id="orangeForm-email" [(ngModel)]="commercant.email" placeholder="{{commercant.email}}" name="email" required pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$" #email="ngModel">
<div *ngIf="email.errors && email.errors.pattern && (email.dirty || email.touched)" class="alert alert-danger">
Email is required and format should be <strong><i>john@parrain.fr</i></strong>.
Votre <strong>email</strong> est requis et doit avoir ce format : <strong><i>john@commercant.fr</i></strong>.
</div>
</div>
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-pass" type="password" [(ngModel)]="newPassword" placeholder="Nouveau mot de passe" name="password" #password= "ngModel" required minlength="5">
<div *ngIf="password.errors && (password.dirty || password.touched)" class="alert alert-danger">
Le<strong> mot de passe</strong> doit avoir au moins 5 caractéres
Votre <strong>nouveau mot de passe</strong> doit être sur 5 caractères au minimum.
</div>
</div>
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-passC" type="password" [(ngModel)]="ConfirmPassword" placeholder="Confirmer le nouveau mot de passe" name="confirmPassword" #confirmPassword="ngModel">
<div *ngIf="(parrain.password != ConfirmPassword) && (confirmPassword.touched)" class="alert alert-danger">
Tapez le méme <strong><i>mot de passe</i></strong>.
Ecrivez le même <strong><i>nouveau mot de passe</i></strong>.
</div>
</div>
</div>
@ -191,7 +195,10 @@
</div>
<div class="md-form">
<i class="fa fa-info prefix grey-text"></i>
<input type="text" id="orangeForm-Familyname" [(ngModel)]="commercant.siret" placeholder="{{commercant.siret}}">
<input type="number" id="orangeForm-Familyname" [(ngModel)]="commercant.siret" placeholder="{{commercant.siret}}" required pattern=".{14,}" minlength="14" name="siret" #siret="ngModel">
<div *ngIf="siret.errors && siret.errors.pattern && (siret.dirty || siret.touched)" class="alert alert-danger">
Votre <strong>siret</strong> doit être sur 14 chiffres au minimum.
</div>
</div>
<div class="btn-block">
<button class="btn btn-green btn-rounded waves-light" [disabled]="(newPassword != '') && (newPassword != ConfirmPassword)" (click)="modifyProfile()">Modifier Profil</button>

@ -32,12 +32,11 @@
<div class="card-body">
<!--Name-->
<h4 class="card-title wow fadeInDown"><p>Salut {{localUser.firstname}} {{localUser.familyname}} {{localUser.uid}} </p></h4>
<h4 class="card-title wow fadeInDown"><p>Salut {{localUser.firstname}} {{localUser.familyname}}</p></h4>
<hr>
<ul class="list-group wow fadeInLeft">
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Status :</label> {{localUser.status}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Email :</label> {{localUser.email}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">EmailVerified :</label> {{localUser.emailVerified}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Nom :</label> {{localUser.familyname}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Prénom :</label> {{localUser.firstname}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Sex :</label> {{localUser.sex}}</li>
@ -102,14 +101,13 @@
<div class="card-body">
<!--Name-->
<h4 class="card-title wow fadeInDown"><p>Salut {{localUser.commercialName}} {{localUser.uid}} </p></h4>
<h4 class="card-title wow fadeInDown"><p>Salut {{localUser.commercialName}}</p></h4>
<hr>
<ul class="list-group wow fadeInLeft">
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold"> Raison sociale :</label> {{localUser.raisonSociale}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Raison sociale :</label> {{localUser.raisonSociale}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Numéro de siret :</label> {{localUser.siret}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Email :</label> {{localUser.email}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold"> emailVerified :</label> {{localUser.emailVerified}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Email :</label> {{localUser.email}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Date d'inscription :</label> {{localUser.dateInscription}}</li>
<li class="list-group-item text-left"><label class="h5-responsive mt-1 font-bold">Status :</label> {{localUser.status}}</li>
</ul>
@ -122,7 +120,7 @@
<!--<p><i class="fa fa-quote-left"></i> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, adipisci</p>-->
<div class="btn-block">
<button class="btn btn-orange btn-rounded waves-light" (click)="goToEditProfile()">Editer profile</button>
<button class="btn btn-orange btn-rounded waves-light" (click)="goToEditProfile()">Editer votre profil</button>
<button class="btn btn-default btn-rounded waves-light" (click)="goToOpCom()">Retour</button>
</div>

@ -1,7 +1,7 @@
<div class="card">
<div class="well">
<p class="h5 text-center mb-4">Sign up</p>
<p class="text-center mb-4" style="padding-top: 2%;">Etes vous parrain ou commercant ?</p>
<p class="text-center mb-4" style="padding-top: 2%;">Êtes-vous <strong>Parrain</strong> ou <strong>Commercant</strong> ?</p>
<label>
<form class="form-inline">
@ -17,14 +17,14 @@
</label>
<!--Si cest un parrain-->
<div *ngIf="currentUser.status === 'Parrain'">
<form (keydown)="keyDownFunctionParrain($event)">
<div class="md-form">
<i class="fa fa-user prefix grey-text"></i>
<input type="text" id="orangeForm-Familyname" [(ngModel)]="parrain.familyname" placeholder="Family name">
<input type="text" id="orangeForm-Familyname" [(ngModel)]="parrain.familyname" placeholder="Nom de famille" name="familyname">
</div>
<div class="md-form">
<i class="fa fa-user prefix grey-text"></i>
<input type="text" id="orangeForm-Firstname" [(ngModel)]="parrain.firstname" placeholder="Firstname">
<input type="text" id="orangeForm-Firstname" [(ngModel)]="parrain.firstname" placeholder="Prénom" name="firstname">
</div>
<!--<div class="md-form">
<i class="fa fa-file-picture-o prefix grey-text"></i>
@ -44,40 +44,40 @@
<div class="md-form">
<i class="fa fa-birthday-cake prefix grey-text"></i>
<input type="date" id="orangeForm-Birthday" [(ngModel)]="parrain.birthday" placeholder="Birthday" required min="minDateTimeTest" max="maxDateTimeTest" name="birthday" #birthday="ngModel">
<div *ngIf="(validationBirthdayParrain())" class="alert alert-danger">
<input type="date" id="orangeForm-Birthday" [(ngModel)]="parrain.birthday" placeholder="Date de naissance" required min="minDateTimeTest" max="maxDateTimeTest" name="birthday" #birthday="ngModel">
<div *ngIf="(validationBirthdayParrain()) && (birthday.dirty || birthday.touched)" class="alert alert-danger">
Votre date de naissance doit être comprise entre <strong><i>01/01/1917 et 01/01/2117</i></strong>.
</div>
</div>
<div class="md-form">
<i class="fa fa-tty prefix grey-text"></i>
<input type="text" id="orangeForm-Username" required minlength="10" [(ngModel)]="parrain.telephone" placeholder="Telephone" name="telephone" #telephone="ngModel">
<div *ngIf="telephone.errors && (telephone.dirty || telephone.touched)" class="alert alert-danger">
<strong>Telephone</strong> must have 10 numbers or more
<input type="tel" id="orangeForm-Username" required pattern=".{9,}\w[0-9]*" [(ngModel)]="parrain.telephone" placeholder="Téléphone" name="telephone" #telephone="ngModel">
<div *ngIf="telephone.errors && telephone.errors.pattern && (telephone.dirty || telephone.touched)" class="alert alert-danger">
Votre <strong>téléphone</strong> doit être sur 10 chiffres au minimum
</div>
</div>
<div class="md-form">
<i class="fa fa-envelope prefix grey-text"></i>
<input type="email" id="orangeForm-email" [(ngModel)]="parrain.email" placeholder="Email" name="email" required pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$" #email="ngModel">
<div *ngIf="email.errors && email.errors.pattern && (email.dirty || email.touched)" class="alert alert-danger">
Email is required and format should be <strong><i>john@parrain.fr</i></strong>.
Votre <strong>email</strong> est requis et doit avoir ce format : <strong><i>john@parrain.fr</i></strong>.
</div>
</div>
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-pass" type="password" [(ngModel)]="parrain.password" placeholder="Password" name="password" #password= "ngModel" required minlength="5">
<input id="orangeForm-pass" type="password" [(ngModel)]="parrain.password" placeholder="Mot de passe" name="password" #password= "ngModel" required minlength="5">
<div *ngIf="password.errors && (password.dirty || password.touched)" class="alert alert-danger">
<strong>Password</strong> must have more than 5 caracteres
Votre <strong>mot de passe</strong> doit être sur 5 caractères au minimum.
</div>
</div>
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-passC" type="password" [(ngModel)]="ConfirmPasswordParrain" placeholder="Confirm your password" name="confirmPassword" #confirmPassword="ngModel">
<input id="orangeForm-passC" type="password" [(ngModel)]="ConfirmPasswordParrain" placeholder="Confirmer votre mot de passe" name="confirmPassword" #confirmPassword="ngModel">
<div *ngIf="(parrain.password != ConfirmPasswordParrain) && (confirmPassword.touched)" class="alert alert-danger">
Please write the same of your <strong><i>password</i></strong>.
Ecrivez le même <strong><i>mot de passe</i></strong>.
</div>
</div>
<input type="file" name="file-1[]" id="orangeForm-File" class="inputfile inputfile-1" data-multiple-caption="{count} files selected" multiple />
@ -88,22 +88,23 @@
données, y compris notre Utilisation des cookies.
</label>
<div class="text-center" style="margin-top:5%">
<button class="btn btn-deep-orange" [disabled]="email.errors || password.errors || (parrain.password != ConfirmPasswordParrain)" (click)="register()">Sign up</button>
<button class="btn btn-deep-orange" [disabled]="email.errors || password.errors || (parrain.password != ConfirmPasswordParrain) || parrain.familyname == '' || parrain.firstname == '' || parrain.sex == ''" (click)="register()">S'inscrire</button>
<!--<button class="btn btn-cyan" (click)="loadHomeComponent()">Back</button>-->
</div>
</form>
</div>
<!--Fin Si cest un parrain-->
<!--Si cest un commercant-->
<div *ngIf="currentUser.status === 'Commercant'">
<form (keydown)="keyDownFunctionCommercant($event)">
<div class="md-form">
<i class="fa fa-institution prefix grey-text"></i>
<input type="text" id="orangeForm-Familyname" [(ngModel)]="commercant.raisonSociale" placeholder="Raison sociale">
<input type="text" id="orangeForm-Familyname" [(ngModel)]="commercant.raisonSociale" placeholder="Raison sociale" name="raisonSociale">
</div>
<div class="md-form">
<i class="fa fa-user prefix grey-text"></i>
<input type="text" id="orangeForm-Firstname" [(ngModel)]="commercant.commercialName" placeholder="Commercial name">
<input type="text" id="orangeForm-Firstname" [(ngModel)]="commercant.commercialName" placeholder="Nom de l'entreprise" name="commercialName">
</div>
<!--<div class="md-form">
<i class="fa fa-file-picture-o prefix grey-text"></i>
@ -111,31 +112,31 @@
</div>-->
<div class="md-form">
<i class="fa fa-info prefix grey-text"></i>
<input type="text" id="orangeForm-Username" [(ngModel)]="commercant.siret" placeholder="Siret" required minlength="14" name="siret" #siret="ngModel">
<div *ngIf="siret.errors && (siret.dirty || siret.touched)" class="alert alert-danger">
<strong>Siret</strong> must have 14 numbers
<input type="number" id="orangeForm-Username" [(ngModel)]="commercant.siret" placeholder="Siret" required pattern=".{14,}" minlength="14" name="siret" #siret="ngModel">
<div *ngIf="siret.errors && siret.errors.pattern && (siret.dirty || siret.touched)" class="alert alert-danger">
Votre <strong>siret</strong> doit être sur 14 chiffres au minimum.
</div>
</div>
<div class="md-form">
<i class="fa fa-envelope prefix grey-text"></i>
<input type="email" id="orangeForm-email" [(ngModel)]="commercant.email" placeholder="Email" name="email" required pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$" #email="ngModel">
<div *ngIf="email.errors && email.errors.pattern && (email.dirty || email.touched)" class="alert alert-danger">
Email is required and format should be <strong><i>john@commercant.fr</i></strong>.
Votre <strong>email</strong> est requis et doit avoir ce format : <strong><i>john@commercant.fr</i></strong>.
</div>
</div>
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-pass" type="password" [(ngModel)]="commercant.password" placeholder="Password" name="password" #password= "ngModel" required minlength="5">
<input id="orangeForm-pass" type="password" [(ngModel)]="commercant.password" placeholder="Mot de passe" name="password" #password= "ngModel" required minlength="5">
<div *ngIf="password.errors && (password.dirty || password.touched)" class="alert alert-danger">
<strong>Password</strong> must have more than 5 caracteres
Votre <strong>mot de passe</strong> doit être sur 5 caractères au minimum.
</div>
</div>
<div class="md-form">
<i class="fa fa-lock prefix grey-text"></i>
<input id="orangeForm-passC" type="password" [(ngModel)]="ConfirmPasswordCommercant" placeholder="Confirm your password" name="confirmPassword" #confirmPassword="ngModel">
<input id="orangeForm-passC" type="password" [(ngModel)]="ConfirmPasswordCommercant" placeholder="Confirmer votre mot de passe" name="confirmPassword" #confirmPassword="ngModel">
<div *ngIf="(commercant.password != ConfirmPasswordCommercant) && (confirmPassword.touched)" class="alert alert-danger">
Please write the same of your <strong><i>password</i></strong>.
Ecrivez le même <strong><i>mot de passe</i></strong>.
</div>
</div>
<input type="file" name="file-1[]" id="orangeForm-File" class="inputfile inputfile-1" data-multiple-caption="{count} files selected" multiple />
@ -146,9 +147,10 @@
données, y compris notre Utilisation des cookies.
</label>
<div class="text-center" style="margin-top:5%">
<button class="btn btn-deep-orange" [disabled]="email.errors || password.errors || (commercant.password != ConfirmPasswordCommercant)" (click)="register()">S'inscrire</button>
<button class="btn btn-deep-orange" [disabled]="email.errors || password.errors || siret.errors || commercant.raisonSociale == '' || commercant.commercialName == '' || (commercant.password != ConfirmPasswordCommercant)" (click)="register()">S'inscrire</button>
<!--<button class="btn btn-cyan" (click)="loadHomeComponent()">Back</button>-->
</div>
</form>
</div>
<!--Fin Si cest un commercant-->
</div>

@ -7,7 +7,6 @@ import { User } from '../../../models/User';
import { Parrain } from '../../../models/Parrain';
import { Commercant } from '../../../models/Commercant';
import { FireImg } from '../../../models/FireImg';
import {tryCatch} from "rxjs/util/tryCatch";
@Component({
selector: 'app-register',
@ -36,25 +35,57 @@ export class RegisterComponent implements OnInit, OnDestroy {
this.parrainDateTimeTest = new Date(this.parrain.birthday);
}
keyDownFunctionParrain(event) {
console.log('you just clicked parrain');
console.log((<HTMLInputElement>document.getElementById('orangeForm-File')).value === '');
if(event.keyCode === 13) {
console.log('you just clicked enter');
// rest of your code
if (this.parrain.email !== '' && this.parrain.password !== ''
&& (this.parrain.password === this.ConfirmPasswordParrain)
&& this.parrain.familyname !== '' && this.parrain.firstname !== ''
&& this.parrain.sex !== '' && this.parrain.telephone !== ''
&& (<HTMLInputElement>document.getElementById('orangeForm-File')).value !== '') {
this.register();
}
}
}
keyDownFunctionCommercant(event) {
console.log('you just clicked commercant');
if(event.keyCode === 13) {
console.log('you just clicked enter');
// rest of your code
if (this.commercant.email !== '' && this.commercant.password !== ''
&& (this.commercant.password === this.ConfirmPasswordCommercant)
&& this.commercant.commercialName !== '' && this.commercant.raisonSociale !== ''
&& this.commercant.siret !== '' && (<HTMLInputElement>document.getElementById('orangeForm-File')).value !== '') {
this.register();
}
}
}
register() {
if (this.currentUser.status === 'Parrain') {
this.parrain.status = this.currentUser.status;
this.parrain.secretCode = this.getRandomArbitrary(1111, 9999).toString();
this.authService.signUp(this.parrain);
if ((<HTMLInputElement>document.getElementById('orangeForm-File')).value !== '') {
this.clean();
}
this.test = true;
}else if (this.currentUser.status === 'Commercant') {
this.commercant.status = this.currentUser.status;
this.commercant.dateInscription = new Date (Date.now());
this.authService.signUp(this.commercant);
this.test = true;
}else if (this.test) {
this.ngOnDestroy();
this.currentUser.status = '';
this.test = false;
if ((<HTMLInputElement>document.getElementById('orangeForm-File')).value !== '') {
this.clean();
}
this.test = true;
}
}
clean(){
clean() {
this.ngOnDestroy();
this.currentUser.status = '';
this.test = false;
@ -126,6 +157,8 @@ export class RegisterComponent implements OnInit, OnDestroy {
}
ngOnDestroy() {
this.ConfirmPasswordParrain = '';
this.ConfirmPasswordCommercant = '';
this.currentUser = {
uid: '',
image: new FireImg(),

Loading…
Cancel
Save