only send list of polls by email to user

This commit is contained in:
Baptiste Lemoine 2020-10-21 16:50:48 +02:00
parent 5f072fe3ab
commit e5214fdd97
2 changed files with 15 additions and 39 deletions

View File

@ -1,10 +1,10 @@
<div class="container has-text-centered">
<ng-container *ngIf="['REGISTERED', 'ADMIN'].includes((_user | async)?.role)">
<div class="columns">
<div class="column">
<h1>Mes sondages</h1>
</div>
<div class="columns">
<div class="column">
<h1>Mes sondages</h1>
</div>
</div>
<div *ngIf="pollsAreLoaded">
<div class="columns">
<div class="column">
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
@ -22,38 +22,15 @@
</table>
</div>
</div>
</ng-container>
<ng-container *ngIf="['ANONYMOUS'].includes((_user | async)?.role)">
<div class="columns">
<div class="column">
<a class="button is-primary" role="button" routerLink="/">
Jai un compte, je me connecte
</a>
</div>
</div>
<div class="columns">
<div class="column">
<span>OU</span>
</div>
</div>
<div class="columns">
<div class="column">
<button class="button is-primary" (click)="toggleModal()">
Je nai pas de compte : envoyez-moi la liste par email
</div>
<div class="columns">
<div class="column">
<form (submit)="sendRetrieveEmail()">
<input type="email" autofocus="autofocus" placeholder="contact@exemple.com" />
<button class="button is-primary">
envoyez-moi la liste par email
</button>
</div>
</div>
</ng-container>
</div>
<div class="modal" [class.is-active]="isModalOpened">
<div class="modal-background" (click)="toggleModal()"></div>
<div class="modal-content has-background-light">
<div class="field">
<div class="control">
<input class="input" type="email" placeholder="Email" />
<button class="button is-primary is-fullwidth">Envoyez le mail !</button>
</div>
</form>
</div>
</div>
</div>

View File

@ -12,12 +12,11 @@ import { UserService } from '../../../core/services/user.service';
export class UserPollsComponent implements OnInit {
public _user: Observable<User> = this.userService.user;
public isModalOpened = false;
public pollsAreLoaded = false;
constructor(private userService: UserService) {}
ngOnInit(): void {}
public toggleModal(): void {
this.isModalOpened = !this.isModalOpened;
}
sendRetrieveEmail() {}
}