salix/modules/account/front/role/inherited/index.js

24 lines
621 B
JavaScript

import ngModule from '../../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
$onInit() {
let filter = {
where: {role: this.$params.id},
include: {
relation: 'inherits',
scope: {
fields: ['id', 'name', 'description']
}
}
};
this.$http.get('RoleRoles', {filter})
.then(res => this.$.data = res.data);
}
}
ngModule.component('vnRoleInherited', {
template: require('./index.html'),
controller: Controller
});