- fix RIS in pendenti, se troppi msg, non compariva piu

- cataloghi, ricerca pickup
This commit is contained in:
Surya Paolo
2024-05-09 23:36:58 +02:00
parent 58f53f8c52
commit faf0fabfb0
68 changed files with 1776 additions and 188 deletions

View File

@@ -5806,6 +5806,9 @@ export const tools = {
if (res && res.arrrecnotif) {
notifStore.updateArrRecNotifFromServer(res.arrrecnotif)
}
if (res && res.arrrecnotifcoins) {
notifStore.updateArrRecNotifCoinsFromServer(res.arrrecnotifcoins)
}
if (res && res.userprofile) {
// console.log('updateMyData', res.userprofile)
@@ -7000,10 +7003,14 @@ export const tools = {
},
getValueByFunzOrVal(value: any, keyfunz: any) {
if (typeof keyfunz === 'function') {
return keyfunz(value)
} else {
return value[keyfunz]
try {
if (typeof keyfunz === 'function') {
return keyfunz(value)
} else {
return value[keyfunz]
}
} catch (e) {
return ''
}
},
@@ -7712,7 +7719,7 @@ export const tools = {
isTypeByRecMov(rec: IMovVisu) {
let type = costanti.TypeMov.Nessuno
if (rec && rec.userfrom) {
if (rec && (rec.userfrom || rec.userto || rec.groupfrom || rec.groupto)) {
const userStore = useUserStore()
if (rec.userfrom && userStore.my.username === rec.userfrom.username) {
type = costanti.TypeMov.Uscita
@@ -7732,6 +7739,11 @@ export const tools = {
return this.isTypeByRecMov(rec) === costanti.TypeMov.Entrata
},
isUscitaByRecMov(rec: IMovVisu) {
return this.isTypeByRecMov(rec) === costanti.TypeMov.Uscita
},
getSymbolByCircuit(circuit: any) {
try {
if (circuit.symbol) {
@@ -8584,7 +8596,7 @@ export const tools = {
return color
},
getIconByVersione (versione: number ) {
getIconByVersione(versione: number) {
let str = ''
if (versione === shared_consts.VERSIONE.NUOVO)
str = 'fas fa-book'
@@ -8615,8 +8627,42 @@ export const tools = {
// get the last 2 digit fraction part, of a decimal number
getDecPart2Digit(number: number) {
return Math.round(number * 100) % 100
}
return Math.round(number * 100) % 100
},
getRecordByField(field: any, record: any) {
let mioval = ''
if (field) {
const arrfields = field.split('.')
if (arrfields && arrfields.length > 0) {
try {
mioval = record[arrfields[0]][arrfields[1]]
} catch (e) {
return ''
}
} else {
mioval = record[field]
}
}
return mioval
},
setRecordByField(field: any, record: any, value: any) {
let mioval = ''
if (field) {
const arrfields = field.split('.')
if (arrfields && arrfields.length > 1) {
try {
record[arrfields[0]][arrfields[1]] = value
} catch (e) {
return record
}
} else {
record[field] = value
}
}
return record
},
// FINE !