Browse Source

only send list of polls by email to user

develop
Baptiste Lemoine 2 years ago
parent
commit
e5214fdd97
  1. 49
      src/app/features/user-profile/user-polls/user-polls.component.html
  2. 5
      src/app/features/user-profile/user-polls/user-polls.component.ts

49
src/app/features/user-profile/user-polls/user-polls.component.html

@ -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="/">
J’ai 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 n’ai 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>

5
src/app/features/user-profile/user-polls/user-polls.component.ts

@ -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() {}
}

Loading…
Cancel
Save