- Doppia modalità di Registrazione con lista extra utenti
- fixed grid pagination
This commit is contained in:
@@ -788,7 +788,7 @@ namespace Actions {
|
||||
|
||||
return await Api.SendReq('/loadsite/' + myuserid + '/' + process.env.APP_ID + '/' + showall, 'GET', null)
|
||||
.then((res) => {
|
||||
console.log('____________________________ res', res)
|
||||
// console.log('____________________________ res', res)
|
||||
if (res.status === 200) {
|
||||
CalendarStore.state.bookedevent = (res.data.bookedevent) ? res.data.bookedevent : []
|
||||
CalendarStore.state.eventlist = (res.data.eventlist) ? res.data.eventlist : []
|
||||
|
||||
@@ -40,7 +40,7 @@ export const DefaultProfile: IUserProfile = {
|
||||
img: '',
|
||||
nationality: '',
|
||||
intcode_cell: '',
|
||||
cell: '',
|
||||
cell: process.env.TEST_CELL || '',
|
||||
dateofbirth: new Date(),
|
||||
sex: 0,
|
||||
country_pay: '',
|
||||
@@ -522,6 +522,16 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
|
||||
async function importExtraList(context, paramquery) {
|
||||
|
||||
return await Api.SendReq('/users/import_extralist', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
return res
|
||||
}).catch((error) => {
|
||||
return { numtot: 0, numadded: 0, numalreadyexisted: 0 }
|
||||
})
|
||||
}
|
||||
|
||||
async function newsletterload(context, paramquery) {
|
||||
|
||||
return await Api.SendReq('/news/load', 'POST', paramquery)
|
||||
@@ -892,6 +902,7 @@ namespace Actions {
|
||||
vreg: b.dispatch(vreg),
|
||||
unsubscribe: b.dispatch(unsubscribe),
|
||||
importemail: b.dispatch(importemail),
|
||||
importExtraList: b.dispatch(importExtraList),
|
||||
newsletterload: b.dispatch(newsletterload),
|
||||
newsletter_setactivate: b.dispatch(newsletter_setactivate),
|
||||
getDashboard: b.dispatch(getDashboard),
|
||||
|
||||
@@ -187,7 +187,7 @@ const colTablePermission = [
|
||||
|
||||
|
||||
const colTableOperator = [
|
||||
AddCol({ name: 'username', label_trans: 'reg.username' }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
|
||||
AddCol({ name: 'email', label_trans: 'reg.email' }),
|
||||
@@ -393,11 +393,15 @@ export const fieldsTable = {
|
||||
// IColGridTable
|
||||
colTableUsers: [
|
||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username' }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
|
||||
AddCol({ name: 'email', label_trans: 'reg.email' }),
|
||||
AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }),
|
||||
AddCol({ name: 'aportador_solidario_nome_completo', label_trans: 'reg.aportador_solidario_nome_completo' }),
|
||||
AddCol({ name: 'aportador_solidario', label_trans: 'reg.aportador_solidario' }),
|
||||
AddCol({ name: 'verified_email', label_trans: 'reg.verified_email', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality', fieldtype: tools.FieldType.nationality }),
|
||||
AddCol({ name: 'profile.intcode_cell', field: 'profile', subfield: 'intcode_cell', label_trans: 'reg.intcode_cell', fieldtype: tools.FieldType.intcode }),
|
||||
AddCol({ name: 'profile.iso2_cell', field: 'profile', subfield: 'iso2_cell', label_trans: 'reg.iso2_cell' }),
|
||||
@@ -416,6 +420,30 @@ export const fieldsTable = {
|
||||
AddCol(DuplicateRec)
|
||||
],
|
||||
|
||||
colTableExtraList: [
|
||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'registered', label_trans: 'reg.registered', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'ind_order', label_trans: 'reg.ind_order' }),
|
||||
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'name_complete', label_trans: 'reg.name_complete' }),
|
||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
|
||||
AddCol({ name: 'num_invitati', label_trans: 'reg.num_invitati', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'is_in_whatsapp', label_trans: 'reg.is_in_whatsapp', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'is_in_telegram', label_trans: 'reg.is_in_telegram', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'cell_complete', label_trans: 'reg.cell_complete' }),
|
||||
AddCol({ name: 'nationality', label_trans: 'reg.nationality', fieldtype: tools.FieldType.nationality }),
|
||||
AddCol({ name: 'aportador_solidario_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }),
|
||||
AddCol({ name: 'aportador_solidario_ind_order', label_trans: 'reg.aportador_solidario_ind_order' }),
|
||||
AddCol({ name: 'aportador_solidario_originale_name_surname', label_trans: 'reg.aportador_solidario_nome_completo' }),
|
||||
AddCol({ name: 'note', label_trans: 'reg.note' }),
|
||||
AddCol({ name: 'col_b', label_trans: 'reg.col_b', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'col_h', label_trans: 'reg.col_h', fieldtype: tools.FieldType.number }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec)
|
||||
],
|
||||
|
||||
tablesList: [
|
||||
{
|
||||
value: 'operators',
|
||||
|
||||
@@ -6,6 +6,7 @@ export const serv_constants = {
|
||||
RIS_CODE_EMAIL_ALREADY_VERIFIED: -5,
|
||||
RIS_CODE_EMAIL_VERIFIED: 1,
|
||||
|
||||
RIS_CODE_USER_EXTRALIST_NOTFOUND: -70,
|
||||
RIS_CODE_USERNAME_ALREADY_EXIST: -60,
|
||||
RIS_CODE_EMAIL_ALREADY_EXIST: -50,
|
||||
RIS_CODE_EMAIL_NOT_SENT: -40,
|
||||
|
||||
@@ -49,6 +49,8 @@ export const tools = {
|
||||
|
||||
getprefCountries: ['it', 'us', 'es', 'uk', 'fr', 'de', 'ch'],
|
||||
|
||||
APORTADOR_NONE: '------',
|
||||
|
||||
APORTADOR_SOLIDARIO: 'apsol',
|
||||
|
||||
listBestColor: [
|
||||
@@ -2136,8 +2138,7 @@ export const tools = {
|
||||
heightgallery(coeff) {
|
||||
// console.log('heightgallery')
|
||||
return tools.heightGallVal(coeff).toString() + 'px'
|
||||
}
|
||||
,
|
||||
},
|
||||
|
||||
heightGallVal(coeff = 1.33) {
|
||||
let maxh2 = 0
|
||||
@@ -2151,8 +2152,8 @@ export const tools = {
|
||||
myw -= 300
|
||||
|
||||
maxh2 = (myw / coeff) + 20
|
||||
if (maxh2 > 750)
|
||||
maxh2 = 750
|
||||
if (maxh2 > 500)
|
||||
maxh2 = 500
|
||||
|
||||
return maxh2
|
||||
}
|
||||
@@ -2435,6 +2436,8 @@ export const tools = {
|
||||
},
|
||||
|
||||
getimgFullpathbysize(fileimg: string) {
|
||||
if (!fileimg)
|
||||
return { path: '', file: fileimg }
|
||||
const ind = fileimg.lastIndexOf('/')
|
||||
if (ind > 0) {
|
||||
return { path: fileimg.substring(0, ind + 1), file: fileimg.substring(ind + 1) }
|
||||
@@ -2551,7 +2554,7 @@ export const tools = {
|
||||
}, 3000)
|
||||
}).then(() => {
|
||||
setTimeout(() => {
|
||||
console.log('HIDE...')
|
||||
// console.log('HIDE...')
|
||||
mythis.$q.loading.hide()
|
||||
}, 500)
|
||||
tools.showNotif(mythis.$q, mythis.$t('login.errato'), { color: 'negative', icon: 'notifications' })
|
||||
@@ -2586,8 +2589,14 @@ export const tools = {
|
||||
|
||||
SignUpcheckErrors(mythis, riscode: number) {
|
||||
console.log('SignUpcheckErrors', riscode)
|
||||
let endload = true
|
||||
|
||||
if (riscode === serv_constants.RIS_CODE_EMAIL_ALREADY_EXIST) {
|
||||
tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_email'))
|
||||
} else if (riscode === serv_constants.RIS_CODE_USER_EXTRALIST_NOTFOUND) {
|
||||
|
||||
tools.showNegativeNotif(mythis.$q, mythis.$t('reg.err.user_extralist_not_found'))
|
||||
|
||||
} else if (riscode === serv_constants.RIS_CODE_USERNAME_ALREADY_EXIST) {
|
||||
tools.showNotif(mythis.$q, mythis.$t('reg.err.duplicate_username'))
|
||||
} else if (riscode === tools.ERR_SERVERFETCH) {
|
||||
@@ -2605,6 +2614,7 @@ export const tools = {
|
||||
tools.showNotif(mythis.$q, 'Errore num ' + riscode)
|
||||
}
|
||||
|
||||
return endload
|
||||
}
|
||||
,
|
||||
isCssColor(color) {
|
||||
@@ -2897,7 +2907,121 @@ export const tools = {
|
||||
}
|
||||
// Directly return the joined string
|
||||
return splitStr.join(' ')
|
||||
}
|
||||
},
|
||||
|
||||
getValDb(keystr, serv, def?, table?, subkey?) {
|
||||
if (table === 'users') {
|
||||
if (keystr === 'profile') {
|
||||
return UserStore.state.my.profile[subkey]
|
||||
} else {
|
||||
return UserStore.state.my[keystr]
|
||||
}
|
||||
} else {
|
||||
const ris = GlobalStore.getters.getValueSettingsByKey(keystr, serv)
|
||||
if (ris === '')
|
||||
if (def !== undefined)
|
||||
return def
|
||||
else
|
||||
return ''
|
||||
else
|
||||
return ris
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
getkey(youtube, title, isnum) {
|
||||
let mykey = 'MP4'
|
||||
if (youtube)
|
||||
mykey = 'YT'
|
||||
|
||||
if (isnum) {
|
||||
mykey += '_NUM'
|
||||
} else {
|
||||
if (title)
|
||||
mykey += '_TITLE_'
|
||||
else
|
||||
mykey += '_VIDEO_'
|
||||
}
|
||||
|
||||
return mykey
|
||||
},
|
||||
|
||||
heightgallvideo() {
|
||||
const h = this.heightgallery(this.getValDb('YT_W', false) / this.getValDb('YT_H', false))
|
||||
return h
|
||||
},
|
||||
|
||||
getvideourl(index, youtube) {
|
||||
const myvideo = this.getValDb(this.getkey(youtube, false, false) + index, false)
|
||||
if (myvideo)
|
||||
if (youtube)
|
||||
return myvideo
|
||||
else
|
||||
return this.getpath(myvideo)
|
||||
else
|
||||
return ''
|
||||
},
|
||||
|
||||
getvideonum(youtube) {
|
||||
return this.getValDb(this.getkey(youtube, false, true), false)
|
||||
},
|
||||
|
||||
getvideomp4yt(index) {
|
||||
return [{ src: 'https://www.youtube.com/embed/' + this.getvideourl(index, true), type: 'video/mp4' }
|
||||
]
|
||||
},
|
||||
getvideomp4src(index) {
|
||||
return [{ src: this.getvideourl(index, false), type: 'video/mp4' }
|
||||
]
|
||||
},
|
||||
|
||||
getvideoyt(index) {
|
||||
return 'https://www.youtube.com/embed/' + this.getvideourl(index, true)
|
||||
},
|
||||
|
||||
getpath(myvideo) {
|
||||
return 'statics/video/' + func_tools.getLocale() + '/' + myvideo
|
||||
},
|
||||
mygetarrValDb(keystr, serv) {
|
||||
const myval = GlobalStore.getters.getValueSettingsByKey(keystr, serv)
|
||||
// console.log('AA: myval', myval)
|
||||
try {
|
||||
if (myval) {
|
||||
// console.log(' Entro')
|
||||
const myrec = JSON.parse(myval)
|
||||
// console.log('*************** getarrValDb')
|
||||
// console.table(myrec)
|
||||
return myrec
|
||||
} else {
|
||||
// console.log('NO MYVAL')
|
||||
return []
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Errore: ', e)
|
||||
return []
|
||||
}
|
||||
},
|
||||
|
||||
getvideotitle(index, youtube) {
|
||||
|
||||
const mykey = this.getkey(youtube, true, false) + index
|
||||
const ris = this.mygetarrValDb(mykey, false)
|
||||
|
||||
return this.getelembylang(ris)
|
||||
},
|
||||
|
||||
getvideoposter(index) {
|
||||
return ''
|
||||
},
|
||||
clone(obj) {
|
||||
if (null == obj || 'object' != typeof obj) return obj
|
||||
const copy = obj.constructor()
|
||||
for (const attr in obj) {
|
||||
if (obj.hasOwnProperty(attr)) copy[attr] = obj[attr]
|
||||
}
|
||||
return copy
|
||||
},
|
||||
|
||||
|
||||
// getLocale() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user