All datasources done. Now to wire them up in the components.

Plus ElementRefs are now optional as they cannot be initialized
This commit is contained in:
2020-11-23 10:25:53 +05:30
parent 39e3cc51bb
commit af343cb7f9
66 changed files with 556 additions and 328 deletions

View File

@ -6,4 +6,15 @@ export class AccountType {
cashFlowClassification: string;
order: number;
showInList: boolean;
public constructor(init?: Partial<AccountType>) {
this.id = 0;
this.name = "";
this.balanceSheet = false;
this.debit = false;
this.cashFlowClassification = "";
this.order = 0;
this.showInList = true;
Object.assign(this, init);
}
}

View File

@ -2,7 +2,7 @@ import { AccountType } from './account-type';
import { CostCentre } from './cost-centre';
export class Account {
id: string;
id: string | undefined;
code: number;
name: string;
type: AccountType;
@ -13,6 +13,14 @@ export class Account {
costCentre: CostCentre;
public constructor(init?: Partial<Account>) {
this.code = 0;
this.name = "";
this.type = new AccountType();
this.isActive = true;
this.isReconcilable = false;
this.isStarred = false;
this.isFixture= false;
this.costCentre = new CostCentre();
Object.assign(this, init);
}
}

View File

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

View File

@ -1,11 +1,11 @@
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;
@ -13,6 +13,13 @@ export class User {
ver: string;
public constructor(init?: Partial<User>) {
this.name = '';
this.password = '';
this.lockedOut = false;
this.roles = [];
this.perms = [];
this.isAuthenticated = false;
this.ver = '';
Object.assign(this, init);
}
}