aggiornamento cataloghi, search

This commit is contained in:
Surya Paolo
2025-04-22 18:30:42 +02:00
parent 6d0efaadb9
commit ae4efab0f3
18 changed files with 117 additions and 27 deletions

View File

@@ -250,6 +250,11 @@ export default defineComponent({
let label = ''
if (rec && rec.productInfo) {
label = `${rec.productInfo.name} - ${rec.productInfo.authors.map((a: any) => a.name + ' ' + a.surname).join(', ')}`
if (rec.productInfo.idStatoProdotto) {
if (!productStore.isPubblicatoById(rec.productInfo.idStatoProdotto))
label += ' (' + productStore.getDescrStatiProdottoByIdStatoProdotto(rec.productInfo.idStatoProdotto || '') + ')'
}
// console.log('Computed label:', label)
}
return label
@@ -271,6 +276,25 @@ export default defineComponent({
emit('updateproductmodif', element)
}
async function searchOnGM(mystr: string) {
// refreshSingleBookFromGM({usaDBGMLocale: false})
const options = {
}
const ris = await globalStore.updateAllBookFromGM_T_Web_Articoli({ sku: '', isbn: mystr, ...options })
if (ris) {
const id = getSearchId()
loadProduct(id)
updateproductmodif(myproduct.value)
// await updateproduct(false)
tools.showPositiveNotif($q, t('dbgm.updateLocalDb_OK'))
// updatefromgm.value = false
}
}
onMounted(mounted)
return {
@@ -301,6 +325,7 @@ export default defineComponent({
clickClose,
saveSearch,
updateproductmodif,
searchOnGM,
}
}
})