Fix: Username unique index was case sensitive and this allowed duplicate names.

Feature: Moved temporal products into their own module and reverted the products module
This commit is contained in:
2021-10-27 09:27:47 +05:30
parent debe0df7b7
commit 124cf4d9ff
40 changed files with 1522 additions and 313 deletions

View File

@ -6,7 +6,6 @@ import { Tax } from './tax';
export class Product {
id: string | undefined;
versionId?: string;
code: number;
name: string;
units: string;
menuCategory?: MenuCategory;
@ -21,12 +20,11 @@ export class Product {
enabled: boolean;
tax: Tax;
validFrom?: string;
validTill?: string;
validFrom: string | null;
validTill: string | null;
public constructor(init?: Partial<Product>) {
this.id = undefined;
this.code = 0;
this.name = '';
this.units = '';
this.price = 0;
@ -36,6 +34,8 @@ export class Product {
this.isActive = true;
this.sortOrder = 0;
this.enabled = true;
this.validFrom = null;
this.validTill = null;
this.tax = new Tax();
Object.assign(this, init);
}