77 lines
2.7 KiB
HTML
77 lines
2.7 KiB
HTML
@if (itemResource.isLoading()) {
|
|
<app-skeleton-loader type="card" [count]="1" />
|
|
} @else if (itemResource.error()) {
|
|
<app-error-state (retryAction)="itemResource.reload()" />
|
|
} @else {
|
|
<h2>Guest Details</h2>
|
|
<form class="flex-col">
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Name</mat-label>
|
|
<input matInput [formField]="form.name" />
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Phone</mat-label>
|
|
<input matInput type="text" [formField]="form.phone" [matAutocomplete]="auto" autocomplete="off" />
|
|
</mat-form-field>
|
|
<mat-autocomplete
|
|
#auto="matAutocomplete"
|
|
autoActiveFirstOption
|
|
[displayWith]="displayFn"
|
|
(optionSelected)="selected($event)"
|
|
>
|
|
@for (customer of customers(); track customer.id) {
|
|
<mat-option [value]="customer">{{ customer.name }} - {{ customer.phone }}</mat-option>
|
|
}
|
|
</mat-autocomplete>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Pax</mat-label>
|
|
<input matInput type="number" [formField]="form.pax" />
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Address</mat-label>
|
|
<textarea matInput [formField]="form.address"></textarea>
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Notes</mat-label>
|
|
<textarea matInput [formField]="form.notes"></textarea>
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto basis-1-2">
|
|
<mat-label>Date</mat-label>
|
|
<input matInput [matDatepicker]="date" (focus)="date.open()" [formField]="form.date" autocomplete="off" />
|
|
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
|
|
<mat-datepicker #date></mat-datepicker>
|
|
</mat-form-field>
|
|
<mat-form-field class="flex-auto basis-1-2">
|
|
<mat-label>Time</mat-label>
|
|
<input
|
|
matInput
|
|
[matTimepicker]="time"
|
|
[formField]="form.time"
|
|
matTimepickerMin="12:00"
|
|
matTimepickerMax="23:45"
|
|
/>
|
|
<mat-timepicker-toggle matSuffix [for]="time"></mat-timepicker-toggle>
|
|
<mat-timepicker #time interval="15min"></mat-timepicker>
|
|
</mat-form-field>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="row-container">
|
|
<button type="button" mat-raised-button color="primary" class="" (click)="save()">Save</button>
|
|
@if (!!item().id) {
|
|
<button type="button" mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
|
|
}
|
|
</div>
|
|
}
|