vers: 1.1.3
- aggiornato ncu -u
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { defineComponent, onMounted, ref, computed } from 'vue'
|
||||
import { defineComponent, onMounted, ref, computed, watch } from 'vue'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -49,6 +49,14 @@ export default defineComponent({
|
||||
|
||||
const search = ref('')
|
||||
|
||||
const isfinishLoading = computed(() => globalStore.finishLoading)
|
||||
|
||||
watch(() => isfinishLoading.value, (newval: boolean, oldval: boolean) => {
|
||||
if (isfinishLoading.value) {
|
||||
load()
|
||||
}
|
||||
})
|
||||
|
||||
const statusnow = computed(() => (): number => {
|
||||
if (recOrderCart.value) {
|
||||
return recOrderCart.value.status
|
||||
@@ -123,20 +131,23 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function load() {
|
||||
mycart.value = getCart()
|
||||
myrec.value = Object.keys(mycart)
|
||||
oldrec.value = myrec.value
|
||||
note.value = mycart.value.note!
|
||||
if (isfinishLoading.value) {
|
||||
console.log('Load CCART')
|
||||
mycart.value = getCart()
|
||||
myrec.value = Object.keys(mycart)
|
||||
oldrec.value = myrec.value
|
||||
note.value = mycart.value.note!
|
||||
|
||||
let options = {};
|
||||
let options = {};
|
||||
|
||||
if (mycart.value) {
|
||||
recOrderCart.value = await productStore.CreateOrdersCart({ cart_id: mycart.value._id, status: 0, note: note.value })
|
||||
if (mycart.value) {
|
||||
recOrderCart.value = await productStore.CreateOrdersCart({ cart_id: mycart.value._id, status: 0, note: note.value })
|
||||
}
|
||||
|
||||
// console.log('myrec', myrec.value)
|
||||
|
||||
endload.value = true
|
||||
}
|
||||
|
||||
// console.log('myrec', myrec.value)
|
||||
|
||||
endload.value = true
|
||||
}
|
||||
|
||||
function CanBeShipped() {
|
||||
@@ -264,6 +275,7 @@ export default defineComponent({
|
||||
search,
|
||||
insertArticolo,
|
||||
globalStore,
|
||||
isfinishLoading,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
|
||||
<div v-if="endload">
|
||||
<div v-if="isfinishLoading && endload">
|
||||
<CSelectUserActive></CSelectUserActive>
|
||||
<div v-if="recOrderCart" class="panel">
|
||||
<div>
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
>
|
||||
<q-img
|
||||
:src="
|
||||
myproduct.productInfo.imagefile
|
||||
? `` + myproduct.productInfo.imagefile
|
||||
productInfo.imagefile
|
||||
? tools.getFullFileNameByImageFile('productInfos', myproduct.myproduct.productInfo.imagefile)
|
||||
: myproduct.productInfo.image_link
|
||||
"
|
||||
:alt="myproduct.productInfo.name"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<q-img
|
||||
:src="
|
||||
myproduct.productInfo.imagefile
|
||||
? tools.getFullFileNameByImageFile(myproduct.productInfo.imagefile, 'productInfos')
|
||||
? tools.getFullFileNameByImageFile('productInfos', myproduct.productInfo.imagefile)
|
||||
: myproduct.productInfo.image_link
|
||||
"
|
||||
:alt="myproduct.productInfo.name"
|
||||
@@ -1067,7 +1067,7 @@
|
||||
<q-img
|
||||
:src="
|
||||
myproduct.productInfo.imagefile
|
||||
? tools.getFullFileNameByImageFile(myproduct.productInfo.imagefile, 'productInfos')
|
||||
? tools.getFullFileNameByImageFile('productInfos', myproduct.productInfo.imagefile)
|
||||
: myproduct.productInfo.image_link
|
||||
"
|
||||
:alt="myproduct.productInfo.name"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
order.product.productInfo &&
|
||||
order.product.productInfo.imagefile
|
||||
"
|
||||
:src="`` + order.product.productInfo.imagefile"
|
||||
:src="tools.getFullFileNameByImageFile('productInfos', order.product.productInfo.imagefile)"
|
||||
:alt="order.product.productInfo.name"
|
||||
:class="myimgclass()"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user