Moved to sqlalchemy 2.0 Added type checking as much as possible Updated angular to 15 Moved from Angular flex layout to tailwind css Started developing on vscode with devcontainers
35 lines
738 B
TypeScript
35 lines
738 B
TypeScript
import { Modifier } from './modifier';
|
|
|
|
export class BillViewItem {
|
|
id: string | undefined;
|
|
kotId: string | undefined;
|
|
isKot: boolean;
|
|
info: string;
|
|
|
|
productId: string;
|
|
isHappyHour: boolean;
|
|
isPrinted: boolean;
|
|
quantity: number;
|
|
modifiers: Modifier[];
|
|
|
|
public get isOldKot(): boolean {
|
|
return this.isKot && this.kotId !== undefined;
|
|
}
|
|
|
|
public get isNewKot(): boolean {
|
|
return this.isKot && this.kotId === undefined;
|
|
}
|
|
|
|
public constructor(init?: Partial<BillViewItem>) {
|
|
this.isKot = true;
|
|
this.info = '';
|
|
this.kotId = '';
|
|
this.productId = '';
|
|
this.isHappyHour = false;
|
|
this.isPrinted = false;
|
|
this.quantity = 0;
|
|
this.modifiers = [];
|
|
Object.assign(this, init);
|
|
}
|
|
}
|