- 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:
@@ -414,7 +414,7 @@ export const costanti = {
|
||||
TABLES_ARRAY: ['circuits'],
|
||||
TABLES_USERNAME_DATE: ['friends', 'friendsandme'],
|
||||
TABLES_IMG_USERNAME: ['friends', 'friendsandme'],
|
||||
TABLES_WITH_STR_TUTTI: ['lista_editori'],
|
||||
TABLES_WITH_STR_TUTTI: ['lista_editori', 'lista_referenti'],
|
||||
FILTER_SEP: '_',
|
||||
|
||||
FILTER_TUTTI_STR: '[Tutti]',
|
||||
|
||||
@@ -188,7 +188,7 @@ export const colTableCatalogList = [
|
||||
name: 'referenti',
|
||||
label_trans: 'cataloglist.referenti',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'lista_editori',
|
||||
jointable: 'lista_referenti',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idPageAssigned',
|
||||
@@ -5210,6 +5210,13 @@ export const fieldsTable = {
|
||||
colkey: 'username',
|
||||
collabel: 'name',
|
||||
},
|
||||
{
|
||||
value: 'lista_referenti',
|
||||
label: 'Referenti',
|
||||
columns: colTableUsersGeneric,
|
||||
colkey: 'username',
|
||||
collabel: 'name',
|
||||
},
|
||||
{
|
||||
value: 'mygroups',
|
||||
label: 'Organizzazioni',
|
||||
|
||||
@@ -10824,7 +10824,7 @@ export const tools = {
|
||||
{
|
||||
visible: !this.isUtente(),
|
||||
label: 'Editore',
|
||||
table: 'lista_editori',
|
||||
table: 'lista_referenti',
|
||||
key: 'referenti',
|
||||
type: costanti.FieldType.select,
|
||||
value: this.isUtente()
|
||||
@@ -11123,14 +11123,18 @@ export const tools = {
|
||||
},
|
||||
|
||||
getColorWithTransparency(color: string): string {
|
||||
const hex = color.slice(1); // Rimuove il simbolo "#" dal colore
|
||||
const r = parseInt(hex.substring(0, 2), 16);
|
||||
const g = parseInt(hex.substring(2, 4), 16);
|
||||
const b = parseInt(hex.substring(4, 6), 16);
|
||||
const a = parseInt(hex.substring(6, 8), 16) / 255; // Trasformiamo la trasparenza in formato decimale
|
||||
if (color) {
|
||||
const hex = color.slice(1); // Rimuove il simbolo "#" dal colore
|
||||
const r = parseInt(hex.substring(0, 2), 16);
|
||||
const g = parseInt(hex.substring(2, 4), 16);
|
||||
const b = parseInt(hex.substring(4, 6), 16);
|
||||
const a = parseInt(hex.substring(6, 8), 16) / 255; // Trasformiamo la trasparenza in formato decimale
|
||||
|
||||
// Restituisce il colore con trasparenza in formato rgba
|
||||
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
||||
// Restituisce il colore con trasparenza in formato rgba
|
||||
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -564,6 +564,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === 'friends') return userStore.my.profile.friends;
|
||||
else if (table === 'lista_editori') {
|
||||
ris = userStore.listaEditori;
|
||||
} else if (table === 'lista_referenti') {
|
||||
ris = userStore.listaReferenti;
|
||||
} else if (table === 'friendsandme')
|
||||
return [{ username: userStore.my.username }, ...userStore.my.profile.friends];
|
||||
// else if (table === 'mygroups')
|
||||
@@ -1251,6 +1253,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
this.clearDataAfterLoginOnlyIfActiveConnection();
|
||||
|
||||
await userStore.loadListaEditori();
|
||||
await userStore.loadListaReferenti();
|
||||
|
||||
await globalroutines('readall', 'config', null);
|
||||
|
||||
@@ -2510,6 +2513,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
shared_consts.Permissions.Teacher,
|
||||
shared_consts.Permissions.Facilitatore,
|
||||
shared_consts.Permissions.Editor,
|
||||
shared_consts.Permissions.Commerciale,
|
||||
shared_consts.Permissions.Zoomeri,
|
||||
shared_consts.Permissions.Department,
|
||||
shared_consts.Permissions.Grafico,
|
||||
|
||||
Reference in New Issue
Block a user