- aggiunto anche nei beni, servizi e ospitalità la possibilità di aggiungerli come "Gruppo"

This commit is contained in:
Surya Paolo
2025-01-14 18:34:58 +01:00
parent 37970c5c91
commit 08a089881c
23 changed files with 484 additions and 94 deletions

View File

@@ -211,6 +211,8 @@ export const shared_consts = {
FILTER_USER_SENZA_CIRCUITO: 67108864,
FILTER_USER_CON_CIRCUITO: 134217728,
FILTER_USER_ONLINE_6_MESI: 268435456,
FILTER_NOTE: 536870912,
FILTER_SENZA_NOTE: 1073741824,
OPTIONS_SEARCH_ONLY_FULL_WORDS: 1,
OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2,
@@ -335,6 +337,14 @@ export const shared_consts = {
label: 'Chat "BOT RISO" eliminata',
value: 1024, //shared_consts.FILTER_USER_TELEGRAM_BLOCKED
},
{
label: 'Con Note Facilitatore',
value: 536870912, //shared_consts.FILTER_NOTE
},
{
label: 'Senza Note Facilitatore',
value: 1073741824, //shared_consts.FILTER_SENZA_NOTE
},
],
@@ -2180,6 +2190,14 @@ export const shared_consts = {
}
}
const proj_common = {
'mygrp.groupname': 1,
'mygrp.title': 1,
'mygrp.photos': 1,
}
proj = Object.assign({}, proj, proj_common);
if (proj_add)
proj = Object.assign({}, proj, proj_add);
@@ -2211,6 +2229,7 @@ export const shared_consts = {
'profile.mygroups': 1,
'profile.mycircuits': 1,
'profile.qualifica': 1,
'profile.note': 1,
'profile.resid_province': 1,
'profile.resid_card': 1,
'profile.username_telegram': 1,

View File

@@ -164,6 +164,7 @@ export default defineComponent({
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.note': 1,
'profile.resid_province': 1,
'mycities.reg': 1,
}

View File

@@ -939,31 +939,42 @@ export default defineComponent({
}
} else if (item.table === shared_consts.TABFILTRI_UTENTE) {
if (item.value === shared_consts.FILTER_USER_SENZA_PROVINCE) {
item.arrvalue.forEach((myitemsingle: any) => {
if (myitemsingle === shared_consts.FILTER_USER_SENZA_PROVINCE) {
filtercustom.push({ 'profile.resid_province': { $exists: false } });
} else if (item.value === shared_consts.FILTER_USER_CON_CIRCUITO) {
} else if (myitemsingle === shared_consts.FILTER_USER_CON_CIRCUITO) {
filtercustom.push({
'profile.mycircuits': { $exists: true, $ne: [] }
});
} else if (item.value === shared_consts.FILTER_USER_ONLINE_6_MESI) {
} else if (myitemsingle === shared_consts.FILTER_USER_ONLINE_6_MESI) {
const numgiorni_attivi = 30 * 6
let daytocheck = new Date();
daytocheck.setDate(daytocheck.getDate() - numgiorni_attivi);
daytocheck.setHours(0, 0, 0, 0)
filtercustom.push({ lasttimeonline: { $gt: daytocheck } })
} else if (item.value === shared_consts.FILTER_USER_SENZA_CIRCUITO) {
} else if (myitemsingle === shared_consts.FILTER_USER_SENZA_CIRCUITO) {
filtercustom.push({
$or: [
{ 'profile.mycircuits': { $exists: false } },
{ 'profile.mycircuits': { $eq: [] } }
]
});
} else if (item.value === shared_consts.FILTER_USER_PROVINCE) {
} else if (myitemsingle === shared_consts.FILTER_USER_PROVINCE) {
filtercustom.push({ 'profile.resid_province': { $exists: true, $ne: '' } });
} else if (item.value === shared_consts.FILTER_USER_TELEGRAM_BLOCKED) {
} else if (myitemsingle === shared_consts.FILTER_USER_TELEGRAM_BLOCKED) {
filtercustom.push({ 'profile.teleg_id_old': { $gt: 1 } });
} else if (item.value === shared_consts.FILTER_USER_WITHOUT_USERNAME_TELEGRAM) {
} else if (myitemsingle === shared_consts.FILTER_NOTE) {
filtercustom.push({ 'profile.note': { $exists: true, $ne: '' } });
} else if (myitemsingle === shared_consts.FILTER_SENZA_NOTE) {
filtercustom.push({
$or: [
{ 'profile.note': { $exists: false } },
{ 'profile.note': { $exists: true, $eq: '' } }],
});
} else if (myitemsingle === shared_consts.FILTER_USER_WITHOUT_USERNAME_TELEGRAM) {
filtercustom.push({
$or: [
{ 'profile.username_telegram': { $exists: false } },
@@ -971,14 +982,16 @@ export default defineComponent({
});
} else if (item.value === shared_consts.FILTER_USER_NO_VERIFIED_APORTADOR) {
} else if (myitemsingle === shared_consts.FILTER_USER_NO_VERIFIED_APORTADOR) {
filtercustom.push({
verified_by_aportador: { $exists: false },
});
} else if (item.value === shared_consts.FILTER_USER_NO_TELEGRAM_ID) {
} else if (myitemsingle === shared_consts.FILTER_USER_NO_TELEGRAM_ID) {
filtercustom.push({ 'profile.teleg_id': { $lt: 1 } });
}
})
} else if (item.table === 'cities') {
if (item.value && item.value.hasOwnProperty('_id')) {

View File

@@ -41,6 +41,11 @@ export default defineComponent({
CTimeAgo, CContactUser
},
props: {
username: {
type: String,
required: true,
default : '',
},
introUser: {
type: Boolean,
required: false,
@@ -63,7 +68,8 @@ export default defineComponent({
const animation = ref('fade')
const mytab = ref('my')
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
// const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
const username = ref('')
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
const filtroutente = ref(<any[]>[])
@@ -110,7 +116,7 @@ export default defineComponent({
if (myuser.value) {
// filtro_eventi.value = [{ userId: myuser.value._id }, { dateTimeStart: { $gte: today } }]
let mydate = tools.addDays(tools.getDateNow(), -1)
let mydateend = tools.addDays(mydate, 30)
let mydateend = tools.addDays(mydate, 180)
mydate = tools.getstrYYMMDDDate(mydate)
filtro_eventi.value = [{ userId: myuser.value._id }, { dateTimeStart: { $gte: mydate, $lte: mydateend } }]
filtroutente.value = [{ userId: myuser.value._id }]
@@ -163,6 +169,7 @@ export default defineComponent({
})
function mounted() {
username.value = props.username || userStore.my.username
loadProfile()
}

View File

@@ -580,7 +580,6 @@
</q-item>
<q-card
v-if="
table === 'mybachecas' &&
myrec.mygrp &&
myrec.mygrp.groupname
"

View File

@@ -407,7 +407,7 @@ export default defineComponent({
return changevalRecOrig(newval)
}
function changevalRec(newval: any) {
return changevalRecOrig(newval, '')
return changevalRecOrig(newval, props.subfield)
}
function changevalRecOrig(newval: any, subcol: string = '') {
@@ -428,16 +428,30 @@ export default defineComponent({
}
if (subcol) {
if (!myrow.value[col.value.name]) {
const arrcol = col.value.name.split('.')
if (arrcol.length > 0) {
const primo = arrcol[0]
let sec = null
if (arrcol.length > 1)
sec = arrcol[1]
if (sec) {
if (!myrow.value[primo]) {
myrow.value[primo] = {}
}
myrow.value[primo][sec] = newval
} else {
myrow.value[primo] = newval
}
/*if (!myrow.value[col.value.name]) {
myrow.value[col.value.name] = {}
}
myrow.value[col.value.name][subcol] = newval
myrow.value[col.value.name][subcol] = newval*/
// console.log('myrow.value[col.value.name]', myrow.value[col.value.name])
}
} else {
myrow.value[col.value.name] = newval
}
// console.log('changevalRec update:row', myrow.value)
// emit('update:row', myrow.value)
emit('update_col', col.value.name, newval)

View File

@@ -99,7 +99,7 @@ export default defineComponent({
}
function getNameToShow(user: IUserFields, col = null) {
if (props.table === shared_consts.TABLES_MYBACHECAS && myrec.value.groupname)
if (myrec.value.groupname)
return myrec.value.groupname
else
return userStore.getNameToShow(user, col)

View File

@@ -37,7 +37,10 @@
}}</em></q-item-label
>
<q-item-label v-if="contact.profile" caption lines="3"
><em>{{ contact.profile.qualifica }}</em></q-item-label
>
<em>{{ contact.profile.qualifica }}</em>
<span v-if="contact.profile.note"><span v-if="contact.profile.qualifica"><br></span><em style="color: blue;">Note: {{ contact.profile.note }}</em></span>
</q-item-label
>
<q-item-label caption lines="1"></q-item-label>
<div v-if="visu === costanti.ASK_TRUST">

View File

@@ -26,6 +26,7 @@
:labelBtnAddExtra="`Aggiungi ` + title"
:prop_pagination="tools.getPagination()"
:groupname="groupname"
:extrafield="groupname"
:margin_right="30">
</CGridTableRec>

View File

View File

@@ -0,0 +1,77 @@
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 { CMyFieldDb } from '@/components/CMyFieldDb'
import { CMyFieldRec } from '@/components/CMyFieldRec'
import { IColGridTable, IOperators, ISpecialField, IUserFields } from 'model'
import MixinBase from '@/mixins/mixin-base'
import { useCalendarStore } from '@src/store/CalendarStore'
export default defineComponent({
name: 'CUserNote',
emits: ['closenote', 'save'],
props: {
username: String,
userprofile_param: {
type: Object as PropType<IUserFields>,
required: true,
}
},
components: { CMyFieldDb, CMyFieldRec },
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
const globalStore = useGlobalStore()
const shownote = ref(false)
const userprofile = ref(<IUserFields>{})
function mounted() {
shownote.value = true
userprofile.value = props.userprofile_param
}
function UpdateDbNote() {
const calendarStore = useCalendarStore()
const globalStore = useGlobalStore()
const { t } = useI18n()
const mydatatosave = {
id: userprofile.value._id,
table: 'users',
fieldsvalue: { 'profile.note': userprofile.value.profile.note }
}
globalStore.saveFieldValue(mydatatosave).then((esito) => {
if (esito) {
emit('save', userprofile.value)
tools.showPositiveNotif($q, t('db.recupdated'))
shownote.value = false
} else {
tools.showNegativeNotif($q, t('db.recfailed'))
}
})
}
onMounted(mounted)
return {
tools,
costanti,
fieldsTable,
globalStore,
shownote,
userprofile,
UpdateDbNote,
t,
}
},
})

View File

@@ -0,0 +1,60 @@
<template>
<div v-if="shownote" class="text-center q-ma-sm">
<q-dialog v-model="shownote" maximized>
<q-card>
<q-toolbar class="bg-primary text-white">
<q-toolbar-title> Note per {{ username }}: </q-toolbar-title>
<q-btn
flat
round
color="white"
icon="close"
@click="
$emit('closenote');
shownote = false;
"
></q-btn>
</q-toolbar>
<q-card-section>
Note per {{ username }} da parte del Facilitatore:
<br />
<CMyFieldRec
table="users"
:id="userprofile._id"
:rec="userprofile"
field="profile.note"
class="cursor-pointer"
:canEdit="true"
:canModify="true"
>
</CMyFieldRec>
</q-card-section>
<q-card-actions align="center">
<q-btn
filled
:label="t('dialog.save')"
color="primary"
@click="UpdateDbNote"
></q-btn>
<q-btn
filled
:label="$t('dialog.close')"
icon="close"
@click="
$emit('closenote');
shownote = false;
"
></q-btn>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script lang="ts" src="./CUserNote.ts">
</script>
<style lang="scss" scoped>
@import './CUserNote.scss';
</style>

View File

@@ -0,0 +1 @@
export {default as CUserNote} from './CUserNote.vue'

View File

@@ -132,6 +132,7 @@ export interface IUserProfile {
special_req?: boolean
sex?: ESexType
biografia?: string
note?: string
socio?: boolean
socioresidente?: boolean
consiglio?: boolean

View File

@@ -169,6 +169,7 @@
<CKeyAndValue mykey="Città di Nascita:" :myvalue="myuser.profile.born_city"></CKeyAndValue>
<CKeyAndValue mykey="Data di Nascita:" :mydate="myuser.profile.dateofbirth"></CKeyAndValue>
<CKeyAndValue mykey="Biografia:" :myvalue="myuser.profile.biografia"></CKeyAndValue>
<CKeyAndValue mykey="Note:" :myvalue="myuser.profile.note"></CKeyAndValue>
<CKeyAndValue mykey="qualifica:" :myvalue="myuser.profile.qualifica"></CKeyAndValue>
</div>

View File

@@ -46,6 +46,7 @@ const msg_it = {
},
profile: {
info_pers: 'Info Personali',
aggiungi_note: 'Aggiungi note',
annunci: 'Annunci',
share_link: 'Copia Link',
info_msg: 'Puoi compilare facoltativamente questi tuoi dati personali.',

View File

@@ -1151,6 +1151,15 @@ export const colmyGoods = [
icon: 'fas fa-users',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
}),
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: 'adType',
label_trans: 'adTypes.name',
@@ -1499,6 +1508,15 @@ export const colmySkills = [
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',
@@ -1692,6 +1710,15 @@ export const colmyHosp = [
icon: 'fas fa-users',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
}),
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: 'idContribType',
label_trans: 'contribtype.name',
@@ -3188,6 +3215,7 @@ export const colTableUsersCNM = [
}),
AddCol({ name: 'profile.motivazioni', field: 'profile', subfield: 'motivazioni', label_trans: 'reg.motivazioni' }),
AddCol({ name: 'profile.biografia', field: 'profile', subfield: 'biografia', label_trans: 'reg.biografia' }),
AddCol({ name: 'profile.note', field: 'profile', subfield: 'note', label_trans: 'reg.note' }),
AddCol({
name: 'profile.competenze_professionalita',
field: 'profile',
@@ -3465,6 +3493,7 @@ export const colTableUsersISP = [
}),
// AddCol({ name: 'profile.motivazioni', field: 'profile', subfield: 'motivazioni', label_trans: 'reg.motivazioni', }),
AddCol({ name: 'profile.biografia', field: 'profile', subfield: 'biografia', label_trans: 'reg.biografia' }),
AddCol({ name: 'profile.note', field: 'profile', subfield: 'note', label_trans: 'reg.note' }),
AddCol({ name: 'profile.qualifica', field: 'profile', subfield: 'qualifica', label_trans: 'reg.qualifica' }),
AddCol({
name: 'profile.paymenttypes',

View File

@@ -7320,7 +7320,7 @@ export const tools = {
return ris
},
getdefaultnewrec_MySkill(groupname?: string): any {
getdefaultnewrec_MySkill(extrarec: any): any {
return {
idSector: tools.getSelectionByTable('sectors', 0, true),
@@ -7336,11 +7336,11 @@ export const tools = {
//**ADDFIELD_MYSKILL
website: '',
descr: '',
groupname,
groupname: extrarec && extrarec.groupname ? extrarec.groupname : '',
}
},
getdefaultnewrec_MyGoods(): any {
getdefaultnewrec_MyGoods(extrarec: any): any {
return {
// idSectorGood: 0,
// idGood: 0,
@@ -7366,6 +7366,7 @@ export const tools = {
//**ADDFIELD_MYSKILL
website: '',
descr: '',
groupname: extrarec && extrarec.groupname ? extrarec.groupname : '',
}
},
@@ -7442,7 +7443,7 @@ export const tools = {
}
},
getdefaultnewrec_MyHosp(): any {
getdefaultnewrec_MyHosp(extrarec: any): any {
return {
visibile: true,
adType: tools.getSelectionByTable('adtypes', costanti.AdType.OFFRO),
@@ -7455,6 +7456,7 @@ export const tools = {
descr: '',
note: '',
website: '',
groupname: extrarec && extrarec.groupname ? extrarec.groupname : '',
}
},
@@ -8367,13 +8369,13 @@ export const tools = {
getdefaultnewrec(table: string, extrarec?: any): any {
if (table === toolsext.TABMYSKILLS) {
return tools.getdefaultnewrec_MySkill()
return tools.getdefaultnewrec_MySkill(extrarec)
} else if (table === toolsext.TABMYBACHECAS) {
return tools.getdefaultnewrec_MyBacheca(extrarec)
} else if (table === toolsext.TABMYHOSPS) {
return tools.getdefaultnewrec_MyHosp()
return tools.getdefaultnewrec_MyHosp(extrarec)
} else if (table === toolsext.TABMYGOODS) {
return tools.getdefaultnewrec_MyGoods()
return tools.getdefaultnewrec_MyGoods(extrarec)
} else if (table === toolsext.TABMYGROUPS) {
return tools.getdefaultnewrec_MyGroup()
} else if (table === toolsext.TABCIRCUITS) {
@@ -8498,6 +8500,15 @@ export const tools = {
lk_as: 'mycities',
af_objId_tab: '',
},
lookup5: {
lk_tab: 'mygroups',
lk_LF: 'groupname',
lk_FF: 'groupname',
lk_as: 'mygrp',
lk_proj: shared_consts.getProjectForAll({}, table),
unwind: true,
noarray: true,
},
}
} else if (table === toolsext.TABMYBACHECAS) {
return {
@@ -8566,6 +8577,15 @@ export const tools = {
af_objId_tab: '',
lk_proj: shared_consts.getProjectForAll({}, table),
},
lookup3: {
lk_tab: 'mygroups',
lk_LF: 'groupname',
lk_FF: 'groupname',
lk_as: 'mygrp',
lk_proj: shared_consts.getProjectForAll({}, table),
unwind: true,
noarray: true,
},
}
} else {
@@ -8593,13 +8613,22 @@ export const tools = {
lk_as: 'sector',
af_objId_tab: '',
},
lookup5: {
lookup4: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
lookup5: {
lk_tab: 'mygroups',
lk_LF: 'groupname',
lk_FF: 'groupname',
lk_as: 'mygrp',
lk_proj: shared_consts.getProjectForAll({}, table),
unwind: true,
noarray: true,
},
}
}
},

View File

@@ -34,11 +34,11 @@ export default defineComponent({
label: 'Filtra per',
table: shared_consts.TABFILTRI_UTENTE,
key: '',
type: costanti.FieldType.select,
value: tools.getCookie(tools.COOK_SEARCH + 'filtroutente', costanti.FILTER_TUTTI),
type: costanti.FieldType.multiselect,
value: 0,
keycookie: '_fu',
addall: false,
arrvalue: [],
arrvalue: tools.getCookie(tools.COOK_SEARCH + costanti.FILTER_SEP + 'users' + costanti.FILTER_SEP + shared_consts.TABFILTRI_UTENTE + '_fu', []),
filter: null,
useinput: false,
icon: 'fas fa-filter'
@@ -106,6 +106,7 @@ export default defineComponent({
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.note': 1,
'profile.resid_province': 1,
'mycities.reg': 1,
}

View File

@@ -43,6 +43,11 @@ export default defineComponent({
const { t } = useI18n()
const animation = ref('fade')
const tabevents = ref('new')
const mycards = computed(() => {
return costanti.MAINCARDS.filter((rec: any) => rec.table && rec.showinprofile)
})
const groupname = computed(() => $route.params.groupname ? $route.params.groupname.toString() : '')
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
@@ -53,6 +58,7 @@ export default defineComponent({
const showsendCoinTo = ref(false)
const tabcircuit = ref('info')
const filtro_eventi = ref(<any[]>[])
const mygrp = ref(<IMyGroup | null>{})
const mystatus = ref(<number>0)
@@ -106,7 +112,7 @@ export default defineComponent({
if (circuitslist.value) {
circuitslistOpt.value = []
for (let i = 0; i < circuitslist.value.length; i++) {
circuitslistOpt.value.push({label: circuitslist.value[i].name, value: i })
circuitslistOpt.value.push({ label: circuitslist.value[i].name, value: i })
let myc = data.mygroup.mycircuits.find((circ: IMyCircuit) => circ.circuitname === circuitslist.value[i].name)
if (myc) {
circuitslist.value[i].account = myc.account
@@ -140,6 +146,7 @@ export default defineComponent({
arrfilterand.value = []
filtercustom_rich.value = []
//++TODO: sistemare la filtercustom ... richieste...
}
@@ -213,11 +220,34 @@ export default defineComponent({
}
}
function filtroeventsgroup() {
function filtrotables(table: string, quale: string) {
let out = []
if (mygrp.value)
return [{ groupname: mygrp.value.groupname }]
else
return null
out.push({ groupname: mygrp.value.groupname })
if (table === shared_consts.TABLES_MYBACHECAS) {
let mydate = tools.addDays(tools.getDateNow(), -1)
let mydateend = tools.addDays(mydate, 180)
mydate = tools.getstrYYMMDDDate(mydate)
mydateend = tools.getstrYYMMDDDate(mydateend)
if (quale === 'new') {
filtro_eventi.value = [{ dateTimeStart: { $gte: mydate, $lte: mydateend } }]
} else {
mydate = tools.addDays(tools.getDateNow(), -365)
mydateend = tools.addDays(tools.getDateNow(), 0)
mydate = tools.getstrYYMMDDDate(mydate)
mydateend = tools.getstrYYMMDDDate(mydateend)
filtro_eventi.value = [{ dateTimeStart: { $gte: mydate, $lte: mydateend } }]
}
filtro_eventi.value.forEach((rec: any) => [
out.push({ ...rec })
])
}
return out
}
function getlinkpage() {
@@ -270,9 +300,11 @@ export default defineComponent({
tabcircuit,
circuitIndex,
circuitslistOpt,
filtroeventsgroup,
filtrotables,
getlinkpage,
showsendCoinTo,
mycards,
tabevents,
}
}
})

View File

@@ -204,6 +204,11 @@
name="members"
icon="fas fa-users"
></q-tab>
<q-tab
:label="t('profile.annunci')"
name="annunci"
icon="fas fa-pencil-alt"
></q-tab>
<q-tab
v-if="
tools.iCanShowGroupsMember(mygrp) ||
@@ -213,11 +218,6 @@
name="circuits"
icon="img: images/1ris_rosso_100.png"
></q-tab>
<q-tab
:label="t('groups.events')"
name="events"
icon="fas fa-bullhorn"
></q-tab>
</q-tabs>
<q-tab-panels v-model="tabgrp" animated keep-alive>
@@ -511,7 +511,7 @@
></q-tab>
</q-tabs>
</q-tab-panel>
<q-tab-panel name="events"></q-tab-panel>
<q-tab-panel name="annunci"></q-tab-panel>
</q-tab-panels>
<div v-if="tabgrp === 'circuits' && tabcircuit === 'info'">
@@ -604,17 +604,59 @@
></CGridTableRec>
</div>
</div>
<div v-if="tabgrp === 'events'">
<div v-if="tabgrp === 'annunci'">
<div v-for="(card, ind) of mycards" :key="ind" :name="card.table">
<div
v-if="card.table !== 'mygroups' && card.table !== 'circuits'"
>
<div
v-if="card.table !== 'mygroups' && card.table !== 'circuits'"
>
<div v-if="card.table === shared_consts.TABLES_MYBACHECAS">
<q-tabs v-model="tabevents" class="text-teal">
<q-tab label="Eventi Passati" name="past"></q-tab>
<q-tab label="Prossimi Eventi" name="new"></q-tab>
</q-tabs>
<q-tab-panels v-model="tabevents" animated>
<q-tab-panel name="past">
<CSkill
v-if="filtroeventsgroup()"
:groupname="mygrp.groupname"
:table="shared_consts.TABLES_MYBACHECAS"
:filtercustom="filtroeventsgroup()"
:table="card.table"
:filtercustom="filtrotables(card.table, tabevents)"
:butt_modif_new="tools.iAmAdminGroup(groupname)"
:visuinpage="true"
:noaut="false"
:title="$t('groups.events')"
:title="card.title"
/>
</q-tab-panel>
<q-tab-panel name="new">
<CSkill
:groupname="mygrp.groupname"
:table="card.table"
:filtercustom="filtrotables(card.table, tabevents)"
:butt_modif_new="tools.iAmAdminGroup(groupname)"
:visuinpage="true"
:noaut="false"
:title="card.title"
/>
</q-tab-panel>
</q-tab-panels>
</div>
<div v-else>
<CSkill
:groupname="mygrp.groupname"
:table="card.table"
:filtercustom="filtrotables(card.table, '')"
:butt_modif_new="tools.iAmAdminGroup(groupname)"
:visuinpage="true"
:noaut="false"
:title="card.title"
/>
</div>
</div>
</div>
</div>
</div>
<div v-if="tabgrp === 'members' && tabmembers === 'all'">
<CGridTableRec
@@ -696,8 +738,6 @@
>
</CSendCoins>
</div>
</template>
<script lang="ts" src="./mygroup.ts">

View File

@@ -7,6 +7,7 @@ import { CCopyBtn } from '@/components/CCopyBtn'
import { CSkill } from '@/components/CSkill'
import { CDateTime } from '@/components/CDateTime'
import { CMyGroup } from '@/components/CMyGroup'
import { CUserNote } from '@/components/CUserNote'
import { CMyCircuit } from '@/components/CMyCircuit'
import { CNotifAtTop } from '@src/components/CNotifAtTop'
import { CMyActivities } from '@src/components/CMyActivities'
@@ -38,7 +39,7 @@ export default defineComponent({
components: {
CProfile, CTitleBanner, CMyFieldDb, CSkill, CDateTime, CCopyBtn, CUserNonVerif, CMyFieldRec, CMyUser,
CMyGroup, CLabel, CMyCircuit, CSendCoins, CNotifAtTop,
CCheckIfIsLogged, CTimeAgo, CContactUser, CMyActivities,
CCheckIfIsLogged, CTimeAgo, CContactUser, CMyActivities, CUserNote,
},
props: {},
setup() {
@@ -54,6 +55,7 @@ export default defineComponent({
const animation = ref('fade')
const spinner_visible = ref(false)
const shownote = ref(false)
const usersList = ref({ show: false, title: '', list: [] })
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
@@ -71,6 +73,7 @@ export default defineComponent({
const showinghand = ref(false)
const actualcard = ref('mygoods')
const mostranota = ref(false)
const notifStore = useNotifStore()
@@ -196,6 +199,11 @@ export default defineComponent({
spinner_visible.value = false
}
function salvaUserProv(userprofile: IUserFields) {
if (userprofile)
userStore.userprofile = userprofile
}
return {
username,
getlinkpage,
@@ -238,6 +246,9 @@ export default defineComponent({
spinner_visible,
showed,
tab,
shownote,
mostranota,
salvaUserProv,
}
}
})

View File

@@ -118,6 +118,17 @@
>
{{ userStore.userprofile.profile.biografia }}
</div>
<div
v-if="
userStore.userprofile &&
userStore.userprofile.profile.note &&
(userStore.isFacilitatore || userStore.isAdmin)
"
class="col-12 text-h8 q-mt-sm"
>
Note del Facilitatore:<br />
{{ userStore.userprofile.profile.note }}
</div>
</div>
</div>
<CCheckIfIsLogged></CCheckIfIsLogged>
@@ -210,6 +221,33 @@
</span>
</div>
<div
v-if="
userStore.userprofile &&
userStore.userprofile.profile.note &&
(userStore.isFacilitatore || userStore.isAdmin)
"
class="col-12 text-h8 q-mt-sm"
>
<div v-if="!mostranota" class="text-center">
<q-btn
label="Note del Facilitatore"
@click="mostranota = true"
color="green"
>
<q-badge color="red" floating>1</q-badge>
</q-btn>
</div>
<div v-else>
<strong>Note del Facilitatore</strong>:<br />
<q-banner rounded class="bg-green-8 text-white">
<div class="text-h7 text-center">
{{ userStore.userprofile.profile.note }}
</div>
</q-banner>
</div>
</div>
<CContactUser
:myuser="userStore.userprofile"
:showBtnActivities="false"
@@ -725,11 +763,7 @@
</q-tab-panels>
</div>
</div>
<q-page-sticky
position="top-right"
:offset="[18, 18]"
class="z-top"
>
<q-page-sticky position="top-right" :offset="[18, 18]" class="z-top">
<q-fab
icon="fas fa-ellipsis-v"
color="accent"
@@ -752,6 +786,14 @@
:label="$t('shared.edit_profile')"
@click.stop="gotoPage('/editprofile')"
/>
<q-fab-action
label-position="right"
v-if="userStore.isFacilitatore || userStore.isAdmin"
color="red"
icon="fas fa-pencil-alt"
:label="$t('profile.aggiungi_note')"
@click="shownote = !shownote"
/>
</q-fab>
</q-page-sticky>
<q-dialog v-model="showPic" full-height full-width>
@@ -828,6 +870,14 @@
</q-card-section>
</q-card>
</q-dialog>
<div v-if="shownote">
<CUserNote
:username="username"
:userprofile_param="userStore.userprofile"
@closenote="shownote = false"
@save="salvaUserProv"
/>
</div>
</template>
<script lang="ts" src="./myprofile.ts">