feat: closed sale receipt status.

feat: approve and reject sale estimate.
feat: initial receipts, invoices, estimates and bills views.
This commit is contained in:
a.bouhuolia
2020-12-14 20:25:38 +02:00
parent 461e18f2a4
commit 27483495cb
23 changed files with 801 additions and 86 deletions

View File

@@ -39,7 +39,7 @@ export default class DynamicListService implements IDynamicListService {
*/
private async getCustomViewOrThrowError(tenantId: number, viewId: number, model: IModel) {
const { viewRepository } = this.tenancy.repositories(tenantId);
const view = await viewRepository.findOneById(viewId);
const view = await viewRepository.findOneById(viewId, 'roles');
if (!view || view.resourceModel !== model.name) {
throw new ServiceError(ERRORS.VIEW_NOT_FOUND);