Group Page : visibility, some info, members views.

This commit is contained in:
paoloar77
2022-08-10 17:06:46 +02:00
parent 0c25bed597
commit a8c7c3e443
14 changed files with 144 additions and 49 deletions

View File

@@ -16,7 +16,7 @@ import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { IFriends, IMyGroup, ISearchList, IUserFields } from 'model'
import { ICity, IFriends, IMyGroup, ISearchList, IUserFields } from 'model'
import { shared_consts } from '@/common/shared_vuejs'
import { colmyUserPeople, colmyUserGroup } from '@store/Modules/fieldsTable'
import { useNotifStore } from '@store/NotifStore'
@@ -42,6 +42,7 @@ export default defineComponent({
const showPic = ref(false)
const mygrp = ref(<IMyGroup|null>{})
const mystatus = ref(<number>0)
const users_in_group = ref(<IFriends[]>[])
const loading = ref(false)
@@ -54,6 +55,8 @@ export default defineComponent({
const filtercustom_rich: any = ref([])
const searchList = ref(<ISearchList[]>[])
const cities = ref(<ICity[]>[])
function profile() {
return userStore.my.profile
}
@@ -65,16 +68,20 @@ export default defineComponent({
async function loadGroup() {
// Carica il profilo di quest'utente
if (groupname.value) {
await userStore.loadGroup(groupname.value, idnotif.value).then((ris) => {
if (ris) {
mygrp.value = ris.mygroup
await userStore.loadGroup(groupname.value, idnotif.value).then(({ data, status }: {data: any, status: number}) => {
console.log('data', data)
if (data) {
mygrp.value = data.mygroup
cities.value = data.cities
notifStore.setAsRead(idnotif.value)
users_in_group.value = ris.users_in_group
users_in_group.value = data.users_in_group
} else {
mygrp.value = null
users_in_group.value = []
}
mystatus.value = status
loading.value = false
// filtroutente.value = [{ userId: userStore.my._id }]
})
@@ -223,6 +230,8 @@ export default defineComponent({
listaAdmins,
users_in_group,
loading,
mystatus,
cities,
}
}
})