2018-04-10 05:48:04 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
|
|
|
|
class Controller {
|
|
|
|
constructor($scope, $state) {
|
|
|
|
this.$scope = $scope;
|
|
|
|
this.$state = $state;
|
|
|
|
}
|
|
|
|
|
|
|
|
set ticket(data) {
|
2018-05-16 06:13:39 +00:00
|
|
|
if (!data) return;
|
|
|
|
|
2018-04-10 05:48:04 +00:00
|
|
|
this.data = Object.assign({}, data);
|
|
|
|
}
|
|
|
|
|
2018-05-16 06:13:39 +00:00
|
|
|
registerChild(child) {
|
|
|
|
this.child = child;
|
2018-04-10 05:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
onStepChange(state) {
|
2018-05-16 06:13:39 +00:00
|
|
|
return this.child.onStepChange(state);
|
|
|
|
}
|
|
|
|
|
|
|
|
onSubmit() {
|
|
|
|
this.child.onSubmit();
|
2018-04-10 05:48:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Controller.$inject = ['$scope', '$state'];
|
|
|
|
|
|
|
|
ngModule.component('vnTicketData', {
|
|
|
|
template: require('./data.html'),
|
|
|
|
bindings: {
|
|
|
|
ticket: '<'
|
|
|
|
},
|
|
|
|
controller: Controller
|
|
|
|
});
|