- aggiornamento con proj RISO. postcss, pwa.
This commit is contained in:
@@ -50,6 +50,7 @@ import { useCatalogStore } from './CatalogStore'
|
||||
|
||||
const stateConnDefault = 'online'
|
||||
|
||||
|
||||
async function getConfig(id: any) {
|
||||
return globalroutines('read', 'config', null, id)
|
||||
}
|
||||
@@ -257,6 +258,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return false
|
||||
},
|
||||
|
||||
getSchedeOpt: (state: IGlobalState) => {
|
||||
const Products = useProducts()
|
||||
|
||||
return Products.getSchedeOpt(state.myschedas)
|
||||
},
|
||||
|
||||
isMyLang: (state: IGlobalState) => (rec: any) => {
|
||||
if (!rec.lang) return true
|
||||
|
||||
@@ -344,34 +351,6 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return !!rec ? rec.name + ' ' + rec.surname : ''
|
||||
},
|
||||
|
||||
getSchedeOpt(): any[] {
|
||||
const arrschede: ISchedaSingola[] = this.myschedas
|
||||
|
||||
let arr: any = []
|
||||
|
||||
arr.push({ label: '[Nessuna]', value: '' })
|
||||
|
||||
if (arrschede) {
|
||||
arrschede.forEach((recscheda: ISchedaSingola) => {
|
||||
let pagename = ''
|
||||
if (recscheda.scheda) {
|
||||
if (recscheda.idPageOrig) {
|
||||
const page = this.mypage.find((page) => (`${page._id}`) === recscheda.idPageOrig)
|
||||
pagename = page ? page.title! : ''
|
||||
}
|
||||
if (pagename)
|
||||
pagename = '[Pag: ' + pagename + '] '
|
||||
|
||||
const mylabel = pagename + (recscheda.scheda ? recscheda.scheda!.name : '')
|
||||
arr.push({ label: mylabel, value: recscheda.scheda!._id })
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return arr
|
||||
|
||||
},
|
||||
|
||||
getListByTable: (state: IGlobalState) => (table: string, value2?: any): any => {
|
||||
let ris: any = []
|
||||
|
||||
@@ -474,7 +453,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === 'collanas')
|
||||
return Products.collane
|
||||
else if (table === 'schedeopt')
|
||||
return state.getSchedeOpt
|
||||
return Products.getSchedeOpt(state.myschedas)
|
||||
else if (table === 'provinces')
|
||||
return state.provinces.filter((rec: IProvince) => (!rec.card) && (rec.prov !== 'ITA') && (rec.prov !== 'EST'))
|
||||
else if (table === 'cards') {
|
||||
@@ -1868,6 +1847,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
this.rightDrawerOpen = true
|
||||
return false
|
||||
} else {
|
||||
console.log('NON SONO LOGGATO... MYUSER NON TORNATO dal SRV',)
|
||||
console.log('Sbianca cmq i dati')
|
||||
// Sbianca cmq i dati
|
||||
const token = localStorage.getItem(toolsext.localStorage.token)
|
||||
|
||||
Reference in New Issue
Block a user