Risolto problema blocco
This commit is contained in:
@@ -118,10 +118,13 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function getnumstore() {
|
||||
if (myproduct.value.storehouses)
|
||||
return myproduct.value.storehouses.length
|
||||
else
|
||||
return 0
|
||||
if (myproduct.value) {
|
||||
if (myproduct.value.storehouses)
|
||||
return myproduct.value.storehouses.length
|
||||
else
|
||||
return 0
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
function getSingleStorehouse() {
|
||||
@@ -138,10 +141,13 @@ export default defineComponent({
|
||||
|
||||
function updateproduct() {
|
||||
myproduct.value = products.getProduct(props.code)
|
||||
products.updateQuantityAvailable(myproduct.value._id)
|
||||
}
|
||||
|
||||
function getStorehouses() {
|
||||
|
||||
if (!myproduct.value)
|
||||
return []
|
||||
|
||||
const myarr: any = []
|
||||
let ind = 1
|
||||
myproduct.value.storehouses.forEach((store) => {
|
||||
@@ -165,7 +171,6 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function getQtyAvailable() {
|
||||
products.updateQuantityAvailable(myproduct.value._id)
|
||||
let qty = myproduct.value.quantityAvailable!
|
||||
return qty
|
||||
}
|
||||
@@ -188,7 +193,7 @@ export default defineComponent({
|
||||
|
||||
function load() {
|
||||
updateproduct()
|
||||
console.log('Load', myproduct.value.name)
|
||||
// console.log('Load', myproduct.value.name)
|
||||
// console.log('created Cproductcard', code)
|
||||
|
||||
arrordersCart.value = products.getOrdersCartByIdProduct(myproduct.value._id)
|
||||
@@ -204,7 +209,7 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
console.log('°°° ENDLOAD °°°')
|
||||
// console.log('°°° ENDLOAD °°°')
|
||||
endload.value = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user