- Per generare la sinossi è possibile estrarre con 1 click la descrizione sia da Amazon che da GruppoMacro.
- corretto piccolo bug sul catalogo.
This commit is contained in:
@@ -779,6 +779,7 @@ export default defineComponent({
|
||||
const options = {
|
||||
update,
|
||||
aggiornasoloSeVuoti,
|
||||
forzaricarica: true,
|
||||
};
|
||||
const myparam = { product_id: myproduct.value._id, options };
|
||||
|
||||
@@ -787,14 +788,22 @@ export default defineComponent({
|
||||
const dataupdated = await globalStore
|
||||
.scrapingBook(myparam)
|
||||
.then((dataupdated) => {
|
||||
if (dataupdated) {
|
||||
if (dataupdated && update) {
|
||||
tools.showPositiveNotif($q, t('dbgm.scrapingOkUpdated'));
|
||||
}
|
||||
if (!dataupdated) {
|
||||
tools.showNegativeNotif($q, t('dbgm.dati_non_estratti'));
|
||||
visudataextracted.value = false
|
||||
}
|
||||
return dataupdated;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error('Errore aggiornamento singolo libro:', e);
|
||||
tools.showNegativeNotif($q, t('dbgm.updateLocalDb_ERROR'));
|
||||
if (update) {
|
||||
console.error('Errore aggiornamento singolo libro:', e);
|
||||
tools.showNegativeNotif($q, t('dbgm.updateLocalDb_ERROR'));
|
||||
} else {
|
||||
tools.showNegativeNotif($q, t('dbgm.err_extraction'));
|
||||
}
|
||||
loading.value = false;
|
||||
});
|
||||
loading.value = false;
|
||||
@@ -803,7 +812,6 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function getDataExtracted() {
|
||||
|
||||
visudataextracted.value = true;
|
||||
loading.value = true;
|
||||
|
||||
@@ -814,8 +822,9 @@ export default defineComponent({
|
||||
const html = tools.generateHtmlTableFromObject(data);
|
||||
dataextractedWeb.value = html;
|
||||
} catch (error) {
|
||||
console.error('Errore durante l\'estrazione dei dati:', error);
|
||||
console.error("Errore durante l'estrazione dei dati:", error);
|
||||
dataextractedWeb.value = 'Errore nel caricamento dei dati.';
|
||||
visudataextracted.value = false;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user