- aggiornamento cataloghi.

possibilità di estrapolare i dati da GM direttamente
- migrazione delle tabelle di GM in locale
- corretto l'ordinamento del Catalogo
This commit is contained in:
Surya Paolo
2025-04-18 13:23:52 +02:00
parent 14375d6b15
commit 6d0efaadb9
16 changed files with 452 additions and 73 deletions

View File

@@ -648,7 +648,7 @@ export default defineComponent({
loading.value = true
updatefromgm.value = true
field_updated_fromGM.value = ''
const ris = await globalStore.updateLocalDbFromGM_T_Web_Articoli(myproduct.value.productInfo.sku!)
const ris = await globalStore.updateLocalDbFromGM_T_Web_Articoli(myproduct.value.productInfo.sku!, myproduct.value.isbn)
if (ris) {
field_updated_fromGM.value = t('dbgm.updateLocalDb_OK')
@@ -659,12 +659,28 @@ export default defineComponent({
}
}
async function refreshAllDataBookFromGM() {
async function refreshAllDataBookFromGM(options: any) {
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!)
const ris = await globalStore.updateAllBookFromGM_T_Web_Articoli({ sku: myproduct.value.productInfo.sku!, isbn: myproduct.value.productInfo.code, ...options, caricatutti: true })
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 refreshSingleBookFromGM(options: any) {
if (myproduct.value) {
loading.value = true
updatefromgm.value = true
field_updated_fromGM.value = ''
const ris = await globalStore.updateAllBookFromGM_T_Web_Articoli({ sku: myproduct.value.productInfo.sku!, isbn: myproduct.value.productInfo.code, ...options })
if (ris) {
field_updated_fromGM.value = t('dbgm.updateLocalDb_OK')
@@ -760,6 +776,7 @@ export default defineComponent({
updatetogm,
refreshDataFromGM,
refreshAllDataBookFromGM,
refreshSingleBookFromGM,
loading,
}
}