diff --git a/scripts/_ALL_SITES/comunitanuovomondo.app/src/db/lang/ws_it.js b/scripts/_ALL_SITES/comunitanuovomondo.app/src/db/lang/ws_it.js index 15a48e2d..0b8c0bca 100755 --- a/scripts/_ALL_SITES/comunitanuovomondo.app/src/db/lang/ws_it.js +++ b/scripts/_ALL_SITES/comunitanuovomondo.app/src/db/lang/ws_it.js @@ -84,6 +84,7 @@ const msg_website_it = { eventodef: 'Evento:', prova: 'prova', dbop: 'Operazioni', + dbopmacro: 'Operazioni Macro', projall: 'Comunitari', groups: 'Lista Gruppi', projectsShared: 'Condivisi da me', diff --git a/src/components/CCatalogoCard/CCatalogoCard.ts b/src/components/CCatalogoCard/CCatalogoCard.ts index ecf9de3f..d4241cce 100755 --- a/src/components/CCatalogoCard/CCatalogoCard.ts +++ b/src/components/CCatalogoCard/CCatalogoCard.ts @@ -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, } } diff --git a/src/components/CCatalogoCard/CCatalogoCard.vue b/src/components/CCatalogoCard/CCatalogoCard.vue index 4f14e0b9..ca0e20b0 100755 --- a/src/components/CCatalogoCard/CCatalogoCard.vue +++ b/src/components/CCatalogoCard/CCatalogoCard.vue @@ -163,7 +163,7 @@ " clickable v-close-popup - @click="refreshAllDataBookFromGM()" + @click="refreshSingleBookFromGM({usaDBGMLocale: false})" > - Riaggiorna Tutto il Libro da GM + Riaggiorna il Libro da GM + + + + + + Riaggiorna il Libro da DBLocale + + + 0 ? cookieValue : ["drag", "image", "name", "authors", "catprods", "isbn", "actions"]); + const selectedColumns = ref(cookieValue.length > 0 ? cookieValue : ["pos", "drag", "image", "name", "authors", "catprods", "isbn", "actions"]); // 3. Funzione per verificare se una colonna è visibile (isColumnVisible) diff --git a/src/components/CProductTable/CProductTable.vue b/src/components/CProductTable/CProductTable.vue index 6b8eb08b..cb736fc6 100755 --- a/src/components/CProductTable/CProductTable.vue +++ b/src/components/CProductTable/CProductTable.vue @@ -40,8 +40,22 @@ @end="onDragEnd" >