aggiornamento ordini

This commit is contained in:
Surya Paolo
2023-12-14 15:20:27 +01:00
parent ba7fffdc23
commit 4ec5b12d64
11 changed files with 97 additions and 42 deletions

View File

@@ -5830,7 +5830,7 @@ export const tools = {
groupname: '',
circuitnameDest: circuitname,
}
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.SETFIDO, true, extrarec)
.then((res: any) => {
if (res && res.result) {
@@ -8259,6 +8259,16 @@ export const tools = {
return 0
},
convertPriceEurToValue(inputString: string): string {
// Rimuovi il simbolo della valuta (€) e sostituisci la virgola con un punto
return inputString.replace(/[^\d.,]/g, '').replace(',', '.');
},
removeescape(inputString: string): string {
return inputString.replace('\\', '').replace(/"/g, '')
},
// FINE !

View File

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