++ aggiunta la prenotazione negli eventi. con la lista degli utenti.

This commit is contained in:
Surya Paolo
2023-04-17 00:11:45 +02:00
parent 6f1f962c0a
commit 3cf4562285
38 changed files with 2016 additions and 1278 deletions

View File

@@ -170,6 +170,8 @@ export const shared_consts = {
TABLES_MYHOSPS: 'myhosps',
TABLES_MYGOODS: 'mygoods',
TABLES_MYEVENTS: 'myevents',
TABLES_CIRCUITS: 'circuits',
TABLES_MYGROUPS: 'mygroups',
MYTABS: [{ id: 0, table: 'none' },
{ id: 1, table: 'myskills' },
@@ -1072,6 +1074,8 @@ export const shared_consts = {
TYPEDIR_EVENTS: 2,
ID_EVENTS_NEW_REC: 1,
ID_EVENTS_REMOVE_REC: 2,
ID_EVENTS_ATTEND: 4,
ID_EVENTS_SEND_MSG: 8,
TYPEDIR_FRIENDS: 3,
ID_FRIENDS_NEW_REC: 1,
@@ -1181,6 +1185,10 @@ export const shared_consts = {
{
value: 1, // ID_EVENTS_NEW_REC
labeltrans: 'notifsid.events_new',
},
{
value: 4, // ID_EVENTS_ATTEND
labeltrans: 'notifsid.attend_new',
}
],
},
@@ -1267,10 +1275,15 @@ export const shared_consts = {
directory: 1,
},
{
value: 1, //
value: 1, // ID_EVENTS_NEW_REC
labeltrans: 'notifs.new_event',
directory: 2,
},
{
value: 4, // ID_EVENTS_ATTEND
labeltrans: 'notifs.new_attend',
directory: 2,
},
{
value: 1, //
labeltrans: 'notifs.new_friends',
@@ -1573,6 +1586,11 @@ export const shared_consts = {
UP_LEFT: 5,
},
TABLETYPE: {
DefaultCal: 0,
MyBachecas: 1,
},
getStatusStr(status: number) {
const trovatorec = this.OrderStatusStr.find((rec) => rec.value === status)
return (trovatorec) ? trovatorec.label : ''
@@ -1587,7 +1605,147 @@ export const shared_consts = {
return ['_id', 'username', 'group', 'email', 'name', 'surname', 'perm', 'date_reg', 'verified_email', 'notask_verif', 'verified_by_aportador', 'trust_modified', 'img', 'ipaddr', 'lasttimeonline', 'profile', 'news_on']
},
getProjectForAll(proj_add: any) {
getProjectByTable(table: string, proj_add?: any) {
let proj = {}
if (table === this.TABLES_MYGOODS) {
proj = {
'recGood': 1,
'sectorGood': 1,
'idSectorGood': 1,
'idGood': 1,
'idShipping': 1,
'idStatusGood': 1,
groupname: 1,
//**ADDFIELD_MYGOOD
}
} else if (table === this.TABLES_MYGROUPS) {
proj = {
groupname: 1,
title: 1,
descr: 1,
img: 1,
visibility: 1,
admins: 1,
idCatGrp: 1,
date_created: 1,
date_updated: 1,
photos: 1,
idCity: 1,
note: 1,
website: 1,
link_telegram: 1,
comune: 1,
mycities: 1,
sector: 1,
recCatGrp: 1,
}
} else if (table === this.TABLES_CIRCUITS) {
proj = {
_id: 1,
groupnameId: 1,
path: 1,
name: 1,
strProv: 1,
subname: 1,
longdescr: 1,
regulation: 1,
numMembers: 1,
totCircolante: 1,
totTransato: 1,
systemUserId: 1,
createdBy: 1,
date_created: 1,
date_updated: 1,
nome_valuta: 1,
fido_scoperto_default: 1,
deperimento: 1,
status: 1,
transactionsEnabled: 1,
qta_max_default: 1,
fido_scoperto_default_grp: 1,
qta_max_default_grp: 1,
valuta_per_euro: 1,
symbol: 1,
idCity: 1,
pub_to_share: 1,
visibility: 1,
color: 1,
abbrev: 1,
data_costituz: 1,
photos: 1,
admins: 1,
req_users: 1,
refused_users: 1,
'mycities': 1,
//**ADDFIELD_CIRCUITS
}
} else if (table === this.TABLES_MYSKILLS) {
proj = {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
website: 1,
groupname: 1,
//**ADDFIELD_MYSKILL
}
} else if (table === this.TABLES_MYHOSPS) {
proj = {
visibile: 1,
typeHosp: 1,
numMaxPeopleHosp: 1,
accomodation: 1,
preferences: 1,
idContribType: 1,
photos: 1,
idCity: 1,
note: 1,
website: 1,
link_maplocation: 1,
groupname: 1,
}
} else if (table === this.TABLES_MYBACHECAS) {
proj = {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
// 'idSubSkill': 1,
idStatusSkill: 1,
idContribType: 1,
dateTimeStart: 1,
dateTimeEnd: 1,
website: 1,
organisedBy: 1,
contact_phone: 1,
contact_telegram: 1,
address: 1,
min_partecip: 1,
max_partecip: 1,
contribstr: 1,
link_maplocation: 1,
groupname: 1,
//**ADDFIELD_MYBACHECAS
}
}
if (proj_add)
proj = Object.assign({}, proj, proj_add);
return proj;
},
getProjectForAll(proj_add: any, table?: string) {
let proj = {
idContribType: 1,
idCity: 1,
@@ -1613,7 +1771,11 @@ export const shared_consts = {
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.attend': 1,
'profile.seen': 1,
'mygrp.groupname': 1,
'mygrp.title': 1,
'mygrp.photos': 1,
reported: 1,
date_report: 1,
username_who_report: 1,
@@ -1624,6 +1786,11 @@ export const shared_consts = {
if (proj_add)
proj = Object.assign({}, proj, proj_add);
if (table) {
let proj_add3 = this.getProjectByTable(table);
proj = Object.assign({}, proj, proj_add3);
}
return proj;
},

View File

@@ -27,6 +27,7 @@ import { useMessageStore } from '@store/MessageStore'
import { static_data } from '@/db/static_data'
import { lists } from '@store/Modules/lists'
import translate from '@/globalroutines/util'
import { shared_consts } from '@src/common/shared_vuejs'
export default defineComponent({
name: 'CEventsCalendar',
@@ -82,8 +83,10 @@ export default defineComponent({
const formbookEventDefault = ref(<IBookedEvent>{
userId: '',
username: '',
msgbooking: '',
infoevent: '',
tableType: shared_consts.TABLETYPE.DefaultCal,
numpeople: 1,
numpeopleLunch: 0,
numpeopleDinner: 0,
@@ -94,14 +97,8 @@ export default defineComponent({
})
const formAskForDefault = ref(<IMessage>{
dest: {
idapp: process.env.APP_ID,
username: ''
},
origin: {
idapp: process.env.APP_ID,
username: ''
},
dest: '',
origin: '',
message: ''
})
@@ -151,15 +148,9 @@ export default defineComponent({
})
const bookEventForm = ref({ ...formbookEventDefault.value })
const askInfoForm = ref(<IMessage>{
dest: {
idapp: process.env.APP_ID,
username: ''
},
origin: {
idapp: process.env.APP_ID,
username: ''
},
message: ''
dest: '',
origin: '',
message: '',
})
const displayEvent = ref(false)
const myevent = ref({})
@@ -402,6 +393,8 @@ export default defineComponent({
myevent.value = eventparam
askInfoForm.value = {
origin: '',
dest: '',
message: ''
}
@@ -610,7 +603,7 @@ export default defineComponent({
function EditBookEvent(myevent: IEvents) {
const bookedevent: any = calendarStore.findEventBooked(myevent, false)
const bookedevent: any = calendarStore.findEventBooked(myevent._id, false)
console.log('bookedevent', bookedevent)
@@ -639,10 +632,8 @@ export default defineComponent({
event_id: myevent._id,
infoevent: tools.gettextevent(myevent)
},
dest: {
idapp: process.env.APP_ID,
username: myevent.teacher
},
origin: userStore.my.username,
dest: myevent.teacher!,
message: askInfoForm.value.message
}
@@ -668,6 +659,8 @@ export default defineComponent({
const data: IBookedEvent = {
userId: userStore.my._id,
id_bookedevent: myevent._id,
username: bookEventForm.value.username,
tableType: shared_consts.TABLETYPE.DefaultCal,
numpeople: bookEventForm.value.numpeople,
numpeopleLunch: bookEventForm.value.numpeopleLunch,
numpeopleDinner: bookEventForm.value.numpeopleDinner,

View File

@@ -981,434 +981,6 @@ export default defineComponent({
}
function extraparams() {
if (props.table === toolsext.TABMYGROUPS) {
let lk_tab = 'mygroups'
let lk_LF = 'userId'
let lk_FF = '_id'
let lk_as = 'group'
let af_objId_tab = 'myId'
return {
lookup1: {
lk_tab,
lk_LF,
lk_FF,
lk_as,
af_objId_tab,
lk_proj: {
groupname: 1,
title: 1,
descr: 1,
img: 1,
visibility: 1,
admins: 1,
idCatGrp: 1,
date_created: 1,
date_updated: 1,
photos: 1,
idCity: 1,
note: 1,
link_telegram: 1,
website: 1,
comune: 1,
mycities: 1,
sector: 1,
}
},
lookup2: {
lk_tab: 'catgrps',
lk_LF: 'idCatGrp',
lk_FF: '_id',
lk_as: 'recCatGrp',
lk_proj: {
groupname: 1,
title: 1,
descr: 1,
img: 1,
visibility: 1,
admins: 1,
idCatGrp: 1,
date_created: 1,
date_updated: 1,
photos: 1,
idCity: 1,
note: 1,
website: 1,
link_telegram: 1,
comune: 1,
mycities: 1,
sector: 1,
recCatGrp: 1,
}
},
lookup3: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'comune',
lk_proj: {
groupname: 1,
title: 1,
descr: 1,
img: 1,
idCatGrp: 1,
date_created: 1,
date_updated: 1,
visibility: 1,
admins: 1,
photos: 1,
idCity: 1,
note: 1,
//**ADDFIELD_MYGROUPS
website: 1,
link_telegram: 1,
comune: 1,
mycities: 1,
recCatGrp: 1,
}
},
lookup5: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
} else if (props.table === toolsext.TABCIRCUITS) {
let lk_tab = 'cities'
let lk_LF = 'idCity'
let lk_FF = '_id'
let lk_as = 'mycities'
let af_objId_tab = ''
return {
lookup1: {
lk_tab,
lk_LF,
lk_FF,
lk_as,
af_objId_tab,
lk_proj: {
_id: 1,
groupnameId: 1,
path: 1,
name: 1,
strProv: 1,
subname: 1,
longdescr: 1,
regulation: 1,
numMembers: 1,
totCircolante: 1,
totTransato: 1,
systemUserId: 1,
createdBy: 1,
date_created: 1,
date_updated: 1,
nome_valuta: 1,
fido_scoperto_default: 1,
deperimento: 1,
status: 1,
transactionsEnabled: 1,
qta_max_default: 1,
fido_scoperto_default_grp: 1,
qta_max_default_grp: 1,
valuta_per_euro: 1,
symbol: 1,
idCity: 1,
pub_to_share: 1,
visibility: 1,
color: 1,
abbrev: 1,
data_costituz: 1,
photos: 1,
admins: 1,
req_users: 1,
refused_users: 1,
'mycities': 1,
}
},
}
} else if (props.table === toolsext.TABMYGOODS) {
return {
lookup1: {
lk_tab: 'users',
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'goods',
lk_LF: 'idGood',
lk_FF: '_id',
lk_as: 'recGood',
af_objId_tab: '',
lk_proj: {
recGood: 1,
sectorGood: 1,
idSectorGood: 1,
idGood: 1,
mygood: 1,
idStatusSkill: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
website: 1,
//**ADDFIELD_MYSKILL
descr: 1,
date_created: 1,
date_updated: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
lasttimeonline: 1,
comune: 1,
mycities: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
reported: 1,
date_report: 1,
username_who_report: 1,
}
},
lookup3: {
lk_tab: 'sectorgoods',
// lk_LF: 'recGood.idSectorGood',
lk_LF: 'idSectorGood',
lk_FF: '_id',
lk_as: 'sectorGood',
af_objId_tab: '',
},
lookup5: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
} else if (props.table === toolsext.TABMYBACHECAS) {
return {
// Servizi
lookup1: {
lk_tab: 'users',
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'skills',
lk_LF: 'idSkill',
lk_FF: '_id',
lk_as: 'recSkill',
af_objId_tab: '',
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
// idSubSkill: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
dateTimeStart: 1,
dateTimeEnd: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
website: 1,
//**ADDFIELD_MYSKILL
descr: 1,
date_created: 1,
date_updated: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
lasttimeonline: 1,
comune: 1,
mycities: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
reported: 1,
date_report: 1,
username_who_report: 1,
}
},
lookup3: {
lk_tab: toolsext.TABSECTORS,
// lk_LF: 'recSkill.idSector',
lk_LF: 'idSector',
lk_FF: '_id',
lk_as: 'sector',
af_objId_tab: '',
},
lookup5: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
} else if (props.table === toolsext.TABMYHOSPS) {
let obj2: any = {}
if (myrecfiltertoggle.value === tools.FILTER_ALL) {
obj2['visibile'] = true
}
return {
// Servizi
filtersearch2: [obj2],
lookup1: {
lk_tab: 'users',
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
lk_proj: {
visibile: 1,
typeHosp: 1,
numMaxPeopleHosp: 1,
accomodation: 1,
preferences: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
photos: 1,
idCity: 1,
pub_to_share: 1,
note: 1,
website: 1,
link_maplocation: 1,
descr: 1,
date_created: 1,
date_updated: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
lasttimeonline: 1,
comune: 1,
mycities: 1,
'profile.img': 1,
}
},
}
} else {
return {
// Servizi
lookup1: {
lk_tab: 'users',
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'skills',
lk_LF: 'idSkill',
lk_FF: '_id',
lk_as: 'recSkill',
af_objId_tab: '',
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
// idSubSkill: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
website: 1,
//**ADDFIELD_MYSKILL
descr: 1,
date_created: 1,
date_updated: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
lasttimeonline: 1,
comune: 1,
mycities: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
reported: 1,
date_report: 1,
username_who_report: 1,
}
},
lookup3: {
lk_tab: toolsext.TABSECTORS,
// lk_LF: 'recSkill.idSector',
lk_LF: 'idSector',
lk_FF: '_id',
lk_as: 'sector',
af_objId_tab: '',
},
lookup5: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
}
}
function mySortFieldsAvailable() {
if (props.table === toolsext.TABUSER) {
@@ -1418,22 +990,6 @@ export default defineComponent({
return []
}
function getdefaultnewrec(): any {
if (props.table === toolsext.TABMYSKILLS) {
return tools.getdefaultnewrec_MySkill()
} else if (props.table === toolsext.TABMYBACHECAS) {
return tools.getdefaultnewrec_MyBacheca()
} else if (props.table === toolsext.TABMYHOSPS) {
return tools.getdefaultnewrec_MyHosp()
} else if (props.table === toolsext.TABMYGOODS) {
return tools.getdefaultnewrec_MyGoods()
} else if (props.table === toolsext.TABMYGROUPS) {
return tools.getdefaultnewrec_MyGroup()
} else if (props.table === toolsext.TABCIRCUITS) {
return tools.getdefaultnewrec_Circuit()
}
return null
}
function doSearch() {
@@ -1446,7 +1002,6 @@ export default defineComponent({
t,
tools,
costanti,
extraparams,
arrfilterand,
filtercustom,
searchList,
@@ -1459,7 +1014,6 @@ export default defineComponent({
col_tabfooter,
col,
toolsext,
getdefaultnewrec,
mypagination,
noMsgRecord,
showType,

View File

@@ -55,11 +55,11 @@
:arrfilters="arrfilterand"
:filtercustom="filtercustom"
:prop_searchList="searchList"
:defaultnewrec="getdefaultnewrec"
:defaultnewrec="tools.getdefaultnewrec(table)"
labelBtnAddRow="NONE"
:prop_SortFieldsAvailable="mySortFieldsAvailable"
:labelBtnAddExtra="noButtAdd ? `` : ``"
:extraparams="extraparams()"
:extraparams="tools.extraparams(table, {myrecfiltertoggle})"
>
</CGridTableRec>
</div>

View File

@@ -116,7 +116,7 @@
<div v-if="edit" class="q-gutter-sm " style="max-height: 200px; width: 208px;">
<q-uploader
label="Aggiungi Immagine"
accept="image/jpeg, image/jpg, image/png, .pdf"
accept="image/*"
:url="getUrl()"
:headers="tools.getheaders()"
:max-file-size="3000000"
@@ -234,7 +234,7 @@
<div class="q-gutter-sm " style="max-height: 200px; width: 208px;">
<q-uploader
label="Aggiungi Immagine"
accept="image/jpeg, image/jpg, image/png, .pdf"
accept="image/*"
:url="getUrl()"
:headers="tools.getheaders()"
:max-file-size="40000000"

View File

@@ -283,7 +283,12 @@ export default defineComponent({
type: String,
required: false,
default: 'elementi trovati',
}
},
groupname: {
type: String,
required: false,
default: '',
},
},
components: {
CMyPopupEdit, CTitleBanner, CMyFieldDb, CMySelect, CMyFriends, CMyGroups,
@@ -350,7 +355,7 @@ export default defineComponent({
const separator = 'horizontal'
const myfilter = ref('')
const myfilterand: any = ref([])
let rowsel: any = {}
const rowsel: any = ref({})
const dark = true
const canEdit = ref(false)
@@ -1274,7 +1279,7 @@ export default defineComponent({
console.log('newRecord', newRecord)
}
}
rowsel = item
rowsel.value = item
idsel = item._id
colsel.value = col
}
@@ -1284,11 +1289,11 @@ export default defineComponent({
// console.table(serverData)
if (colsel.value) {
if (colsel.value.subfield !== '') {
if (rowsel[colsel.value.field!] === undefined)
rowsel[colsel.value.field!] = {}
rowsel[colsel.value.field!][colsel.value.subfield!] = valPrec
if (rowsel.value[colsel.value.field!] === undefined)
rowsel.value[colsel.value.field!] = {}
rowsel.value[colsel.value.field!][colsel.value.subfield!] = valPrec
} else {
rowsel[colsel.value.field!] = valPrec
rowsel.value[colsel.value.field!] = valPrec
}
}
@@ -1308,8 +1313,8 @@ export default defineComponent({
function showandsel(row: any, col: any, newval: any, valinitial: any) {
// console.log('showandsel CGridTable', row, col, newval)
rowsel = row
console.log('showandsel CGridTable', row, col, newval)
rowsel.value = row
colsel.value = col
idsel = row._id
SaveValue(newval, valinitial)
@@ -1335,7 +1340,7 @@ export default defineComponent({
}
function SaveValue(newVal: any, valinitial: any) {
// console.log('SaveValue', newVal)
console.log('SaveValue', newVal)
// console.log('rowsel', rowsel, 'colsel', colsel.value)
let myfield = ''
let subf = ''
@@ -1344,15 +1349,19 @@ export default defineComponent({
subf = colsel.value.subfield!
}
let myrec = rowsel.value
if (newRecordBool.value)
myrec = newRecord.value
if (myfield) {
if (colsel.value) {
// Update value in table memory
if (subf !== '') {
if (rowsel[myfield] === undefined)
rowsel[myfield] = {}
rowsel[myfield][subf] = newVal
if (myrec[myfield] === undefined)
myrec[myfield] = {}
myrec[myfield][subf] = newVal
} else {
rowsel[myfield] = newVal
myrec[myfield] = newVal
}
}
@@ -1374,13 +1383,8 @@ export default defineComponent({
}
}
// if (colsel.value)
// console.log(' -> rowsel[myfield]', rowsel[myfield])
valPrec = valinitial
// console.log('rowsel FINALE', rowsel)
saveFieldValue(mydata)
}
}
@@ -1431,7 +1435,9 @@ export default defineComponent({
// @ts-ignore
if (props.defaultnewrec) {
// @ts-ignore
newRecord.value = props.defaultnewrec()
newRecord.value = props.defaultnewrec
} else {
newRecord.value = tools.getdefaultnewrec(mytable.value, {groupname: props.groupname})
}
if (!newRecord.value) {
newRecord.value = {}
@@ -2089,6 +2095,14 @@ export default defineComponent({
function cmdExt(cmd: any, id: any, val2: any) {
console.log('cmd', cmd)
if (cmd === costanti.CMD_CLONE) {
const myarr = serverData.value.find((rec: any) => rec._id === id)
newRecord.value = myarr
newRecord.value._id = 0
newRecordBool.value = true
return true;
}
if (cmd === costanti.CMD_SHOW_PAGE) {
visupagedialog.value = true
myrecdialog.value = id
@@ -2103,6 +2117,8 @@ export default defineComponent({
action = lists.MenuAction.DELETE_RECTABLE
} else if (cmd === costanti.CMD_MODIFY) {
action = lists.MenuAction.CAN_EDIT_TABLE
} else if (cmd === costanti.CMD_DUPLICATE) {
action = lists.MenuAction.DUPLICATE_RECTABLE
}
@@ -2314,6 +2330,7 @@ export default defineComponent({
ordinam,
ordinam_desc,
getNumFilterSelected,
rowsel,
}
}
})

View File

@@ -370,7 +370,7 @@
<div
v-if="
row.dateTimeStart &&
tools.getstrVeryShortDate(row.dateTimeStart) !== actual
(tools.getstrVeryShortDate(row.dateTimeStart) !== actual) || index === 0
"
class="actualdate"
>
@@ -1176,7 +1176,6 @@
<q-space />
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-bar>
<q-card-section class="inset-shadow">
<div
:class="$q.screen.lt.sm ? `` : `row` + ` text-blue `"

View File

@@ -5,9 +5,11 @@ import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CDateTime } from '@/components/CDateTime'
import { CMyPage } from '@/components/CMyPage'
import { CMyGroup } from '@/components/CMyGroup'
import { CMyChipList } from '@/components/CMyChipList'
import { CMyFieldRec } from '@/components/CMyFieldRec'
import { CMyUser } from '@/components/CMyUser'
import { CLabel } from '@/components/CLabel'
import { CGalleryImages } from '@/components/CGalleryImages'
import { CAccomodation } from '@/components/CAccomodation'
import { tools } from '@store/Modules/tools'
@@ -18,18 +20,22 @@ import { useI18n } from '@/boot/i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
import { IColGridTable, IImgGallery, IUserFields } from 'model'
import { EState, IBookedEventPage, IColGridTable, IBookedEvent, IEvents, IMessage, IMessagePage, IParamDialog } from '@model'
import { shared_consts } from '@/common/shared_vuejs'
import { colCitys, fieldsTable } from '@store/Modules/fieldsTable'
import { useRoute, useRouter } from 'vue-router'
import { useNotifStore } from '@store/NotifStore'
import { lists } from '@store/Modules/lists'
import translate from '@/globalroutines/util'
import { useMessageStore } from '@src/store/MessageStore'
import mixinEvents from '@src/mixins/mixin-events'
export default defineComponent({
name: 'CMyCardService',
components: {
CProfile, CTitleBanner,
CMyFieldDb, CDateTime, CMyPage, CMyFieldRec, CAccomodation,
CMyUser, CGalleryImages, CMyChipList
CMyUser, CGalleryImages, CMyChipList, CLabel, CMyGroup
},
props: {
table: {
@@ -56,22 +62,81 @@ export default defineComponent({
const userStore = useUserStore()
const calendarStore = useCalendarStore()
const messageStore = useMessageStore()
const notifStore = useNotifStore()
const globalStore = useGlobalStore()
const $q = useQuasar()
const $route = useRoute()
const { t } = useI18n()
const showPic = ref(false)
const loading = ref(false)
const $router = useRouter()
const contextDay = ref(<any>null)
const usersList = ref({ show: false, title: '', list: [] })
const bookedList = ref(<any>{ show: false, title: '', list: [] })
const formbookEventDefault = ref(<IBookedEvent>{
userId: '',
username: '',
msgbooking: '',
infoevent: '',
tableType: shared_consts.TABLETYPE.MyBachecas,
numpeople: 1,
numpeopleLunch: 0,
numpeopleDinner: 0,
numpeopleDinnerShared: 0,
datebooked: tools.getDateNow(),
booked: false,
modified: false
})
const formAskForDefault = ref(<IMessage>{
dest: '',
origin: '',
message: '',
})
const bookEventForm = ref({ ...formbookEventDefault.value })
const askInfoForm = ref(<IMessage>{
dest: '',
origin: '',
message: '',
})
const askInfopage = ref(<IMessagePage>{
show: false,
msg: {
message: ''
},
state: EState.None
})
const bookEventpage = ref(<IBookedEventPage>{
show: false,
bookedevent: {
userId: '',
username: '',
tableType: shared_consts.TABLETYPE.MyBachecas,
numpeople: 0,
infoevent: '',
msgbooking: '',
modified: false,
booked: false
},
state: EState.Creating,
})
const myrec = ref(<any>{})
const col = ref(<IColGridTable>{})
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
const arrbookings = computed(() => calendarStore.findAllBookedByIdEvent(myrec.value._id))
function profile() {
return userStore.my.profile
@@ -139,23 +204,47 @@ export default defineComponent({
return null
}
function clicca(tipo: any, myset: any, title: string) {
async function clicca(tipo: any, myset: any, title: string) {
let mylist = null
if (tipo === costanti.TIPOFAVBOOK.FAVORITE) {
if (myset) {
userStore.setFavorite($q, t, myrec.value._id, props.table, myrec.value);
await userStore.setFavorite($q, t, myrec.value._id, props.table, myrec.value);
}
mylist = myrec.value.myfav
} else if (tipo === costanti.TIPOFAVBOOK.BOOKMARK) {
if (myset) {
userStore.setBookmark($q, t, myrec.value._id, props.table, myrec.value);
await userStore.setBookmark($q, t, myrec.value._id, props.table, myrec.value);
}
mylist = myrec.value.mybook
} else if (tipo === costanti.TIPOFAVBOOK.SEEN) {
if (myset) {
userStore.setSeen($q, t, myrec.value._id, props.table, myrec.value);
loading.value = true
const risrecord = await userStore.setSeen($q, t, myrec.value._id, props.table, myrec.value)
if (risrecord) {
myrec.value = risrecord
calendarStore.updatearrBookingEvent(myrec.value._id, risrecord.mybookings)
bookEventpage.value.state = EState.None
const findev = calendarStore.findEventBooked(myrec.value._id, false)
EditBookEvent(false)
}
loading.value = false
}
mylist = myrec.value.myseen
} else if (tipo === costanti.TIPOFAVBOOK.ATTEND) {
if (myset) {
// userStore.setAttend($q, t, myrec.value._id, props.table, bookEventpage.value.bookedevent.numpeople, myrec.value);
}
mylist = arrbookings.value
if (!myset && mylist && mylist.length > 0) {
bookedList.value.show = true;
bookedList.value.title = title;
bookedList.value.list = mylist;
}
return true;
}
if (!myset && mylist && mylist.length > 0) {
@@ -180,6 +269,180 @@ export default defineComponent({
return obj
}
function hasModifiedBooking() {
return (bookEventpage.value.bookedevent.numpeople !== bookEventForm.value.numpeople) ||
(bookEventpage.value.bookedevent.numpeopleLunch !== bookEventForm.value.numpeopleLunch) ||
(bookEventpage.value.bookedevent.numpeopleDinner !== bookEventForm.value.numpeopleDinner) ||
(bookEventpage.value.bookedevent.numpeopleDinnerShared !== bookEventForm.value.numpeopleDinnerShared) ||
(bookEventpage.value.bookedevent.msgbooking !== bookEventForm.value.msgbooking) ||
(bookEventpage.value.bookedevent.booked !== bookEventForm.value.booked)
}
function checkseinviaMsg() {
return (bookEventpage.value.state === EState.Creating) && (!bookEventForm.value.booked)
}
function getTitleBtnBooking() {
if (bookEventpage.value.state === EState.Creating) {
return t('dialog.book')
} else {
return t('dialog.update')
}
}
function EditBookEvent(show: boolean) {
// const bookedevent: any = calendarStore.findEventBooked(myrec.value._id, false)
const bookedevent: any = arrbookings.value.find((recbook: IBookedEvent) => recbook.userId === userStore.my._id)
console.log('bookedevent', bookedevent)
if (bookedevent) {
bookEventForm.value._id = bookedevent._id
bookEventForm.value.numpeople = bookedevent.numpeople
bookEventForm.value.numpeopleLunch = bookedevent.numpeopleLunch
bookEventForm.value.numpeopleDinner = bookedevent.numpeopleDinner
bookEventForm.value.numpeopleDinnerShared = bookedevent.numpeopleDinnerShared
bookEventForm.value.infoevent = bookedevent.infoevent
bookEventForm.value.msgbooking = bookedevent.msgbooking
bookEventForm.value.booked = bookedevent.booked
bookEventForm.value.datebooked = bookedevent.datebooked
bookEventpage.value.state = EState.Modifying
} else {
bookEventpage.value.state = EState.Creating
}
bookEventpage.value.bookedevent = bookedevent
bookEventpage.value.show = show
}
async function BookEvent(eventparam: IBookedEvent) {
const ris = await calendarStore.BookEvent(eventparam)
load()
return ris
}
function saveBookEvent(myevent: IEvents) {
if (true) {
// close the dialog
bookEventpage.value.show = false
// bookEventForm.value.booked = bookEventForm.value.bookedcheck
const data: IBookedEvent = {
userId: userStore.my._id,
username: userStore.my.username,
id_bookedevent: myrec.value._id,
tableType: shared_consts.TABLETYPE.MyBachecas,
numpeople: bookEventForm.value.numpeople,
numpeopleLunch: bookEventForm.value.numpeopleLunch,
numpeopleDinner: bookEventForm.value.numpeopleDinner,
numpeopleDinnerShared: bookEventForm.value.numpeopleDinnerShared,
infoevent: tools.gettextevent(myrec.value),
msgbooking: bookEventForm.value.msgbooking,
booked: bookEventForm.value.booked,
datebooked: tools.getDateNow(),
modified: (bookEventpage.value.state !== EState.Creating)
}
BookEvent(data).then((ris) => {
if (ris)
tools.showPositiveNotif($q, t('cal.booked') + ' ' + t('cal.event') + ' "' + myrec.value.descr + '"')
else
tools.showNegativeNotif($q, t('cal.booked_error'))
})
contextDay.value = null
}
}
function executefunc(mythisq: any, table: string, func: number, par: IParamDialog) {
if (func === lists.MenuAction.DELETE) {
// console.log('param1', par.param1)
calendarStore.CancelBookingEvent({
ideventbook: par.param1,
notify: par.param2 === true ? '1' : '0',
}).then((ris: any) => {
if (ris) {
tools.showPositiveNotif(mythisq, t('cal.canceledbooking') + ' "' + par.param3 + '"')
if (bookEventpage.value)
bookEventpage.value.show = false
} else {
tools.showNegativeNotif(mythisq, t('cal.cancelederrorbooking'))
}
})
}
}
function CancelBookingEvent(mythisq: any, bookeventid: string, notify: boolean, mythis?: any) {
const mytitle = translate('cal.titlebooking')
const mytext = translate('cal.cancelbooking') + ' ' + tools.gettextevent(myrec.value) + '?'
const ok = translate('dialog.yes')
const funcok = lists.MenuAction.DELETE
const table = ''
const funccancel = 0
const par = {
param1: bookeventid,
param2: notify,
param3: myrec.value.descr,
}
// console.log('CancelBookingEvent ', myrec.value)
return $q.dialog({
message: mytext,
html: true,
ok: {
label: ok,
push: true,
},
title: mytitle,
cancel: true,
persistent: false,
}).onOk(() => {
// console.log('OK')
executefunc($q, table, funcok, par)
return true
}).onCancel(() => {
// console.log('CANCEL')
executefunc($q, table, funccancel, par)
return false
})
}
function sendMsg(info: boolean) {
askInfopage.value.show = false
const data: IMessage = {
source: {
event_id: myrec.value._id,
infoevent: tools.gettextevent(myrec.value)
},
origin: userStore.my.username,
dest: myrec.value.username,
message: info ? askInfoForm.value.message : bookEventForm.value.msgbooking
}
messageStore.SendMsgEvent(data).then((ris) => {
contextDay.value = null
if (ris)
tools.showPositiveNotif($q, t('cal.sendmsg_sent'))
else
tools.showNegativeNotif($q, t('cal.sendmsg_error'))
})
}
function isAlreadyBooked() {
// const calendarStore = useCalendarStore()
// return calendarStore.findEventBooked(myrec.value._id, true)
arrbookings.value.find((recbook: IBookedEvent) => recbook.userId === userStore.my._id && recbook.booked)
}
onMounted(mounted)
return {
@@ -189,6 +452,7 @@ export default defineComponent({
myrec,
shared_consts,
globalStore,
site: globalStore.site,
showPic,
userStore,
t,
@@ -203,9 +467,24 @@ export default defineComponent({
getSectorByRec,
getRecGoodSkillByRec,
usersList,
bookedList,
clicca,
naviga,
getTypeHosps,
bookEventpage,
hasModifiedBooking,
checkseinviaMsg,
getTitleBtnBooking,
askInfoForm,
EState,
saveBookEvent,
EditBookEvent,
CancelBookingEvent,
sendMsg,
askInfopage,
isAlreadyBooked,
bookEventForm,
loading,
}
}
})

View File

@@ -10,13 +10,35 @@
</CGalleryImages>
<q-card-actions align="right">
<div class="">
<div v-if="table === shared_consts.TABLES_MYBACHECAS" class="">
<q-btn
flat
round
color="blue"
icon="far fa-eye"
color="green"
:icon="
calendarStore.isPartecipero(myrec._id, table)
? 'fas fa-user-check'
: 'far fa-check-circle'
"
@click="EditBookEvent(true)"
>
<q-badge
v-if="myrec.mybookings"
color="primary"
:label="
calendarStore.getNumParticipants(
myrec,
true,
tools.peopleWhere.participants
)
"
floating
transparent
/>
</q-btn>
</div>
<div class="">
<q-btn flat round color="blue" icon="far fa-eye">
<q-badge
v-if="myrec.myseen"
color="primary"
@@ -31,7 +53,11 @@
flat
round
color="red"
:icon="userStore.isFavorite(myrec._id, table) ? 'favorite' : 'far fa-heart'"
:icon="
userStore.isFavorite(myrec._id, table)
? 'favorite'
: 'far fa-heart'
"
@click="clicca(costanti.TIPOFAVBOOK.FAVORITE, true, '')"
>
<q-badge
@@ -48,7 +74,11 @@
flat
round
color="teal"
:icon="userStore.isBookmarked(myrec._id, table) ? 'bookmark' : 'far fa-bookmark'"
:icon="
userStore.isBookmarked(myrec._id, table)
? 'bookmark'
: 'far fa-bookmark'
"
@click="clicca(costanti.TIPOFAVBOOK.BOOKMARK, true, '')"
>
<q-badge
@@ -82,7 +112,16 @@
<q-icon color="blue" name="far fa-comment" />
</q-item-section>
<q-item-section>
<a :href="tools.getHttpForTelegram(myrec.profile.username_telegram)" target="_blank">{{ $t('dialog.contact') }} - {{tools.getNomeUtenteByRecUser(myrec)}}</a>
<a
:href="
tools.getHttpForTelegram(
myrec.profile.username_telegram
)
"
target="_blank"
>{{ $t('dialog.contact') }} -
{{ tools.getNomeUtenteByRecUser(myrec) }}</a
>
</q-item-section>
</q-item>
<q-item
@@ -106,15 +145,21 @@
clicca(
costanti.TIPOFAVBOOK.SEEN,
false,
$t('cmd.seen', {num: myrec.myseen ? myrec.myseen.length : 0})
$t('cmd.seen', {
num: myrec.myseen ? myrec.myseen.length : 0,
})
)
"
>
<q-item-section avatar>
<q-icon color="blue" name="fas fa-eye" />
<q-icon color="blue" name="far fa-eye" />
</q-item-section>
<q-item-section>
{{ $t('cmd.seen', {num: myrec.myseen ? myrec.myseen.length : 0}) }}
{{
$t('cmd.seen', {
num: myrec.myseen ? myrec.myseen.length : 0,
})
}}
</q-item-section>
</q-item>
<q-item
@@ -124,7 +169,9 @@
clicca(
costanti.TIPOFAVBOOK.FAVORITE,
false,
$t('cmd.favorite', {num: myrec.myfav ? myrec.myfav.length : 0})
$t('cmd.favorite', {
num: myrec.myfav ? myrec.myfav.length : 0,
})
)
"
>
@@ -132,7 +179,43 @@
<q-icon color="red" name="favorite" />
</q-item-section>
<q-item-section>
{{ $t('cmd.favorite', {num: myrec.myfav ? myrec.myfav.length : 0}) }}
{{
$t('cmd.favorite', {
num: myrec.myfav ? myrec.myfav.length : 0,
})
}}
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@click="
clicca(
costanti.TIPOFAVBOOK.ATTEND,
false,
$t('cmd.attend', {
num: calendarStore.getNumParticipants(
myrec,
true,
tools.peopleWhere.participants
),
})
)
"
>
<q-item-section avatar>
<q-icon color="green" name="fas fa-user-check" />
</q-item-section>
<q-item-section>
{{
$t('cmd.attend', {
num: calendarStore.getNumParticipants(
myrec,
true,
tools.peopleWhere.participants
),
})
}}
</q-item-section>
</q-item>
<q-item
@@ -142,7 +225,9 @@
clicca(
costanti.TIPOFAVBOOK.BOOKMARK,
false,
$t('cmd.bookmark', {num: myrec.mybook ? myrec.mybook.length : 0})
$t('cmd.bookmark', {
num: myrec.mybook ? myrec.mybook.length : 0,
})
)
"
>
@@ -150,7 +235,11 @@
<q-icon color="teal" name="bookmark" />
</q-item-section>
<q-item-section>
{{ $t('cmd.bookmark', {num: myrec.mybook ? myrec.mybook.length : 0}) }}
{{
$t('cmd.bookmark', {
num: myrec.mybook ? myrec.mybook.length : 0,
})
}}
</q-item-section>
</q-item>
</q-list>
@@ -195,7 +284,9 @@
<q-item-section>
<q-item-label>
<span>{{tools.getstrDateMonthTimeLong(myrec.dateTimeStart)}}</span>
<span>{{
tools.getstrDateMonthTimeLong(myrec.dateTimeStart)
}}</span>
</q-item-label>
</q-item-section>
</q-item>
@@ -206,7 +297,9 @@
<q-item-section>
<q-item-label>
<span>{{tools.getstrDateMonthTimeLong(myrec.dateTimeEnd)}}</span>
<span>{{
tools.getstrDateMonthTimeLong(myrec.dateTimeEnd)
}}</span>
</q-item-label>
</q-item-section>
</q-item>
@@ -305,7 +398,35 @@
><div v-html="myrec.note" class="clBorderService"></div
></q-item-label>
<q-card class="my-card clBorderUser" bordered>
<q-item clickable v-if="table === 'mybachecas'">
<q-item-section avatar>
<q-icon color="green" name="fas fa-house-user" />
</q-item-section>
<q-item-section>
<q-item-label lines="1">
{{ $t('event.organisedBy') }}: {{ myrec.organisedBy }}
</q-item-label>
</q-item-section>
</q-item>
<q-card
v-if="
table === 'mybachecas' && myrec.mygrp && myrec.mygrp.groupname
"
class="my-card clBorderUser"
bordered
@click="
naviga(tools.getPathByGroup(myrec.mygrp, toolsext.TABMYGROUPS))
"
>
<CMyGroup
:mygrp="myrec.mygrp"
:visu="costanti.USER_GROUPS"
:noaut="true"
>
</CMyGroup>
</q-card>
<q-card v-else class="my-card clBorderUser" bordered>
<CMyUser
:mycontact="myrec"
:visu="costanti.FIND_PEOPLE"
@@ -313,12 +434,52 @@
>
</CMyUser>
</q-card>
<q-item
clickable
v-if="table === 'mybachecas' && myrec.contact_phone"
>
<q-item-section avatar>
<q-icon color="green" name="fas fa-phone" />
</q-item-section>
<q-item-section>
<q-item-label lines="1">
<CLabel
v-bind="$attrs"
:copy="true"
:value="myrec.contact_phone"
:label="$t('event.contact_phone')"
/>
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-if="table === 'mybachecas' && myrec.contact_telegram"
>
<q-item-section avatar>
<q-icon color="blue" name="fab fa-telegram" />
</q-item-section>
<q-item-section>
<q-item-label lines="1">
<a
:href="tools.getHttpForTelegram(myrec.contact_telegram)"
target="_blank"
>{{ $t('msgs.telegrammsg') }}: @{{ myrec.contact_telegram }}
</a>
</q-item-label>
</q-item-section>
</q-item>
<q-item v-if="myrec.mycities[0].comune">
<q-item-section avatar>
<q-icon color="amber" name="fas fa-map-marker-alt" />
</q-item-section>
<q-item-section>
<q-item-label>
<div v-if="myrec.address">
{{ myrec.address }}
</div>
<span v-for="(city, index) in myrec.mycities" :key="index">
<span v-if="city.comune">
{{ city.comune }} ({{ city.prov }})</span
@@ -330,6 +491,20 @@
}}</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-if="myrec.link_maplocation">
<q-item-section avatar>
<q-icon color="blue" name="fas fa-map-marker-alt" />
</q-item-section>
<q-item-section>
<q-item-label lines="1">
<span
v-html="
tools.getlinkhref(myrec.link_maplocation, 'Apri Mappa')
"
/></q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-if="myrec.website">
<q-item-section avatar>
<q-icon color="blue" name="fas fa-globe" />
@@ -344,18 +519,66 @@
/></q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-if="myrec.link_maplocation">
<q-item clickable v-if="table === 'mybachecas'">
<q-item-section avatar>
<q-icon color="blue" name="fas fa-map-marker-alt" />
<q-icon color="blue" name="fas fa-user-check" />
</q-item-section>
<q-item-section>
<q-item-label lines="1" v-if="myrec.myattend">
<q-btn
v-if="table === shared_consts.TABLES_MYBACHECAS"
rounded
color="primary"
:label="
$t('cmd.attend', {
num: calendarStore.getNumParticipants(
myrec,
true,
tools.peopleWhere.participants
),
})
"
@click="
clicca(
costanti.TIPOFAVBOOK.ATTEND,
false,
$t('cmd.attend', {
num: calendarStore.getNumParticipants(
myrec,
true,
tools.peopleWhere.participants
),
})
)
"
>
</q-btn>
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-if="
table === 'mybachecas' &&
(myrec.min_partecip || myrec.max_partecip)
"
>
<q-item-section avatar>
<q-icon color="blue" name="fas fa-users" />
</q-item-section>
<q-item-section>
<q-item-label lines="1">
<span
v-html="
tools.getlinkhref(myrec.link_maplocation, 'Apri Mappa')
"
/></q-item-label>
<span v-if="myrec.min_partecip"
>{{ $t('event.min_partecip') }}:
{{ myrec.min_partecip }}</span
><br />
<span v-if="myrec.max_partecip"
>{{ $t('event.max_partecip') }}:
{{ myrec.max_partecip }}</span
>
</q-item-label>
</q-item-section>
</q-item>
<q-item v-if="myrec.idContribType && myrec.idContribType.length > 0">
@@ -377,6 +600,9 @@
{{ calendarStore.getContribtypeById(reccontr) }}
</q-chip>
</span>
<span v-if="myrec.contribstr"
><br />{{ myrec.contribstr }}</span
>
</q-item-label>
</q-item-section>
</q-item>
@@ -386,14 +612,23 @@
</q-item-section>
<q-item-section>
<q-item-label
><span v-if="myrec.date_updated">{{
<q-item-label>
{{ $t('reg.pub_updated') }}
<span v-if="myrec.date_updated">{{
tools.getstrDateMonthLong(myrec.date_updated)
}}</span
><span v-else>{{
tools.getstrDateMonthLong(myrec.date_created)
}}</span></q-item-label
}}</span>
<span v-if="myrec.organisedBy"
><br />{{ $t('reg.who_updated') }}
<span class="text-bold"
><a :href="'my/' + myrec.username">{{
tools.getNomeUtenteByRecUser(myrec)
}}</a></span
></span
>
</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-if="false">
@@ -409,42 +644,16 @@
</q-list>
<q-separator />
<div class="q-mb-xl"></div>
<q-card-actions
v-if="$q.screen.gt.sm || nopopup"
class="text-center justify-center"
>
<q-btn
v-if="myrec.profile.username_telegram"
:label="$t('dialog.contact')"
color="primary"
icon="far fa-comment"
target="_blank"
:type="tools.isUserOk() ? 'a' : 'btn'"
size="md"
rounded
:href="
tools.isUserOk()
? tools.getHttpForTelegram(myrec.profile.username_telegram)
: null
"
/>
<q-btn
v-if="!nopopup"
rounded
outline
:label="$t('dialog.close')"
color="primary"
icon="close"
v-close-popup
/>
</q-card-actions>
<div v-if="table === shared_consts.TABLES_MYBACHECAS" class="q-mb-sm">
&nbsp;
</div>
</q-card>
<div
v-if="!$q.screen.gt.sm && !nopopup"
v-if="(!$q.screen.gt.sm && !nopopup) || true"
class="row absolute-bottom text-shadow custom-caption q-px-md buttons_bottom"
>
<q-btn
v-if="myrec.profile.username_telegram"
v-if="myrec.profile.username_telegram || myrec.contact_telegram"
:label="$t('dialog.contact')"
color="primary"
icon="far fa-comment"
@@ -453,13 +662,37 @@
size="md"
rounded
:href="
tools.isUserOk()
? tools.getHttpForTelegram(myrec.profile.username_telegram)
: null
myrec.contact_telegram
? tools.getHttpForTelegram(myrec.contact_telegram)
: tools.getHttpForTelegram(myrec.profile.username_telegram)
"
/>
<q-btn
v-if="!nopopup"
v-if="table === shared_consts.TABLES_MYBACHECAS"
rounded
:color="
calendarStore.isPartecipero(myrec._id, table) ? 'green' : 'grey'
"
:label="$t('event.attend')"
:icon="
calendarStore.isPartecipero(myrec._id, table)
? 'fas fa-user-check'
: 'far fa-check-circle'
"
@click="EditBookEvent(true)"
>
</q-btn>
<q-btn
rounded
outline
class="q-ma-sm"
v-if="isAlreadyBooked() && site.confpages.bookingEvents"
text-color="red"
@click="EditBookEvent(true)"
:label="$t('cal.modifybooking')"
>
</q-btn>
<q-btn
rounded
outline
:label="$t('dialog.close')"
@@ -468,6 +701,12 @@
v-close-popup
/>
</div>
<q-inner-loading
:showing="loading"
label="attendere..."
label-class="text-teal"
label-style="font-size: 1.1em"
/>
</div>
</div>
<q-dialog v-model="usersList.show">
@@ -491,6 +730,212 @@
</q-card-section>
</q-card>
</q-dialog>
<q-dialog v-model="bookedList.show">
<q-card v-if="bookedList" class="dialog_card">
<q-toolbar class="bg-primary text-white">
<q-toolbar-title>
{{ bookedList.title }}
</q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
<q-card-section class="q-pa-xs inset-shadow">
<div v-for="(eventbook, index) in bookedList.list" :key="index">
<CMyUser
:mycontact="{ username: eventbook.username }"
:visu="costanti.FIND_PEOPLE"
@setCmd="tools.setCmd"
>
</CMyUser>
<div>
{{ tools.getstrshortDateTime(eventbook.datebooked) }}
<span v-if="eventbook.msgbooking">{{ $t('sendmsg.write') }}: </span>
<q-separator />
</div>
{{ eventbook.msgbooking }}
<div>
<span v-if="eventbook.numpeople > 0"
>Partecipanti: {{ eventbook.numpeople }}<br
/></span>
<span v-if="eventbook.numpeopleLunch > 0"
>Pranzo: {{ eventbook.numpeopleLunch }}<br
/></span>
<span v-if="eventbook.numpeopleDinner > 0"
>Cena: {{ eventbook.numpeopleDinner }}<br
/></span>
<span v-if="eventbook.numpeopleDinnerShared > 0"
>C.Cond: {{ eventbook.numpeopleDinnerShared }}<br
/></span>
</div>
<div>
<div class="text-center">
<q-btn
v-if="myrec.userId === userStore.my._id"
rounded
color="red"
label="Elimina"
icon="fas fa-trash-alt"
@click="
tools.CancelBookingEvent($q, myrec, eventbook._id, false)
"
></q-btn>
</div>
</div>
</div>
<br />
<div class="text-center">
<q-btn
outlined
rounded
:label="$t('dialog.close')"
color="primary"
icon="close"
v-close-popup
></q-btn>
</div>
</q-card-section>
</q-card>
</q-dialog>
<q-dialog v-model="askInfopage.show" no-backdrop-dismiss>
<q-card v-if="askInfopage.show" class="dialog_card">
<q-toolbar class="bg-primary text-white">
<q-toolbar-title>
{{ $t('cal.booking') }}
</q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
<q-card-section class="inset-shadow">
<div style="margin-top: 150px">
<q-chip class="shadow-5 q-mb-md" dense>
{{ myrec.descr }}
</q-chip>
<div v-if="myrec.dateTimeStart" class="cal__when">
<span class="cal__where-title"
>{{ $t('cal.when') }}:
<span v-html="tools.getstrDateTimeEvent($t, myrec, true)"></span>
</span>
</div>
<div class="q-pa-xs">
<q-card class="text-white windowcol">
<q-card-section>
<q-input
v-model="askInfoForm.message"
:label="$t('cal.writemsg') + ':'"
autofocus
debounce="500"
type="textarea"
input-class="myinput-area"
>
</q-input>
</q-card-section>
</q-card>
</div>
</div>
</q-card-section>
<q-card-actions align="right">
<q-btn
flat
:label="$t('dialog.sendmsg')"
color="primary"
@click="sendMsg(true)"
></q-btn>
<q-btn
flat
:label="$t('dialog.cancel')"
color="primary"
v-close-popup
></q-btn>
</q-card-actions>
</q-card>
</q-dialog>
<q-dialog v-model="bookEventpage.show" no-backdrop-dismiss>
<q-card v-if="bookEventpage.show" class="dialog_card">
<q-toolbar class="bg-primary text-white">
<q-toolbar-title>
{{ $t('cal.booking') }}
</q-toolbar-title>
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
</q-toolbar>
<div class="q-pa-xs">
<q-card class="text-white windowcol" style="display: block">
<q-card-section class="q-pa-xs">
<div style="display: inline-flex" class="q-px-xs centermydiv">
<q-checkbox
style="color: black"
v-model="bookEventForm.booked"
:label="$t('cal.bookingtextdefault')"
color="green"
>
</q-checkbox>
<div
v-if="bookEventForm.booked"
class="q-gutter-xs q-mx-xs"
style="min-width: 140px"
>
<q-select
v-if="table === shared_consts.TABLES_MYBACHECAS"
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
rounded
style="max-width: 150px"
outlined
v-model="bookEventForm.numpeople"
:options="tools.SelectListNumPeople"
:label="$t('statusreg.reg')"
emit-value
map-options
>
</q-select>
</div>
</div>
<q-input
v-model="bookEventForm.msgbooking"
:label="$t('cal.writemsg') + ':'"
type="textarea"
debounce="500"
input-class="myinput-area"
>
</q-input>
</q-card-section>
</q-card>
</div>
<q-card-actions align="right">
<q-btn
v-if="bookEventpage.state === EState.Modifying"
flat
:label="$t('cal.cancelbooking')"
color="negative"
@click="CancelBookingEvent($q, bookEventForm._id, true)"
></q-btn>
<q-btn
v-if="checkseinviaMsg()"
flat
:label="$t('dialog.sendonlymsg')"
color="primary"
@click="sendMsg(false)"
></q-btn>
<q-btn
v-else-if="bookEventForm.booked"
:label="getTitleBtnBooking()"
color="primary"
@click="saveBookEvent()"
:disable="
!(bookEventpage.state === EState.Creating || hasModifiedBooking)
"
></q-btn>
<q-btn
flat
:label="$t('dialog.cancel')"
color="primary"
v-close-popup
></q-btn>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script lang="ts" src="./CMyCardService.ts">

View File

@@ -875,7 +875,7 @@
label="Sottotitoli"
v-model="myel.parambool"
color="positive"
icon="fas fa-eye"
icon="far fa-eye"
>
</q-toggle>
@@ -883,7 +883,7 @@
label="Miniature"
v-model="myel.parambool2"
color="positive"
icon="fas fa-eye"
icon="far fa-eye"
>
</q-toggle>
</div>

View File

@@ -37,6 +37,7 @@
<q-item-label>
<q-btn
v-if="circuitname"
icon="fas fa-coins"
color="green"
size="md"

View File

@@ -257,7 +257,7 @@ export default defineComponent({
// console.log('crea', isFieldDb(), 'props.mycol', props.mycol)
if (props.mycol && props.mycol.name && props.mycol.name !== 'test') {
col.value = {...props.mycol}
col.value = { ...props.mycol }
} else {
if (col.value.name === 'test') {
col.value.name = props.field
@@ -369,6 +369,7 @@ export default defineComponent({
}
function changevalRec(newval: any) {
if (!props.insertMode || (props.insertMode && col.value.fieldtype !== costanti.FieldType.multioption)) {
if (col.value && col.value.allowchar === costanti.ALLOWCHAR_CODE) {
myvalue.value = tools.removespaces_slash(newval)
}
@@ -387,6 +388,7 @@ export default defineComponent({
if (props.isInModif)
OpenEdit()
}
}
function changevalRecHours(newval: any) {
if (col.value.fieldtype === costanti.FieldType.hours) {
@@ -499,7 +501,7 @@ export default defineComponent({
function SaveValueInt(newVal: any, valinitial: any) {
console.log('SaveValueInt', newVal, valinitial)
//console.log('SaveValueInt', newVal, valinitial)
if (props.tablesel) {
if (true) {
@@ -563,7 +565,7 @@ export default defineComponent({
function Savedb(newVal: any, valinitial: any) {
console.log('Savedb', newVal)
// console.log('Savedb', newVal)
if (col.value.fieldtype === costanti.FieldType.boolean) {
// console.log('myvalue', myvalue, newVal, myvalueprec)

View File

@@ -10,6 +10,7 @@ import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { CMyCardPopup } from '@/components/CMyCardPopup'
import { useRouter } from 'vue-router'
import { useCalendarStore } from '@src/store/CalendarStore'
export default defineComponent({
name: 'CMyRecCard',
@@ -40,6 +41,7 @@ export default defineComponent({
setup(props, { emit }) {
const userStore = useUserStore()
const calendarStore = useCalendarStore()
// const $q = useQuasar()
const { t } = useI18n()
const $router = useRouter()
@@ -92,9 +94,15 @@ export default defineComponent({
}
function getNameToShow(user: IUserFields, col = null) {
if (props.table === shared_consts.TABLES_MYBACHECAS && myrec.value.groupname)
return myrec.value.groupname
else
return userStore.getNameToShow(user, col)
}
function isPartecipero() {
return (props.table === shared_consts.TABLES_MYBACHECAS && calendarStore.isPartecipero(myrec.value._id, props.table))
}
onMounted(mounted)
@@ -115,6 +123,8 @@ export default defineComponent({
visupage,
showBadge,
getNameToShow,
isPartecipero,
calendarStore,
}
},
})

View File

@@ -11,12 +11,21 @@
: ``)
"
>
<q-item v-if="myrec" clickable v-ripple :class="`shadow-2 butt_rounded `">
<q-item
v-if="myrec"
clickable
v-ripple
:class="
`shadow-2 butt_rounded ` + (tools.isPartecipero(myrec) ? ` butt_green ` : '')
"
>
<q-item-section
v-if="
shared_consts.TABLES_VISU_IMG.includes(table) &&
myrec.photos &&
myrec.photos.length > 0
(myrec.photos &&
myrec.photos.length > 0) ||
(myrec.mygrp &&
myrec.mygrp.photos.length > 0)
"
avatar
@click="cmdExt(costanti.CMD_SHOW_PAGE, myrec)"
@@ -35,6 +44,20 @@
</q-badge>
<q-avatar size="60px">
<q-img
v-if="myrec.mygrp && myrec.mygrp.groupname && tools.getValue(myrec.mygrp, 'photos', '')"
:src="
tools.getFullFileName(
tools.getValue(myrec.mygrp, 'photos', ''),
'mygroups',
myrec.username,
myrec.groupname
)
"
class="img"
alt="immagine del gruppo"
>
</q-img>
<q-img
:src="
tools.getFullFileName(myrec.photos, table, myrec.username, '')
@@ -103,17 +126,30 @@
<q-item-label lines="1" style="" class="text_user_city">
<div class="row justify-between">
<div class="text-weight-bold text-italic">
{{ tools.getNameToShow(myrec) }}
<span
v-if="
table === shared_consts.TABLES_MYBACHECAS && myrec.organisedBy
"
>
<span>{{ myrec.organisedBy }} </span>
</span>
<span v-else>
{{ getNameToShow(myrec) }}
</span>
</div>
<div class="q-mx-sm">
(
<span v-if="table === shared_consts.TABLES_MYBACHECAS">
<span class="q-mx-xxs text-bold">{{
tools.getNumPartecipantes(myrec)
}}</span>
<span class="q-mx-xxs"
><q-icon dense color="blue" name="far fa-check-circle" />
</span>
</span>
<span class="q-mx-xxs">{{ myrec.myseen.length }}</span>
<span class="q-mx-xxs"
><q-icon
dense
color="blue"
name="far fa-eye"
/>
><q-icon dense color="blue" name="far fa-eye" />
</span>
<span class="q-mx-xxs">&nbsp;</span>
<span class="">{{ myrec.myfav.length }}</span>
@@ -146,6 +182,17 @@
</div>
</q-item-label>
<q-item-label
v-if="tools.isPartecipero(myrec)"
lines="1"
style="text-align: left"
class="text_user_city"
>
<span class="text-bold text-green text-h7">
<q-icon name="fas fa-user-check" color="green"></q-icon>
{{ $t('event.attend') }}</span
>
</q-item-label>
<q-item-label
lines="1"
style="text-align: right"
@@ -174,6 +221,18 @@
<q-item-section>{{ $t('reg.edit') }}</q-item-section>
</q-item>
</q-list>
<q-list style="min-width: 150px">
<q-item
clickable
v-close-popup
@click="cmdExt(costanti.CMD_CLONE, myrec._id)"
>
<q-item-section side>
<q-icon name="fas fa-copy" />
</q-item-section>
<q-item-section>{{ $t('event.duplicate') }}</q-item-section>
</q-item>
</q-list>
<q-list style="min-width: 150px">
<q-item
clickable

View File

@@ -115,7 +115,7 @@
<div v-if="edit" class="q-gutter-sm " style="max-height: 200px; width: 208px;">
<q-uploader
label="Aggiungi Immagine"
accept="image/jpeg, image/jpg, image/png, .pdf"
accept="image/*"
:url="getUrl()"
:headers="tools.getheaders()"
:max-file-size="3000000"
@@ -233,7 +233,7 @@
<div class="q-gutter-sm " style="max-height: 200px; width: 208px;">
<q-uploader
label="Aggiungi Immagine"
accept="image/jpeg, image/jpg, image/png, .pdf"
accept="image/*"
:url="getUrl()"
:headers="tools.getheaders()"
:max-file-size="40000000"

View File

@@ -11,6 +11,7 @@ import { CGridTableRec } from '@/components/CGridTableRec'
import { IColGridTable, IMySkill, ISkill } from 'model'
import { toolsext } from '@store/Modules/toolsext'
import { fieldsTable } from '@store/Modules/fieldsTable'
import { shared_consts } from '@src/common/shared_vuejs'
export default defineComponent({
name: 'CSkill',
@@ -49,6 +50,11 @@ export default defineComponent({
type: String,
required: false,
default: ''
},
groupname: {
type: String,
required: false,
default: ''
}
},
components: {
@@ -67,13 +73,6 @@ export default defineComponent({
const col_footer = ref('')
const col_tabfooter = ref('')
const extraparams = computed(() => {
if (props.table === 'goods')
return extraparams_Goods()
else
return extraparams_Servizi()
})
function mounted() {
let obj = tools.getParamsByTable(props.table)
@@ -87,339 +86,17 @@ export default defineComponent({
}
function extraparams_Servizi() {
let lk_tab = 'users'
let lk_LF = 'userId'
let lk_FF = '_id'
let lk_as = 'user'
let af_objId_tab = 'myId'
if (props.username) {
// lk_LF = 'username'
}
return {
lookup1: {
lk_tab,
lk_LF,
lk_FF,
lk_as,
af_objId_tab,
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
//**ADDFIELD_MYSKILL
website: 1,
descr: 1,
date_created: 1,
date_updated: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
lasttimeonline: 1,
comune: 1,
mycities: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
reported: 1,
}
},
lookup2: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'comune',
af_objId_tab: '',
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
//**ADDFIELD_MYSKILL
website: 1,
descr: 1,
date_created: 1,
date_updated: 1,
comune: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
lasttimeonline: 1,
mycities: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
reported: 1,
}
},
lookup3: {
lk_tab: 'skills',
lk_LF: 'idSkill',
lk_FF: '_id',
lk_as: 'recSkill',
af_objId_tab: '',
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
//**ADDFIELD_MYSKILL
website: 1,
descr: 1,
date_created: 1,
date_updated: 1,
userId: 1,
name: 1,
surname: 1,
lasttimeonline: 1,
comune: 1,
mycities: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
reported: 1,
}
},
lookup4: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
}
function extraparams_Goods() {
let lk_tab = 'users'
let lk_LF = 'userId'
let lk_FF = '_id'
let lk_as = 'user'
let af_objId_tab = 'myId'
if (props.username) {
// lk_LF = 'username'
}
return {
lookup1: {
lk_tab,
lk_LF,
lk_FF,
lk_as,
af_objId_tab,
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
idShipping: 1,
otherfilters: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
//**ADDFIELD_MYSKILL
website: 1,
descr: 1,
date_created: 1,
date_updated: 1,
surname: 1,
lasttimeonline: 1,
username: 1,
name: 1,
comune: 1,
mycities: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
reported: 1,
}
},
lookup2: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'comune',
af_objId_tab: '',
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
idShipping: 1,
otherfilters: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
//**ADDFIELD_MYSKILL
website: 1,
descr: 1,
date_created: 1,
date_updated: 1,
comune: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
mycities: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
reported: 1,
}
},
lookup3: {
lk_tab: 'skills',
lk_LF: 'idSkill',
lk_FF: '_id',
lk_as: 'recSkill',
af_objId_tab: '',
lk_proj: {
recSkill: 1,
sector: 1,
idSector: 1,
idSkill: 1,
idShipping: 1,
otherfilters: 1,
myskill: 1,
idStatusSkill: 1,
idContribType: 1,
'profile.username_telegram': 1,
'profile.favorite': 1,
'profile.bookmark': 1,
'profile.seen': 1,
idCity: 1,
pub_to_share: 1,
numLevel: 1,
adType: 1,
photos: 1,
note: 1,
//**ADDFIELD_MYSKILL
website: 1,
descr: 1,
date_created: 1,
date_updated: 1,
userId: 1,
username: 1,
name: 1,
surname: 1,
lasttimeonline: 1,
comune: 1,
mycities: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
}
},
lookup4: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
}
function getdefaultnewrec(): any {
if (props.table === toolsext.TABMYSKILLS) {
return tools.getdefaultnewrec_MySkill()
} else if (props.table === toolsext.TABMYBACHECAS) {
return tools.getdefaultnewrec_MyBacheca()
} else if (props.table === toolsext.TABMYHOSPS) {
return tools.getdefaultnewrec_MyHosp()
} else if (props.table === toolsext.TABMYGOODS) {
return tools.getdefaultnewrec_MyGoods()
}
return null
}
onMounted(mounted)
return {
tools,
costanti,
extraparams,
fieldsTable,
col,
prop_colkey,
col_title,
col_footer,
col_tabfooter,
getdefaultnewrec,
}
},
})

View File

@@ -17,14 +17,15 @@
:prop_search="false"
:visuinpage="visuinpage"
noresultLabel="Il filtro selezionato non ha trovato nessun risultato"
:defaultnewrec="getdefaultnewrec"
:defaultnewrec="tools.getdefaultnewrec(table, {groupname})"
:filtercustom="filtercustom"
v-bind="$attrs"
:extraparams="extraparams"
:extraparams="tools.extraparams(table)"
:noaut="noaut"
:hidetitleIfEmpty="true"
:labelBtnAddExtra="`Aggiungi ` + title"
:prop_pagination="tools.getPagination()"
:groupname="groupname"
:margin_right="30">
</CGridTableRec>

View File

@@ -1646,3 +1646,7 @@ h3 {
.q-mx-xxs {
margin-left: 2px;
}
.butt_green{
background-color: rgb(202, 232, 202) !important;
}

View File

@@ -1,49 +1,47 @@
<template>
<div>
<q-btn flat round dense icon="fas fa-bell" class="q-mx-xs" @click="open = !open">
<q-badge v-if="num_notifs_unread > 0" floating color="red">{{ num_notifs_unread }}</q-badge>
<q-btn
flat
round
dense
icon="fas fa-bell"
class="q-mx-xs"
@click="open = !open"
>
<q-badge v-if="num_notifs_unread > 0" floating color="red">{{
num_notifs_unread
}}</q-badge>
</q-btn>
<q-btn v-if="false" flat round dense icon="fas fa-bell">
<q-badge v-if="num_notifs_unread > 0" floating color="red">{{ num_notifs_unread }}</q-badge>
<q-badge v-if="num_notifs_unread > 0" floating color="red">{{
num_notifs_unread
}}</q-badge>
</q-btn>
<q-drawer v-model="open" side="right" elevated class="text-black"
<q-drawer
v-model="open"
side="right"
elevated
class="text-black"
:overlay="true"
:breakpoint="1200"
:width="q.screen.lt.sm ? tools.getwidth($q) : 450"
>
<q-bar class="bg-primary text-white">
{{ $t('notifs.notifs') }}
<q-space/>
<q-btn round dense icon="fas fa-pencil-alt" class="q-mx-xs">
<q-menu style="min-width: 200px">
<q-list style="">
<q-item clickable v-close-popup to="/notifs">
<q-item-section side>
<q-icon name="fas fa-cog"/>
</q-item-section>
<q-item-section>{{ $t('notifs.settings') }}</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="notifStore.setAllRead(username, shared_consts.QualiNotifs.OTHERS)">
<q-item-section side>
<q-icon name="fas fa-check"/>
</q-item-section>
<q-item-section>{{ $t('notifs.setallread') }}</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="notifStore.deleteAll(username, shared_consts.QualiNotifs.OTHERS)">
<q-item-section side>
<q-icon name="fas fa-trash-alt"/>
</q-item-section>
<q-item-section>{{ $t('notifs.deleteall') }}</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
<q-btn flat round color="white" icon="close" @click="open = false"></q-btn>
<q-space />
<q-btn
flat
round
color="white"
icon="close"
@click="open = false"
></q-btn>
</q-bar>
<div v-if="tools.isLogged()" class="row justify-center margin_buttons q-gutter-lg">
<q-bar v-if="tools.isLogged()"
>
<div>
<q-btn-toggle
v-model="show_all"
class="my-custom-toggle"
@@ -55,27 +53,69 @@
color="white"
text-color="primary"
:options="[
{label: t('notifs.all'), value: true},
{label: t('notifs.notread'), value: false}
{ label: t('notifs.all'), value: true },
{ label: t('notifs.notread'), value: false },
]"
/>
</div>
<q-space />
<div >
<q-btn round dense icon="fas fa-ellipsis-h" class="q-mx-xs">
<q-menu style="min-width: 200px">
<q-list style="">
<q-item clickable v-close-popup to="/notifs">
<q-item-section side>
<q-icon name="fas fa-cog" />
</q-item-section>
<q-item-section>{{ $t('notifs.settings') }}</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@click="
notifStore.setAllRead(
username,
shared_consts.QualiNotifs.OTHERS
)
"
>
<q-item-section side>
<q-icon name="fas fa-check" />
</q-item-section>
<q-item-section>{{ $t('notifs.setallread') }}</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@click="
notifStore.deleteAll(
username,
shared_consts.QualiNotifs.OTHERS
)
"
>
<q-item-section side>
<q-icon name="fas fa-trash-alt" />
</q-item-section>
<q-item-section>{{ $t('notifs.deleteall') }}</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</div>
</q-bar>
<div class="clBorderSperator"></div>
<div class="q-ma-xs">
<q-list bordered class="rounded-borders">
<div v-if="num_notifs_unread === 0">
<q-item>
<q-item-label lines="1">{{ $t('notifs.nonotif') }}</q-item-label>
</q-item>
</div>
<q-item clickable v-for="(notif, index) in lasts_notifs" :key="index">
<!--<q-item-section avatar>
<q-avatar>
<q-item-label lines="1">{{ getTypeDirNotif(notif) }}</q-item-label>
@@ -84,32 +124,60 @@
<q-item-section avatar>
<q-avatar @click="clickNotif(notif)">
<img :src="notif.myimgsender" :alt="notif.sender">
<img :src="notif.myimgsender" :alt="notif.sender" />
</q-avatar>
</q-item-section>
<q-item-section v-ripple>
<q-item-label lines="5" :class="(!notif.read) ? 'unread' : 'read'" @click="clickNotif(notif)">
<q-item-label
lines="5"
:class="!notif.read ? 'unread' : 'read'"
@click="clickNotif(notif)"
>
<div v-html="getNotifText($t, notif, false)"></div>
</q-item-label>
<q-item-label caption lines="2" v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_FRIENDS && notif.status === 0" v-ripple>
<div class="row no-wrap justify-evenly" v-if="userStore.IsReqFriendByUsername(notif.sender)">
<q-item-label
caption
lines="2"
v-if="
notif.typedir === shared_consts.TypeNotifs.TYPEDIR_FRIENDS &&
notif.status === 0
"
v-ripple
>
<div
class="row no-wrap justify-evenly"
v-if="userStore.IsReqFriendByUsername(notif.sender)"
>
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-plus"
color="positive" :label="$t('friends.accept')"
@click="tools.addToMyFriends(q, userStore.my.username, notif.sender)"
color="positive"
:label="$t('friends.accept')"
@click="
tools.addToMyFriends(
q,
userStore.my.username,
notif.sender
)
"
/>
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-minus"
color="negative" :label="$t('friends.refuse')"
@click="tools.refuseReqFriends(q, userStore.my.username, notif.sender)"
color="negative"
:label="$t('friends.refuse')"
@click="
tools.refuseReqFriends(
q,
userStore.my.username,
notif.sender
)
"
/>
</div>
</q-item-label>
@@ -125,30 +193,52 @@
/>
</div>
</q-item-label>-->
<q-item-label caption lines="2"
v-else-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_GROUPS && notif.status === 0 && notif.typeid === shared_consts.TypeNotifs.ID_GROUP_REQUEST_TO_ENTER"
v-ripple>
<div class="row no-wrap justify-evenly" v-if="tools.iAmAdminGroup(notif.extrafield)">
<q-item-label
caption
lines="2"
v-else-if="
notif.typedir === shared_consts.TypeNotifs.TYPEDIR_GROUPS &&
notif.status === 0 &&
notif.typeid ===
shared_consts.TypeNotifs.ID_GROUP_REQUEST_TO_ENTER
"
v-ripple
>
<div
class="row no-wrap justify-evenly"
v-if="tools.iAmAdminGroup(notif.extrafield)"
>
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-plus"
color="positive" :label="$t('friends.accept')"
@click="tools.addToMyGroups(q, notif.sender, notif.extrafield)"
color="positive"
:label="$t('friends.accept')"
@click="
tools.addToMyGroups(q, notif.sender, notif.extrafield)
"
/>
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-minus"
color="negative" :label="$t('friends.refuse')"
@click="tools.refuseReqGroup(q, notif.sender, notif.extrafield)"
color="negative"
:label="$t('friends.refuse')"
@click="
tools.refuseReqGroup(q, notif.sender, notif.extrafield)
"
/>
</div>
</q-item-label>
<q-item-label caption lines="1" :class="(!notif.read) ? 'unread-date' : 'read-date'" @click="clickNotif(notif)">
<q-item-label
caption
lines="1"
:class="!notif.read ? 'unread-date' : 'read-date'"
@click="clickNotif(notif)"
>
<CTimeAgo :datetime="notif.datenotif" />
<!--{{ // getUsernameChatByNotif(notif) }}-->
</q-item-label>
@@ -158,32 +248,47 @@
<q-btn dense rounded icon="fas fa-ellipsis-h">
<q-menu>
<q-list style="min-width: 150px">
<q-item clickable v-close-popup @click="notifStore.setRead(notif._id)">
<q-item
clickable
v-close-popup
@click="notifStore.setRead(notif._id)"
>
<q-item-section side>
<q-icon name="fas fa-trash-alt"/>
<q-icon name="fas fa-trash-alt" />
</q-item-section>
<q-item-section>{{ $t('notifs.read') }}</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="notifStore.deleteRec(username, notif._id)">
<q-item
clickable
v-close-popup
@click="notifStore.deleteRec(username, notif._id)"
>
<q-item-section side>
<q-icon name="fas fa-trash-alt"/>
<q-icon name="fas fa-trash-alt" />
</q-item-section>
<q-item-section>{{ $t('notifs.delete_notif') }}</q-item-section>
<q-item-section>{{
$t('notifs.delete_notif')
}}</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="notifStore.deactivateRec(notif._id)">
<q-item
clickable
v-close-popup
@click="notifStore.deactivateRec(notif._id)"
>
<q-item-section side>
<q-icon name="fas fa-bell-slash"/>
<q-icon name="fas fa-bell-slash" />
</q-item-section>
<q-item-section>{{ $t('notifs.deactivate_notif') }}</q-item-section>
<q-item-section>{{
$t('notifs.deactivate_notif')
}}</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-item-label>
</q-item-section>
</q-item>
<q-separator/>
<q-separator />
</q-list>
</div>
</q-drawer>

View File

@@ -29,7 +29,7 @@ export default function () {
function isAlreadyBooked(eventparam: IEvents) {
const calendarStore = useCalendarStore()
return calendarStore.findEventBooked(eventparam, true)
return calendarStore.findEventBooked(eventparam._id, true)
}
function getWhereIcon(where: string) {

View File

@@ -36,8 +36,8 @@ export default function () {
function getUsernameChatByMsg(msg: IMessage) {
if (msg) {
if (msg.dest) {
if (msg.dest.username !== getMyUsername()) return msg.dest.username
return msg.origin ? msg.origin.username : {}
if (msg.dest !== getMyUsername()) return msg.dest
return msg.origin ? msg.origin : {}
}
} else {
return ''
@@ -150,7 +150,7 @@ export default function () {
function getMsgText(msg: IMessage, inarray: boolean) {
let add = ''
if (msg.origin && msg.origin.username === getMyUsername()) add = 'Tu: '
if (msg.origin && msg.origin === getMyUsername()) add = 'Tu: '
const ris = add + msg.message
if (inarray) return [ris]

View File

@@ -47,7 +47,9 @@ export interface IEvents {
export interface IBookedEvent {
_id?: any
userId: string
username: string
id_bookedevent?: any
tableType?: number
numpeople: number
numpeopleLunch?: number
numpeopleDinner?: number

View File

@@ -967,6 +967,7 @@ export interface IMySkill extends IMyMain {
NumLevel: number
adType: number
note: string
groupname: string,
// **ADDFIELD_MYSKILL
website: string
descr: string
@@ -993,6 +994,7 @@ export interface IMyGoods extends IMyMain {
NumLevel: number
adType: number
note: string
groupname: string,
// **ADDFIELD_MYSKILL
website: string
descr: string
@@ -1014,6 +1016,14 @@ export interface IMyBacheca extends IMyMain {
NumLevel: number
adType: number
note: string
organisedBy: string,
address: string,
min_partecip: number,
max_partecip: number,
contribstr: string,
groupname: string,
mygrp?: IMyGroup
// **ADDFIELD_MYBACHECAS
website: string
descr: string
@@ -1042,6 +1052,8 @@ export interface IMyHosp extends IMyMain {
website: string
date_created?: Date,
date_updated?: Date,
groupname: string,
//**ADDFIELD_MYHOSPS
}

View File

@@ -35,14 +35,8 @@ export const MsgDefault: IMessage = {
infoevent: '',
page: '',
},
origin: {
username: '',
idapp: '',
},
dest: {
idapp: '',
username: '',
},
origin: '',
dest: '',
message: '',
datemsg: new Date(),
read: false,
@@ -71,8 +65,8 @@ export interface IMessage {
_id?: any
idapp?: string
source?: ISource
origin?: IIdentity
dest?: IIdentity
origin: string
dest: string
message: string
datemsg?: Date
read?: boolean

View File

@@ -1,6 +1,7 @@
import { IToken } from '@model/other'
import { ICart, IOrderCart, IShareWithUs } from '@src/model/Products'
import { IAccount, ICircuit, IGallery, IImgGallery, IMyCircuit } from '@model/GlobalStore'
import { IBookedEvent } from './Calendar'
const enum ESexType {
None = 0,
@@ -71,6 +72,12 @@ export interface ISeen {
tab: number
}
export interface IAttend {
id: string
tab: number
num: number
}
export interface IFavBook {
username: string
}
@@ -137,9 +144,14 @@ export interface IUserProfile {
bookmark: IBookmark[]
favorite: IFavorite[]
seen: ISeen[]
attend: IAttend[]
// Query
myfav: IFavBook[]
mybook: IFavBook[]
myseen: IFavBook[]
myattend: IFavBook[]
mybookings: IBookedEvent[]
// in memory
asked_friends: any[]

View File

@@ -610,6 +610,7 @@ const msg_it = {
date_created: 'Creato il',
pub_created: 'Pubblicato il',
pub_updated: 'Aggiornato il',
who_updated: 'da:',
options: 'Opzioni',
link_telegram: 'Link al Canale/Gruppo Telegram',
refuse_cookie: 'Sei sicuro di rifiutare i Cookies? Se continui dovrai reinserire username e password tutte le volte che entri. I cookies servono per riproporti i filtri che utilizzi solitamente. (E\' Consigliato ACCETTARE i Cookies)',
@@ -854,6 +855,7 @@ const msg_it = {
warn_my_groups: 'nei miei Gruppi',
warn_my_ris_circuit: 'nei miei Circuiti',
new_event: 'Nuovo Evento',
new_attend: 'Nuovo Partecipante',
new_friends: 'Nuove Richieste di Amicizia',
delete_notif: 'Elimina questa notifica',
read: 'Segna come letto',
@@ -863,19 +865,19 @@ const msg_it = {
},
typenotifs: {
new_rec_bacheca: 'Annunci',
new_rec_bacheca_descr: 'Avvisami se vengono aggiunti nuovi Annunci',
new_rec_bacheca_descr: 'Avvisami se:',
friends: 'Richieste di Amicizia',
groups: 'Gruppi',
friends_descr: 'Avvisami se:',
events: 'Eventi',
events_descr: 'Avvisami se vengono aggiunti nuovi Eventi',
events_descr: 'Avvisami se:',
circuits: 'Circuiti',
circuits_descr: 'Avvisami:',
booking: 'Prenotazioni',
test: 'Test',
test_descr: 'Test descr',
favorite: 'Preferiti',
favorite_descr: 'Notificami se una persona mette "Mi Piace" su un tuo annuncio o post',
favorite_descr: 'Notificami se:',
},
notifsid: {
bacheca_new_good: 'Nuovo Bene',
@@ -887,6 +889,7 @@ const msg_it = {
circuits_new: 'Si creano Nuovi Circuiti',
test_new: 'Nuovo Test',
favorite_new: '"Mi Piace" su un tuo annuncio o post',
attend_new: 'Nuovi Partecipanti',
},
event: {
_id: 'id',
@@ -941,6 +944,16 @@ const msg_it = {
showinnewsletter: 'Mostra nella Newsletter',
color: 'Colore del titolo',
testo_di_spiegazione: 'Testo di Spiegazione',
attend: 'Parteciperò',
not_attend: 'Non Parteciperò',
organisedBy: 'Organizzato da',
organisedBy_insert: 'Organizzato da (lasciare vuoto se sei tu)',
address: 'Indirizzo Località',
min_partecip: 'Minimo partecipanti',
max_partecip: 'Massimo partecipanti',
contribstr: 'Contributo',
contact_phone: 'Telefono per info',
contact_telegram: 'Username Telegram',
},
disc: {
typol_code: 'Codice Tipologia',
@@ -1157,6 +1170,7 @@ const msg_it = {
circuits: 'Circuiti',
groupname: 'Conto Collettivo',
contocom: 'Conto Comunitario',
events: 'Eventi',
},
finder: {
search_skill: 'Cerca una specializzazione'
@@ -1492,11 +1506,14 @@ const msg_it = {
cmd: {
favorite_set: 'Aggiunto ai Preferiti',
favorite_unset: 'Rimosso dai Preferiti',
bookmark_set: 'Aggiunto ai Segnalibri',
bookmark_set: 'Salvato sui Segnalibri',
bookmark_unset: 'Rimosso dai Segnalibri',
attend_set: 'Hai confermato di partecipare all\'evento',
attend_unset: 'Hai annullato la tua partecipazione all\'evento',
favorite: 'Piace a {num} utenti',
bookmark: 'Salvato da {num} utenti',
seen: 'Visto da {num} utenti',
attend: '{num} Partecipanti',
},
},

View File

@@ -42,9 +42,38 @@ export const useCalendarStore = defineStore('CalendarStore', {
}),
getters: {
findEventBooked: (mystate: ICalendarState) => (myevent: IEvents, isconfirmed: boolean) => {
updatearrBookingEvent: (mystate: ICalendarState) => (id_bookedevent: any, arrBookings: IBookedEvent[]) => {
// Rimuovi quelli precedenti
mystate.bookedevent = mystate.bookedevent.filter((rec: IBookedEvent) => rec.id_bookedevent !== id_bookedevent)
if (arrBookings) {
// Aggiorna quelli appena arrivati:
mystate.bookedevent = [...mystate.bookedevent, ...arrBookings]
}
console.log('BOOKEDEV: ', mystate.bookedevent)
},
findEventBooked: (mystate: ICalendarState) => (id: any, isconfirmed: boolean) => {
const userStore = useUserStore()
return mystate.bookedevent.find((bookedevent) => (bookedevent.id_bookedevent === myevent._id) && (bookedevent.userId === userStore.my._id) && ((isconfirmed && bookedevent.booked) || (!isconfirmed)))
return mystate.bookedevent.find((bookedevent) => (bookedevent.id_bookedevent === id) && (bookedevent.userId === userStore.my._id) && ((isconfirmed && bookedevent.booked) || (!isconfirmed)))
},
findAllBookedByIdEvent: (mystate: ICalendarState) => (id_bookedevent: any) => {
const arr = mystate.bookedevent.filter((rec: IBookedEvent) => (rec.id_bookedevent === id_bookedevent) && rec.booked)
if (arr)
return arr
else
return []
},
isPartecipero: (mystate: ICalendarState) => (id: any, table: string) => {
const userStore = useUserStore()
const isconfirmed = true
const mybooked = mystate.bookedevent.find((bookedevent) => (bookedevent.id_bookedevent === id) && (bookedevent.userId === userStore.my._id) && ((isconfirmed && bookedevent.booked) || (!isconfirmed)))
return !!mybooked
},
getNumParticipants: (mystate: ICalendarState) => (myevent: IEvents, showall: boolean, tipo = 0): number => {
@@ -103,7 +132,7 @@ export const useCalendarStore = defineStore('CalendarStore', {
},
actions: {
getOperatorByUsername (username: string): IOperators | undefined {
getOperatorByUsername(username: string): IOperators | undefined {
const ctrec = this.operators.find((rec: IOperators) => rec.username === username)
return ctrec
},
@@ -125,6 +154,7 @@ export const useCalendarStore = defineStore('CalendarStore', {
return {
_id: bookevent._id,
id_bookedevent: bookevent.id_bookedevent,
username: bookevent.username,
infoevent: bookevent.infoevent,
numpeople: bookevent.numpeople,
numpeopleLunch: bookevent.numpeopleLunch,
@@ -170,7 +200,7 @@ export const useCalendarStore = defineStore('CalendarStore', {
},
async CancelEvent({ id }: {id: string}) {
async CancelEvent({ id }: { id: string }) {
const globalStore = useGlobalStore()
return globalStore.DeleteRec({ table: costanti.TABEVENTS, id })
},
@@ -183,7 +213,8 @@ export const useCalendarStore = defineStore('CalendarStore', {
return (this.intervalRange.max - this.intervalRange.min) * (1 / this.intervalRangeStep)
},
async CancelBookingEvent({ ideventbook, notify }: {ideventbook: string, notify: string}) {
async CancelBookingEvent({ ideventbook, notify }: { ideventbook: string, notify: string }) {
console.log('CALSTORE: CancelBookingEvent', ideventbook, notify)
return Api.SendReq('/booking/' + ideventbook + '/' + notify + '/' + process.env.APP_ID, 'DELETE', null)

View File

@@ -48,17 +48,17 @@ export const useMessageStore = defineStore('MessageStore', {
// console.table(users_msg.msgs)
if (users_msg.msgs) {
let userother = users_msg.msgs.slice(-1)[0].dest.username
let userother: any = users_msg.msgs.slice(-1)[0].dest
if (userother === userStore.my.username)
userother = users_msg.msgs.slice(-1)[0].origin.username
userother = users_msg.msgs.slice(-1)[0].origin
let index = this.last_msgs.findIndex((rec: IMessage) => (rec.dest!.username === userother) || (rec.origin!.username === userother))
let index = this.last_msgs.findIndex((rec: IMessage) => (rec.dest === userother) || (rec.origin === userother))
if (index >= 0) {
// Update last message
this.last_msgs[index] = users_msg.msgs.slice(-1)[0]
} else {
this.last_msgs.push(users_msg.msgs.slice(-1)[0])
index = this.last_msgs.findIndex((rec: IMessage) => (rec.dest!.username === userother) || (rec.origin!.username === userother))
index = this.last_msgs.findIndex((rec: IMessage) => (rec.dest === userother) || (rec.origin === userother))
}
if (this.last_msgs[index])
users_msg.lastdataread = this.last_msgs[index].datemsg
@@ -101,8 +101,7 @@ export const useMessageStore = defineStore('MessageStore', {
data.source!.page = ''
data.idapp = process.env.APP_ID
data.origin!.idapp = process.env.APP_ID
data.origin!.username = userStore.my.username
data.origin = userStore.my.username
data.datemsg = tools.getDateNow()
data.status = StatusMessage.WaitingToSend
// Options
@@ -122,7 +121,7 @@ export const useMessageStore = defineStore('MessageStore', {
const myarr = []
myarr.push(data)
this.setMsg(myarr, data.dest!.username!)
this.setMsg(myarr, data.dest)
return true
}
}

View File

@@ -21,6 +21,7 @@ export const costanti = {
FAVORITE: 1,
BOOKMARK: 2,
SEEN: 3,
ATTEND: 4,
},
ENABLE_FRIENDS: false,
@@ -307,6 +308,8 @@ export const costanti = {
CMD_MODIFY: 2,
CMD_SHOW_PAGE: 3,
CMD_OPEN_PAGE: 4,
CMD_DUPLICATE: 5,
CMD_CLONE: 6,
SHOW_ALL: 50,

View File

@@ -1359,7 +1359,6 @@ export const colmyHosp = [
isadvanced_field: true,
sortable: false,
}),
// **ADDFIELD_MYBACHECAS
AddCol({
name: 'link_maplocation', label_trans: 'reg.link_maplocation', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
@@ -1394,6 +1393,26 @@ export const colmyBachecas = [
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'descr',
label_trans: 'proj.shortdescr',
fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
maxlength: 120,
required: true,
sortable: false,
}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'username',
@@ -1407,26 +1426,13 @@ export const colmyBachecas = [
sortable: false,
}),
AddCol({
name: 'idCity',
label_trans: 'skill.city',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
name: 'groupname',
label_trans: 'proj.gruppo',
foredit: false,
tipovisu: costanti.TipoVisu.LINK,
fieldtype: costanti.FieldType.username_chip,
link: '/mygrp/groupname',
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
sortable: false,
required: true,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
fieldtype: costanti.FieldType.select,
icon: 'fas fa-users',
jointable: 'pub_to_share',
}),
AddCol(
{
@@ -1451,22 +1457,19 @@ export const colmyBachecas = [
sortable: false,
}),
AddCol({
name: 'descr',
label_trans: 'proj.shortdescr',
fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
name: 'idCity',
label_trans: 'skill.city',
fieldtype: costanti.FieldType.multiselect_by_server,
jointable: 'cities',
tablesel: 'cities',
noshowlabel: true,
maxlength: 120,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
sortable: false,
required: true,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
required: false,
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'idSector',
@@ -1494,6 +1497,50 @@ export const colmyBachecas = [
required: false,
sortable: false,
}),
AddCol({
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
required: false,
isadvanced_field: true,
sortable: false,
}),
AddCol({
name: 'address',
label_trans: 'event.address',
fieldtype: costanti.FieldType.string,
}),
AddCol({
name: 'link_maplocation', label_trans: 'reg.link_maplocation', isadvanced_field: true, fieldtype: costanti.FieldType.link,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
sortable: false,
}),
AddCol({
name: 'pub_to_share',
label_trans: 'skill.pub_to_share',
fieldtype: costanti.FieldType.select,
icon: 'fas fa-users',
jointable: 'pub_to_share',
}),
AddCol({
name: 'organisedBy',
label_trans: 'event.organisedBy_insert',
fieldtype: costanti.FieldType.string,
required: false,
sortable: false,
}),
AddCol({
name: 'contact_phone',
label_trans: 'event.contact_phone',
fieldtype: costanti.FieldType.string,
}),
AddCol({
name: 'contact_telegram',
label_trans: 'event.contact_telegram',
fieldtype: costanti.FieldType.string,
}),
AddCol({ name: 'min_partecip', label_trans: 'event.min_partecip', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'max_partecip', label_trans: 'event.max_partecip', fieldtype: costanti.FieldType.number }),
AddCol({
name: 'idContribType',
label_trans: 'contribtype.name',
@@ -1506,6 +1553,7 @@ export const colmyBachecas = [
isadvanced_field: false,
sortable: false,
}),
AddCol({ name: 'contribstr', label_trans: 'event.contribstr', fieldtype: costanti.FieldType.string }),
/*AddCol({
name: '',
fieldtype: costanti.FieldType.separator,
@@ -1521,16 +1569,6 @@ export const colmyBachecas = [
sortable: true,
showWhen: 0
}),
AddCol({
name: 'photos',
label_trans: 'skill.photos',
fieldtype: costanti.FieldType.listimages,
jointable: '',
showpicprofile_ifnotset: true,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
isadvanced_field: true,
sortable: false,
}),
// **ADDFIELD_MYBACHECAS
AddCol({
name: 'website', label_trans: 'reg.website', isadvanced_field: true, fieldtype: costanti.FieldType.link,

View File

@@ -1069,6 +1069,46 @@ export const tools = {
label: '10',
value: 10,
},
{
id: 11,
label: '11',
value: 11,
},
{
id: 12,
label: '12',
value: 12,
},
{
id: 13,
label: '13',
value: 13,
},
{
id: 14,
label: '14',
value: 14,
},
{
id: 15,
label: '15',
value: 15,
},
{
id: 20,
label: '20',
value: 20,
},
{
id: 25,
label: '25',
value: 25,
},
{
id: 30,
label: '30',
value: 30,
},
],
selectPhase: {
@@ -3766,9 +3806,9 @@ export const tools = {
return msg
}
,
gettextevent(myevent: IEvents) {
gettextevent(myevent: any) {
// return '"' + myevent.title + '" (' + func_tools.getDateStr(myevent.date) + ') - ' + myevent.time
return '"' + myevent.title + '" (' + this.getstrDateEmailTime(myevent.dateTimeStart) + ')'
return '"' + (myevent.title ? myevent.title : (myevent.descr ? myevent.descr: '')) + '" (' + this.getstrDateEmailTime(myevent.dateTimeStart) + ')'
},
getlangforQuasar(mylang: string) {
@@ -6862,7 +6902,7 @@ export const tools = {
return ris
},
getdefaultnewrec_MySkill(): any {
getdefaultnewrec_MySkill(groupname?: string): any {
return {
idSector: tools.getSelectionByTable('sectors', 0, true),
@@ -6878,6 +6918,7 @@ export const tools = {
//**ADDFIELD_MYSKILL
website: '',
descr: '',
groupname,
}
},
@@ -6944,7 +6985,7 @@ export const tools = {
},
getdefaultnewrec_MyBacheca(): any {
getdefaultnewrec_MyBacheca(extrarec: any): any {
return {
idSector: tools.getSelectionByTable('sectors', 0, true),
idSkill: tools.getSelectionByTable('skills', 0, true),
@@ -6958,6 +6999,13 @@ export const tools = {
pub_to_share: tools.getSelectionByTable('pub_to_share', shared_consts.PUBTOSHARE.ALL, true),
photos: [],
note: '',
organisedBy: tools.getSelectionByTable('organisedBy', ''),
address: tools.getSelectionByTable('address', ''),
min_partecip: tools.getSelectionByTable('min_partecip', 0, true),
max_partecip: tools.getSelectionByTable('max_partecip', 0, true),
contribstr: tools.getSelectionByTable('contribstr', ''),
groupname: extrarec && extrarec.groupname ? extrarec.groupname : '',
//**ADDFIELD_MYBACHECAS
website: '',
descr: '',
@@ -7811,7 +7859,235 @@ export const tools = {
return 0
},
getdefaultnewrec(table: string, extrarec?: any): any {
if (table === toolsext.TABMYSKILLS) {
return tools.getdefaultnewrec_MySkill()
} else if (table === toolsext.TABMYBACHECAS) {
return tools.getdefaultnewrec_MyBacheca(extrarec)
} else if (table === toolsext.TABMYHOSPS) {
return tools.getdefaultnewrec_MyHosp()
} else if (table === toolsext.TABMYGOODS) {
return tools.getdefaultnewrec_MyGoods()
} else if (table === toolsext.TABMYGROUPS) {
return tools.getdefaultnewrec_MyGroup()
} else if (table === toolsext.TABCIRCUITS) {
return tools.getdefaultnewrec_Circuit()
}
return null
},
extraparams(table: string, extra?: any) {
if (table === toolsext.TABMYGROUPS) {
let lk_tab = 'mygroups'
let lk_LF = 'userId'
let lk_FF = '_id'
let lk_as = 'group'
let af_objId_tab = 'myId'
return {
lookup1: {
lk_tab,
lk_LF,
lk_FF,
lk_as,
af_objId_tab,
lk_proj: shared_consts.getProjectByTable(table, {}),
},
lookup2: {
lk_tab: 'catgrps',
lk_LF: 'idCatGrp',
lk_FF: '_id',
lk_as: 'recCatGrp',
lk_proj: shared_consts.getProjectByTable(table, {}),
},
lookup3: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'comune',
lk_proj: shared_consts.getProjectByTable(table, {}),
},
lookup4: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
} else if (table === toolsext.TABCIRCUITS) {
let lk_tab = 'cities'
let lk_LF = 'idCity'
let lk_FF = '_id'
let lk_as = 'mycities'
let af_objId_tab = ''
return {
lookup1: {
lk_tab,
lk_LF,
lk_FF,
lk_as,
af_objId_tab,
lk_proj: shared_consts.getProjectByTable(table, {}),
},
}
} else if (table === toolsext.TABMYGOODS) {
return {
lookup1: {
lk_tab: 'users',
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'goods',
lk_LF: 'idGood',
lk_FF: '_id',
lk_as: 'recGood',
af_objId_tab: '',
lk_proj: shared_consts.getProjectForAll({}, table),
},
lookup3: {
lk_tab: 'sectorgoods',
// lk_LF: 'recGood.idSectorGood',
lk_LF: 'idSectorGood',
lk_FF: '_id',
lk_as: 'sectorGood',
af_objId_tab: '',
},
lookup4: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
} else if (table === toolsext.TABMYBACHECAS) {
return {
lookup1: {
lk_tab: 'users',
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'skills',
lk_LF: 'idSkill',
lk_FF: '_id',
lk_as: 'recSkill',
af_objId_tab: '',
lk_proj: shared_consts.getProjectForAll({}, table),
},
lookup3: {
lk_tab: toolsext.TABSECTORS,
// lk_LF: 'recSkill.idSector',
lk_LF: 'idSector',
lk_FF: '_id',
lk_as: 'sector',
af_objId_tab: '',
},
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,
},
}
} else if (table === toolsext.TABMYHOSPS) {
let obj2: any = {}
if (extra && extra.myrecfiltertoggle.value === tools.FILTER_ALL) {
obj2['visibile'] = true
}
return {
filtersearch2: [obj2],
lookup1: {
lk_tab: 'users',
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
lk_proj: shared_consts.getProjectForAll({}, table),
},
}
} else {
return {
// Servizi
lookup1: {
lk_tab: 'users',
lk_LF: 'userId',
lk_FF: '_id',
lk_as: 'user',
af_objId_tab: 'myId',
},
lookup2: {
lk_tab: 'skills',
lk_LF: 'idSkill',
lk_FF: '_id',
lk_as: 'recSkill',
af_objId_tab: '',
lk_proj: shared_consts.getProjectForAll({}, table),
},
lookup3: {
lk_tab: toolsext.TABSECTORS,
lk_LF: 'idSector',
lk_FF: '_id',
lk_as: 'sector',
af_objId_tab: '',
},
lookup5: {
lk_tab: 'cities',
lk_LF: 'idCity',
lk_FF: '_id',
lk_as: 'mycities',
af_objId_tab: '',
},
}
}
},
getNumPartecipantes(myrec: any) {
if (myrec && myrec.mybookings && myrec.mybookings.length > 0) {
return myrec.mybookings.reduce((accum: any, currval: any) => accum + (currval.booked ? 0 : currval.numpeople), 0)
}
return 0
},
isPartecipero(myrec: any) {
const userStore = useUserStore()
if (myrec && myrec.mybookings && myrec.mybookings.length > 0) {
const isconfirmed = true
return myrec.mybookings.find((bookedevent: any) => (bookedevent.id_bookedevent === myrec._id) && (bookedevent.userId === userStore.my._id) && ((isconfirmed && bookedevent.booked) || (!isconfirmed)))
}
return 0
},
// FINE !

View File

@@ -35,7 +35,7 @@ import { Router } from 'vue-router'
import { useProjectStore } from '@store/Projects'
import { shared_consts } from '@/common/shared_vuejs'
import { costanti } from '@costanti'
import { IBookmark, ISeen, IFavBook, IFavorite, IGroupShort, IMyGroup, IUserAdmins } from '@model/UserStore'
import { IBookmark, ISeen, IFavBook, IAttend, IFavorite, IGroupShort, IMyGroup, IUserAdmins } from '@model/UserStore'
import globalroutines from '../globalroutines/index'
import { useNotifStore } from '@store/NotifStore'
@@ -45,6 +45,7 @@ export const CMD_USER = {
SET_FAVORITE: 1,
SET_BOOKMARK: 2,
SET_SEEN: 3,
SET_ATTEND: 4,
}
export const DefaultUser: IUserFields = {
@@ -85,9 +86,12 @@ export const DefaultUser: IUserFields = {
bookmark: [],
favorite: [],
seen: [],
attend: [],
myfav: [],
mybook: [],
myseen: [],
myattend: [],
mybookings: [],
notif_idCities: [],
notif_provinces: [],
notif_regions: [],
@@ -156,9 +160,12 @@ export const DefaultProfile: IUserProfile = {
bookmark: [],
favorite: [],
seen: [],
attend: [],
myfav: [],
mybook: [],
myseen: [],
myattend: [],
mybookings: [],
notif_idCities: [],
notif_provinces: [],
notif_regions: [],
@@ -254,7 +261,7 @@ export const useUserStore = defineStore('UserStore', {
return { sortBy: 'namecomplete', descending: false, page: 1, rowsNumber: 0, rowsPerPage: 15 }
},
getSortFieldsAvailable(): any[] {
return [{ label: 'Name e User', value: { 'namecomplete': 1 } }, { label: 'Ultimi entrati', value: { 'date_reg': -1} }]
return [{ label: 'Name e User', value: { 'namecomplete': 1 } }, { label: 'Ultimi entrati', value: { 'date_reg': -1 } }]
},
IsMyFriendByUsername(username: string): boolean {
@@ -1672,7 +1679,37 @@ export const useUserStore = defineStore('UserStore', {
this.my.profile.favorite = tools.removeIObjectOnce(this.my.profile.favorite, { id, tab })
if (myrec && myrec.myfav)
myrec.myfav = myrec.myfav.filter((rec: IFavBook) => rec.username !== this.my.username)
tools.showPositiveNotif($q, t('cmd.favorite_unset'))
tools.showNegativeNotif($q, t('cmd.favorite_unset'))
}
}).catch((error) => {
tools.showNegativeNotif($q, t('db.recfailed'))
return {}
})
},
async setAttend($q: any, t: any, id: any, table: string, num: number, myrec: any) {
let value = false
console.log('table', table)
const tab = tools.getNumTabByTable(table)
value = this.isAttend(id, table) ? false : true
return await Api.SendReq('/users/cmd', 'POST', { cmd: CMD_USER.SET_ATTEND, id, tab, value })
.then((res) => {
if (res && res.data.state === 1) {
if (!myrec.myattend)
myrec.myattend = []
this.my.profile.attend.push({ id, tab, num })
if (myrec)
myrec.myattend.push({ username: this.my.username })
tools.showPositiveNotif($q, t('cmd.attend_set'))
} else if (res && res.data.state === -1) {
this.my.profile.attend = tools.removeIObjectOnce(this.my.profile.attend, { id, tab })
if (myrec && myrec.myattend)
myrec.myattend = myrec.myattend.filter((rec: IFavBook) => rec.username !== this.my.username)
tools.showNegativeNotif($q, t('cmd.attend_unset'))
}
}).catch((error) => {
tools.showNegativeNotif($q, t('db.recfailed'))
@@ -1699,6 +1736,12 @@ export const useUserStore = defineStore('UserStore', {
return myfavorite
},
isAttend(id: string, table: string) {
const tab = tools.getNumTabByTable(table)
const myattend = this.my.profile.attend.find((rec: IAttend) => ((rec.id === id) && (rec.tab === tab)))
return myattend
},
async setBookmark($q: any, t: any, id: any, table: string, myrec: any) {
let value = false
@@ -1719,7 +1762,7 @@ export const useUserStore = defineStore('UserStore', {
this.my.profile.bookmark = tools.removeIObjectOnce(this.my.profile.bookmark, { id, tab })
if (myrec && myrec.mybook)
myrec.mybook = myrec.mybook.filter((rec: IFavBook) => rec.username !== this.my.username)
tools.showPositiveNotif($q, t('cmd.bookmark_unset'))
tools.showNegativeNotif($q, t('cmd.bookmark_unset'))
}
}).catch((error) => {
console.error('error', error)
@@ -1744,10 +1787,17 @@ export const useUserStore = defineStore('UserStore', {
this.my.profile.seen.push({ id, tab })
if (myrec)
myrec.myseen.push({ username: this.my.username })
}
if (res && res.data) {
if (res.data.record) {
return res.data.record
}
}
return null
}).catch((error) => {
console.error('error', error)
return {}
return null
})
},

View File

@@ -68,7 +68,7 @@ export default defineComponent({
const lastmsg: IMessage = messageStore.getlasts_messages().slice(-1)[0]
console.log('lastmsg', lastmsg)
if (lastmsg) {
return (lastmsg.origin!.username !== Username()) ? lastmsg.origin!.username : lastmsg.origin!.username
return (lastmsg.origin !== Username()) ? lastmsg.origin : lastmsg.origin
} else {
return ''
}
@@ -180,8 +180,8 @@ export default defineComponent({
}
function selChat(mymsg: IMessage) {
if (chatsel.value.username !== mymsg.dest!.username)
$router.replace('/messages/' + mymsg.dest!.username)
if (chatsel.value.username !== mymsg.dest)
$router.replace('/messages/' + mymsg.dest)
else {
// refresh
refreshdata(chatsel.value.username)
@@ -205,13 +205,11 @@ export default defineComponent({
function sendMsg() {
const data: IMessage = {
dest: {
idapp: process.env.APP_ID,
username: chatsel.value.username
},
origin: '',
dest: chatsel.value.username,
message: mytexttosend.value
}
data.dest!.username = chatsel.value.username
data.dest = chatsel.value.username
data.message = mytexttosend.value
mytexttosend.value = ''

View File

@@ -31,7 +31,7 @@
<q-item
clickable
:active="isMenuActive(msg.dest.username)"
:active="isMenuActive(msg.dest)"
active-class="active-user"
v-for="(msg, index) in lasts_messages()"
:key="index"
@@ -117,7 +117,7 @@
<div>
<div
class="chat_dest"
v-if="msg.dest.username === Username()"
v-if="msg.dest === Username()"
>
<q-chat-message
:name="getUsernameChatByMsg(msg)"

View File

@@ -487,7 +487,6 @@ export default defineComponent({
showonlymine,
tabellare,
showsaldi,
extraparams_groups,
filterextra_group,
groupsListAdmin,
groupnameSel,

View File

@@ -71,11 +71,6 @@ export default defineComponent({
})
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: {

View File

@@ -175,37 +175,6 @@ 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,
surname: 1,
'profile.img': 1,
'profile.mygroups': 1,
'profile.qualifica': 1,
'profile.resid_province': 1,
reported: 1,
date_report: 1,
username_who_report: 1,
}
},
}
}
function extraparams_rich() {
return {
querytype: shared_consts.QUERYTYPE_MYGROUP,
@@ -239,6 +208,12 @@ export default defineComponent({
}
}
function filtroeventsgroup() {
if (mygrp.value)
return [{ groupname: mygrp.value.groupname }]
else
return null
}
onMounted(mounted)
@@ -265,7 +240,6 @@ export default defineComponent({
searchList,
colmyUserPeople,
colmyUserGroup,
extraparams,
extraparams_rich,
extraparams_refused,
tab,
@@ -287,6 +261,7 @@ export default defineComponent({
tabcircuit,
circuitIndex,
circuitslistOpt,
filtroeventsgroup,
}
}
})

View File

@@ -173,12 +173,6 @@
name="info"
icon="fas fa-info"
></q-tab>
<q-tab
v-if="!!mygrp.note"
:label="t('groups.page')"
name="page"
icon="fas fa-file-word"
></q-tab>
<q-tab
v-if="
tools.iCanShowGroupsMember(mygrp) ||
@@ -197,6 +191,11 @@
name="circuits"
icon="fas fa-coins"
></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>
@@ -356,15 +355,21 @@
</div>
</q-card-section>
</q-card>
</q-tab-panel>
<q-card v-if="mygrp.note">
<q-card-section>
<div class="text-h6">Pagina:</div>
</q-card-section>
<q-separator />
<q-tab-panel name="page">
<q-card-section>
<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-card-section>
</q-card>
</q-tab-panel>
<q-tab-panel
@@ -394,39 +399,6 @@
</q-tabs>
<q-tab-panels v-model="tabmembers" animated>
<q-tab-panel name="all">
<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"
@@ -520,8 +492,10 @@
></q-tab>
</q-tabs>
</q-tab-panel>
<q-tab-panel name="events"> </q-tab-panel>
</q-tab-panels>
<div v-if="tabgrp === 'circuits' && tabcircuit === 'info'">
<q-tab-panels v-model="tabcircuit" animated>
<q-tab-panel name="info" style="max-width: 500px">
<div v-for="(circuit, ind) of circuitslist" :key="ind">
@@ -534,7 +508,9 @@
/>
</div>
</q-tab-panel>
<q-tab-panel name="mov">
</q-tab-panels>
</div>
<div v-if="tabgrp === 'circuits' && tabcircuit === 'mov'">
<div v-if="circuitslist && circuitslist.length > 0">
<q-toggle v-model="tabellare" label="Tabella"></q-toggle>
@@ -567,7 +543,9 @@
:showType="costanti.SHOW_MOVEMENTS"
:showCol="true"
:showHeaderCol="true"
:extraparams="getExtraparams_movs_grp(circuitslist[circuitIndex])"
:extraparams="
getExtraparams_movs_grp(circuitslist[circuitIndex])
"
extrafield=""
:visufind="costanti.FRIENDS"
>
@@ -600,14 +578,60 @@
:showType="costanti.SHOW_MOVEMENTS"
:showCol="false"
:showHeaderCol="false"
:extraparams="getExtraparams_movs_grp(circuitslist[circuitIndex])"
:extraparams="
getExtraparams_movs_grp(circuitslist[circuitIndex])
"
extrafield=""
:visufind="costanti.FRIENDS"
>
</CGridTableRec>
</div>
</q-tab-panel>
</q-tab-panels>
</div>
<div v-if="tabgrp === 'events'">
<CSkill
v-if="filtroeventsgroup()"
:groupname="mygrp.groupname"
:table="shared_consts.TABLES_MYBACHECAS"
:filtercustom="filtroeventsgroup()"
:butt_modif_new="true"
:visuinpage="true"
:noaut="false"
:title="$t('groups.events')"
/>
</div>
<div v-if="tabgrp === 'members' && tabmembers === 'all'">
<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="tools.extraparams(shared_consts.TABMYGROUPS)"
:visufind="
tools.iAmAdminGroup(groupname)
? costanti.REQ_REMOVE_USER_TO_GROUP
: costanti.FIND_PEOPLE
"
>
</CGridTableRec>
</div>
</div>
<div
v-else