2018-04-18 07:47:05 +00:00
|
|
|
import ngModule from '../../module';
|
|
|
|
|
|
|
|
class Controller {
|
|
|
|
constructor($http, $scope) {
|
|
|
|
this.$http = $http;
|
|
|
|
this.$scope = $scope;
|
|
|
|
}
|
|
|
|
|
|
|
|
$onChanges(data) {
|
|
|
|
if (!this.ticket || !this.ticket.id) return;
|
|
|
|
|
2018-05-04 09:46:03 +00:00
|
|
|
let query = `/ticket/api/sales/${this.ticket.id}/priceDifference`;
|
2018-04-18 07:47:05 +00:00
|
|
|
this.$http.get(query).then(res => {
|
|
|
|
if (res.data)
|
|
|
|
this.ticket.sales = res.data;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Controller.$inject = ['$http', '$scope'];
|
|
|
|
|
|
|
|
ngModule.component('vnTicketDataStepTwo', {
|
|
|
|
template: require('./step-two.html'),
|
|
|
|
controller: Controller,
|
|
|
|
bindings: {
|
|
|
|
ticket: '<'
|
|
|
|
}
|
|
|
|
});
|