- caaloghi, categorie
This commit is contained in:
@@ -181,9 +181,9 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
|
||||
function updateproduct() {
|
||||
async function updateproduct() {
|
||||
|
||||
myproduct.value = products.getProductById(props.id)
|
||||
myproduct.value = await products.getProductById(props.id)
|
||||
|
||||
// products.updateQuantityAvailable(myproduct.value._id)
|
||||
}
|
||||
@@ -194,15 +194,15 @@ export default defineComponent({
|
||||
if (prod) {
|
||||
myproduct.value = prod
|
||||
}
|
||||
load()
|
||||
await load()
|
||||
endload.value = true
|
||||
|
||||
}
|
||||
|
||||
function updateproductmodif() {
|
||||
async function updateproductmodif() {
|
||||
|
||||
try {
|
||||
myproduct.value = products.getProductById(props.id)
|
||||
myproduct.value = await products.getProductById(props.id)
|
||||
|
||||
updateLabel()
|
||||
} catch (e) {
|
||||
@@ -250,16 +250,16 @@ export default defineComponent({
|
||||
return ''
|
||||
}
|
||||
|
||||
watch(() => props.id, (newval, oldval) => {
|
||||
watch(() => props.id, async (newval, oldval) => {
|
||||
// console.log('change code')
|
||||
load()
|
||||
await load()
|
||||
})
|
||||
|
||||
watch(() => storeSelected.value, (newval, oldval) => {
|
||||
myorder.idStorehouse = newval
|
||||
})
|
||||
|
||||
function updateLabel() {
|
||||
function updateLabel() {
|
||||
let dataArrivoMerce = ''
|
||||
let dataRitiro = ''
|
||||
try {
|
||||
@@ -283,8 +283,8 @@ export default defineComponent({
|
||||
updateTimerLabel()
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
load()
|
||||
async function mounted() {
|
||||
await load()
|
||||
|
||||
// Start the timer when the component is mounted
|
||||
startTimer();
|
||||
@@ -312,9 +312,9 @@ export default defineComponent({
|
||||
timerInterval.value = setInterval(() => updateTimerLabel(), 60000);
|
||||
}
|
||||
|
||||
function load() {
|
||||
async function load() {
|
||||
initproduct()
|
||||
updateproduct()
|
||||
await updateproduct()
|
||||
labelDataArrivoMerce.value = ''
|
||||
labelDataRitiro.value = ''
|
||||
|
||||
|
||||
@@ -997,7 +997,8 @@
|
||||
<q-img
|
||||
:src="myproduct.productInfo.img ? `` + myproduct.productInfo.img : myproduct.productInfo.image_link"
|
||||
:alt="myproduct.productInfo.name"
|
||||
:fit="tools.isMobile() ? 'fill' : 'none'"
|
||||
:fit="tools.isMobile() ? 'fill' : 'cover'"
|
||||
class="fullscreen-image"
|
||||
@touchstart="onTouchStart"
|
||||
@touchmove="onTouchMove"
|
||||
@touchend="onTouchEnd"
|
||||
|
||||
Reference in New Issue
Block a user