84 lines
2.7 KiB
HTML
84 lines
2.7 KiB
HTML
<div fxLayout="row" fxFlex="50%" fxLayoutAlign="space-around center" class="example-card">
|
|
<mat-card fxFlex>
|
|
<mat-card-title-group>
|
|
<mat-card-title>Guest Details</mat-card-title>
|
|
</mat-card-title-group>
|
|
<mat-card-content>
|
|
<form [formGroup]="form" fxLayout="column">
|
|
<div
|
|
fxLayout="row"
|
|
fxLayoutAlign="space-around start"
|
|
fxLayout.lt-md="column"
|
|
fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px"
|
|
>
|
|
<mat-form-field fxFlex>
|
|
<mat-label>Name</mat-label>
|
|
<input matInput #name placeholder="Name" formControlName="name" />
|
|
<mat-error *ngIf="form.controls['name'].hasError('required')">
|
|
Name is <strong>required</strong>
|
|
</mat-error>
|
|
</mat-form-field>
|
|
</div>
|
|
<div
|
|
fxLayout="row"
|
|
fxLayoutAlign="space-around start"
|
|
fxLayout.lt-md="column"
|
|
fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px"
|
|
>
|
|
<mat-form-field fxFlex>
|
|
<mat-label>Phone</mat-label>
|
|
<input
|
|
matInput
|
|
#phone
|
|
placeholder="Phone"
|
|
type="text"
|
|
formControlName="phone"
|
|
[matAutocomplete]="auto"
|
|
autocomplete="off"
|
|
/>
|
|
</mat-form-field>
|
|
<mat-autocomplete
|
|
#auto="matAutocomplete"
|
|
autoActiveFirstOption
|
|
[displayWith]="displayFn"
|
|
(optionSelected)="selected($event)"
|
|
>
|
|
<mat-option *ngFor="let customer of customers | async" [value]="customer"
|
|
>{{ customer.name }} - {{ customer.phone }}</mat-option
|
|
>
|
|
</mat-autocomplete>
|
|
</div>
|
|
<div
|
|
fxLayout="row"
|
|
fxLayoutAlign="space-around start"
|
|
fxLayout.lt-md="column"
|
|
fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px"
|
|
>
|
|
<mat-form-field fxFlex>
|
|
<mat-label>Pax</mat-label>
|
|
<input matInput placeholder="Pax" type="number" formControlName="pax" />
|
|
</mat-form-field>
|
|
</div>
|
|
<div
|
|
fxLayout="row"
|
|
fxLayoutAlign="space-around start"
|
|
fxLayout.lt-md="column"
|
|
fxLayoutGap="20px"
|
|
fxLayoutGap.lt-md="0px"
|
|
>
|
|
<mat-form-field fxFlex>
|
|
<mat-label>Address</mat-label>
|
|
<textarea matInput placeholder="Address" formControlName="address"></textarea>
|
|
</mat-form-field>
|
|
</div>
|
|
</form>
|
|
</mat-card-content>
|
|
<mat-card-actions>
|
|
<button mat-raised-button color="primary" (click)="save()">Save</button>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
</div>
|