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:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user