fix: edit custom view details.

This commit is contained in:
Ahmed Bouhuolia
2020-10-17 18:12:15 +02:00
parent ebcd1d12f3
commit 078098c593
12 changed files with 97 additions and 47 deletions

View File

@@ -15,15 +15,6 @@ export default class AccountsTypesService implements IAccountsTypesService{
*/
async getAccountsTypes(tenantId: number): Promise<IAccountType> {
const { accountTypeRepository } = this.tenancy.repositories(tenantId);
const { AccountType } = this.tenancy.models(tenantId);
const { __ } = this.tenancy.i18n(tenantId);
const allAccountsTypes = await accountTypeRepository.all();
return allAccountsTypes.map((_accountType: IAccountType) => ({
id: _accountType.id,
label: __(AccountType.labels[_accountType.key]),
...omit(_accountType, ['id']),
}));
return accountTypeRepository.all();
}
}