import ngModule from '../module'; import Section from 'salix/components/section'; export default class Controller extends Section { preview(event, travel) { this.stopEvent(event); this.travelSelected = travel; this.$.summary.show(); } cloneTravel(event, travel) { this.stopEvent(event); this.$.clone.show(travel); } onCloneAccept(travel) { const params = JSON.stringify({ ref: travel.ref, agencyModeFk: travel.agencyFk, shipped: travel.shipped, landed: travel.landed, warehouseInFk: travel.warehouseInFk, warehouseOutFk: travel.warehouseOutFk }); this.$state.go('travel.create', {q: params}); } } ngModule.component('vnTravelIndex', { template: require('./index.html'), controller: Controller });