feat: custom view dynamic filter.

This commit is contained in:
a.bouhuolia
2021-08-04 15:01:43 +02:00
parent 3fc30d5240
commit 2822270ac3
42 changed files with 647 additions and 97 deletions

View File

@@ -4,8 +4,13 @@ import { difference } from 'lodash';
import TenantModel from 'models/TenantModel';
import BillSettings from './Bill.Settings';
import ModelSetting from './ModelSetting';
import CustomViewBaseModel from './CustomViewBaseModel';
import { DEFAULT_VIEWS } from 'services/Purchases/constants';
export default class Bill extends mixin(TenantModel, [ModelSetting]) {
export default class Bill extends mixin(TenantModel, [
ModelSetting,
CustomViewBaseModel,
]) {
/**
* Table name
*/
@@ -303,4 +308,11 @@ export default class Bill extends mixin(TenantModel, [ModelSetting]) {
.where('id', billId)
[changeMethod]('payment_amount', Math.abs(amount));
}
/**
* Retrieve the default custom views, roles and columns.
*/
static get defaultViews() {
return DEFAULT_VIEWS;
}
}