- Gruppi si chiamano ora "Organizzazioni".

- Categorie dei Gruppi aggiornate.
- Email ora compare sul profilo se non hai telegram e anche sugli annunci.
This commit is contained in:
Surya Paolo
2025-01-28 23:32:37 +01:00
parent 17bcc1644d
commit d65d4e3ffa
59 changed files with 555 additions and 328 deletions

View File

@@ -215,7 +215,7 @@ export const costanti = {
visible: false,
title: 'Circuiti RIS',
strsingolo: 'Circuito',
subtitle: 'Strumento di scambio alternativa alle monete',
subtitle: 'Strumento di scambio alternativo alle monete',
to: '/circuits',
table: 'circuits',
icon: 'fas fa-coins',
@@ -229,9 +229,9 @@ export const costanti = {
},
{
visible: false,
title: 'Gruppi',
strsingolo: 'Gruppo',
subtitle: 'Associazioni, progetti, comunità, negozi',
title: 'Organizzazioni',
strsingolo: 'Organizzazione',
subtitle: 'Gruppi, Associazioni, Aziende, Comunità',
to: '/groups',
table: 'mygroups',
icon: 'fas fa-users',

View File

@@ -1045,8 +1045,8 @@ export const colmyUserGroup = [
AddCol({
name: 'idCatGrp',
label_trans: 'catgrps.name',
fieldtype: costanti.FieldType.select,
required: true,
fieldtype: costanti.FieldType.multiselect,
required: false,
jointable: 'catgrps',
visible: true,
icon: 'category',
@@ -1059,13 +1059,6 @@ export const colmyUserGroup = [
maxlength: 100
}
),
AddCol({
name: 'visibility',
label_trans: 'bot.visibility',
fieldtype: costanti.FieldType.multiselect,
jointable: 'visibilGroup',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
}),
/*AddCol({
name: 'pwd', label_trans: 'groups.pwd', fieldtype: costanti.FieldType.crypted,
visibleif: costanti.BINARY_CHECK, visib_field: 'visibility', visib_value: shared_consts.Visibility_Group.PASSWORD,
@@ -1100,6 +1093,25 @@ export const colmyUserGroup = [
jointable: '',
showWhen: costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
}),
AddCol({
name: 'note', label_trans: 'reg.detailsPage', fieldtype: costanti.FieldType.html,
titlepopupedit: 'detailsPage', field_extra1: 'groupname', subfield_extra1: '',
}),
AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
}),
AddCol({
name: 'visibility',
label_trans: 'bot.visibility',
fieldtype: costanti.FieldType.multiselect,
jointable: 'visibilGroup',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
isadvanced_field: true,
}),
AddCol({
name: 'link_telegram', label_trans: 'reg.link_telegram', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
@@ -1109,10 +1121,7 @@ export const colmyUserGroup = [
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist
}),
AddCol({
name: 'note', label_trans: 'reg.detailsPage', fieldtype: costanti.FieldType.html,
titlepopupedit: 'detailsPage', field_extra1: 'groupname', subfield_extra1: '',
}),
AddCol(ModifRec),
AddCol(DeleteRec),
]
@@ -1499,24 +1508,6 @@ export const colmySkills = [
showonlyif_dipersona: true,
numpag_carousel: 2,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
fieldtype: costanti.FieldType.select,
jointable: 'pub_to_share',
icon: 'fas fa-users',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
numpag_carousel: 2,
}),
AddCol({
name: 'groupname',
label_trans: 'proj.gruppo',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/mygrp/groupname',
noshowlabel: true,
}),
AddCol({
name: 'descr',
label_trans: 'proj.shortdescr',
@@ -1528,6 +1519,16 @@ export const colmySkills = [
sortable: false,
numpag_carousel: 3,
}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
isadvanced_field: false,
numpag_carousel: 6,
}),
AddCol({
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
@@ -1575,14 +1576,30 @@ export const colmySkills = [
numpag_carousel: 5,
}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
name: '',
fieldtype: costanti.FieldType.separator,
required: false,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit,
visible: false,
}),
AddCol({
name: 'groupname',
label_trans: 'proj.gruppo',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/mygrp/groupname',
noshowlabel: true,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
fieldtype: costanti.FieldType.select,
jointable: 'pub_to_share',
icon: 'fas fa-users',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
numpag_carousel: 2,
isadvanced_field: true,
numpag_carousel: 6,
}),
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,
@@ -4762,7 +4779,7 @@ export const fieldsTable = {
},
{
value: 'mygroups',
label: 'Gruppi',
label: 'Organizzazioni',
columns: colmyUserGroup,
colkey: 'groupname',
collabel: 'groupname',

View File

@@ -6972,6 +6972,17 @@ export const tools = {
},
iCanShowAnnunci(grp: IMyGroup) {
if (grp && grp.visibility!.includes(shared_consts.Visibility_Group.HIDDEN)) {
// Only if I am part of this group
return this.iAmPartOfThisGroup(grp)
}
return true
},
iAmTheCreatorOfTheGroup(groupname: string) {
const userStore = useUserStore()
@@ -7012,10 +7023,10 @@ export const tools = {
},
isUserAdminGroup(groupname: string, username: string) {
isUserAdminGroup(groupname: string, username: string, real?: boolean) {
const userStore = useUserStore()
if (userStore.my.username === username && userStore.isAdmin) {
if (!real && (userStore.my.username === username && userStore.isAdmin)) {
return true
}
let risultato = false
@@ -7081,10 +7092,10 @@ export const tools = {
},
isUserAdminCircuit(name: string, username: string) {
isUserAdminCircuit(name: string, username: string, real?: boolean) {
const userStore = useUserStore()
if (userStore.my.username === username && userStore.isAdmin) {
if (!real && (userStore.my.username === username && userStore.isAdmin)) {
return true
}
@@ -7498,6 +7509,9 @@ export const tools = {
// return true
if (shared_consts.TABLES_WITH_ADMINS.includes(tablesel)) {
if (userStore.isAdmin)
return true
// is Admin ?
if (rec.admins) {
const trovato = rec.admins.find((myuser: any) => myuser.username === userStore.my.username)
@@ -7505,6 +7519,8 @@ export const tools = {
return !!trovato
}
}
}
if (rec.hasOwnProperty('userId')) {