2020-03-09 08:00:03 +00:00
|
|
|
import ngModule from '../../module';
|
|
|
|
import Component from 'core/lib/component';
|
|
|
|
|
|
|
|
class Controller extends Component {
|
|
|
|
set role(value) {
|
|
|
|
this._role = value;
|
|
|
|
this.$.summary = null;
|
|
|
|
if (!value) return;
|
2023-11-30 11:20:05 +00:00
|
|
|
this.$http.get(`VnRoles/${value.id}`)
|
2020-03-09 08:00:03 +00:00
|
|
|
.then(res => this.$.summary = res.data);
|
|
|
|
}
|
|
|
|
|
|
|
|
get role() {
|
|
|
|
return this._role;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ngModule.component('vnRoleSummary', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller,
|
|
|
|
bindings: {
|
|
|
|
role: '<'
|
|
|
|
}
|
|
|
|
});
|