ver: 1.1.21:

- Lista dei Cataloghi
- Gestione Cataloghi in base alla configurazione
This commit is contained in:
Surya Paolo
2025-02-10 22:48:53 +01:00
parent 4da257e43a
commit 3d0e307e42
85 changed files with 1419 additions and 547 deletions

View File

@@ -339,7 +339,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
return !!rec ? rec.name + ' ' + rec.surname : ''
},
getSchedeOpt(): any [] {
getSchedeOpt(): any[] {
const arrschede: ISchedaSingola[] = this.myschedas
let arr: any = []
@@ -432,7 +432,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
return userStore.usersList
else if (table === 'friends')
return userStore.my.profile.friends
else if (table === 'friendsandme')
else if (table === 'lista_editori') {
ris = userStore.getListaEditori
} else if (table === 'friendsandme')
return [{ username: userStore.my.username }, ...userStore.my.profile.friends]
// else if (table === 'mygroups')
// return userStore.groups
@@ -1028,6 +1030,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
async loadAfterLogin() {
const userStore = useUserStore()
// console.log('loadAfterLogin')
this.clearDataAfterLoginOnlyIfActiveConnection()
@@ -1041,6 +1045,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
isok = true
}
await userStore.loadListaEditori()
await globalroutines('readall', 'config', null)
if (tools.isLogged()) {
@@ -1113,7 +1119,6 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
async loadTable(params: IParamsQuery) {
// console.log('loadTable', params)
const userStore = useUserStore()
return Api.SendReq('/gettable', 'POST', params)
@@ -1132,6 +1137,23 @@ export const useGlobalStore = defineStore('GlobalStore', {
})
},
async getObjOnServer(cmd: string) {
const userStore = useUserStore()
return Api.SendReq('/getobj', 'POST', { cmd })
.then((res) => {
this.serverError = false
return res.data.data
})
.catch((error) => {
this.serverError = true
this.serverMsgError = error
console.log('error getObjOnServer', error)
userStore.setErrorCatch(error)
return null
})
},
async loadExp(params: any) {
// console.log('loadTable', params)
params.filtersearch2 = 'fdsgas1'
@@ -2032,9 +2054,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
options,
}
return Api.SendReq('/aitools/ds', 'POST', paramquery)
return Api.SendReq('/aitools/ds', 'POST', paramquery, false, true, 1, 5000, null, null, options)
.then((res) => {
return res.data
return res.data
}).catch((error) => {
return {}
})