- Sistemato i Referenti (e non Editori), quando crei un nuovo Catalogo ti imposta la proprietà a te, ma chiunque Collaboratore potrebbe cmq modificartelo.

This commit is contained in:
Surya Paolo
2025-07-01 12:59:39 +02:00
parent 4b65400d50
commit 9e95fe622b
29 changed files with 138 additions and 84 deletions

View File

@@ -217,6 +217,8 @@ export const useUserStore = defineStore('UserStore', {
isZoomeri: false,
isTratuttrici: false,
isEditor: false,
isCommerciale: false,
isCollaboratore: false,
isGrafico: false,
isTeacher: false,
usersList: [],
@@ -224,6 +226,7 @@ export const useUserStore = defineStore('UserStore', {
lastparamquery: {},
updateTables: false,
lista_editori: null,
lista_referenti: null,
}),
getters: {
@@ -234,6 +237,9 @@ export const useUserStore = defineStore('UserStore', {
listaEditori: (state: IUserState): any => {
return state.lista_editori;
},
listaReferenti: (state: IUserState): any => {
return state.lista_referenti;
},
getServerCode: (state: IUserState): number =>
state.servercode ? state.servercode : 0,
@@ -2519,5 +2525,12 @@ export const useUserStore = defineStore('UserStore', {
}
return this.lista_editori;
},
async loadListaReferenti() {
const globalStore = useGlobalStore();
if (!this.lista_referenti) {
this.lista_referenti = await globalStore.getObjOnServer('lista_referenti');
}
return this.lista_referenti;
},
},
});