Skip to content
Snippets Groups Projects
Commit fe6e5219 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

Merge branch 'fix/formDesign-createStructure' of...

Merge branch 'fix/formDesign-createStructure' of https://forge.grandlyon.com/web-et-numerique/pamn_plateforme-des-acteurs-de-la-mediation-numerique/pamn_client into fix/formDesign-createStructure
parents 5c8b7e6a 7635a489
Branches
Tags
3 merge requests!68Recette,!67Dev,!66Fix/form design create structure
...@@ -2,13 +2,17 @@ ...@@ -2,13 +2,17 @@
<p *ngIf="!verificationSuccess && !verificationIssue">Votre email est en cours de vérification ...</p> <p *ngIf="!verificationSuccess && !verificationIssue">Votre email est en cours de vérification ...</p>
<div *ngIf="verificationSuccess"> <div *ngIf="verificationSuccess">
<div class="title"> <div class="title">
<h3> <h3 *ngIf="structure">
Bravo !<br /> Bravo !<br />
Votre compte et votre structure ont bien été référencés. Votre compte et votre structure ont bien été référencés.
</h3> </h3>
<h3 *ngIf="!structure">
Bravo !<br />
Votre compte a bien été créé.
</h3>
</div> </div>
<div class="structureInfoBlock" fxLayout="row" fxLayoutAlign=" center"> <div *ngIf="structure" class="structureInfoBlock" fxLayout="row" fxLayoutAlign=" center">
<div class="structureInfoContent" fxLayout="column"> <div class="structureInfoContent" fxLayout="column">
{{ structure.structureName }} {{ structure.structureName }}
<span>{{ structure.structureType }}</span> <span>{{ structure.structureType }}</span>
...@@ -20,7 +24,7 @@ ...@@ -20,7 +24,7 @@
</div> </div>
</div> </div>
<div class="btnSection" fxLayout="row" fxLayoutAlign="space-around center"> <div class="btnSection" fxLayout="row" fxLayoutAlign="space-around center">
<button class="btn" routerLink="/home" [state]="{ data: structure }">Voir ma structure</button> <button *ngIf="structure" class="btn" routerLink="/home" [state]="{ data: structure }">Voir ma structure</button>
<button class="btn tmp-form-link" routerLink="/home"> <button class="btn tmp-form-link" routerLink="/home">
<a <a
class="typeform-share button" class="typeform-share button"
......
...@@ -35,23 +35,27 @@ export class UserVerificationComponent implements OnInit { ...@@ -35,23 +35,27 @@ export class UserVerificationComponent implements OnInit {
private sendVerification(): void { private sendVerification(): void {
this.authService.verifyUser(this.userId, this.token).subscribe( this.authService.verifyUser(this.userId, this.token).subscribe(
(user: User) => { (user: User) => {
this.structureService.getStructure(user.structuresLink[0]).subscribe( if (user.structuresLink[0]) {
(structure) => { this.structureService.getStructure(user.structuresLink[0]).subscribe(
structure.accountVerified = true; (structure) => {
this.structure = structure; structure.accountVerified = true;
this.structureService.updateStructureAfterOwnerVerify(structure._id, user).subscribe( this.structure = structure;
() => { this.structureService.updateStructureAfterOwnerVerify(structure._id, user).subscribe(
this.verificationSuccess = true; () => {
}, this.verificationSuccess = true;
() => { },
this.verificationIssue = true; () => {
} this.verificationIssue = true;
); }
}, );
() => { },
this.verificationIssue = true; () => {
} this.verificationIssue = true;
); }
);
} else {
this.verificationSuccess = true;
}
}, },
() => { () => {
this.verificationIssue = true; this.verificationIssue = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment