Chore: Moved from css to sass, god knows what to do now.
Chore: Prettier line length changed to 120 from 100 Fix: Hard coded the face as the primary color to make the buttons stand out
This commit is contained in:
@ -8,22 +8,13 @@
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Name</mat-label>
|
||||
<input matInput #name formControlName="name" />
|
||||
<mat-error *ngIf="form.controls['name'].hasError('required')">
|
||||
Name is <strong>required</strong>
|
||||
</mat-error>
|
||||
<mat-error *ngIf="form.controls['name'].hasError('required')"> Name is <strong>required</strong> </mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Phone</mat-label>
|
||||
<input
|
||||
matInput
|
||||
#phone
|
||||
type="text"
|
||||
formControlName="phone"
|
||||
[matAutocomplete]="auto"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<input matInput #phone type="text" formControlName="phone" [matAutocomplete]="auto" autocomplete="off" />
|
||||
</mat-form-field>
|
||||
<mat-autocomplete
|
||||
#auto="matAutocomplete"
|
||||
|
||||
@ -51,9 +51,7 @@ export class GuestBookDetailComponent implements OnInit, AfterViewInit {
|
||||
map((x) => (x !== null && (x as string).length >= 1 ? x : null)),
|
||||
debounceTime(150),
|
||||
distinctUntilChanged(),
|
||||
switchMap((x) =>
|
||||
x === null ? observableOf([]) : this.customerService.autocomplete(x as string),
|
||||
),
|
||||
switchMap((x) => (x === null ? observableOf([]) : this.customerService.autocomplete(x as string))),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -13,13 +13,7 @@
|
||||
<div class="flex flex-row justify-around content-start items-start">
|
||||
<mat-form-field class="flex-auto">
|
||||
<mat-label>Date</mat-label>
|
||||
<input
|
||||
matInput
|
||||
[matDatepicker]="date"
|
||||
(focus)="date.open()"
|
||||
formControlName="date"
|
||||
autocomplete="off"
|
||||
/>
|
||||
<input matInput [matDatepicker]="date" (focus)="date.open()" formControlName="date" autocomplete="off" />
|
||||
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
|
||||
<mat-datepicker #date></mat-datepicker>
|
||||
</mat-form-field>
|
||||
@ -60,12 +54,7 @@
|
||||
<ng-container matColumnDef="action">
|
||||
<mat-header-cell *matHeaderCellDef class="center">Action</mat-header-cell>
|
||||
<mat-cell *matCellDef="let row" class="center">
|
||||
<button
|
||||
mat-icon-button
|
||||
[routerLink]="['/sales']"
|
||||
[queryParams]="{ guest: row.id }"
|
||||
*ngIf="!row.tableId"
|
||||
>
|
||||
<button mat-icon-button [routerLink]="['/sales']" [queryParams]="{ guest: row.id }" *ngIf="!row.tableId">
|
||||
<mat-icon>chair</mat-icon>
|
||||
</button>
|
||||
<button
|
||||
|
||||
@ -44,13 +44,11 @@ export class GuestBookListComponent implements OnInit {
|
||||
}
|
||||
|
||||
listenToDateChange(): void {
|
||||
this.form.controls.date.valueChanges
|
||||
.pipe(map((x) => moment(x).format('DD-MMM-YYYY')))
|
||||
.subscribe((x) =>
|
||||
this.ser.list(x).subscribe((list: GuestBookList) => {
|
||||
this.data.next(list.list);
|
||||
}),
|
||||
);
|
||||
this.form.controls.date.valueChanges.pipe(map((x) => moment(x).format('DD-MMM-YYYY'))).subscribe((x) =>
|
||||
this.ser.list(x).subscribe((list: GuestBookList) => {
|
||||
this.data.next(list.list);
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@ -4,12 +4,7 @@ import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import {
|
||||
MatNativeDateModule,
|
||||
MAT_DATE_FORMATS,
|
||||
MAT_DATE_LOCALE,
|
||||
DateAdapter,
|
||||
} from '@angular/material/core';
|
||||
import { MatNativeDateModule, MAT_DATE_FORMATS, MAT_DATE_LOCALE, DateAdapter } from '@angular/material/core';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
|
||||
Reference in New Issue
Block a user