++ 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

@@ -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>