Non si vedono le foto nella lista degli utenti (sul gruppo)

Corretto le varie funzionalità di Richieste di ingresso e uscita dai Gruppi
This commit is contained in:
paoloar77
2022-03-06 01:44:54 +01:00
parent c6539f4378
commit 267dca3f15
10 changed files with 55 additions and 15 deletions

View File

@@ -74,7 +74,21 @@ export default defineComponent({
watch(() => myrecfiltertoggle.value, (value: any, oldval: any) => {
if (value === tools.FILTER_MYREC) {
filtercustom.value = [{ userId: userStore.my._id }]
if (props.table === toolsext.TABMYGROUPS) {
filtercustom.value = [{
'admins': {
$elemMatch: { username: { $eq: userStore.my.username } }
},
}]
} else {
filtercustom.value = [{ userId: userStore.my._id }]
}
} else if (value === tools.FILTER_MYFOLLOW) {
if (props.table === toolsext.TABMYGROUPS) {
}
} else {
filtercustom.value = []
}

View File

@@ -12,6 +12,7 @@
:options="[
{label: 'Tutti', value: tools.FILTER_ALL},
{label: 'Personali', value: tools.FILTER_MYREC},
// {label: 'Seguo', value: tools.FILTER_MYFOLLOW},
]"
/>
</div>

View File

@@ -87,7 +87,6 @@ export default defineComponent({
shared_consts,
userStore,
tools,
$q,
table,
}
},

View File

@@ -55,7 +55,7 @@ export default defineComponent({
if (props.modelValue === costanti.GROUPS) {
arr = userStore.my.profile.mygroups
} else if (props.modelValue === costanti.MY_GROUPS) {
arr = userStore.my.profile.mygroups
arr = userStore.groups.filter((grp: IMyGroup) => userStore.my.profile.mygroups.findIndex((rec: IMyGroup) => rec.groupname === grp.groupname) >= 0)
} else if (props.modelValue === costanti.MANAGE_GROUPS) {
arr = userStore.my.profile.manage_mygroups
} else if (props.modelValue === costanti.ASK_SENT_GROUP) {
@@ -71,7 +71,7 @@ export default defineComponent({
const myoptions = computed(() => {
const mybutt = []
mybutt.push({ label: t('mypages.find_group'), value: costanti.FIND_GROUP })
mybutt.push({ label: t('mypages.manage_my_groups') + ' (' + numManageGroups.value + ')', value: costanti.MANAGE_GROUPS })
// mybutt.push({ label: t('mypages.manage_my_groups') + ' (' + numManageGroups.value + ')', value: costanti.MANAGE_GROUPS })
mybutt.push({ label: t('mypages.follow_groups') + ' (' + numMyGroups.value + ')', value: costanti.MY_GROUPS })
if (numAskSentGroups.value > 0 || props.modelValue === costanti.ASK_SENT_GROUP)
@@ -135,6 +135,7 @@ export default defineComponent({
listgroupsfiltered,
updateValue,
myoptions,
userStore,
}
}
})

View File

@@ -184,6 +184,7 @@ const msg_enUs = {
recdupfailed: 'Error during record duplication',
friendsadded: 'Aggiunto alla lista di Amici',
domanda_removefriend: 'Rimuovi dagli Amici {username}?',
domanda_exit_fromgroup: 'Uscire dal Gruppo {groupname} ?',
domanda_removegroup: 'Rimuovere dal Gruppo {username} ?',
removedfriend: 'Rimosso dalla lista di Amici',
removedgroup: 'Rimosso dal Gruppo',
@@ -901,6 +902,7 @@ const msg_enUs = {
admin: 'amministratore',
admins: 'Amministratori',
ask_group: 'Chiedi di entrare nel Gruppo',
exit_group: 'Esci dal Gruppo',
accept_group: 'Accetta la richiesta',
remove_from_mygroups: 'Rimuovi dal Gruppo',
block_group: 'Blocca Gruppo',

View File

@@ -154,6 +154,7 @@ const msg_es = {
recdupfailed: 'Error durante la duplicación de registros',
friendsadded: 'Aggiunto alla lista di Amici',
domanda_removefriend: 'Rimuovi dagli Amici {username}?',
domanda_exit_fromgroup: 'Uscire dal Gruppo {groupname} ?',
domanda_removegroup: 'Rimuovere dal Gruppo {username} ?',
removedfriend: 'Rimosso dalla lista di Amici',
removedgroup: 'Rimosso dal Gruppo',
@@ -828,6 +829,7 @@ const msg_es = {
admin: 'amministratore',
admins: 'Amministratori',
ask_group: 'Chiedi di entrare nel Gruppo',
exit_group: 'Esci dal Gruppo',
accept_group: 'Accetta la richiesta',
remove_from_mygroups: 'Rimuovi dal Gruppo',
block_group: 'Blocca Gruppo',

View File

@@ -186,6 +186,7 @@ const msg_it = {
recdupfailed: 'Errore durante la duplicazione del Record',
friendsadded: 'Aggiunto alla lista di Amici',
domanda_removefriend: 'Rimuovi dagli Amici {username}?',
domanda_exit_fromgroup: 'Uscire dal Gruppo {groupname} ?',
domanda_removegroup: 'Rimuovere dal Gruppo {username} ?',
removedfriend: 'Rimosso dalla lista di Amici',
removedgroup: 'Rimosso dal Gruppo',
@@ -925,6 +926,7 @@ const msg_it = {
admin: 'amministratore',
admins: 'Amministratori',
ask_group: 'Chiedi di entrare nel Gruppo',
exit_group: 'Esci dal Gruppo',
accept_group: 'Accetta la richiesta',
remove_from_mygroups: 'Rimuovi dal Gruppo',
block_group: 'Blocca Gruppo',

View File

@@ -57,6 +57,7 @@ export const tools = {
FILTER_ALL: 0,
FILTER_MYREC: 1,
FILTER_MYFOLLOW: 2,
COOK_SEARCH: 'SEARCH_',
@@ -4651,11 +4652,11 @@ export const tools = {
})
},
removeFromMyGroups($q: any, username: string, groupnameDest: string) {
removeFromMyGroups($q: any, username: string, groupnameDest: string, domanda: any = '') {
const userStore = useUserStore()
$q.dialog({
message: t('db.domanda_removegroup', { username }),
message: domanda ? domanda : t('db.domanda_removegroup', { username }),
ok: { label: t('dialog.yes'), push: true },
cancel: { label: t('dialog.cancel') },
title: t('db.domanda')

View File

@@ -28,6 +28,21 @@
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)"
@@ -35,8 +50,19 @@
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>
@@ -190,14 +216,6 @@
</q-tab-panel>
</q-tab-panels>
<q-btn
v-if="mygrp.admins.includes(userStore.my.username)" icon="fas fa-pencil-alt"
color="blue"
size="md"
:label="$t('otherpages.modifgrp')"
to="/editgrp">
</q-btn>
</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"/>

View File

@@ -20,7 +20,7 @@
<CFinder
:table="toolsext.TABMYGROUPS"
:showFilterPersonal="false"
:showFilterPersonal="true"
/>
<!--