salix/modules/client/front/descriptor-popover/index.js

19 lines
463 B
JavaScript
Raw Normal View History

import ngModule from '../module';
2020-04-25 09:50:04 +00:00
import DescriptorPopover from 'salix/components/descriptor-popover';
2020-04-25 09:50:04 +00:00
class Controller extends DescriptorPopover {
2018-10-18 09:41:25 +00:00
get client() {
2020-04-25 09:50:04 +00:00
return this.entity;
}
2020-04-25 09:50:04 +00:00
loadData() {
return this.getData(`Clients/${this.id}/getCard`)
.then(res => this.entity = res.data);
2018-10-18 09:41:25 +00:00
}
}
2020-04-25 09:50:04 +00:00
ngModule.vnComponent('vnClientDescriptorPopover', {
slotTemplate: require('./index.html'),
controller: Controller
});