Change event button toggles between join and leave

master
Max 5 years ago
parent 0ef2885fea
commit 985a0a4f1d

@ -123,14 +123,12 @@
<mat-card-title>{{event.name}}</mat-card-title> <mat-card-title>{{event.name}}</mat-card-title>
<mat-card-subtitle>{{event.date}}</mat-card-subtitle> <mat-card-subtitle>{{event.date}}</mat-card-subtitle>
<div class="button-box"> <div class="button-box">
<button mat-icon-button class="request-button" <button *ngIf="!event.joined" mat-icon-button class="request-button"
matTooltip="join event" matTooltipShowDelay="500" matTooltip="join event" matTooltipShowDelay="500"
(click)="joinEvent(event)" (click)="joinEvent(event)">
[disabled]="event.joined"> <mat-icon>event_available</mat-icon>
<mat-icon *ngIf="event.joined" color="primary">event_available</mat-icon>
<mat-icon *ngIf="!event.joined">event_available</mat-icon>
</button> </button>
<button mat-icon-button class="request-button" <button *ngIf="event.joined" mat-icon-button class="request-button"
matTooltip="leave event" matTooltipShowDelay="500" matTooltip="leave event" matTooltipShowDelay="500"
(click)="leaveEvent(event)" (click)="leaveEvent(event)"
[disabled]="!event.joined"> [disabled]="!event.joined">

Loading…
Cancel
Save