aggiornamento visualizzazione Ordini e Carrello

This commit is contained in:
Surya Paolo
2023-12-09 19:38:30 +01:00
parent 2b6411eb77
commit 59c03f28f2
13 changed files with 371 additions and 226 deletions

View File

@@ -37,7 +37,7 @@ import { useCircuitStore } from '@store/CircuitStore'
import { routesAdmin } from '@src/router/routesAdmin'
import { routesECommerce } from '@src/router/routesECommerce'
import LandingFooter from '@src/components/LandingFooter/LandingFooter'
import { useProducts } from '@store/Products'
const stateConnDefault = 'online'
@@ -283,6 +283,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
const userStore = useUserStore()
const messageStore = useMessageStore()
const notifStore = useNotifStore()
if (table === costanti.TABEVENTS)
return calendarStore.eventlist
@@ -1498,6 +1499,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
const userStore = useUserStore()
const calendarStore = useCalendarStore()
const circuitStore = useCircuitStore()
const Products = useProducts()
// console.log('calendarStore: loadAfterLogin')
// Load local data
const showall = userStore.isAdmin || userStore.isManager ? '1' : '0'
@@ -1550,13 +1553,13 @@ export const useGlobalStore = defineStore('GlobalStore', {
// console.log('res.data.cart', res.data.cart)
/* if (res.data.cart)
if (res.data.cart)
Products.cart = (res.data.cart) ? { ...res.data.cart } : {}
else
Products.cart = { items: [], totalPrice: 0, totalQty: 0, userId: '' }
Products.orders = (res.data.orders) ? [...res.data.orders] : []
*/
if (showall) {
this.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []