salix/modules/account/front/roles/index.js

27 lines
690 B
JavaScript

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