- Ricerca Titolo per nome o autore o ISBN o codice articolo
This commit is contained in:
@@ -4168,12 +4168,16 @@ export const fieldsTable = {
|
||||
if (myrec) return ((myrec.colkey) ? myrec.colkey : '_id')
|
||||
return '_id'
|
||||
},
|
||||
getLabelByTable(mytable: string): string {
|
||||
const myrec = this.getrecTableList(mytable)
|
||||
if (myrec) { // @ts-ignore
|
||||
return ((myrec.collabel) ? myrec.collabel : 'label')
|
||||
getLabelByTable(mytable: string, collabel?: any): string {
|
||||
if (collabel) {
|
||||
return collabel
|
||||
} else {
|
||||
const myrec = this.getrecTableList(mytable)
|
||||
if (myrec) { // @ts-ignore
|
||||
return ((myrec.collabel) ? myrec.collabel : 'label')
|
||||
}
|
||||
return 'label'
|
||||
}
|
||||
return 'label'
|
||||
},
|
||||
getValByTabAndId(table: string, field: string, idvalue: any) {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
@@ -2835,13 +2835,14 @@ export const tools = {
|
||||
}
|
||||
},
|
||||
|
||||
async saveFieldToServer(mythisq: any, table: string, id: any, mydata: any, notif = true) {
|
||||
async saveFieldToServer(mythisq: any, table: string, id: any, mydata: any, notif = true, aggiornainmem = true) {
|
||||
|
||||
const mydatatosave = {
|
||||
id,
|
||||
table,
|
||||
fieldsvalue: mydata,
|
||||
notifBot: null,
|
||||
aggiornainmem,
|
||||
}
|
||||
|
||||
const globalStore = useGlobalStore()
|
||||
@@ -9637,6 +9638,9 @@ export const tools = {
|
||||
if (!myrec.dimensioni) {
|
||||
myrec.dimensioni = this.resetRecIDimensioni(null)
|
||||
}
|
||||
if (!myrec.testo_title) {
|
||||
myrec.testo_title = this.resetIText(null)
|
||||
}
|
||||
if (!myrec.testo_up) {
|
||||
myrec.testo_up = this.resetIText(null)
|
||||
}
|
||||
|
||||
@@ -1434,6 +1434,8 @@ export const useProducts = defineStore('Products', {
|
||||
const pagine = myproduct.arrvariazioni![0].pagine || ''
|
||||
const qta = myproduct.arrvariazioni![0].quantita || ''
|
||||
const isbn = myproduct.productInfo.code || ''
|
||||
const image_link = myproduct.productInfo.image_link || ''
|
||||
const imagefile = myproduct.productInfo.imagefile || ''
|
||||
|
||||
const scale = optcatalogo.printable ? optcatalogo.areadistampa?.scale : 1
|
||||
// Crea una mappa di sostituzioni
|
||||
@@ -1465,6 +1467,8 @@ export const useProducts = defineStore('Products', {
|
||||
'{descrizione_breve_macro}': descrizione_breve_macro || '',
|
||||
'{link_macro}': link_macro || '',
|
||||
'{qta}': qta || '',
|
||||
'{image_link}': image_link || '',
|
||||
'{imagefile}': imagefile || '',
|
||||
};
|
||||
|
||||
// Esegue le sostituzioni
|
||||
|
||||
@@ -1419,7 +1419,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return Api.SendReq('/chval', 'PATCH', { data: mydata })
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
this.UpdateValuesInMemory(mydata)
|
||||
if (mydata.aggiornainmem)
|
||||
this.UpdateValuesInMemory(mydata)
|
||||
return (res.data.code === serv_constants.RIS_CODE_OK)
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user