Bläddra i källkod

[backend] Impossible de modifier le point de vente d'une commande lorsqu'un point de vente est sélectionné

Pour corriger cela, on passe un clone de la commande au formulaire de modification.
dev
Guillaume Bourgeois 5 år sedan
förälder
incheckning
2d1144ebdf
2 ändrade filer med 15 tillägg och 2 borttagningar
  1. +1
    -1
      backend/views/distribution/index.php
  2. +14
    -1
      backend/web/js/vuejs/distribution-index.js

+ 1
- 1
backend/views/distribution/index.php Visa fil

@@ -302,7 +302,7 @@ $this->setPageTitle('Distributions') ;
:points-sale="pointsSale"
:users="users"
:products="products"
:order="order"
:order="order.clone"
@close="showModalFormOrderUpdate = false"
@ordercreatedupdated="orderCreatedUpdated"
></order-form>

+ 14
- 1
backend/web/js/vuejs/distribution-index.js Visa fil

@@ -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) {

Laddar…
Avbryt
Spara