- Gruppi (3) - lista degli utenti del gruppo
This commit is contained in:
@@ -42,6 +42,7 @@ export const shared_consts = {
|
||||
FILTER_MYSKILL_SKILL: 1,
|
||||
|
||||
OPTIONS_SEARCH_ONLY_FULL_WORDS: 1,
|
||||
OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2,
|
||||
|
||||
FRIENDSCMD: {
|
||||
SETTRUST: 121,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:prop_mycolumns="colmySkills"
|
||||
prop_colkey="idSkill"
|
||||
col_title="subTitle"
|
||||
:vertical="true"
|
||||
:vertical="-1"
|
||||
:nodataLabel="idSector > 0 ? 'Nessuna Competenza trovata': 'Selezionare un Settore'"
|
||||
:prop_search="true"
|
||||
:finder="true"
|
||||
|
||||
@@ -90,9 +90,9 @@ export default defineComponent({
|
||||
default: false,
|
||||
},
|
||||
vertical: {
|
||||
type: Boolean,
|
||||
type: Number,
|
||||
required: false,
|
||||
default: false,
|
||||
default: 0,
|
||||
},
|
||||
prop_codeId: {
|
||||
type: String,
|
||||
@@ -181,7 +181,17 @@ export default defineComponent({
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
visufind: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: costanti.FIND_PEOPLE,
|
||||
},
|
||||
extrafield: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
components: { CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups },
|
||||
setup(props, { emit }) {
|
||||
@@ -242,7 +252,7 @@ export default defineComponent({
|
||||
|
||||
const mycodeid = toRef(props, 'prop_codeId')
|
||||
|
||||
const myvertical = ref(0)
|
||||
const myvertical = ref(props.vertical)
|
||||
|
||||
const valoriopt = computed(() => (item: any, addall: boolean) => {
|
||||
// console.log('valoriopt', item.table)
|
||||
@@ -318,9 +328,11 @@ export default defineComponent({
|
||||
|
||||
if (tablesel.value === 'mygroups') {
|
||||
// is Admin ?
|
||||
const trovato = rec.admins.find((myuser: any) => myuser.username === userStore.my.username)
|
||||
if (trovato) {
|
||||
return !!trovato
|
||||
if (rec.admins) {
|
||||
const trovato = rec.admins.find((myuser: any) => myuser.username === userStore.my.username)
|
||||
if (trovato) {
|
||||
return !!trovato
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -859,7 +871,7 @@ export default defineComponent({
|
||||
colkey.value = props.prop_colkey
|
||||
pagination.value = props.prop_pagination
|
||||
|
||||
myvertical.value = props.vertical ? -1 : 0
|
||||
myvertical.value = props.vertical
|
||||
if (props.finder) {
|
||||
myvertical.value = tools.getCookie('myv', 0)
|
||||
}
|
||||
|
||||
@@ -297,7 +297,6 @@
|
||||
<br>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-slot:item="props">
|
||||
<div v-if="((showType === costanti.SHOW_USERINFO) && myvertical !== costanti.VISUTABLE_SCHEDA_USER) || ((myvertical === 2) && (tablesel === 'users' || tablesel === 'myskills'))" class="fill-all-width">
|
||||
<div>
|
||||
@@ -305,7 +304,8 @@
|
||||
v-model="filter"
|
||||
:finder="false"
|
||||
:mycontact="props.row"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
:visu="visufind"
|
||||
:groupname="extrafield"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineComponent, PropType, ref, watch } from 'vue'
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
@@ -75,6 +75,18 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
rec: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
mycol: {
|
||||
type: Object as PropType<IColGridTable>,
|
||||
required: false,
|
||||
default: () => {
|
||||
return { name: '' }
|
||||
},
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -118,6 +130,17 @@ export default defineComponent({
|
||||
return col.value.fieldtype !== costanti.FieldType.onlydate && col.value.fieldtype !== costanti.FieldType.date
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
if (props.rec) {
|
||||
row.value = props.rec
|
||||
}
|
||||
if (props.mycol.name !== '') {
|
||||
col.value = props.mycol
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
tools,
|
||||
costanti,
|
||||
|
||||
0
src/components/CMyFieldRec/CMyFieldRec.scss
Executable file
0
src/components/CMyFieldRec/CMyFieldRec.scss
Executable file
185
src/components/CMyFieldRec/CMyFieldRec.ts
Executable file
185
src/components/CMyFieldRec/CMyFieldRec.ts
Executable file
@@ -0,0 +1,185 @@
|
||||
import { defineComponent, onMounted, PropType, ref, watch } from 'vue'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { costanti } from '@costanti'
|
||||
import { CMyPopupEdit } from '@/components/CMyPopupEdit'
|
||||
import { IColGridTable } from 'model'
|
||||
import MixinBase from '@/mixins/mixin-base'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CMyFieldRec',
|
||||
props: {
|
||||
table: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
rec: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
field: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
myimg: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
canModify: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true,
|
||||
},
|
||||
canEdit: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
columns: {
|
||||
type: Object,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
disable: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
id: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
idmain: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
indrec: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: -1,
|
||||
},
|
||||
},
|
||||
components: { CMyPopupEdit },
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const mytitle = ref('')
|
||||
const col = ref(<any>{})
|
||||
const keytab = ref(<any>'')
|
||||
const optlab = ref('')
|
||||
|
||||
const pickup = ref(false)
|
||||
const tablesel = ref('')
|
||||
const jointable = ref('')
|
||||
const recordCol = ref(<any>{})
|
||||
|
||||
const mykey = ref('')
|
||||
const mysubkey = ref('')
|
||||
const mysubsubkey = ref('')
|
||||
|
||||
const { setValDb, getValDb } = MixinBase()
|
||||
|
||||
function mounted() {
|
||||
mytitle.value = props.title
|
||||
keytab.value = fieldsTable.getKeyByTable(props.table)
|
||||
optlab.value = fieldsTable.getLabelByTable(props.table)
|
||||
// recordCol.value = fieldsTable.getrecTableList(props.table)
|
||||
if (props.columns) {
|
||||
col.value = props.columns.find((col: any) => col.name === props.field)
|
||||
} else {
|
||||
col.value = fieldsTable.getColByTable(props.table, props.field)
|
||||
}
|
||||
|
||||
if (col.value) {
|
||||
jointable.value = col.value.jointable!
|
||||
}
|
||||
|
||||
const arrk = props.field.split('.')
|
||||
if (arrk) {
|
||||
if (arrk.length >= 0)
|
||||
mykey.value = arrk[0]
|
||||
if (arrk.length > 1)
|
||||
mysubkey.value = arrk[1]
|
||||
if (arrk.length > 2)
|
||||
mysubsubkey.value = arrk[2]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function showandsel(row: any, col: any, newval: any, valinitial: any) {
|
||||
console.log('showandsel CMyFieldDb', row, col, newval)
|
||||
|
||||
if (newval !== valinitial)
|
||||
setValDb($q, mykey.value, newval, col.value.fieldtype, false, props.table, mysubkey.value, props.id, props.indrec, mysubsubkey.value)
|
||||
}
|
||||
|
||||
function withBorder() {
|
||||
return col.value.fieldtype !== costanti.FieldType.onlydate && col.value.fieldtype !== costanti.FieldType.date
|
||||
}
|
||||
|
||||
function getValue() {
|
||||
let myvalue = ''
|
||||
|
||||
if (mysubkey.value !== '') {
|
||||
if (props.rec[mykey.value] === undefined) {
|
||||
myvalue = ''
|
||||
} else {
|
||||
myvalue = props.rec[mykey.value][mysubkey.value]
|
||||
}
|
||||
} else {
|
||||
if (mykey.value !== '') {
|
||||
myvalue = props.rec[mykey.value]
|
||||
}
|
||||
}
|
||||
|
||||
if (Array.isArray(myvalue)) {
|
||||
if (myvalue.length === 0)
|
||||
return null
|
||||
}
|
||||
return myvalue
|
||||
}
|
||||
|
||||
function visuElem() {
|
||||
return !!col.value.name && (props.canEdit || (!props.canEdit && getValue()))
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
tools,
|
||||
withBorder,
|
||||
costanti,
|
||||
fieldsTable,
|
||||
globalStore,
|
||||
mytitle,
|
||||
col,
|
||||
keytab,
|
||||
optlab,
|
||||
recordCol,
|
||||
pickup,
|
||||
tablesel,
|
||||
jointable,
|
||||
showandsel,
|
||||
mykey,
|
||||
mysubkey,
|
||||
mysubsubkey,
|
||||
visuElem,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
59
src/components/CMyFieldRec/CMyFieldRec.vue
Executable file
59
src/components/CMyFieldRec/CMyFieldRec.vue
Executable file
@@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<div class="text-center">
|
||||
<div v-if="visuElem()" class="row items-center justify-center q-gutter-md q-ma-xs">
|
||||
|
||||
<div class="q-ma-xs">
|
||||
<q-field rounded outlined bg-color="blue-1" dense style="min-width:110px;">
|
||||
<template v-slot:control>
|
||||
<div class="centermydiv">
|
||||
<div v-if="myimg" class="text-center">
|
||||
<q-img
|
||||
:src="myimg"
|
||||
class="text-center"
|
||||
style="height: 50px; width: 50px;"
|
||||
:alt="mytitle">
|
||||
</q-img>
|
||||
</div>
|
||||
<div v-if="mytitle" class="self-center full-width no-outline text-center" tabindex="0">{{ mytitle }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</q-field>
|
||||
</div>
|
||||
|
||||
<div :class="` q-ma-sm q-pa-sm col-grow rounded-borders `" :style="withBorder() ? `border: 1px solid #bbb` : ``">
|
||||
<CMyPopupEdit
|
||||
v-bind="$attrs"
|
||||
:isrec="true"
|
||||
:table="table"
|
||||
:title="mytitle"
|
||||
:field="mykey"
|
||||
:subfield="mysubkey"
|
||||
:mysubsubkey="mysubsubkey"
|
||||
:type="col.fieldtype"
|
||||
:serv="false"
|
||||
:disable="disable"
|
||||
:jointable="jointable"
|
||||
:myimg="myimg"
|
||||
:canModify="canModify"
|
||||
:canEdit="canEdit"
|
||||
:visulabel="true"
|
||||
:mycol="col"
|
||||
:tablesel="tablesel"
|
||||
:pickup="pickup"
|
||||
v-model:row="rec"
|
||||
minuteinterval="1"
|
||||
@showandsave="showandsel"
|
||||
>
|
||||
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyFieldRec.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CMyFieldRec.scss';
|
||||
</style>
|
||||
1
src/components/CMyFieldRec/index.ts
Executable file
1
src/components/CMyFieldRec/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CMyFieldRec} from './CMyFieldRec.vue'
|
||||
@@ -38,6 +38,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
groupname: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const userStore = useUserStore()
|
||||
@@ -218,7 +223,7 @@ export default defineComponent({
|
||||
|
||||
function refuseReqFriends(usernameDest: string) {
|
||||
$q.dialog({
|
||||
message: t('db.domanda_removefriend', { username: usernameDest }),
|
||||
message: t('db.domanda_revoke_friend', { username: usernameDest }),
|
||||
ok: { label: t('dialog.yes'), push: true },
|
||||
cancel: { label: t('dialog.cancel') },
|
||||
title: t('db.domanda')
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
<CMyUser
|
||||
:mycontact="mycontact"
|
||||
@setCmd="setCmd"
|
||||
:visu="visu">
|
||||
:visu="visu"
|
||||
:groupname="groupname">
|
||||
</CMyUser>
|
||||
</span>
|
||||
</q-list>
|
||||
|
||||
@@ -36,11 +36,6 @@
|
||||
<q-item-label>
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
<q-menu>
|
||||
<q-list v-if="true" style="min-width: 150px">
|
||||
<q-item clickable v-close-popup @click="setCmd(shared_consts.GROUPSCMD.SETGROUP, grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.accept_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 150px">
|
||||
<q-item clickable icon="fas fa-user-minus" v-close-popup
|
||||
@click="setCmd(shared_consts.GROUPSCMD.REQGROUP, grp.groupname, false)">
|
||||
@@ -67,37 +62,14 @@
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.FIND_GROUP">
|
||||
<q-item-label>
|
||||
<q-btn v-if="grp.admins && grp.admins.includes(userStore.my.username)" rounded :icon="userStore.IsMyGroupByGroupname(grp.groupname) ? `fas fa-ellipsis-h` : `fas fa-user`">
|
||||
<q-btn rounded :icon="userStore.IsMyGroupByGroupname(grp.groupname) ? `fas fa-ellipsis-h` : `fas fa-user`">
|
||||
<q-menu>
|
||||
<q-list v-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && !userStore.IsAskedGroupByGroupname(grp.groupname))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="setCmd(shared_consts.GROUPSCMD.REQGROUP, grp.groupname, true)">
|
||||
<q-item-section>{{ $t('groups.ask_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && userStore.IsAskedGroupByUsername(grp.groupname))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="setCmd(shared_consts.GROUPSCMD.REQGROUP, grp.groupname, false)">
|
||||
<q-item-section>{{ $t('groups.cancel_ask_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="userStore.IsMyGroupByGroupname(grp.groupname)" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="setCmd(shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUPS, grp.groupname)">
|
||||
<q-item-section>{{ $t('groups.remove_from_mygroups') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.FIND_GROUP">
|
||||
<q-item-label>
|
||||
<q-btn v-if="grp.admins && grp.admins.includes(userStore.my.username)" rounded :icon="userStore.IsMyGroupByGroupname(grp.groupname) ? `fas fa-ellipsis-h` : `fas fa-user`">
|
||||
<q-menu>
|
||||
<q-list v-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && !userStore.IsAskedGroupByGroupname(grp.groupname))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="setCmd(shared_consts.GROUPSCMD.REQGROUP, grp.groupname, true)">
|
||||
<q-item-section>{{ $t('groups.ask_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list v-else-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && userStore.IsAskedGroupByUsername(grp.groupname))" style="min-width: 200px">
|
||||
<q-list v-else-if="(!userStore.IsMyGroupByGroupname(grp.groupname) && userStore.IsAskedGroupByGroupname(grp.groupname))" style="min-width: 200px">
|
||||
<q-item clickable v-close-popup @click="setCmd(shared_consts.GROUPSCMD.REQGROUP, grp.groupname, false)">
|
||||
<q-item-section>{{ $t('groups.cancel_ask_group') }}</q-item-section>
|
||||
</q-item>
|
||||
|
||||
@@ -55,8 +55,8 @@ export default defineComponent({
|
||||
arr = userStore.my.profile.mygroups
|
||||
} else if (props.modelValue === costanti.MY_GROUPS) {
|
||||
arr = userStore.my.profile.mygroups
|
||||
// } else if (props.modelValue === costanti.REQ_GROUP) {
|
||||
// arr = userStore.my.profile.req_groups
|
||||
} else if (props.modelValue === costanti.MANAGE_GROUPS) {
|
||||
arr = userStore.my.profile.manage_mygroups
|
||||
} else if (props.modelValue === costanti.ASK_SENT_GROUP) {
|
||||
arr = userStore.my.profile.asked_groups
|
||||
}
|
||||
@@ -70,7 +70,8 @@ export default defineComponent({
|
||||
const myoptions = computed(() => {
|
||||
const mybutt = []
|
||||
mybutt.push({ label: t('mypages.find_group'), value: costanti.FIND_GROUP })
|
||||
mybutt.push({ label: t('mypages.my_groups') + ' (' + numGroups.value + ')', value: costanti.MY_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)
|
||||
mybutt.push({
|
||||
@@ -81,7 +82,12 @@ export default defineComponent({
|
||||
return mybutt
|
||||
})
|
||||
|
||||
const numGroups = computed(() => {
|
||||
const numManageGroups = computed(() => {
|
||||
const arr = userStore.my.profile.manage_mygroups
|
||||
return (arr) ? arr.length : 0
|
||||
})
|
||||
|
||||
const numMyGroups = computed(() => {
|
||||
const arr = userStore.my.profile.mygroups
|
||||
return (arr) ? arr.length : 0
|
||||
})
|
||||
@@ -107,23 +113,6 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function removeFromMyGroups(groupnameDest: string) {
|
||||
$q.dialog({
|
||||
message: t('db.domanda_removegroup', { username: groupnameDest }),
|
||||
ok: { label: t('dialog.yes'), push: true },
|
||||
cancel: { label: t('dialog.cancel') },
|
||||
title: t('db.domanda')
|
||||
}).onOk(() => {
|
||||
|
||||
userStore.setGroupsCmd($q, t, username.value, groupnameDest, shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP, null).then((res) => {
|
||||
if (res) {
|
||||
userStore.my.profile.mygroups = userStore.my.profile.mygroups.filter((rec: IMyGroup) => rec.groupname !== groupnameDest)
|
||||
tools.showPositiveNotif($q, t('db.removedgroup'))
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function blockGroup(usernameDest: string) {
|
||||
$q.dialog({
|
||||
message: t('db.domanda_blockgroup', { groupname: usernameDest }),
|
||||
@@ -142,7 +131,7 @@ export default defineComponent({
|
||||
|
||||
function setCmd(cmd: number, groupnameDest: string, value: any = '') {
|
||||
if (cmd === shared_consts.GROUPSCMD.REMOVE_FROM_MYGROUP) {
|
||||
removeFromMyGroups(groupnameDest)
|
||||
tools.removeFromMyGroups($q, username.value, groupnameDest)
|
||||
} else if (cmd === shared_consts.GROUPSCMD.BLOCK_GROUP) {
|
||||
blockGroup(groupnameDest)
|
||||
} else if (cmd === shared_consts.GROUPSCMD.SETGROUP) {
|
||||
|
||||
@@ -36,6 +36,11 @@ export default defineComponent({
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
isrec: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
mycol: {
|
||||
type: Object as PropType<IColGridTable>,
|
||||
required: true,
|
||||
@@ -191,36 +196,43 @@ export default defineComponent({
|
||||
function crea() {
|
||||
// console.log('crea', isFieldDb())
|
||||
|
||||
if (isFieldDb()) {
|
||||
// mykey -> field
|
||||
// mysubkey -> subfield
|
||||
// table -> table
|
||||
// serv -> serv
|
||||
// id -> id
|
||||
// idmain -> idmain
|
||||
if (props.isrec) {
|
||||
col.value = props.mycol
|
||||
|
||||
// console.table(props)
|
||||
|
||||
myvalue.value = getValDb(props.field, props.serv, '', props.table, props.subfield, props.id, props.idmain)
|
||||
// console.log('myvalue.value', myvalue.value)
|
||||
col.value.jointable = props.jointable
|
||||
col.value.fieldtype = props.type
|
||||
col.value.label = props.title
|
||||
|
||||
if (props.type === costanti.FieldType.image) {
|
||||
myImgGall.value = [{
|
||||
_id: '',
|
||||
imagefile: myvalue.value,
|
||||
// order: 1,
|
||||
alt: 'img',
|
||||
}]
|
||||
}
|
||||
|
||||
// console.log('col', col.value);
|
||||
} else {
|
||||
col.value = {...props.mycol}
|
||||
if (isFieldDb()) {
|
||||
// mykey -> field
|
||||
// mysubkey -> subfield
|
||||
// table -> table
|
||||
// serv -> serv
|
||||
// id -> id
|
||||
// idmain -> idmain
|
||||
|
||||
// console.table(props)
|
||||
|
||||
myvalue.value = getValDb(props.field, props.serv, '', props.table, props.subfield, props.id, props.idmain)
|
||||
// console.log('myvalue.value', myvalue.value)
|
||||
col.value.jointable = props.jointable
|
||||
col.value.fieldtype = props.type
|
||||
col.value.label = props.title
|
||||
|
||||
if (props.type === costanti.FieldType.image) {
|
||||
myImgGall.value = [{
|
||||
_id: '',
|
||||
imagefile: myvalue.value,
|
||||
// order: 1,
|
||||
alt: 'img',
|
||||
}]
|
||||
}
|
||||
|
||||
// console.log('col', col.value);
|
||||
} else {
|
||||
col.value = { ...props.mycol }
|
||||
}
|
||||
}
|
||||
|
||||
console.log('col.value', col.value)
|
||||
|
||||
// console.log('CMyFieldDb crea', myvalue)
|
||||
}
|
||||
|
||||
@@ -307,7 +319,7 @@ export default defineComponent({
|
||||
|
||||
try {
|
||||
// console.log('mounted', 'isFieldDb()', isFieldDb())
|
||||
if (isFieldDb()) {
|
||||
if (isFieldDb() && !props.isrec) {
|
||||
|
||||
} else {
|
||||
if (props.subfield !== '') {
|
||||
|
||||
@@ -25,6 +25,11 @@ export default defineComponent({
|
||||
visu: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
groupname: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -82,6 +87,7 @@ export default defineComponent({
|
||||
setCmd,
|
||||
shared_consts,
|
||||
userStore,
|
||||
tools,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -51,6 +51,50 @@
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.REQ_ADD_USER_TO_GROUP">
|
||||
<q-item-label>
|
||||
<q-btn 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.addToMyGroups($q, contact.username, groupname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="positive" name="fas fa-user-plus" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
{{ $t('groups.accept_group') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
<q-list style="min-width: 200px">
|
||||
<q-item clickable v-close-popup
|
||||
@click="tools.cancelReqGroups($q, contact.username, groupname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus" />
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>{{ $t('groups.refuse_ask_group_short') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.REQ_REMOVE_USER_TO_GROUP">
|
||||
<q-item-label>
|
||||
<q-btn 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, contact.username, groupname)">
|
||||
<q-item-section avatar>
|
||||
<q-icon color="negative" name="fas fa-user-minus" />
|
||||
</q-item-section>
|
||||
<q-item-section>{{ $t('groups.remove_from_mygroups') }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="visu === costanti.ASK_SENT_FRIENDS">
|
||||
<q-item-label>
|
||||
<q-btn rounded icon="fas fa-ellipsis-h">
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:prop_mycolumns="colmySkills"
|
||||
prop_colkey="idSkill"
|
||||
col_title="subTitle"
|
||||
:vertical="true"
|
||||
:vertical="-1"
|
||||
:choose_visutype="!visuinpage"
|
||||
:butt_modif_new="!visuinpage"
|
||||
nodataLabel="Nessuna Competenza inserita"
|
||||
|
||||
@@ -14,6 +14,7 @@ export * from './CImgTitle'
|
||||
export * from './CMyAvatar'
|
||||
export * from './CMyCart'
|
||||
export * from './CMyFieldDb'
|
||||
export * from './CMyFieldRec'
|
||||
export * from './CMyPage'
|
||||
export * from './CMyTeacher'
|
||||
export * from './CProfile'
|
||||
|
||||
@@ -70,6 +70,7 @@ export interface IUserProfile {
|
||||
friends: IFriends[]
|
||||
req_friends: IFriends[]
|
||||
mygroups: IMyGroup[]
|
||||
manage_mygroups: IMyGroup[]
|
||||
|
||||
// in memory
|
||||
asked_friends: any[]
|
||||
|
||||
@@ -182,6 +182,7 @@ const msg_it = {
|
||||
recdupfailed: 'Errore durante la duplicazione del Record',
|
||||
friendsadded: 'Aggiunto alla lista di Amici',
|
||||
domanda_removefriend: 'Rimuovi dagli Amici {username}?',
|
||||
domanda_removegroup: 'Rimuovere dal Gruppo {username} ?',
|
||||
removedfriend: 'Rimosso dalla lista di Amici',
|
||||
removedgroup: 'Rimosso dal Gruppo',
|
||||
domanda_addtofriend: 'Aggiungere agli amici {username}?',
|
||||
@@ -199,7 +200,7 @@ const msg_it = {
|
||||
revoketofriend: 'Revocato la richiesta di Amicizia a {username}',
|
||||
revoketogroup: 'Revocato la richiesta d\'invito al gruppo {groupname}',
|
||||
domanda_cancel_req_friend: 'Annullare la richiesta di Amicizia a {username}?',
|
||||
domanda_cancel_req_group: 'Annullare la richiesta d\'invito al gruppo {groupname}?',
|
||||
domanda_cancel_req_group: 'Annullare la richiesta d\'invito di {username} al gruppo {groupname}?',
|
||||
cancel_req_friend: 'Annullata la richiesta di Amicizia a {username}',
|
||||
cancel_req_group: 'Annullata la richiesta al gruppo {groupname}',
|
||||
domanda_rejectedtrust: 'Rifiutare la Fiducia a {username}?',
|
||||
@@ -864,12 +865,14 @@ const msg_it = {
|
||||
mypages: {
|
||||
find_people: 'Cerca Persone',
|
||||
find_group: 'Cerca Gruppo',
|
||||
my_groups: 'Miei Gruppi',
|
||||
manage_my_groups: 'Gruppi che Gestisco',
|
||||
follow_groups: 'Gruppi che Seguo',
|
||||
create_group: 'Crea Gruppo',
|
||||
friends: 'Amici',
|
||||
groups: 'Gruppi',
|
||||
request_friends: 'Rich. Amicizia',
|
||||
request_sent_friends: 'Rich. Inviate',
|
||||
request_sent_groups: 'Rich. Inviate',
|
||||
request_trust: 'Rich. Fiducia',
|
||||
trusted: 'Fiducia Accettata',
|
||||
rejected: 'Rifiutati',
|
||||
@@ -889,11 +892,12 @@ const msg_it = {
|
||||
groups: {
|
||||
admins: 'Amministratori',
|
||||
ask_group: 'Chiedi di entrare nel Gruppo',
|
||||
accept_group: 'Accetta la richiesta per entrare',
|
||||
remove_from_mygroups: 'Rimuovi dai tuoi Gruppi',
|
||||
accept_group: 'Accetta la richiesta',
|
||||
remove_from_mygroups: 'Rimuovi dal Gruppo',
|
||||
block_group: 'Blocca Gruppo',
|
||||
cancel_ask_group: 'Annulla la richiesta',
|
||||
cancel_ask_group_short: 'Annulla richiesta',
|
||||
refuse_ask_group_short: 'Rifiuta la richiesta',
|
||||
pwd: 'Password per accedere',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -16,6 +16,7 @@ export const costanti = {
|
||||
RISERVATO_PASSWORD: 1,
|
||||
NASCOSTO_CERCA: 2,
|
||||
|
||||
VISUTABLE_LISTA: 2,
|
||||
VISUTABLE_SCHEDA_USER: -1,
|
||||
VISUTABLE_SCHEDA_GROUP: -3,
|
||||
|
||||
@@ -36,10 +37,15 @@ export const costanti = {
|
||||
FIND_GROUP: 20,
|
||||
MY_GROUPS: 21,
|
||||
CREATE_GROUP: 30,
|
||||
MANAGE_GROUPS: 31,
|
||||
|
||||
REQ_ADD_USER_TO_GROUP: 40,
|
||||
REQ_REMOVE_USER_TO_GROUP: 41,
|
||||
|
||||
FILTER_TUTTI: -100,
|
||||
TABLES_ARRAY: ['mygroups'],
|
||||
TABLES_USERNAME_DATE: ['friends', 'friendsandme'],
|
||||
TABLES_IMG_USERNAME: ['friends', 'friendsandme'],
|
||||
|
||||
FuncDialog: {
|
||||
CANCEL_BOOKING: 1,
|
||||
|
||||
@@ -446,7 +446,7 @@ export const colmyUserPeople = [
|
||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||
AddCol({
|
||||
name: 'profile.img', field: 'profile', subfield: 'img', label_trans: 'reg.img', sortable: false,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit,
|
||||
}),
|
||||
// AddCol({ name: 'sospeso', label_trans: 'reg.sospeso', fieldtype: costanti.FieldType.boolean }),
|
||||
// AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: costanti.FieldType.boolean }),
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
ITodo,
|
||||
IUserFields,
|
||||
Privacy,
|
||||
TipoVisu,
|
||||
TipoVisu, IGroup,
|
||||
} from '@model'
|
||||
|
||||
import { lists } from '@store/Modules/lists'
|
||||
@@ -4437,12 +4437,37 @@ export const tools = {
|
||||
userStore.setGroupsCmd($q, t, username, groupnameDest, shared_consts.GROUPSCMD.SETGROUP, null)
|
||||
.then((res: any) => {
|
||||
if (res) {
|
||||
userStore.my.profile.mygroups = [...userStore.my.profile.mygroups, res]
|
||||
if (userStore.my.profile.mygroups)
|
||||
userStore.my.profile.mygroups = [...userStore.my.profile.mygroups, res]
|
||||
else
|
||||
userStore.my.profile.mygroups = [res]
|
||||
tools.showPositiveNotif($q, t('db.addedgroup'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
removeFromMyGroups($q: any, username: string, groupnameDest: string) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
$q.dialog({
|
||||
message: t('db.domanda_removegroup', { 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.REMOVE_FROM_MYGROUP, 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.removedgroup'))
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
setRequestFriendship($q: any, username: string, usernameDest: string, value: boolean) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -4544,10 +4569,10 @@ export const tools = {
|
||||
})
|
||||
})
|
||||
},
|
||||
cancelReqGroups($q: any, username: string, groupnameDest: string) {
|
||||
cancelReqGroups($q: any, username: string, groupnameDest: string) {
|
||||
const userStore = useUserStore()
|
||||
$q.dialog({
|
||||
message: t('db.domanda_cancel_req_group', { groupname: groupnameDest }),
|
||||
message: t('db.domanda_cancel_req_group', { username, groupname: groupnameDest }),
|
||||
ok: { label: t('dialog.yes'), push: true },
|
||||
cancel: { label: t('dialog.cancel') },
|
||||
title: t('db.domanda')
|
||||
@@ -4695,6 +4720,29 @@ export const tools = {
|
||||
// (!visulabel && !col.showOnlyNewRec && !col.noShowView)
|
||||
},
|
||||
|
||||
iAmAdminGroup(groupname: string) {
|
||||
const userStore = useUserStore()
|
||||
|
||||
let risultato = false
|
||||
|
||||
if (userStore.my.profile.manage_mygroups) {
|
||||
const ris = userStore.my.profile.manage_mygroups.find((grp: IMyGroup) => {
|
||||
if (grp.groupname === groupname) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
// console.log('ris', ris)
|
||||
if (ris && ris.admins) {
|
||||
const isadmin = ris.admins.find((user: IFriends) => user.username === userStore.my.username)
|
||||
risultato = !!isadmin
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return risultato
|
||||
|
||||
},
|
||||
|
||||
// getLocale() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
// return navigator.languages[0]
|
||||
|
||||
@@ -51,6 +51,7 @@ export const DefaultUser: IUserFields = {
|
||||
friends: [],
|
||||
req_friends: [],
|
||||
mygroups: [],
|
||||
manage_mygroups: [],
|
||||
asked_friends: [],
|
||||
asked_groups: [],
|
||||
},
|
||||
@@ -95,6 +96,7 @@ export const DefaultProfile: IUserProfile = {
|
||||
friends: [],
|
||||
req_friends: [],
|
||||
mygroups: [],
|
||||
manage_mygroups: [],
|
||||
asked_friends: [],
|
||||
asked_groups: [],
|
||||
}
|
||||
@@ -177,7 +179,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
IsMyGroupByGroupname(groupname: string): boolean {
|
||||
if (this.my.profile.friends)
|
||||
if (this.my.profile.mygroups)
|
||||
return this.my.profile.mygroups.findIndex((rec) => rec.groupname === groupname) >= 0
|
||||
else
|
||||
return false
|
||||
@@ -475,6 +477,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
this.my.profile = DefaultProfile
|
||||
|
||||
// Memory
|
||||
this.my.profile.manage_mygroups = []
|
||||
this.my.profile.asked_friends = []
|
||||
this.my.profile.asked_groups = []
|
||||
}
|
||||
@@ -856,7 +859,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
verified_by_aportador,
|
||||
made_gift,
|
||||
perm,
|
||||
profile: { img, teleg_id, myshares: [], friends: [], req_friends: [], asked_friends: [], mygroups: [], asked_groups: [] },
|
||||
profile: { img, teleg_id, myshares: [], friends: [], req_friends: [], asked_friends: [], mygroups: [], asked_groups: [], manage_mygroups: [] },
|
||||
})
|
||||
|
||||
isLogged = true
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title="username"
|
||||
:vertical="true"
|
||||
:vertical="-1"
|
||||
nodataLabel=" "
|
||||
:prop_search="true"
|
||||
hint="Username da trovare"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
import { CMyFriends } from '@/components/CMyFriends'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CMyFieldRec } from '@/components/CMyFieldRec'
|
||||
import { CSkill } from '@/components/CSkill'
|
||||
import { CDateTime } from '@/components/CDateTime'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
@@ -12,13 +14,14 @@ import { useI18n } from '@/boot/i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
import { IMyGroup, IUserFields } from 'model'
|
||||
import { IFriends, IMyGroup, ISearchList, IUserFields } from 'model'
|
||||
import { shared_consts } from '@/common/shared_vuejs'
|
||||
import { colmyUserPeople, colmyUserGroup } from '@store/Modules/fieldsTable'
|
||||
|
||||
|
||||
export default defineComponent({
|
||||
name: 'mygroup',
|
||||
components: { CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime },
|
||||
components: { CProfile, CTitleBanner, CMyFieldRec, CSkill, CDateTime, CMyFriends, CGridTableRec },
|
||||
props: {},
|
||||
setup() {
|
||||
const userStore = useUserStore()
|
||||
@@ -33,7 +36,15 @@ export default defineComponent({
|
||||
const filtroutente = ref(<any[]>[])
|
||||
const showPic = ref(false)
|
||||
|
||||
const mygrp = ref(<IMyGroup>{})
|
||||
const mygrp = ref(<IMyGroup|null>{})
|
||||
const users_in_group = ref(<IFriends[]>[])
|
||||
|
||||
const tab = ref('membri')
|
||||
|
||||
const arrfilterand: any = ref([])
|
||||
const filtercustom: any = ref([])
|
||||
const filtercustom_rich: any = ref([])
|
||||
const searchList = ref(<ISearchList[]>[])
|
||||
|
||||
function profile() {
|
||||
return userStore.my.profile
|
||||
@@ -47,7 +58,13 @@ export default defineComponent({
|
||||
// Carica il profilo di quest'utente
|
||||
if (groupname.value) {
|
||||
userStore.loadGroup(groupname.value).then((ris) => {
|
||||
mygrp.value = ris
|
||||
if (ris) {
|
||||
mygrp.value = ris.mygroup
|
||||
users_in_group.value = ris.users_in_group
|
||||
} else {
|
||||
mygrp.value = null
|
||||
users_in_group.value = []
|
||||
}
|
||||
// filtroutente.value = [{ userId: userStore.my._id }]
|
||||
})
|
||||
|
||||
@@ -60,10 +77,19 @@ export default defineComponent({
|
||||
|
||||
function mounted() {
|
||||
loadGroup()
|
||||
|
||||
searchList.value = []
|
||||
filtercustom.value = [{ 'profile.mygroups': { $elemMatch: {groupname: {$eq: groupname.value }} } } ]
|
||||
filtercustom_rich.value = [{ req_users: { $elemMatch: {username: {$eq: userStore.my.username }} } } ]
|
||||
arrfilterand.value = []
|
||||
//++TODO: sistemare la filtercustom ... richieste...
|
||||
}
|
||||
|
||||
function getImgGrp() {
|
||||
return userStore.getImgByGroup(mygrp.value)
|
||||
if (mygrp.value)
|
||||
return userStore.getImgByGroup(mygrp.value)
|
||||
else
|
||||
return ''
|
||||
}
|
||||
|
||||
function checkifShow(col: string) {
|
||||
@@ -73,12 +99,20 @@ export default defineComponent({
|
||||
|
||||
function getLinkGrpTelegram() {
|
||||
|
||||
if (!!mygrp.value.link_telegram) {
|
||||
return 'https://t.me/' + mygrp.value.link_telegram
|
||||
if (mygrp.value) {
|
||||
if (!!mygrp.value.link_telegram) {
|
||||
return 'https://t.me/' + mygrp.value.link_telegram
|
||||
}
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getLinkWebSite() {
|
||||
if (!mygrp.value) {
|
||||
return ''
|
||||
}
|
||||
|
||||
let site = mygrp.value.website!
|
||||
if (site) {
|
||||
@@ -89,6 +123,31 @@ export default defineComponent({
|
||||
return site
|
||||
}
|
||||
|
||||
function extraparams() {
|
||||
let lk_tab = 'users'
|
||||
let lk_LF = 'userId'
|
||||
let lk_FF = '_id'
|
||||
let lk_as = 'user'
|
||||
let af_objId_tab = 'myId'
|
||||
|
||||
return {
|
||||
lookup1: {
|
||||
lk_tab,
|
||||
lk_LF,
|
||||
lk_FF,
|
||||
lk_as,
|
||||
af_objId_tab,
|
||||
lk_proj: {
|
||||
username: 1,
|
||||
name: 1,
|
||||
'profile.img': 1,
|
||||
'profile.qualifica': 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -108,6 +167,15 @@ export default defineComponent({
|
||||
userStore,
|
||||
t,
|
||||
animation,
|
||||
arrfilterand,
|
||||
filtercustom,
|
||||
filtercustom_rich,
|
||||
searchList,
|
||||
colmyUserPeople,
|
||||
colmyUserGroup,
|
||||
extraparams,
|
||||
tab,
|
||||
users_in_group,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
|
||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||
<div v-if="mygrp.descr" class="fit column no-wrap justify-evenly items-center content-start">
|
||||
|
||||
@@ -14,11 +15,21 @@
|
||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||
{{ mygrp.groupname }}
|
||||
</div>
|
||||
<div>
|
||||
<CMyFieldRec
|
||||
title="Visibilità"
|
||||
table="mygroups"
|
||||
:columns="colmyUserGroup"
|
||||
:rec="mygrp"
|
||||
field="visibility"
|
||||
:canModify="false">
|
||||
</CMyFieldRec>
|
||||
</div>
|
||||
<div class="col-12 text-h7">
|
||||
<span v-if="checkifShow('descr')">{{ mygrp.descr }}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="mygrp.admins && !mygrp.admins.includes(userStore.my.username)">
|
||||
<div>
|
||||
<q-btn
|
||||
v-if="!userStore.IsMyGroupByGroupname(mygrp.groupname) && !userStore.IsAskedGroupByGroupname(mygrp.groupname)"
|
||||
icon="fas fa-user-plus"
|
||||
@@ -73,7 +84,80 @@
|
||||
:href="getLinkWebSite()" target="__blank">
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="tools.iAmAdminGroup(groupname)">
|
||||
<q-tabs v-model="tab" class="text-blue">
|
||||
<q-tab label="Membri" name="membri" icon="fas fa-users"></q-tab>
|
||||
<q-tab label="Richieste" name="rich" icon="fas fa-user-plus"></q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tab" animated>
|
||||
<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 Membro"
|
||||
:prop_search="true"
|
||||
hint="Username da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="true"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ONLY_FULL_WORDS"
|
||||
:butt_modif_new="false"
|
||||
noresultLabel="Username non trovato"
|
||||
:arrfilters="arrfilterand"
|
||||
:filtercustom="filtercustom"
|
||||
:prop_searchList="searchList"
|
||||
:showType="costanti.SHOW_USERINFO"
|
||||
keyMain=""
|
||||
:showCol="false"
|
||||
:extrafield="groupname"
|
||||
:extraparams="extraparams()"
|
||||
:visufind="costanti.REQ_REMOVE_USER_TO_GROUP"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="rich">
|
||||
<CGridTableRec
|
||||
prop_mytable="mygroups"
|
||||
prop_mytitle=""
|
||||
:prop_mycolumns="colmyUserPeople"
|
||||
prop_colkey="_id"
|
||||
col_title="username"
|
||||
:vertical="costanti.VISUTABLE_LISTA"
|
||||
nodataLabel=" "
|
||||
:prop_search="false"
|
||||
hint="Username da trovare"
|
||||
:finder="false"
|
||||
:choose_visutype="false"
|
||||
:finder_noNull="false"
|
||||
:options="shared_consts.OPTIONS_SEARCH_USER_ONLY_FULL_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()"
|
||||
:extrafield="groupname"
|
||||
:visufind="costanti.REQ_ADD_USER_TO_GROUP"
|
||||
>
|
||||
|
||||
</CGridTableRec>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
</div>
|
||||
|
||||
</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"/>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
:prop_mycolumns="colmyUserGroup"
|
||||
prop_colkey="_id"
|
||||
col_title="groupname"
|
||||
:vertical="true"
|
||||
nodataLabel=" "
|
||||
:vertical="costanti.VISUTABLE_LISTA"
|
||||
nodataLabel="Nessuna Richiesta in sospeso"
|
||||
:prop_search="true"
|
||||
hint="nome del gruppo da trovare"
|
||||
:finder="true"
|
||||
|
||||
Reference in New Issue
Block a user