Blacked and isorted the python files
Prettied and eslinted the typescript/html files
This commit is contained in:
@ -1,13 +1,20 @@
|
||||
<h2 mat-dialog-title>Tables</h2>
|
||||
<mat-dialog-content fxLayout="row wrap" fxLayoutGap="grid 20px">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngFor="let table of list" (click)="select(table)"
|
||||
[class.running]="table.status === 'running'" [class.printed]="table.status === 'printed'"
|
||||
[class.selected]="table === selected">
|
||||
<h3 class="item-name">{{table.name}}</h3>
|
||||
<mat-card-subtitle class="center">{{table.guest}}</mat-card-subtitle>
|
||||
<span class="center">{{table.pax || 0}} / {{table.seats}} Seats</span>
|
||||
<span class="center" *ngIf="table.date">{{table.date}}</span>
|
||||
<span class="center" *ngIf="table.amount">{{table.amount | currency:'INR'}}</span>
|
||||
<mat-card
|
||||
fxLayout="column"
|
||||
class="square-button"
|
||||
matRipple
|
||||
*ngFor="let table of list"
|
||||
(click)="select(table)"
|
||||
[class.running]="table.status === 'running'"
|
||||
[class.printed]="table.status === 'printed'"
|
||||
[class.selected]="table === selected"
|
||||
>
|
||||
<h3 class="item-name">{{ table.name }}</h3>
|
||||
<mat-card-subtitle class="center">{{ table.guest }}</mat-card-subtitle>
|
||||
<span class="center">{{ table.pax || 0 }} / {{ table.seats }} Seats</span>
|
||||
<span class="center" *ngIf="table.date">{{ table.date }}</span>
|
||||
<span class="center" *ngIf="table.amount">{{ table.amount | currency: 'INR' }}</span>
|
||||
</mat-card>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
|
||||
@ -8,9 +8,8 @@ describe('TablesDialogComponent', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ TablesDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
declarations: [TablesDialogComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { Table } from '../../core/table';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tables-dialog',
|
||||
templateUrl: './tables-dialog.component.html',
|
||||
styleUrls: ['./tables-dialog.component.css']
|
||||
styleUrls: ['./tables-dialog.component.css'],
|
||||
})
|
||||
export class TablesDialogComponent {
|
||||
list: Table[];
|
||||
@ -14,7 +15,8 @@ export class TablesDialogComponent {
|
||||
selected: Table;
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<TablesDialogComponent>,
|
||||
@Inject(MAT_DIALOG_DATA) public data: { list: Observable<Table[]>, canChooseRunning: boolean }) {
|
||||
@Inject(MAT_DIALOG_DATA) public data: { list: Observable<Table[]>; canChooseRunning: boolean },
|
||||
) {
|
||||
this.data.list.subscribe((list: Table[]) => {
|
||||
this.list = list;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user