2018-04-26 14:41:08 +00:00
|
|
|
import ngModule from '../module';
|
2020-04-25 09:50:04 +00:00
|
|
|
import DescriptorPopover from 'salix/components/descriptor-popover';
|
2018-04-26 14:41:08 +00:00
|
|
|
|
2020-04-25 09:50:04 +00:00
|
|
|
class Controller extends DescriptorPopover {
|
|
|
|
constructor(...args) {
|
|
|
|
super(...args);
|
2019-05-07 09:32:35 +00:00
|
|
|
this._quicklinks = {
|
|
|
|
btnThree: {
|
|
|
|
icon: 'icon-transaction',
|
2020-04-25 09:50:04 +00:00
|
|
|
state: `item.card.diary({id: $ctrl.id})`,
|
2019-05-07 09:32:35 +00:00
|
|
|
tooltip: 'Item diary'
|
|
|
|
}
|
|
|
|
};
|
2018-10-18 09:41:25 +00:00
|
|
|
}
|
2018-08-08 12:45:29 +00:00
|
|
|
|
2018-10-18 09:41:25 +00:00
|
|
|
get item() {
|
2020-04-25 09:50:04 +00:00
|
|
|
return this.entity;
|
2018-08-01 10:15:09 +00:00
|
|
|
}
|
|
|
|
|
2020-04-25 09:50:04 +00:00
|
|
|
loadData() {
|
|
|
|
return this.getData(`Items/${this.id}/getCard`)
|
|
|
|
.then(res => this.entity = res.data);
|
2018-04-26 14:41:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-25 09:50:04 +00:00
|
|
|
ngModule.vnComponent('vnItemDescriptorPopover', {
|
|
|
|
slotTemplate: require('./index.html'),
|
|
|
|
controller: Controller
|
2018-04-26 14:41:08 +00:00
|
|
|
});
|