- caaloghi, categorie

This commit is contained in:
Surya Paolo
2024-05-08 16:07:42 +02:00
parent 84e7f6e9f4
commit 58f53f8c52
20 changed files with 704 additions and 415 deletions

View File

@@ -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 = ''