- Pagina MySkills personale
This commit is contained in:
@@ -70,7 +70,11 @@ function AddCol(params: IColGridTable) {
|
||||
addall: (params.addall === undefined) ? false : params.addall,
|
||||
filter: (params.filter === undefined) ? null : params.filter,
|
||||
noshowifnone: (params.noshowifnone === undefined) ? false : params.noshowifnone,
|
||||
noshowlabel: (params.noshowlabel === undefined) ? false : params.noshowlabel,
|
||||
notShowInNewRec: (params.notShowInNewRec === undefined) ? false : params.notShowInNewRec,
|
||||
showOnlyNewRec: (params.showOnlyNewRec === undefined) ? false : params.showOnlyNewRec,
|
||||
visuinpage: (params.visuinpage === undefined) ? false : params.visuinpage,
|
||||
noShowView: (params.noShowView === undefined) ? false : params.noShowView,
|
||||
notsave: (params.notsave === undefined) ? false : params.notsave,
|
||||
filter_table: (params.filter_table === undefined) ? '' : params.filter_table,
|
||||
maxlength: (params.maxlength === undefined) ? 0 : params.maxlength,
|
||||
@@ -422,23 +426,35 @@ export const colmySkills = [
|
||||
}), */
|
||||
//AddCol({ name: 'name', label_trans: 'reg.name', fieldtype: costanti.FieldType.string }),
|
||||
//AddCol({ name: 'surname', label_trans: 'reg.surname', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username', foredit: false, tipovisu: costanti.TipoVisu.LINK, link: '/my/username' }),
|
||||
/*AddCol({
|
||||
AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string, noshowifnone: true, maxlength: 70, noshowlabel: true, noShowView: true }),
|
||||
AddCol({
|
||||
name: 'photos',
|
||||
label_trans: 'skill.photos',
|
||||
fieldtype: costanti.FieldType.listimages,
|
||||
jointable: '',
|
||||
noshowifnone: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idSector',
|
||||
label_trans: 'sectors.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
required: true,
|
||||
jointable: 'sectors',
|
||||
|
||||
}), */
|
||||
AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string, noshowifnone: true, maxlength: 40 }),
|
||||
notsave: true,
|
||||
showOnlyNewRec: true,
|
||||
visible: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idSkill',
|
||||
label_trans: 'skill.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
required: true,
|
||||
jointable: 'skills',
|
||||
// filter_table: 'sectors',
|
||||
filter_table: 'sectors',
|
||||
filter_field: 'idSector',
|
||||
noshowlabel: true,
|
||||
icon: 'far fa-id-card',
|
||||
visuinpage: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idSubSkill',
|
||||
@@ -448,6 +464,9 @@ export const colmySkills = [
|
||||
jointable: 'subskills',
|
||||
filter_table: 'skills',
|
||||
filter_field: 'idSkill',
|
||||
noshowlabel: true,
|
||||
icon: 'fas fa-scroll',
|
||||
visuinpage: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'numLevel',
|
||||
@@ -456,6 +475,9 @@ export const colmySkills = [
|
||||
required: true,
|
||||
jointable: 'levels',
|
||||
noshowifnone: true,
|
||||
noshowlabel: true,
|
||||
icon: 'fas fa-layer-group',
|
||||
visuinpage: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idStatusSkill',
|
||||
@@ -463,6 +485,7 @@ export const colmySkills = [
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'statusSkills',
|
||||
noshowifnone: true,
|
||||
visuinpage: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idContribType',
|
||||
@@ -470,6 +493,9 @@ export const colmySkills = [
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'contribtypes',
|
||||
noshowifnone: true,
|
||||
noshowlabel: true,
|
||||
icon: 'fas fa-hands-helping',
|
||||
visuinpage: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idCity',
|
||||
@@ -477,16 +503,13 @@ export const colmySkills = [
|
||||
fieldtype: costanti.FieldType.multiselect_by_server,
|
||||
jointable: 'cities',
|
||||
tablesel: 'cities',
|
||||
noshowlabel: true,
|
||||
icon: 'fas fa-map-marker-alt',
|
||||
visuinpage: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'photos',
|
||||
label_trans: 'skill.photos',
|
||||
fieldtype: costanti.FieldType.listimages,
|
||||
jointable: '',
|
||||
noshowifnone: true,
|
||||
}),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username', foredit: false, tipovisu: costanti.TipoVisu.LINK, link: '/my/username', noshowlabel: true }),
|
||||
AddCol({ name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html, noshowifnone: true,
|
||||
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '' }),
|
||||
titlepopupedit: 'Dettagli:', field_extra1: 'username', subfield_extra1: '' }),
|
||||
AddCol(DuplicateRec),
|
||||
AddCol(ModifRec),
|
||||
AddCol(DeleteRec),
|
||||
@@ -1415,6 +1438,24 @@ export const fieldsTable = {
|
||||
label_trans: 'reg.manage_telegram',
|
||||
fieldtype: costanti.FieldType.boolean,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'profile.username_telegram',
|
||||
field: 'profile',
|
||||
subfield: 'username_telegram',
|
||||
label_trans: 'reg.username_telegram',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'profile.firstname_telegram',
|
||||
field: 'profile',
|
||||
subfield: 'firstname_telegram',
|
||||
label_trans: 'reg.firstname_telegram',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'profile.lastname_telegram',
|
||||
field: 'profile',
|
||||
subfield: 'lastname_telegram',
|
||||
label_trans: 'reg.lastname_telegram',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'profile.socio',
|
||||
field: 'profile',
|
||||
@@ -1813,6 +1854,7 @@ export const fieldsTable = {
|
||||
columns: colCitys,
|
||||
colkey: '_id',
|
||||
collabel: 'comune',
|
||||
// collabel: (rec: any) => `${rec.comune} (${rec.prov})`,
|
||||
remote: true,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1470,11 +1470,15 @@ export const tools = {
|
||||
const myimage = dir + file
|
||||
// console.log('includes = ', static_data.preLoadImages.map((a) => a.imgname).includes(myimage), myimage)
|
||||
let ris = ''
|
||||
// @ts-ignore
|
||||
if (this.isMobile() && (preloadedimages().map((a) => a.imgname).includes(myimage))) {
|
||||
ris = `${dir}mobile/${file}`
|
||||
} else {
|
||||
ris = myimage
|
||||
try {
|
||||
// @ts-ignore
|
||||
if (this.isMobile() && (preloadedimages().map((a) => a.imgname).includes(myimage))) {
|
||||
ris = `${dir}mobile/${file}`
|
||||
} else {
|
||||
ris = myimage
|
||||
}
|
||||
}catch (e) {
|
||||
return myimage
|
||||
}
|
||||
|
||||
// console.log('getimgbysize', ris)
|
||||
@@ -3280,7 +3284,7 @@ export const tools = {
|
||||
},
|
||||
getCookie(mytok: any, def?: any) {
|
||||
const ris = Cookies.get(mytok)
|
||||
console.log('getCookie', mytok, ris)
|
||||
// console.log('getCookie', mytok, ris)
|
||||
if (!!ris) {
|
||||
return ris
|
||||
} else {
|
||||
@@ -3289,7 +3293,7 @@ export const tools = {
|
||||
},
|
||||
|
||||
setCookie(mytok: any, value: string) {
|
||||
console.log('setCookie', mytok, value)
|
||||
// console.log('setCookie', mytok, value)
|
||||
return Cookies.set(mytok, value)
|
||||
},
|
||||
|
||||
|
||||
@@ -857,6 +857,20 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
},
|
||||
|
||||
async loadSkill(idSkill: string) {
|
||||
const data = {
|
||||
idSkill
|
||||
}
|
||||
|
||||
return Api.SendReq('/myskills/page', 'POST', data)
|
||||
.then((res) => {
|
||||
return res.data
|
||||
}).catch((error) => {
|
||||
return {}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
async loadFriends(username: string) {
|
||||
return Api.SendReq('/users/friends', 'POST', null)
|
||||
.then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user