Updated to angular 11

Now compiling with strict mode in typescript
Need to error checking now
This commit is contained in:
2020-11-22 10:13:37 +05:30
parent cabd6f2ea1
commit 6567f560ab
187 changed files with 1709 additions and 1184 deletions

View File

@ -0,0 +1,41 @@
import { Modifier } from './modifier';
import { Product } from './product';
import { Tax } from './tax';
export class BillViewItem {
id: string;
isKot: boolean;
oldKot: boolean;
info: string;
kotId: string;
product: Product;
productId: string | undefined;
isHappyHour: boolean;
isPrinted: boolean;
price: number;
quantity: number;
discount: number;
taxRate: number;
tax: Tax;
modifiers: Modifier[];
public constructor(init?: Partial<BillViewItem>) {
this.id = '';
this.isKot = true;
this.oldKot = false;
this.info = '';
this.kotId = '';
this.product = new Product();
this.productId = this.product.id;
this.isHappyHour = false;
this.isPrinted = false;
this.price = 0;
this.quantity = 0;
this.discount = 0;
this.taxRate = 0;
this.tax = new Tax();
this.modifiers = [];
Object.assign(this, init);
}
}

View File

@ -1,7 +1,7 @@
import { Section } from './section';
export class Device {
id: string;
id: string | undefined;
name: string;
enabled: boolean;
section: Section;
@ -10,6 +10,12 @@ export class Device {
lastDate?: string;
public constructor(init?: Partial<Device>) {
this.id = undefined;
this.name = '';
this.enabled = false;
this.section = new Section();
this.creationDate = '';
this.lastUser = '';
Object.assign(this, init);
}
}

View File

@ -2,7 +2,7 @@
import { Product } from './product';
export class MenuCategory {
id: string;
id: string | undefined;
name: string;
discountLimit: number;
isActive: boolean;
@ -12,6 +12,13 @@ export class MenuCategory {
enabled?: boolean;
public constructor(init?: Partial<MenuCategory>) {
this.id = undefined;
this.name = '';
this.discountLimit = 0;
this.isActive = true;
this.isFixture = false;
this.sortOrder = 0;
this.products = [];
Object.assign(this, init);
}
}

View File

@ -3,11 +3,22 @@ import { MenuCategory } from './menu-category';
import { Modifier } from './modifier';
export class ModifierCategory {
id: string;
id: string | undefined;
name: string;
minimum: number;
maximum: number;
isActive: boolean;
menuCategories?: MenuCategory[];
modifiers?: Modifier[];
menuCategories: MenuCategory[];
modifiers: Modifier[];
public constructor(init?: Partial<ModifierCategory>) {
this.id = undefined;
this.name = '';
this.minimum = 0;
this.maximum = 0;
this.isActive = true;
this.menuCategories = [];
this.modifiers = [];
Object.assign(this, init);
}
}

View File

@ -2,11 +2,21 @@
import { ModifierCategory } from './modifier-category';
export class Modifier {
id: string;
id: string | undefined;
name: string;
showInBill: boolean;
price: number;
modifierCategory: ModifierCategory;
isActive: boolean;
billPrice?: number;
public constructor(init?: Partial<Modifier>) {
this.id = undefined;
this.name = '';
this.showInBill = true;
this.price = 0;
this.modifierCategory = new ModifierCategory();
this.isActive = true;
Object.assign(this, init);
}
}

View File

@ -1,6 +1,11 @@
export class Printer {
id: string;
id: string | undefined;
name?: string;
address?: string;
cutCode?: string;
public constructor(init?: Partial<Printer>) {
this.id = undefined;
Object.assign(this, init);
}
}

View File

@ -4,7 +4,7 @@ import { SaleCategory } from './sale-category';
import { Tax } from './tax';
export class Product {
id: string;
id: string | undefined;
code: number;
name: string;
units: string;
@ -17,6 +17,24 @@ export class Product {
isActive: boolean;
sortOrder: number;
enabled?: boolean;
tax?: Tax;
enabled: boolean;
tax: Tax;
public constructor(init?: Partial<Product>) {
this.id = undefined;
this.code = 0;
this.name = '';
this.units = '';
this.menuCategory = new MenuCategory();
this.saleCategory = new SaleCategory();
this.price = 0;
this.hasHappyHour = false;
this.isNotAvailable = false;
this.quantity = 0;
this.isActive = true;
this.sortOrder = 0;
this.enabled = true;
this.tax = new Tax();
Object.assign(this, init);
}
}

View File

@ -0,0 +1,5 @@
export interface ReceivePaymentItem {
id: number;
name: string;
amount: number;
}

View File

@ -0,0 +1,5 @@
import { ReceivePaymentItem } from './receive-payment-item';
export interface ReceivePaymentList {
[billType: string]: ReceivePaymentItem[];
}

View File

@ -1,7 +1,14 @@
import { Tax } from './tax';
export class SaleCategory {
id: string;
id: string | undefined;
name: string;
tax: Tax;
public constructor(init?: Partial<SaleCategory>) {
this.id = undefined;
this.name = '';
this.tax = new Tax();
Object.assign(this, init);
}
}

View File

@ -5,4 +5,11 @@ export class SectionPrinter {
menuCategory: MenuCategory;
printer: Printer;
copies: number;
public constructor(init?: Partial<SectionPrinter>) {
this.menuCategory = new MenuCategory();
this.printer = new Printer();
this.copies = 0;
Object.assign(this, init);
}
}

View File

@ -1,4 +1,10 @@
export class Section {
id: string;
id: string | undefined;
name: string;
public constructor(init?: Partial<Section>) {
this.id = undefined;
this.name = '';
Object.assign(this, init);
}
}

View File

@ -1,7 +1,7 @@
import { Section } from './section';
export class Table {
id: string;
id: string | undefined;
name: string;
seats: number;
section: Section;
@ -12,4 +12,13 @@ export class Table {
guest?: string;
date?: string;
amount?: number;
public constructor(init?: Partial<Table>) {
this.id = undefined;
this.name = '';
this.seats = 0;
this.section = new Section();
this.isActive = true;
Object.assign(this, init);
}
}

View File

@ -1,6 +1,14 @@
export class Tax {
id: string;
id: string | undefined;
name: string;
rate: number;
isFixture: boolean;
public constructor(init?: Partial<Tax>) {
this.id = undefined;
this.name = '';
this.rate = 0;
this.isFixture = false;
Object.assign(this, init);
}
}

View File

@ -1,5 +1,12 @@
export class UserGroup {
id: string;
id: string | undefined;
name: string;
enabled: boolean;
public constructor(init?: Partial<UserGroup>) {
this.id = undefined;
this.name = '';
this.enabled = false;
Object.assign(this, init);
}
}

View File

@ -1,20 +1,28 @@
import { UserGroup } from './user-group';
export class User {
id: string;
id: string | undefined;
name: string;
password: string;
lockedOut: boolean;
roles?: UserGroup[];
roles: UserGroup[];
perms: string[];
isAuthenticated: boolean;
access_token?: string;
exp?: number;
exp: number;
ver: string;
lastDevice: string;
lastDate?: string;
public constructor(init?: Partial<User>) {
this.id = undefined;
this.name = '';
this.password = '';
this.lockedOut = true;
this.roles = [];
this.perms = [];
this.exp = 0;
this.ver = '';
this.lastDevice = '';
Object.assign(this, init);
}
}