aggiornamento ordini
This commit is contained in:
@@ -92,7 +92,7 @@ export const useProducts = defineStore('Products', {
|
||||
quantityAvailable: 0,
|
||||
stockQty: 0,
|
||||
canBeShipped: false,
|
||||
tempTotalQty: 0,
|
||||
QuantitaOrdinateInAttesa: 0,
|
||||
canBeBuyOnline: false,
|
||||
weight: 0,
|
||||
unit: 0,
|
||||
@@ -424,9 +424,10 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
if (res.data.status === shared_consts.OrderStatus.CHECKOUT_SENT) {
|
||||
this.cart = {}
|
||||
if (res.data.orders)
|
||||
this.orders = res.data.orders
|
||||
}
|
||||
if (res.data.orders)
|
||||
this.orders = res.data.orders
|
||||
|
||||
return res.data.status
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -450,7 +451,11 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
ris = await Api.SendReq('/cart/' + userStore.my._id + '/ordercartstatus', 'POST', { order_id, status })
|
||||
.then((res) => {
|
||||
if (res.data.orders)
|
||||
this.orders = res.data.orders
|
||||
|
||||
return res.data.status
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('error UpdateOrderCartStatus', error)
|
||||
|
||||
Reference in New Issue
Block a user