fix(Items): Remove bulk actions.

fix(Settings): Parse the fetched settings from the storage.
This commit is contained in:
a.bouhuolia
2021-03-22 11:35:21 +02:00
parent 55771348b5
commit 1f6aca63e2
11 changed files with 265 additions and 289 deletions

View File

@@ -20,7 +20,7 @@ export default class Contact extends TenantModel {
* Defined virtual attributes.
*/
static get virtualAttributes() {
return ['contactNormal', 'closingBalance'];
return ['contactNormal', 'closingBalance', 'formattedContactService'];
}
/**
@@ -35,17 +35,36 @@ export default class Contact extends TenantModel {
}
/**
* Retrieve the contact noraml;
* Retrieve the contact normal by the given contact service.
* @param {string} contactService
*/
static getFormattedContactService(contactService) {
const types = {
'customer': 'Customer',
'vendor': 'Vendor',
};
return types[contactService];
}
/**
* Retrieve the contact normal.
*/
get contactNormal() {
return Contact.getContactNormalByType(this.contactService);
}
/**
* Retrieve formatted contact service.
*/
get formattedContactService() {
return Contact.getFormattedContactService(this.contactService);
}
/**
* Closing balance attribute.
*/
get closingBalance() {
return this.openingBalance + this.balance;
return this.balance;
}
/**

View File

@@ -48,7 +48,7 @@ export default class Customer extends TenantModel {
* Closing balance attribute.
*/
get closingBalance() {
return this.openingBalance + this.balance;
return this.balance;
}
/**

View File

@@ -47,7 +47,7 @@ export default class Vendor extends TenantModel {
* Closing balance attribute.
*/
get closingBalance() {
return this.openingBalance + this.balance;
return this.balance;
}
/**