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 | 1x | <div class="create m3">
<mat-card>
<mat-card-title>
<div fxLayout="row" fxLayoutAlign="start center">
<button mat-icon-button routerLink="/sessions">
<mat-icon>arrow_back</mat-icon>
</button>
<h1 *ngIf="!onUpdate">Create session</h1>
<h1 *ngIf="onUpdate">Update session</h1>
</div>
</mat-card-title>
<mat-card-content *ngIf="sessionForm">
<form class="mt2" fxLayout="column" [formGroup]="sessionForm" (ngSubmit)="submit()">
<mat-form-field appearance="outline" class="" fxFlex>
<mat-label>Name</mat-label>
<input matInput formControlName="name">
</mat-form-field>
<mat-form-field appearance="outline" fxFlex>
<mat-label>Date</mat-label>
<input matInput type="date" formControlName="date">
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Teacher</mat-label>
<mat-select ngDefaultControl formControlName="teacher_id">
<mat-option *ngFor="let teacher of teachers$ | async" [value]="teacher.id">
{{teacher.firstName}} {{teacher.lastName}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline" fxFlex>
<mat-label>Description</mat-label>
<textarea matInput rows="8" formControlName="description"></textarea>
</mat-form-field>
<div fxLayout="row" fxLayoutAlign="center center">
<button mat-raised-button color="primary" type="submit" [disabled]="sessionForm.invalid">
Save
</button>
</div>
</form>
</mat-card-content>
</mat-card>
</div>
|