|
|
@@ -123,6 +123,9 @@ var app = new Vue({ |
|
|
|
app.orders = response.data.orders ; |
|
|
|
|
|
|
|
for(i=0 ; i < app.orders.length ; i++) { |
|
|
|
|
|
|
|
app.orders[i].clone = app.cloneOrder(app.orders[i]) ; |
|
|
|
|
|
|
|
if(!app.orders[i].date_delete) { |
|
|
|
app.countOrders ++ ; |
|
|
|
} |
|
|
@@ -346,6 +349,16 @@ var app = new Vue({ |
|
|
|
closeModalProducts: function() { |
|
|
|
this.showModalProducts = false ; |
|
|
|
this.init(this.idActivePointSale) ; |
|
|
|
}, |
|
|
|
cloneOrder: function(order) { |
|
|
|
var clone = Object.assign({}, order) ; |
|
|
|
|
|
|
|
clone.productOrder = {} ; |
|
|
|
for(var key in order.productOrder) { |
|
|
|
clone.productOrder[key] = order.productOrder[key] ; |
|
|
|
} |
|
|
|
|
|
|
|
return clone ; |
|
|
|
} |
|
|
|
}, |
|
|
|
}); |
|
|
@@ -437,7 +450,7 @@ Vue.component('order-form',{ |
|
|
|
idUser: this.order.id_user, |
|
|
|
username: ''+this.order.username, |
|
|
|
products: JSON.stringify(this.order.productOrder), |
|
|
|
comment: this.comment, |
|
|
|
comment: this.order.comment, |
|
|
|
processCredit: processCredit |
|
|
|
}}) |
|
|
|
.then(function(response) { |