All files / app/features/sessions/components/detail detail.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 701x                                                                                                                                          
<div class="m3">
  <mat-card *ngIf="session">
    <mat-card-title>
      <div fxLayout="row" fxLayoutAlign="space-between center">
        <div fxLayout="row" fxLayoutAlign="start center">
          <button mat-icon-button (click)="back()">
            <mat-icon>arrow_back</mat-icon>
          </button>
          <h1>{{session.name | titlecase}}</h1>
        </div>
        <div>
          <button *ngIf="isAdmin" mat-raised-button color="warn" (click)="delete()">
            <mat-icon>delete</mat-icon>
            <span class="ml1">Delete</span>
          </button>
          <div *ngIf="!isAdmin">
            <button *ngIf="!isParticipate" mat-raised-button color="primary" (click)="participate()">
              <mat-icon>person_add</mat-icon>
              <span class="ml1">Participate</span>
            </button>
            <button *ngIf="isParticipate" mat-raised-button color="warn" (click)="unParticipate()">
              <mat-icon>person_remove</mat-icon>
              <span class="ml1">Do not participate</span>
            </button>
 
          </div>
 
 
        </div>
      </div>
    </mat-card-title>
    <mat-card-subtitle *ngIf="teacher">
      <div fxLayoutAlign="start center" class="ml3">
        <mat-icon>
          people
        </mat-icon>
        <span class="ml1">{{ teacher.firstName }} {{ teacher.lastName | uppercase }}</span>
      </div>
    </mat-card-subtitle>
    <div mat-card-image fxLayoutAlign="center center">
      <img class="picture" src="assets/sessions.png" alt="Yoga session">
    </div>
    <mat-card-content>
      <div class="my2" fxLayout="row" fxLayoutAlign="space-between center">
        <div fxLayoutAlign="start center">
          <mat-icon>
            group
          </mat-icon>
          <span class="ml1">{{ session.users.length }} attendees</span>
        </div>
        <div fxLayoutAlign="start center">
          <mat-icon>
            calendar_month
          </mat-icon>
          <span class="ml1">{{ session.date | date: 'longDate'}}</span>
        </div>
      </div>
      <div class="description">
        <p>Description:</p>
        {{ session.description }}
        <br>
      </div>
      <div class="date" class="my2" fxLayout="row" fxLayoutAlign="space-between center">
        <div class="created"><i>Create at: </i> {{ session.createdAt| date: 'longDate'}}</div>
        <div class="updated"><i>Last update: </i> {{ session.updatedAt| date: 'longDate'}}</div>
      </div>
    </mat-card-content>
  </mat-card>
</div>