corretto problema che si aggiornava a fatica... si bloccava... era una label che veniva continuamente azzerata e riscritta...
This commit is contained in:
@@ -672,7 +672,7 @@ export default defineComponent({
|
||||
sortBy = sortBy + ''
|
||||
// descending = descending + ''
|
||||
let arrsort = (sortBy && sortBy.indexOf(',') > 0) ? sortBy.split(',') : [];
|
||||
let arrdescending = (descending && descending.lenght > 1 && descending.indexOf(',') > 0) ? descending.split(',') : [];
|
||||
let arrdescending = (descending && descending.length > 1 && descending.indexOf(',') > 0) ? descending.split(',') : [];
|
||||
if (arrsort.length > 0) {
|
||||
for (let i = 0; i < arrsort.length; i++) {
|
||||
let field = arrsort[i].trim()
|
||||
|
||||
@@ -652,7 +652,7 @@ export default defineComponent({
|
||||
sortBy = sortBy + ''
|
||||
// descending = descending + ''
|
||||
let arrsort = (sortBy && sortBy.indexOf(',') > 0) ? sortBy.split(',') : [];
|
||||
let arrdescending = (descending && descending.lenght > 1 && descending.indexOf(',') > 0) ? descending.split(',') : [];
|
||||
let arrdescending = (descending && descending.length > 1 && descending.indexOf(',') > 0) ? descending.split(',') : [];
|
||||
if (arrsort.length > 0) {
|
||||
for (let i = 0; i < arrsort.length; i++) {
|
||||
let field = arrsort[i].trim()
|
||||
|
||||
@@ -98,12 +98,6 @@ export default defineComponent({
|
||||
const scale = ref(1)
|
||||
|
||||
|
||||
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean) => {
|
||||
// console.log('valoriopt', item.table)
|
||||
return globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
|
||||
})
|
||||
|
||||
|
||||
watch(() => editOn.value, (to: any, from: any) => {
|
||||
if (!editOn.value)
|
||||
ricarica()
|
||||
@@ -266,15 +260,26 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
function updateLabel() {
|
||||
if (myproduct.value.gasordine) {
|
||||
if (myproduct.value.gasordine.data_arrivo_merce)
|
||||
labelDataArrivoMerce.value = tools.getstrDateShort(myproduct.value.gasordine.data_arrivo_merce)
|
||||
if (myproduct.value.gasordine.dataora_ritiro)
|
||||
labelDataRitiro.value = tools.getstrDateTime(myproduct.value.gasordine.dataora_ritiro)
|
||||
} else {
|
||||
labelDataArrivoMerce.value = ''
|
||||
labelDataRitiro.value = ''
|
||||
let dataArrivoMerce = ''
|
||||
let dataRitiro = ''
|
||||
try {
|
||||
if (myproduct.value && myproduct.value.gasordine) {
|
||||
if (myproduct.value.gasordine.data_arrivo_merce)
|
||||
dataArrivoMerce = tools.getstrDateShort(myproduct.value.gasordine.data_arrivo_merce)
|
||||
if (myproduct.value.gasordine.dataora_ritiro)
|
||||
dataRitiro = tools.getstrDateTime(myproduct.value.gasordine.dataora_ritiro)
|
||||
} else {
|
||||
dataArrivoMerce = ''
|
||||
dataRitiro = ''
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
if (labelDataArrivoMerce.value !== dataArrivoMerce)
|
||||
labelDataArrivoMerce.value = dataArrivoMerce
|
||||
if (labelDataRitiro.value !== dataRitiro)
|
||||
labelDataRitiro.value = dataRitiro
|
||||
|
||||
updateTimerLabel()
|
||||
}
|
||||
|
||||
@@ -291,7 +296,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function updateTimerLabel() {
|
||||
if (myproduct.value.gasordine && myproduct.value.gasordine._id && myproduct.value.gasordine.dataora_chiusura_ordini)
|
||||
if (myproduct.value && myproduct.value.gasordine && myproduct.value.gasordine._id && myproduct.value.gasordine.dataora_chiusura_ordini)
|
||||
timerLabelScadenza.value = tools.getCountDown(myproduct.value.gasordine.dataora_chiusura_ordini)
|
||||
else
|
||||
timerLabelScadenza.value = ''
|
||||
@@ -304,12 +309,14 @@ export default defineComponent({
|
||||
|
||||
function startTimer() {
|
||||
// Update the timer label every second
|
||||
timerInterval.value = setInterval(() => updateTimerLabel(), 1000);
|
||||
timerInterval.value = setInterval(() => updateTimerLabel(), 60000);
|
||||
}
|
||||
|
||||
function load() {
|
||||
initproduct()
|
||||
updateproduct()
|
||||
labelDataArrivoMerce.value = ''
|
||||
labelDataRitiro.value = ''
|
||||
|
||||
// console.log('Load', myproduct.value.name)
|
||||
// console.log('created Cproductcard', code)
|
||||
|
||||
@@ -637,6 +637,7 @@
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
v-if="
|
||||
myproduct.gasordine &&
|
||||
|
||||
Reference in New Issue
Block a user