salix/modules/ticket/front/tracking/edit/index.js

31 lines
751 B
JavaScript
Raw Normal View History

2018-03-27 12:26:20 +00:00
import ngModule from '../../module';
2018-04-05 09:09:22 +00:00
class Controller {
constructor($scope, $state, vnApp, $translate) {
2018-03-27 12:26:20 +00:00
this.$ = $scope;
this.$state = $state;
2018-04-05 09:09:22 +00:00
this.vnApp = vnApp;
this.$translate = $translate;
2018-03-27 12:26:20 +00:00
this.ticket = {
ticketFk: $state.params.id
2018-03-27 12:26:20 +00:00
};
}
onSubmit() {
this.$.watcher.submit().then(
() => {
this.card.reload();
2018-03-27 12:26:20 +00:00
this.$state.go('ticket.card.tracking.index');
}
);
}
}
2018-04-05 09:09:22 +00:00
Controller.$inject = ['$scope', '$state', 'vnApp', '$translate'];
2018-03-27 12:26:20 +00:00
ngModule.component('vnTicketTrackingEdit', {
template: require('./index.html'),
controller: Controller,
require: {
card: '^vnTicketCard'
}
2018-03-27 12:26:20 +00:00
});