32 lines
826 B
JavaScript
32 lines
826 B
JavaScript
|
import ngModule from '../module';
|
||
|
import Section from 'salix/components/section';
|
||
|
import './style.scss';
|
||
|
|
||
|
class Controller extends Section {
|
||
|
constructor($element, $) {
|
||
|
super($element, $);
|
||
|
}
|
||
|
|
||
|
onCloneAccept() {
|
||
|
const params = JSON.stringify({
|
||
|
ref: this.travel.ref,
|
||
|
agencyModeFk: this.travel.agencyFk,
|
||
|
shipped: this.travel.shipped,
|
||
|
landed: this.travel.landed,
|
||
|
warehouseInFk: this.travel.warehouseInFk,
|
||
|
warehouseOutFk: this.travel.warehouseOutFk
|
||
|
});
|
||
|
this.$state.go('travel.create', {q: params});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Controller.$inject = ['$element', '$scope'];
|
||
|
|
||
|
ngModule.vnComponent('vnTravelDescriptorMenu', {
|
||
|
template: require('./index.html'),
|
||
|
controller: Controller,
|
||
|
bindings: {
|
||
|
travel: '<',
|
||
|
}
|
||
|
});
|