- Aggiornamento dal DB di GM al DB Locale
This commit is contained in:
@@ -115,7 +115,6 @@ export default defineComponent({
|
||||
|
||||
const apriSchedaPDF = ref(false)
|
||||
const visufromgm = ref(false)
|
||||
const updatelocaldb = ref(false)
|
||||
const updatefromgm = ref(false)
|
||||
const updatetogm = ref(false)
|
||||
const showQtaDisponibile = ref(false)
|
||||
@@ -659,6 +658,22 @@ export default defineComponent({
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
}
|
||||
async function refreshAllDataBookFromGM() {
|
||||
if (myproduct.value) {
|
||||
loading.value = true
|
||||
updatefromgm.value = true
|
||||
field_updated_fromGM.value = ''
|
||||
const ris = await globalStore.updateAllBookFromGM_T_Web_Articoli(myproduct.value.productInfo.sku!)
|
||||
if (ris) {
|
||||
field_updated_fromGM.value = t('dbgm.updateLocalDb_OK')
|
||||
|
||||
await updateproduct(false)
|
||||
tools.showPositiveNotif($q, t('dbgm.updateLocalDb_OK'))
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
}
|
||||
async function refreshFieldFromGM(field: string) {
|
||||
if (myproduct.value) {
|
||||
@@ -744,8 +759,8 @@ export default defineComponent({
|
||||
refreshFieldFromGM,
|
||||
updatetogm,
|
||||
refreshDataFromGM,
|
||||
refreshAllDataBookFromGM,
|
||||
loading,
|
||||
updatelocaldb,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -157,6 +157,25 @@
|
||||
<q-item-label>Carica da GM</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
tools.isManager() && !optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="refreshAllDataBookFromGM()"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
icon="fas fa-pencil-alt"
|
||||
color="accent"
|
||||
text-color="white"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>Riaggiorna Tutto il Libro da GM</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
tools.isManager() && !optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
|
||||
@@ -209,7 +228,6 @@
|
||||
@click="
|
||||
showQtaDisponibile = true;
|
||||
visufromgm = true;
|
||||
updatelocaldb = false;
|
||||
"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
@@ -599,7 +617,7 @@
|
||||
:options="{
|
||||
nameTable: 'T_Web_Articoli',
|
||||
campispeciali: true,
|
||||
numrec: 100,
|
||||
numrec: 1,
|
||||
where: 'T.IdArticolo =' + myproduct.productInfo.sku,
|
||||
showQtaDisponibile,
|
||||
outhtml: true,
|
||||
|
||||
Reference in New Issue
Block a user