watcher preventing claim creation
gitea/salix/dev This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-09-24 11:55:36 +02:00
parent 5851784e41
commit 3af26900e3
1 changed files with 6 additions and 3 deletions

View File

@ -246,12 +246,11 @@ class Controller {
sales: this.transfer.sales
};
this.$scope.watcher.updateOriginalData();
const query = `/api/tickets/${this.ticket.id}/transferSales`;
this.$http.post(query, params).then(res => {
this.$scope.watcher.updateOriginalData();
this.goToTicket(res.data.id);
}).finally(() => {
this.$scope.watcher.updateOriginalData();
});
}
@ -262,6 +261,10 @@ class Controller {
ticketCreated: this.ticket.shipped
};
const sales = this.checkedLines();
if (this.newInstances().length === 0)
this.$scope.watcher.updateOriginalData();
this.$http.post(`/api/Claims/createFromSales`, {claim: claim, sales: sales}).then(res => {
this.$state.go('claim.card.basicData', {id: res.data.id});
});