import ngModule from '../module'; import Section from 'salix/components/section'; class Controller extends Section { showIntrastat(event) { if (event.defaultPrevented) return; event.preventDefault(); this.newIntrastat = { taxClassFk: this.item.taxClassFk }; this.$.intrastat.show(); } onIntrastatAccept() { const query = `Items/${this.$params.id}/createIntrastat`; return this.$http.patch(query, this.newIntrastat) .then(res => this.item.intrastatFk = res.data.id); } } ngModule.vnComponent('vnItemBasicData', { template: require('./index.html'), bindings: { item: '<' }, controller: Controller });