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
No related branches found
No related tags found
3 merge requests!68Recette,!67Dev,!66Fix/form design create structure
......@@ -2,13 +2,17 @@
<p *ngIf="!verificationSuccess && !verificationIssue">Votre email est en cours de vérification ...</p>
<div *ngIf="verificationSuccess">
<div class="title">
<h3>
<h3 *ngIf="structure">
Bravo !<br />
Votre compte et votre structure ont bien été référencés.
</h3>
<h3 *ngIf="!structure">
Bravo !<br />
Votre compte a bien été créé.
</h3>
</div>
<div class="structureInfoBlock" fxLayout="row" fxLayoutAlign=" center">
<div *ngIf="structure" class="structureInfoBlock" fxLayout="row" fxLayoutAlign=" center">
<div class="structureInfoContent" fxLayout="column">
{{ structure.structureName }}
<span>{{ structure.structureType }}</span>
......@@ -20,7 +24,7 @@
</div>
</div>
<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">
<a
class="typeform-share button"
......
......@@ -35,23 +35,27 @@ export class UserVerificationComponent implements OnInit {
private sendVerification(): void {
this.authService.verifyUser(this.userId, this.token).subscribe(
(user: User) => {
this.structureService.getStructure(user.structuresLink[0]).subscribe(
(structure) => {
structure.accountVerified = true;
this.structure = structure;
this.structureService.updateStructureAfterOwnerVerify(structure._id, user).subscribe(
() => {
this.verificationSuccess = true;
},
() => {
this.verificationIssue = true;
}
);
},
() => {
this.verificationIssue = true;
}
);
if (user.structuresLink[0]) {
this.structureService.getStructure(user.structuresLink[0]).subscribe(
(structure) => {
structure.accountVerified = true;
this.structure = structure;
this.structureService.updateStructureAfterOwnerVerify(structure._id, user).subscribe(
() => {
this.verificationSuccess = true;
},
() => {
this.verificationIssue = true;
}
);
},
() => {
this.verificationIssue = true;
}
);
} else {
this.verificationSuccess = true;
}
},
() => {
this.verificationIssue = true;
......
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