- la ricerca trova anche i "On Line" anche se metto la provincia o regione.

This commit is contained in:
Surya Paolo
2024-02-19 18:51:18 +01:00
parent e1bc367418
commit 70f5beb1cb
6 changed files with 67 additions and 35 deletions

View File

@@ -239,6 +239,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
getStatusSkillIconById: (state: IGlobalState) => (id: number) => {
const ctrec = state.statusSkills.find((mystatus: IStatusSkill) => mystatus._id === id)
return (ctrec) ? ctrec.icon : ''
},
isNewVersionAvailable: (state: IGlobalState) => {
// console.log('cfgServer', cfgServer)
const serversrec = state.cfgServer.find((x) => (x.chiave === toolsext.SERVKEY_VERS) && (x.idapp === process.env.APP_ID))
@@ -297,7 +303,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
const userStore = useUserStore()
const messageStore = useMessageStore()
const notifStore = useNotifStore()
if (table === costanti.TABEVENTS)
return calendarStore.eventlist
@@ -386,7 +392,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
}
return []
}
else {
return ris
}
@@ -1524,7 +1530,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
const calendarStore = useCalendarStore()
const circuitStore = useCircuitStore()
const Products = useProducts()
// console.log('calendarStore: loadAfterLogin')
// Load local data
const showall = userStore.isAdmin || userStore.isManager ? '1' : '0'
@@ -1559,7 +1565,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
this.producers = (res.data.producers) ? [...res.data.producers] : []
this.storehouses = (res.data.storehouses) ? [...res.data.storehouses] : []
this.providers = (res.data.providers) ? [...res.data.providers] : []
Products.catprods = (res.data.catprods) ? [...res.data.catprods] : []
Products.catprods_gas = (res.data.catprods_gas) ? [...res.data.catprods_gas] : []
@@ -1595,7 +1601,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
Products.cart = { items: [], totalPrice: 0, totalQty: 0, userId: '' }
Products.orders = (res.data.orders) ? [...res.data.orders] : []
if (showall) {
this.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []
@@ -1664,8 +1670,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
getArrCardByProv(provstr: string): string[] {
getArrCardByProv(provstr: string): string[] {
const recprov = this.provinces.filter((rec: any) => rec.prov === provstr)
@@ -1924,7 +1930,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
}
if (table === 'cards') {
obj = {card: '', label: '[Nessuna]'}
obj = { card: '', label: '[Nessuna]' }
}
myarr = [obj, ...myarr]