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

@@ -0,0 +1,16 @@
export default (Model) =>
class CustomViewBaseModel extends Model {
/**
* Retrieve the default custom views, roles and columns.
*/
static get defaultViews() {
return [];
}
/**
* Retrieve the default view by the given slug.
*/
static getDefaultViewBySlug(viewSlug) {
return this.defaultViews.find((view) => view.slug === viewSlug) || null;
}
};