Nella pagina profilo, i "Gruppi" personali non si vedevano !
Cancellazione di un Gruppo corretto filtro di visiblità dei Gruppi
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.22"
|
||||
APP_VERSION="0.3.23"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.22"
|
||||
APP_VERSION="0.3.23"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.22"
|
||||
APP_VERSION="0.3.23"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.22"
|
||||
APP_VERSION="0.3.23"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="12"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.22"
|
||||
APP_VERSION="0.3.23"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.22"
|
||||
APP_VERSION="0.3.23"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "0.3.22",
|
||||
"version": "0.3.23",
|
||||
"description": "Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.",
|
||||
"productName": "Riso",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.22"
|
||||
APP_VERSION="0.3.23"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="14"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.22"
|
||||
APP_VERSION="0.3.23"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="14"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "terradellavisione",
|
||||
"version": "0.3.22",
|
||||
"version": "0.3.23",
|
||||
"description": "TerraDellaVisione",
|
||||
"productName": "TerraDellaVisione",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
312
grp.js
Normal file
312
grp.js
Normal file
@@ -0,0 +1,312 @@
|
||||
db.getCollection('mygoods').aggregate(
|
||||
[
|
||||
{
|
||||
"$match": {
|
||||
"$and": [
|
||||
{
|
||||
"$or": [
|
||||
{
|
||||
"idContribType": "515a353c002c8298f4495bf7"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"$match": {
|
||||
"idapp": "13"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$sort": {
|
||||
"date_created": -1
|
||||
}
|
||||
},
|
||||
{
|
||||
"$addFields": {
|
||||
"myId1": {
|
||||
"$toObjectId": "$userId"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$lookup": {
|
||||
"from": "users",
|
||||
"localField": "myId1",
|
||||
"foreignField": "_id",
|
||||
"as": "user"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$replaceRoot": {
|
||||
"newRoot": {
|
||||
"$mergeObjects": [
|
||||
{
|
||||
"$arrayElemAt": [
|
||||
"$user",
|
||||
0
|
||||
]
|
||||
},
|
||||
"$$ROOT"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$project": {
|
||||
"recGood": 1,
|
||||
"sectorGood": 1,
|
||||
"idSectorGood": 1,
|
||||
"idGood": 1,
|
||||
"mygood": 1,
|
||||
"idStatusSkill": 1,
|
||||
"idContribType": 1,
|
||||
"idCity": 1,
|
||||
"pub_to_share": 1,
|
||||
"numLevel": 1,
|
||||
"adType": 1,
|
||||
"photos": 1,
|
||||
"note": 1,
|
||||
"website": 1,
|
||||
"descr": 1,
|
||||
"date_created": 1,
|
||||
"date_updated": 1,
|
||||
"userId": 1,
|
||||
"username": 1,
|
||||
"name": 1,
|
||||
"surname": 1,
|
||||
"comune": 1,
|
||||
"mycities": 1,
|
||||
"profile.img": 1,
|
||||
"profile.mygroups": 1,
|
||||
"profile.qualifica": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"$lookup": {
|
||||
"from": "goods",
|
||||
"localField": "idGood",
|
||||
"foreignField": "_id",
|
||||
"as": "recGood"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$replaceRoot": {
|
||||
"newRoot": {
|
||||
"$mergeObjects": [
|
||||
{
|
||||
"$arrayElemAt": [
|
||||
"$recGood",
|
||||
0
|
||||
]
|
||||
},
|
||||
"$$ROOT"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$project": {
|
||||
"recGood": 1,
|
||||
"sectorGood": 1,
|
||||
"idSectorGood": 1,
|
||||
"idGood": 1,
|
||||
"mygood": 1,
|
||||
"idStatusSkill": 1,
|
||||
"idContribType": 1,
|
||||
"idCity": 1,
|
||||
"pub_to_share": 1,
|
||||
"numLevel": 1,
|
||||
"adType": 1,
|
||||
"photos": 1,
|
||||
"note": 1,
|
||||
"website": 1,
|
||||
"descr": 1,
|
||||
"date_created": 1,
|
||||
"date_updated": 1,
|
||||
"userId": 1,
|
||||
"username": 1,
|
||||
"name": 1,
|
||||
"surname": 1,
|
||||
"comune": 1,
|
||||
"mycities": 1,
|
||||
"profile.img": 1,
|
||||
"profile.mygroups": 1,
|
||||
"profile.qualifica": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"$lookup": {
|
||||
"from": "sectorgoods",
|
||||
"localField": "recGood.idSectorGood",
|
||||
"foreignField": "_id",
|
||||
"as": "sectorgood"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$replaceRoot": {
|
||||
"newRoot": {
|
||||
"$mergeObjects": [
|
||||
{
|
||||
"$arrayElemAt": [
|
||||
"$sectorgood",
|
||||
0
|
||||
]
|
||||
},
|
||||
"$$ROOT"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$project": {
|
||||
"recGood": 1,
|
||||
"sectorGood": 1,
|
||||
"idSectorGood": 1,
|
||||
"idGood": 1,
|
||||
"mygood": 1,
|
||||
"idStatusSkill": 1,
|
||||
"idContribType": 1,
|
||||
"idCity": 1,
|
||||
"pub_to_share": 1,
|
||||
"numLevel": 1,
|
||||
"adType": 1,
|
||||
"photos": 1,
|
||||
"note": 1,
|
||||
"website": 1,
|
||||
"descr": 1,
|
||||
"date_created": 1,
|
||||
"date_updated": 1,
|
||||
"userId": 1,
|
||||
"username": 1,
|
||||
"name": 1,
|
||||
"surname": 1,
|
||||
"comune": 1,
|
||||
"mycities": 1,
|
||||
"profile.img": 1,
|
||||
"profile.mygroups": 1,
|
||||
"profile.qualifica": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"$lookup": {
|
||||
"from": "cities",
|
||||
"localField": "idCity",
|
||||
"foreignField": "_id",
|
||||
"as": "mycities"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$replaceRoot": {
|
||||
"newRoot": {
|
||||
"$mergeObjects": [
|
||||
{
|
||||
"$arrayElemAt": [
|
||||
"$mycities",
|
||||
0
|
||||
]
|
||||
},
|
||||
"$$ROOT"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$project": {
|
||||
"recGood": 1,
|
||||
"sectorGood": 1,
|
||||
"idSectorGood": 1,
|
||||
"idGood": 1,
|
||||
"mygood": 1,
|
||||
"idStatusSkill": 1,
|
||||
"idContribType": 1,
|
||||
"idCity": 1,
|
||||
"pub_to_share": 1,
|
||||
"numLevel": 1,
|
||||
"adType": 1,
|
||||
"photos": 1,
|
||||
"note": 1,
|
||||
"website": 1,
|
||||
"descr": 1,
|
||||
"date_created": 1,
|
||||
"date_updated": 1,
|
||||
"userId": 1,
|
||||
"username": 1,
|
||||
"name": 1,
|
||||
"surname": 1,
|
||||
"comune": 1,
|
||||
"mycities": 1,
|
||||
"profile.img": 1,
|
||||
"profile.mygroups": 1,
|
||||
"profile.qualifica": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"$match": {
|
||||
"$or": [
|
||||
{
|
||||
"$and": [
|
||||
{
|
||||
"profile.mygroups": {
|
||||
"$elemMatch": {
|
||||
"groupname": {
|
||||
"$in": [
|
||||
"000017",
|
||||
"VillaggiamoItalia",
|
||||
"Terraw",
|
||||
"RisoBenevento",
|
||||
"111"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"pub_to_share": 1,
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"pub_to_share": 0,
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"$match": {
|
||||
"$and": [
|
||||
{
|
||||
"mycities.reg": "EMR"
|
||||
},
|
||||
{
|
||||
"mycities.prov": "RN"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"$group": {
|
||||
"_id": null,
|
||||
"count": {
|
||||
"$sum": 1
|
||||
},
|
||||
"results": {
|
||||
"$push": "$$ROOT"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$project": {
|
||||
"count": 1,
|
||||
"rows": {
|
||||
"$slice": [
|
||||
"$results",
|
||||
0,
|
||||
20
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
)
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "0.3.22",
|
||||
"version": "0.3.23",
|
||||
"description": "Siamo la Rete Italiana di Scambio Orizzontale, abbiamo creato questa piattaforma per metterla al servizio di chi vuole riscoprire il valore della condivisione e della cooperazione. Valori semplici e profondi che ci aiutano a ritrovare il Senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza che intere popolazioni antiche conoscevano bene.",
|
||||
"productName": "Riso",
|
||||
"author": "Paolo Arena",
|
||||
|
||||
@@ -67,6 +67,7 @@ export const shared_consts = {
|
||||
CANCEL_REQ_GROUP: 1146,
|
||||
BLOCK_GROUP: 1155,
|
||||
FIND_GROUP: 1166,
|
||||
DELETE_GROUP: 1170,
|
||||
},
|
||||
|
||||
PUBTOSHARE: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { IMyGroup, IImgGallery, IUserFields, IUserProfile } from 'model'
|
||||
import { IMyGroup, IImgGallery, IUserFields, IUserProfile, IFriends } from 'model'
|
||||
import { costanti } from '@costanti'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
@@ -24,8 +24,13 @@
|
||||
<q-item-section>{{ $t('groups.remove_from_mygroups') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-if="tools.iAmAdminGroup(grp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-ban" v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.BLOCK_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item v-if="!tools.iAmAdminGroup(grp.groupname)" clickable icon="fas fa-ban" v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.BLOCK_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.block_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
@@ -52,6 +57,11 @@
|
||||
<q-item-section>{{ $t('groups.exit_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-if="tools.iAmAdminGroup(grp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
@@ -103,6 +113,11 @@
|
||||
<q-item-section>{{ $t('groups.exit_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-if="tools.iAmAdminGroup(grp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, myusername(), '', grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
|
||||
@@ -195,9 +195,11 @@ const msg_it = {
|
||||
friendsadded: 'Aggiunto alla lista di Amici',
|
||||
domanda_removefriend: 'Rimuovi dagli Amici {username}?',
|
||||
domanda_exit_fromgroup: 'Uscire dal Gruppo {groupname} ?',
|
||||
domanda_remove_group: 'Sicuro di voler Eliminare il Gruppo {groupname} ?',
|
||||
domanda_removegroup: 'Rimuovere dal Gruppo {username} ?',
|
||||
removedfriend: 'Rimosso dalla lista di Amici',
|
||||
removedgroup: 'Rimosso dal Gruppo',
|
||||
deletedgroup: 'Gruppo Eliminato',
|
||||
domanda_addtofriend: 'Aggiungere agli amici {username}?',
|
||||
domanda_addtogroup: 'Aggiungi {username} al gruppo {groupname}?',
|
||||
addedfriend: 'Aggiunto alla lista di Amici',
|
||||
@@ -945,6 +947,7 @@ const msg_it = {
|
||||
admins: 'Amministratori',
|
||||
ask_group: 'Chiedi di entrare nel Gruppo',
|
||||
exit_group: 'Esci dal Gruppo',
|
||||
delete_group: 'Elimina il Gruppo',
|
||||
accept_group: 'Accetta la richiesta',
|
||||
remove_from_mygroups: 'Rimuovi dal Gruppo',
|
||||
block_group: 'Blocca Gruppo',
|
||||
|
||||
@@ -4749,6 +4749,27 @@ export const tools = {
|
||||
})
|
||||
},
|
||||
|
||||
DeleteGroup($q: any, username: string, groupnameDest: string, domanda: any = '') {
|
||||
const userStore = useUserStore()
|
||||
|
||||
$q.dialog({
|
||||
message: domanda ? domanda : t('db.domanda_remove_group', { username }),
|
||||
ok: { label: t('dialog.yes'), push: true },
|
||||
cancel: { label: t('dialog.cancel') },
|
||||
title: t('db.domanda')
|
||||
}).onOk(() => {
|
||||
|
||||
userStore.setGroupsCmd($q, t, username, groupnameDest, shared_consts.GROUPSCMD.DELETE_GROUP, null).then((res) => {
|
||||
if (res) {
|
||||
if (userStore.my.profile.mygroups) {
|
||||
userStore.my.profile.mygroups = userStore.my.profile.mygroups.filter((rec: IMyGroup) => rec.groupname !== groupnameDest)
|
||||
tools.showPositiveNotif($q, t('db.deletedgroup'))
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
setRequestFriendship($q: any, username: string, usernameDest: string, value: boolean) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -5028,6 +5049,8 @@ export const tools = {
|
||||
console.log('setcmd', cmd)
|
||||
if (cmd === shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP) {
|
||||
tools.removeFromMyGroups($q, username, dest, t('db.domanda_exit_fromgroup', { username }))
|
||||
} else if (cmd === shared_consts.GROUPSCMD.DELETE_GROUP) {
|
||||
tools.DeleteGroup($q, username, dest)
|
||||
} else if (cmd === shared_consts.GROUPSCMD.BLOCK_GROUP) {
|
||||
tools.blockGroup($q, username, dest)
|
||||
} else if (cmd === shared_consts.GROUPSCMD.SETGROUP) {
|
||||
|
||||
@@ -41,6 +41,8 @@ export default defineComponent({
|
||||
const mygrp = ref(<IMyGroup|null>{})
|
||||
const users_in_group = ref(<IFriends[]>[])
|
||||
|
||||
const loading = ref(false)
|
||||
|
||||
const tabgrp = ref('info')
|
||||
const tab = ref('membri')
|
||||
|
||||
@@ -68,6 +70,8 @@ export default defineComponent({
|
||||
mygrp.value = null
|
||||
users_in_group.value = []
|
||||
}
|
||||
|
||||
loading.value = false
|
||||
// filtroutente.value = [{ userId: userStore.my._id }]
|
||||
})
|
||||
|
||||
@@ -79,6 +83,7 @@ export default defineComponent({
|
||||
})
|
||||
|
||||
async function mounted() {
|
||||
loading.value = true
|
||||
await loadGroup()
|
||||
|
||||
searchList.value = []
|
||||
@@ -202,6 +207,7 @@ export default defineComponent({
|
||||
numAdmins,
|
||||
listaAdmins,
|
||||
users_in_group,
|
||||
loading,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,253 +1,269 @@
|
||||
<template>
|
||||
|
||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||
<div v-if="!tools.isLogged()">
|
||||
<CCheckIfIsLogged></CCheckIfIsLogged>
|
||||
<div v-if="!mygrp && !loading">
|
||||
<h3>Gruppo non Esistente</h3>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div v-if="mygrp.descr" class="fit column no-wrap justify-evenly items-center content-start">
|
||||
|
||||
<div class="">
|
||||
<q-avatar size="140px">
|
||||
<q-img :src="getImgGrp()" :alt="mygrpname()" img-class="imgprofile" height="140px" @click="showPic = true"/>
|
||||
</q-avatar>
|
||||
</div>
|
||||
|
||||
<div class="text-h6">
|
||||
<span v-if="checkifShow('name')"> {{ mygrp.title }}</span>
|
||||
</div>
|
||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||
{{ mygrp.groupname }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!userStore.IsMyGroupByGroupname(mygrp.groupname) && !userStore.IsAskedGroupByGroupname(mygrp.groupname)"
|
||||
icon="fas fa-user-plus"
|
||||
color="primary" :label="$t('groups.ask_group')"
|
||||
@click="tools.setRequestGroup($q, userStore.my.username, mygrp.groupname, true)"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="userStore.IsMyGroupByGroupname(mygrp.groupname)"
|
||||
rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
<q-item clickable v-close-popup
|
||||
@click="tools.removeFromMyGroups($q, userStore.my.username, mygrp.groupname, $t('db.domanda_exit_fromgroup', {groupname: mygrp.groupname }))">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('groups.exit_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="userStore.IsAskedGroupByGroupname(mygrp.groupname) && !userStore.IsMyGroupByGroupname(mygrp.groupname)"
|
||||
icon="fas fa-user-minus"
|
||||
flat :label="$t('groups.cancel_ask_group_short')"
|
||||
@click="tools.cancelReqGroups($q, userStore.my.username, mygrp.groupname)"
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<q-btn
|
||||
v-if="tools.iAmAdminGroup(groupname)" icon="fas fa-pencil-alt"
|
||||
color="blue"
|
||||
size="md"
|
||||
:label="$t('otherpages.modifgrp')"
|
||||
to="/editgrp">
|
||||
</q-btn>
|
||||
-->
|
||||
|
||||
<q-tabs v-model="tabgrp" class="text-blue">
|
||||
<q-tab label="Info" name="info" icon="fas fa-info"></q-tab>
|
||||
<q-tab v-if="!!mygrp.note" label="Pagina" name="page" icon="fas fa-file-word"></q-tab>
|
||||
<q-tab v-if="userStore.IsMyGroupByGroupname(mygrp.groupname) || tools.iAmAdminGroup(groupname)"
|
||||
label="Iscritti" name="membri" icon="fas fa-users"></q-tab>
|
||||
<q-tab v-if="tools.iAmAdminGroup(groupname)" label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabgrp" animated>
|
||||
<q-tab-panel name="info">
|
||||
<div>
|
||||
<q-card>
|
||||
<CMyFieldRec
|
||||
title="Visibilità"
|
||||
table="mygroups"
|
||||
:id="mygrp._id"
|
||||
:columns="colmyUserGroup"
|
||||
:rec="mygrp"
|
||||
field="visibility"
|
||||
:canEdit="false"
|
||||
:canModify="false">
|
||||
</CMyFieldRec>
|
||||
</q-card>
|
||||
<q-card>
|
||||
<div class="members">
|
||||
<q-icon name="fas fa-users"></q-icon>
|
||||
{{ numUsers() }} {{ numUsers() === 1 ? t('groups.member') : t('groups.members') }}
|
||||
</div>
|
||||
<div class="admins">
|
||||
<q-icon name="fas fa-user-cog"></q-icon>
|
||||
{{ numAdmins() }} {{ numAdmins() === 1 ? t('groups.admin') : t('groups.admins') }}
|
||||
</div>
|
||||
<div v-for="(user, index) of mygrp.admins" :key="index">
|
||||
<CMyUser
|
||||
:mycontact="user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUser>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
</div>
|
||||
<q-card>
|
||||
<br>
|
||||
<div class="col-12 text-h7">
|
||||
<span v-if="checkifShow('descr')">{{ mygrp.descr }}</span>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<div v-if="mygrp.title" class="myrow justify-evenly items-center q-pa-sm q-ma-sm">
|
||||
<q-card>
|
||||
<div class="col-6 q-ma-xs">
|
||||
|
||||
<q-btn
|
||||
v-if="getLinkGrpTelegram()" icon="fab fa-telegram"
|
||||
color="blue" type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('msgs.telegrammsg')"
|
||||
:href="getLinkGrpTelegram()" target="__blank">
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
<div class="col-6 q-ma-xs">
|
||||
<q-btn
|
||||
v-if="getLinkWebSite()" icon="fas fa-globe"
|
||||
color="blue" type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('reg.website')"
|
||||
:href="getLinkWebSite()" target="__blank">
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="page">
|
||||
<div v-if="mygrp.note">
|
||||
<br>
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<div v-if="mygrp.note" v-html="mygrp.note">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="membri">
|
||||
<CGridTableRec
|
||||
ref="tabMembri"
|
||||
prop_mytable="users"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title="username"
|
||||
:vertical="costanti.VISUTABLE_LISTA"
|
||||
nodataLabel="Nessun Iscritto"
|
||||
:prop_search="true"
|
||||
hint="Username da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="true"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_USERINFO"
|
||||
:showCol="false"
|
||||
:extrafield="groupname"
|
||||
:extraparams="extraparams()"
|
||||
:visufind="tools.iAmAdminGroup(groupname) ? costanti.REQ_REMOVE_USER_TO_GROUP : costanti.FIND_PEOPLE"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="rich">
|
||||
|
||||
<CGridTableRec
|
||||
prop_mytable="mygroups"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title=""
|
||||
:vertical="costanti.VISUTABLE_USER_TABGROUP"
|
||||
nodataLabel="Nessuna Richiesta in sospeso"
|
||||
:prop_search="false"
|
||||
hint="Username da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="false"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom_rich"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_USERINFO"
|
||||
keyMain=""
|
||||
:showCol="false"
|
||||
:extraparams="extraparams_rich()"
|
||||
:extrafield="groupname"
|
||||
:visufind="costanti.REQ_ADD_USER_TO_GROUP"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
<div v-else>
|
||||
|
||||
<div v-if="!tools.isLogged()">
|
||||
<CCheckIfIsLogged></CCheckIfIsLogged>
|
||||
</div>
|
||||
<div v-else class="fit column no-wrap justify-evenly items-center content-start">
|
||||
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade"/>
|
||||
<q-card flat bordered style="width: 250px">
|
||||
<div>
|
||||
|
||||
<div v-if="mygrp.descr" class="fit column no-wrap justify-evenly items-center content-start">
|
||||
|
||||
<div class="">
|
||||
<q-avatar size="140px">
|
||||
<q-img :src="getImgGrp()" :alt="mygrpname()" img-class="imgprofile" height="140px" @click="showPic = true"/>
|
||||
</q-avatar>
|
||||
</div>
|
||||
|
||||
<div class="text-h6">
|
||||
<q-skeleton :animation="animation"/>
|
||||
<span v-if="checkifShow('name')"> {{ mygrp.title }}</span>
|
||||
</div>
|
||||
<div class="col-12 text-h7 text-grey text-center">
|
||||
{{ groupname }}
|
||||
</div>
|
||||
<div class="col-12 text-h7">
|
||||
<q-skeleton :animation="animation"/>
|
||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||
{{ mygrp.groupname }}
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation"/>
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!userStore.IsMyGroupByGroupname(mygrp.groupname) && !userStore.IsAskedGroupByGroupname(mygrp.groupname)"
|
||||
icon="fas fa-user-plus"
|
||||
color="primary" :label="$t('groups.ask_group')"
|
||||
@click="tools.setRequestGroup($q, userStore.my.username, mygrp.groupname, true)"
|
||||
/>
|
||||
<q-btn
|
||||
v-if="userStore.IsMyGroupByGroupname(mygrp.groupname)"
|
||||
rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
<q-item clickable v-close-popup
|
||||
@click="tools.removeFromMyGroups($q, userStore.my.username, mygrp.groupname, $t('db.domanda_exit_fromgroup', {groupname: mygrp.groupname }))">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('groups.exit_group') }}</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-list v-if="tools.iAmAdminGroup(mygrp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="tools.setCmd($q, shared_consts.GROUPSCMD.DELETE_GROUP, userStore.my.username, '', mygrp.groupname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-trash-alt"/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('groups.delete_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
||||
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-if="userStore.IsAskedGroupByGroupname(mygrp.groupname) && !userStore.IsMyGroupByGroupname(mygrp.groupname)"
|
||||
icon="fas fa-user-minus"
|
||||
flat :label="$t('groups.cancel_ask_group_short')"
|
||||
@click="tools.cancelReqGroups($q, userStore.my.username, mygrp.groupname)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation"/>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<!--
|
||||
<q-btn
|
||||
v-if="tools.iAmAdminGroup(groupname)" icon="fas fa-pencil-alt"
|
||||
color="blue"
|
||||
size="md"
|
||||
:label="$t('otherpages.modifgrp')"
|
||||
to="/editgrp">
|
||||
</q-btn>
|
||||
-->
|
||||
|
||||
<q-tabs v-model="tabgrp" class="text-blue">
|
||||
<q-tab label="Info" name="info" icon="fas fa-info"></q-tab>
|
||||
<q-tab v-if="!!mygrp.note" label="Pagina" name="page" icon="fas fa-file-word"></q-tab>
|
||||
<q-tab v-if="userStore.IsMyGroupByGroupname(mygrp.groupname) || tools.iAmAdminGroup(groupname)"
|
||||
label="Iscritti" name="membri" icon="fas fa-users"></q-tab>
|
||||
<q-tab v-if="tools.iAmAdminGroup(groupname)" label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabgrp" animated>
|
||||
<q-tab-panel name="info">
|
||||
<div>
|
||||
<q-card>
|
||||
<CMyFieldRec
|
||||
title="Visibilità"
|
||||
table="mygroups"
|
||||
:id="mygrp._id"
|
||||
:columns="colmyUserGroup"
|
||||
:rec="mygrp"
|
||||
field="visibility"
|
||||
:canEdit="false"
|
||||
:canModify="false">
|
||||
</CMyFieldRec>
|
||||
</q-card>
|
||||
<q-card>
|
||||
<div class="members">
|
||||
<q-icon name="fas fa-users"></q-icon>
|
||||
{{ numUsers() }} {{ numUsers() === 1 ? t('groups.member') : t('groups.members') }}
|
||||
</div>
|
||||
<div class="admins">
|
||||
<q-icon name="fas fa-user-cog"></q-icon>
|
||||
{{ numAdmins() }} {{ numAdmins() === 1 ? t('groups.admin') : t('groups.admins') }}
|
||||
</div>
|
||||
<div v-for="(user, index) of mygrp.admins" :key="index">
|
||||
<CMyUser
|
||||
:mycontact="user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUser>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
</div>
|
||||
<q-card>
|
||||
<br>
|
||||
<div class="col-12 text-h7">
|
||||
<span v-if="checkifShow('descr')">{{ mygrp.descr }}</span>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<div v-if="mygrp.title" class="myrow justify-evenly items-center q-pa-sm q-ma-sm">
|
||||
<q-card>
|
||||
<div class="col-6 q-ma-xs">
|
||||
|
||||
<q-btn
|
||||
v-if="getLinkGrpTelegram()" icon="fab fa-telegram"
|
||||
color="blue" type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('msgs.telegrammsg')"
|
||||
:href="getLinkGrpTelegram()" target="__blank">
|
||||
</q-btn>
|
||||
|
||||
</div>
|
||||
<div class="col-6 q-ma-xs">
|
||||
<q-btn
|
||||
v-if="getLinkWebSite()" icon="fas fa-globe"
|
||||
color="blue" type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="$t('reg.website')"
|
||||
:href="getLinkWebSite()" target="__blank">
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
</div>
|
||||
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="page">
|
||||
<div v-if="mygrp.note">
|
||||
<br>
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<div v-if="mygrp.note" v-html="mygrp.note">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="membri">
|
||||
<CGridTableRec
|
||||
ref="tabMembri"
|
||||
prop_mytable="users"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title="username"
|
||||
:vertical="costanti.VISUTABLE_LISTA"
|
||||
nodataLabel="Nessun Iscritto"
|
||||
:prop_search="true"
|
||||
hint="Username da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="true"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_USERINFO"
|
||||
:showCol="false"
|
||||
:extrafield="groupname"
|
||||
:extraparams="extraparams()"
|
||||
:visufind="tools.iAmAdminGroup(groupname) ? costanti.REQ_REMOVE_USER_TO_GROUP : costanti.FIND_PEOPLE"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="rich">
|
||||
|
||||
<CGridTableRec
|
||||
prop_mytable="mygroups"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title=""
|
||||
:vertical="costanti.VISUTABLE_USER_TABGROUP"
|
||||
nodataLabel="Nessuna Richiesta in sospeso"
|
||||
:prop_search="false"
|
||||
hint="Username da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="false"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom_rich"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_USERINFO"
|
||||
keyMain=""
|
||||
:showCol="false"
|
||||
:extraparams="extraparams_rich()"
|
||||
:extrafield="groupname"
|
||||
:visufind="costanti.REQ_ADD_USER_TO_GROUP"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
</div>
|
||||
<div v-else class="fit column no-wrap justify-evenly items-center content-start">
|
||||
<q-skeleton type="QAvatar" size="140px" height="140px" animation="fade"/>
|
||||
<q-card flat bordered style="width: 250px">
|
||||
<div class="text-h6">
|
||||
<q-skeleton :animation="animation"/>
|
||||
</div>
|
||||
<div class="col-12 text-h7 text-grey text-center">
|
||||
{{ groupname }}
|
||||
</div>
|
||||
<div class="col-12 text-h7">
|
||||
<q-skeleton :animation="animation"/>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation"/>
|
||||
</div>
|
||||
<div class="col-12 text-h8 q-mt-sm">
|
||||
<q-skeleton :animation="animation"/>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<q-dialog
|
||||
v-model="showPic"
|
||||
full-height full-width
|
||||
>
|
||||
|
||||
<img :src="getImgGrp()" :alt="groupname" class="full-width">
|
||||
|
||||
</q-dialog>
|
||||
</div>
|
||||
<q-dialog
|
||||
v-model="showPic"
|
||||
full-height full-width
|
||||
>
|
||||
|
||||
<img :src="getImgGrp()" :alt="groupname" class="full-width">
|
||||
|
||||
</q-dialog>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
@@ -24,7 +24,8 @@ export default defineComponent({
|
||||
|
||||
function mounted() {
|
||||
|
||||
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.GROUP_SEARCH)
|
||||
const filt_loaded = tools.getCookie(tools.COOK_SEARCH + tools.GROUP_SEARCH, costanti.FIND_GROUP, true)
|
||||
console.log('filt_loaded', filt_loaded)
|
||||
filter.value = filt_loaded ? filt_loaded : costanti.FIND_GROUP
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user