- ordinamento tabella titoli
- migliorata la lista degli argomenti
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { PropType } from 'vue';
|
||||
import { defineComponent, onMounted, ref, watch, computed} from 'vue'
|
||||
import { defineComponent, onMounted, ref, watch, computed } from 'vue'
|
||||
import { tools } from '@tools'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
@@ -23,6 +23,7 @@ import type {
|
||||
|
||||
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import Products from 'app/src/rootgen/admin/products/products.vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CSearchProduct',
|
||||
@@ -37,7 +38,7 @@ export default defineComponent({
|
||||
idprodtoshow: {
|
||||
type: String,
|
||||
required: false,
|
||||
default : '',
|
||||
default: '',
|
||||
},
|
||||
empty: {
|
||||
type: Boolean,
|
||||
@@ -47,7 +48,7 @@ export default defineComponent({
|
||||
nameLinkTemplate: {
|
||||
type: String,
|
||||
required: false,
|
||||
default : '',
|
||||
default: '',
|
||||
},
|
||||
visu: {
|
||||
type: Number,
|
||||
@@ -245,7 +246,7 @@ export default defineComponent({
|
||||
router.push(path)
|
||||
}
|
||||
|
||||
function collabel (rec: any) {
|
||||
function collabel(rec: any) {
|
||||
// console.log('Record:', rec)
|
||||
let label = ''
|
||||
if (rec && rec.productInfo) {
|
||||
@@ -254,79 +255,81 @@ export default defineComponent({
|
||||
if (!productStore.isPubblicatoById(rec.productInfo.idStatoProdotto))
|
||||
label += ' (' + productStore.getDescrStatiProdottoByIdStatoProdotto(rec.productInfo.idStatoProdotto || '') + ')'
|
||||
}
|
||||
|
||||
// console.log('Computed label:', label)
|
||||
}
|
||||
return label
|
||||
if (productStore.isEsaurito(rec)) {
|
||||
label += ' (Attualmente non disponibile)'
|
||||
}
|
||||
// console.log('Computed label:', label)
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
function insertProd() {
|
||||
// console.log('insertProd')
|
||||
emit('insert', myproduct.value)
|
||||
// console.log('insertProd')
|
||||
emit('insert', myproduct.value)
|
||||
}
|
||||
|
||||
function clickClose() {
|
||||
searchList.value[0].value = ''
|
||||
myproduct.value = null
|
||||
emit('close')
|
||||
}
|
||||
function clickClose() {
|
||||
searchList.value[0].value = ''
|
||||
myproduct.value = null
|
||||
emit('close')
|
||||
}
|
||||
|
||||
function updateproductmodif(element: IProduct) {
|
||||
console.log('CSEARCHPRODUCT: updateproductmodif')
|
||||
emit('updateproductmodif', element)
|
||||
}
|
||||
function updateproductmodif(element: IProduct) {
|
||||
console.log('CSEARCHPRODUCT: updateproductmodif')
|
||||
emit('updateproductmodif', element)
|
||||
}
|
||||
|
||||
async function searchOnGM(mystr: string) {
|
||||
// refreshSingleBookFromGM({usaDBGMLocale: false})
|
||||
const options = {
|
||||
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 ris = await globalStore.updateAllBookFromGM_T_Web_Articoli({ sku: '', isbn: mystr, ...options })
|
||||
if (ris) {
|
||||
|
||||
const id = getSearchId()
|
||||
loadProduct(id)
|
||||
updateproductmodif(myproduct.value)
|
||||
const id = getSearchId()
|
||||
loadProduct(id)
|
||||
updateproductmodif(myproduct.value)
|
||||
|
||||
// await updateproduct(false)
|
||||
tools.showPositiveNotif($q, t('dbgm.updateLocalDb_OK'))
|
||||
// updatefromgm.value = false
|
||||
}
|
||||
// await updateproduct(false)
|
||||
tools.showPositiveNotif($q, t('dbgm.updateLocalDb_OK'))
|
||||
// updatefromgm.value = false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
userStore,
|
||||
costanti,
|
||||
tools,
|
||||
toolsext,
|
||||
search,
|
||||
shared_consts,
|
||||
productStore,
|
||||
t,
|
||||
loadpage,
|
||||
refreshpage,
|
||||
show_hide,
|
||||
searchList,
|
||||
fieldsTable,
|
||||
mycolumns,
|
||||
naviga,
|
||||
myproduct,
|
||||
optcatalogo,
|
||||
idPage,
|
||||
selauthor,
|
||||
valoriopt,
|
||||
labelcombo,
|
||||
searchText,
|
||||
insertProd,
|
||||
focus,
|
||||
clickClose,
|
||||
saveSearch,
|
||||
updateproductmodif,
|
||||
searchOnGM,
|
||||
}
|
||||
return {
|
||||
userStore,
|
||||
costanti,
|
||||
tools,
|
||||
toolsext,
|
||||
search,
|
||||
shared_consts,
|
||||
productStore,
|
||||
t,
|
||||
loadpage,
|
||||
refreshpage,
|
||||
show_hide,
|
||||
searchList,
|
||||
fieldsTable,
|
||||
mycolumns,
|
||||
naviga,
|
||||
myproduct,
|
||||
optcatalogo,
|
||||
idPage,
|
||||
selauthor,
|
||||
valoriopt,
|
||||
labelcombo,
|
||||
searchText,
|
||||
insertProd,
|
||||
focus,
|
||||
clickClose,
|
||||
saveSearch,
|
||||
updateproductmodif,
|
||||
searchOnGM,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user