Aggiungere "San Marino" e suoi comuni

Corretto Filtro a mano della ricerca
Creare filtro ricerca per trovare la sottocategoria o categoria -> Skill e SubSkill
This commit is contained in:
paoloar77
2022-02-12 02:19:49 +01:00
parent 7c0c2fef39
commit b21a7d1885
63 changed files with 541 additions and 752 deletions

View File

@@ -316,6 +316,11 @@ export const colTableStorehouse = [
AddCol(DuplicateRec),
]
export const colAdType = [
AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'descr', label_trans: 'store.description' }),
]
export const colSectors = [
AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'descr', label_trans: 'store.description' }),
@@ -502,7 +507,7 @@ export const colmyUserGroup = [
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
remote_table: 'comune',
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
}),
@@ -523,8 +528,18 @@ 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: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit , maxlength: 70, noshowlabel: true }),
// AddCol({ name: 'subTitle', label_trans: 'event.title', fieldtype: costanti.FieldType.string,
// showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit , maxlength: 70, noshowlabel: true }),
AddCol({
name: 'adTypes',
label_trans: 'adTypes.name',
fieldtype: costanti.FieldType.select,
required: true,
jointable: 'adtypes',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
noshowlabel: true,
icon: 'grading',
}),
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: 200 }),
AddCol({
@@ -569,7 +584,7 @@ export const colmySkills = [
filter_field: 'idSkill',
noshowlabel: true,
icon: 'far fa-id-card',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
allowNewValue: true,
}),
AddCol({
@@ -609,7 +624,10 @@ export const colmySkills = [
tablesel: 'cities',
noshowlabel: true,
icon: 'fas fa-map-marker-alt',
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView,
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
remote_table: 'mycities',
remote_key: '_id',
remote_field: 'comune',
}),
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,
@@ -1984,6 +2002,13 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'descr',
},
{
value: 'adtypes',
label: 'Tipo Annuncio',
columns: colAdType,
colkey: '_id',
collabel: 'descr',
},
{
value: 'cities',
label: 'Comune',

View File

@@ -3124,7 +3124,7 @@ export const tools = {
const msg2 = t('fetch.errore_generico') + userStore.getMsgError(riscode)
this.showNotif(mythisq, msg2)
} else if (riscode === this.OK) {
$router.push('/regok')
$router.push('/')
this.showNotif(mythisq, t('components.authentication.email_verification.link_sent', { botname: t('ws.botname') }), {
color: 'green',
textColor: 'black',
@@ -4856,6 +4856,27 @@ export const tools = {
} else {
return value[keyfunz]
}
},
getValueByRemoteField(col: IColGridTable, row: any, value: any, col_tabfooter: string) {
if (col) {
if (col.remote_table && col.remote_key && col.remote_field && col_tabfooter) {
const myarrremote = row[col.remote_table]
let myarr: any = []
for (const myrec of myarrremote) {
let myval = myrec[col.remote_field]
myarr.push(myval)
}
return myarr ? myarr.join(' - ') : ''
}
}
return ''
}

View File

@@ -221,7 +221,12 @@ export const useUserStore = defineStore('UserStore', {
return ''
},
getImgByProfile(userparam: IUserFields): string {
getImgUserByUsername(username: string): string {
let img = this.getImgByUsername(username)
return img ? img : 'images/noimg-user.svg'
},
getImgByProfile(userparam: IUserFields, reale: any = false): string {
try {
if (userparam.profile && userparam.profile.img) {
@@ -229,7 +234,10 @@ export const useUserStore = defineStore('UserStore', {
}
} catch (e) {
}
return 'images/noimg.png'
if (!reale)
return 'images/noimg.png'
else
return ''
},
getImgByGroup(group: IMyGroup): string {

View File

@@ -117,6 +117,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
URL_RITORNA: '',
URL_RESTORE: '',
levels: [],
adtypes: [],
skills: [],
subSkills: [],
statusSkills: [],
@@ -232,6 +233,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
return state.settings
else if (table === 'levels')
return state.levels
else if (table === 'adtypes')
return state.adtypes
else if (table === 'skills')
return state.skills
else if (table === 'subskills')
@@ -1227,6 +1230,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
this.sectors = (res.data.sectors) ? [...res.data.sectors] : []
this.cities = (res.data.cities) ? [...res.data.cities] : []
this.catgrps = (res.data.catgrps) ? [...res.data.catgrps] : []
this.adtypes = (res.data.adtypes) ? [...res.data.adtypes] : []
// console.log('res.data.cart', res.data.cart)