salix/modules/travel/front/index/index.js

27 lines
727 B
JavaScript

import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
preview(travel) {
this.travelSelected = travel;
this.$.summary.show();
}
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.vnComponent('vnTravelIndex', {
template: require('./index.html'),
controller: Controller
});