SubAccounts !
This commit is contained in:
@@ -80,7 +80,7 @@ const state: IGlobalState = {
|
||||
gallery: [],
|
||||
mailinglist: [],
|
||||
mypage: [],
|
||||
calzoom: [],
|
||||
calzoom: []
|
||||
}
|
||||
|
||||
async function getConfig(id) {
|
||||
@@ -142,17 +142,17 @@ namespace Getters {
|
||||
|
||||
}, 'getPage')
|
||||
|
||||
const getmenu = b.read((state) => {
|
||||
const getmenu = b.read((mystate: IGlobalState) => {
|
||||
// console.log('getmenu', cfgrouter.getmenu())
|
||||
|
||||
state.menulinks = {
|
||||
mystate.menulinks = {
|
||||
Dashboard: {
|
||||
routes: cfgrouter.getmenu(),
|
||||
show: true
|
||||
}
|
||||
}
|
||||
|
||||
return state.menulinks
|
||||
return mystate.menulinks
|
||||
|
||||
// console.log('state.menulinks', state.menulinks)
|
||||
|
||||
@@ -309,7 +309,7 @@ namespace Getters {
|
||||
|
||||
get isNewVersionAvailable() {
|
||||
// console.log('state.cfgServer', state.cfgServer)
|
||||
const serversrec = state.cfgServer.find((x) => x.chiave === tools.SERVKEY_VERS)
|
||||
const serversrec = state.cfgServer.find((x) => (x.chiave === tools.SERVKEY_VERS) && (x.idapp === process.env.APP_ID))
|
||||
// console.log('Record ', serversrec)
|
||||
if (serversrec) {
|
||||
console.log('Vers Server ', serversrec.valore, 'Vers locale:', process.env.APP_VERSION)
|
||||
@@ -467,8 +467,6 @@ namespace Actions {
|
||||
return
|
||||
}
|
||||
|
||||
console.log('createPushSubscription: INIT')
|
||||
|
||||
if (!('PushManager' in window)) {
|
||||
return
|
||||
}
|
||||
@@ -484,6 +482,8 @@ namespace Actions {
|
||||
return swreg.pushManager.getSubscription()
|
||||
})
|
||||
.then((subscription) => {
|
||||
console.log('subscription = ', subscription)
|
||||
|
||||
mystate.wasAlreadySubscribed = !(subscription === null)
|
||||
|
||||
if (mystate.wasAlreadySubscribed) {
|
||||
@@ -511,11 +511,10 @@ namespace Actions {
|
||||
// Calling the Server to Save in the MongoDB the Subscriber
|
||||
function saveNewSubscriptionToServer(context, newSub) {
|
||||
|
||||
console.log('saveNewSubscriptionToServer')
|
||||
// If already subscribed, exit
|
||||
if (true) {
|
||||
return
|
||||
}
|
||||
// if (true) {
|
||||
// return
|
||||
// }
|
||||
|
||||
if (!newSub) {
|
||||
return
|
||||
@@ -528,12 +527,19 @@ namespace Actions {
|
||||
// console.log('saveSubscriptionToServer: ', newSub)
|
||||
// console.log('context', context)
|
||||
|
||||
console.log('saveNewSubscriptionToServer')
|
||||
|
||||
let options = null
|
||||
let notreg = false
|
||||
|
||||
if (UserStore.getters.isTokenInvalid) {
|
||||
notreg = true
|
||||
}
|
||||
|
||||
// If is not already stored in DB, then show the message to the user.
|
||||
if (!state.wasAlreadySubscribed) {
|
||||
if (!state.wasAlreadySubscribed || notreg) {
|
||||
options = {
|
||||
title: translate('notification.title_subscribed'),
|
||||
title: tools.translate('notification.title_subscribed', [{strin: 'sitename', strout: translate('ws.sitename')}]),
|
||||
content: translate('notification.subscribed'),
|
||||
openUrl: '/'
|
||||
}
|
||||
@@ -686,6 +692,19 @@ namespace Actions {
|
||||
|
||||
}
|
||||
|
||||
async function sendPushNotif(context, { params }) {
|
||||
|
||||
return await Api.SendReq('/push/send', 'POST', { params })
|
||||
.then((res) => {
|
||||
// console.table(res)
|
||||
return res.data
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('error sendPushNotif', error)
|
||||
return null
|
||||
})
|
||||
}
|
||||
|
||||
async function loadTable(context, params: IParamsQuery) {
|
||||
// console.log('loadTable', params)
|
||||
|
||||
@@ -732,6 +751,21 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
|
||||
async function callFunz(context, { mydata }) {
|
||||
// console.log('saveFieldValue', mydata)
|
||||
|
||||
return await Api.SendReq(`/callfunz`, 'PATCH', { data: mydata })
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
return (res.data.code === serv_constants.RIS_CODE_OK)
|
||||
} else
|
||||
return false
|
||||
})
|
||||
.catch((error) => {
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
async function DeleteRec(context, { table, id }) {
|
||||
console.log('DeleteRec', table, id)
|
||||
|
||||
@@ -1034,12 +1068,32 @@ namespace Actions {
|
||||
infooter: false
|
||||
}
|
||||
|
||||
static_data.routes = [...static_data.baseroutes, ...arrpagesroute, last]
|
||||
const sito_offline = {
|
||||
active: true,
|
||||
order: 20,
|
||||
path: '/sito_offline',
|
||||
materialIcon: 'home',
|
||||
name: 'otherpages.sito_offline',
|
||||
component: () => import('@/rootgen/sito_offline/sito_offline.vue'),
|
||||
inmenu: true,
|
||||
infooter: true
|
||||
}
|
||||
|
||||
if (!tools.sito_online(false)) {
|
||||
static_data.routes = [sito_offline, last]
|
||||
} else {
|
||||
static_data.routes = [...static_data.baseroutes, ...arrpagesroute, last]
|
||||
}
|
||||
|
||||
// Sort array
|
||||
static_data.routes = static_data.routes.sort((a, b) => a.order - b.order)
|
||||
|
||||
router.addRoutes([...arrpagesroute, last])
|
||||
if (tools.sito_online(false)) {
|
||||
router.addRoutes([...arrpagesroute, last])
|
||||
} else {
|
||||
router.addRoutes([sito_offline, last])
|
||||
this.$router.replace('/sito_offline')
|
||||
}
|
||||
}
|
||||
|
||||
async function sendFile(context, formdata) {
|
||||
@@ -1063,6 +1117,8 @@ namespace Actions {
|
||||
saveCfgServerKey: b.dispatch(saveCfgServerKey),
|
||||
checkUpdates: b.dispatch(checkUpdates),
|
||||
saveFieldValue: b.dispatch(saveFieldValue),
|
||||
callFunz: b.dispatch(callFunz),
|
||||
sendPushNotif: b.dispatch(sendPushNotif),
|
||||
loadTable: b.dispatch(loadTable),
|
||||
saveTable: b.dispatch(saveTable),
|
||||
DeleteRec: b.dispatch(DeleteRec),
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace Actions {
|
||||
state.datastat = res.data.datastat
|
||||
state.datastat.arr_nations = JSON.parse(state.datastat.arr_nations)
|
||||
state.datastat.reg_daily = JSON.parse(state.datastat.reg_daily)
|
||||
state.datastat.reg_weekly = JSON.parse(state.datastat.reg_weekly)
|
||||
state.datastat.checkuser = JSON.parse(state.datastat.checkuser)
|
||||
|
||||
return state.datastat
|
||||
|
||||
@@ -79,6 +79,7 @@ const state: IUserState = {
|
||||
isAdmin: false,
|
||||
isManager: false,
|
||||
isTutor: false,
|
||||
isTraduttrici: false,
|
||||
usersList: [],
|
||||
countusers: 0,
|
||||
lastparamquery: {}
|
||||
@@ -93,7 +94,8 @@ namespace Getters {
|
||||
|
||||
const isUserInvalid = b.read((mystate) => {
|
||||
try {
|
||||
const ris = (mystate.my._id === undefined) || (mystate.my._id.trim() === '') || (mystate.my.tokens[0] === undefined)
|
||||
// const ris = (mystate.my._id === undefined) || (mystate.my._id.trim() === '') || (mystate.my.tokens[0] === undefined)
|
||||
const ris = (mystate.my._id === undefined) || (mystate.my._id.trim() === '')
|
||||
// console.log('state._id', state._id, 'ris', ris)
|
||||
return ris
|
||||
} catch (e) {
|
||||
@@ -101,6 +103,15 @@ namespace Getters {
|
||||
}
|
||||
}, 'isUserInvalid')
|
||||
|
||||
const isTokenInvalid = b.read((mystate) => {
|
||||
try {
|
||||
const ris = (mystate.my.tokens.length <= 0)
|
||||
return ris
|
||||
} catch (e) {
|
||||
return true
|
||||
}
|
||||
}, 'isTokenInvalid')
|
||||
|
||||
const lang = b.read((mystate) => {
|
||||
if (state.lang !== '') {
|
||||
return state.lang
|
||||
@@ -225,6 +236,9 @@ namespace Getters {
|
||||
get isUserInvalid() {
|
||||
return isUserInvalid()
|
||||
},
|
||||
get isTokenInvalid() {
|
||||
return isTokenInvalid()
|
||||
},
|
||||
get lang() {
|
||||
return lang()
|
||||
},
|
||||
@@ -291,6 +305,7 @@ namespace Mutations {
|
||||
mystate.isManager = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Manager.value)
|
||||
mystate.isTutor = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Tutor.value)
|
||||
mystate.isTeacher = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Teacher.value)
|
||||
mystate.isTraduttrici = tools.isBitActive(mystate.my.perm, shared_consts.Permissions.Traduttrici.value)
|
||||
|
||||
// console.log('authUser', 'state.isAdmin', mystate.isAdmin)
|
||||
// console.table(mystate)
|
||||
@@ -492,7 +507,7 @@ namespace Actions {
|
||||
lang: state.lang
|
||||
}
|
||||
|
||||
return await Api.SendReq(`/setlang`, 'PATCH', { data: mydata })
|
||||
return Api.SendReq(`/setlang`, 'PATCH', { data: mydata })
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
return (res.data.code === serv_constants.RIS_CODE_OK)
|
||||
@@ -706,7 +721,7 @@ namespace Actions {
|
||||
if ('serviceWorker' in navigator) {
|
||||
sub = await navigator.serviceWorker.ready
|
||||
.then((swreg) => {
|
||||
console.log('swreg')
|
||||
// console.log('swreg')
|
||||
sub = swreg.pushManager.getSubscription()
|
||||
return sub
|
||||
})
|
||||
@@ -721,7 +736,7 @@ namespace Actions {
|
||||
}
|
||||
|
||||
const options = {
|
||||
title: translate('notification.title_subscribed'),
|
||||
title: tools.translate('notification.title_subscribed', [{strin: 'sitename', strout: translate('ws.sitename')}]),
|
||||
content: translate('notification.subscribed'),
|
||||
openUrl: '/'
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { tools } from './tools'
|
||||
import { IColGridTable } from '../../model'
|
||||
import { lists } from './lists'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { GlobalStore, UserStore } from '@store'
|
||||
|
||||
const DeleteRec = {
|
||||
name: 'deleterec',
|
||||
label_trans: 'newsletter.reset',
|
||||
label_trans: 'reg.elimina',
|
||||
align: 'right',
|
||||
field: tools.NOFIELD,
|
||||
sortable: false,
|
||||
@@ -163,20 +163,20 @@ const colnavi = [
|
||||
AddCol({ name: '_id', label_trans: 'others.value' }),
|
||||
AddCol({ name: 'riga', label_trans: 'reg.riga' }),
|
||||
AddCol({ name: 'col', label_trans: 'reg.col' }),
|
||||
AddCol({ name: 'indprimario', label_trans: 'indprimario' }),
|
||||
AddCol({ name: 'ind_order', label_trans: 'ind_order' }),
|
||||
AddCol({ name: 'parent_id', label_trans: 'parent_id' }),
|
||||
AddCol({ name: 'created', label_trans: 'cal.data', fieldtype: tools.FieldType.date }),
|
||||
// AddCol({ name: 'date_start', label_trans: 'date_start', fieldtype: tools.FieldType.date }),
|
||||
// AddCol({ name: 'date_gift_chat_open', label_trans: 'date_gift_chat_open', fieldtype: tools.FieldType.date }),
|
||||
// AddCol({ name: 'link_chat', label_trans: 'reg.link_chat' }),
|
||||
AddCol({ name: 'parent_id', label_trans: 'parent_id' }),
|
||||
AddCol({ name: 'sent_msg_howto_make_gift', label_trans: 'sent_msg_howto_make_gift', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
|
||||
// AddCol({ name: 'provvisoria', label_trans: 'reg.provvisoria', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'date_made_gift', label_trans: 'date_made_gift', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'received_gift', label_trans: 'received_gift', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'date_received_gift', label_trans: 'date_received_gift', fieldtype: tools.FieldType.date }),
|
||||
// AddCol({ name: 'received_gift', label_trans: 'received_gift', fieldtype: tools.FieldType.boolean }),
|
||||
// AddCol({ name: 'date_received_gift', label_trans: 'date_received_gift', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'num_tess', label_trans: 'num_tess', fieldtype: tools.FieldType.number }),
|
||||
// AddCol({ name: 'note_bot', label_trans: 'note_bot', fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'note', label_trans: 'note', fieldtype: tools.FieldType.string }),
|
||||
// AddCol({ name: 'note_interne', label_trans: 'note_interne', fieldtype: tools.FieldType.string }),
|
||||
// AddCol({ name: 'tutor', label_trans: 'tutor', fieldtype: tools.FieldType.string }),
|
||||
AddCol(DeleteRec),
|
||||
@@ -199,12 +199,14 @@ const colnavepersistente = [
|
||||
|
||||
const collistaingresso = [
|
||||
AddCol({ name: '_id', label_trans: 'others.value' }),
|
||||
AddCol({ name: 'indprimario', label_trans: 'indprimario' }),
|
||||
AddCol({ name: 'ind_order', label_trans: 'ind_order' }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'invitante_username', label_trans: 'reg.aportador_solidario' }),
|
||||
AddCol({ name: 'date_added', label_trans: 'date_added', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'added', label_trans: 'added', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'added', label_trans: 'Aggiunto', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'num_tess', label_trans: 'num_tess', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'deleted', label_trans: 'deleted', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'note', label_trans: 'reg.note', fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol(DuplicateRec),
|
||||
AddCol(DeleteRec)
|
||||
]
|
||||
@@ -398,7 +400,7 @@ export const fieldsTable = {
|
||||
|
||||
getTableJoinByName(table) {
|
||||
if (table === 'permissions')
|
||||
return [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Tutor]
|
||||
return [shared_consts.Permissions.Admin, shared_consts.Permissions.Manager, shared_consts.Permissions.Teacher, shared_consts.Permissions.Tutor, shared_consts.Permissions.Traduttrici]
|
||||
else if (table === 'accepted')
|
||||
return [shared_consts.Accepted.CHECK_READ_GUIDELINES, shared_consts.Accepted.CHECK_SEE_VIDEO_PRINCIPI]
|
||||
else if (table === 'fieldstype')
|
||||
@@ -446,6 +448,9 @@ export const fieldsTable = {
|
||||
AddCol({ name: 'typeconf', label_trans: 'zoom.typeconf' }),
|
||||
AddCol({ name: 'date_start', label_trans: 'event.dateTimeStart', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'date_end', label_trans: 'event.dateTimeEnd' , fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'benvenuto', label_trans: 'event.benvenuto' , fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'icon', label_trans: 'event.icon' , fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'color', label_trans: 'event.color' , fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'id_conf_zoom', label_trans: 'zoom.id_conf_zooom' }),
|
||||
AddCol({ name: 'note', label_trans: 'zoom.note' }),
|
||||
AddCol(DeleteRec),
|
||||
@@ -453,7 +458,10 @@ export const fieldsTable = {
|
||||
],
|
||||
|
||||
colTableUsersBase: [
|
||||
AddCol({ name: 'index', label_trans: 'reg.index' }),
|
||||
AddCol({ name: 'ind_order', label_trans: 'reg.ind_order' }),
|
||||
AddCol({ name: 'sospeso', label_trans: 'reg.sospeso', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||
@@ -470,37 +478,41 @@ export const fieldsTable = {
|
||||
// IColGridTable
|
||||
colTableUsers: [
|
||||
AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
AddCol({ name: 'index', label_trans: 'reg.index', fieldtype: tools.FieldType.number }),
|
||||
AddCol({ name: 'ind_order', label_trans: 'reg.ind_order' }),
|
||||
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'date_temp_reg', label_trans: 'reg.date_temp_reg', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'old_order', label_trans: 'old_order' }),
|
||||
AddCol({ name: 'sospeso', label_trans: 'reg.sospeso', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'username_main', label_trans: 'reg.username_main' }),
|
||||
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: 'note', label_trans: 'reg.note' }),
|
||||
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.teleg_id', field: 'profile', subfield: 'teleg_id', label_trans: 'reg.teleg_id' }),
|
||||
AddCol({ name: 'profile.saw_and_accepted', field: 'profile', subfield: 'saw_and_accepted', label_trans: 'reg.saw_and_accepted', fieldtype: tools.FieldType.binary, jointable: 'accepted' }),
|
||||
AddCol({ name: 'profile.saw_zoom_presentation', field: 'profile', subfield: 'saw_zoom_presentation', label_trans: 'reg.saw_zoom_presentation', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.my_dream', field: 'profile', subfield: 'my_dream', label_trans: 'reg.my_dream' }),
|
||||
AddCol({ name: 'profile.email_paypal', field: 'profile', subfield: 'email_paypal', label_trans: 'reg.email_paypal' }),
|
||||
AddCol({ name: 'profile.paymenttypes', field: 'profile', subfield: 'paymenttypes', label_trans: 'reg.paymenttype', fieldtype: tools.FieldType.multiselect, jointable: 'paymenttypes' }),
|
||||
// AddCol({ name: 'made_gift', label_trans: 'reg.made_gift', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'note', label_trans: 'reg.note' }),
|
||||
// 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: 'profile.special_req', field: 'profile', subfield: 'special_req', label_trans: 'reg.special_req', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.vuole_ritessersi', field: 'profile', subfield: 'vuole_ritessersi', label_trans: 'reg.vuole_ritessersi', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.saw_and_accepted', field: 'profile', subfield: 'saw_and_accepted', label_trans: 'reg.saw_and_accepted', fieldtype: tools.FieldType.binary, jointable: 'accepted' }),
|
||||
AddCol({ name: 'profile.my_dream', field: 'profile', subfield: 'my_dream', label_trans: 'reg.my_dream' }),
|
||||
AddCol({ name: 'lang', field: 'lang', label_trans: 'reg.lang' }),
|
||||
AddCol({ name: 'profile.nationality', field: 'profile', subfield: 'nationality', label_trans: 'reg.nationality' }),
|
||||
AddCol({ name: 'profile.intcode_cell', field: 'profile', subfield: 'intcode_cell', label_trans: 'reg.intcode_cell' }),
|
||||
AddCol({ name: 'profile.iso2_cell', field: 'profile', subfield: 'iso2_cell', label_trans: 'reg.iso2_cell' }),
|
||||
AddCol({ name: 'profile.cell', field: 'profile', subfield: 'cell', label_trans: 'reg.cell' }),
|
||||
AddCol({ name: 'profile.email_paypal', field: 'profile', subfield: 'email_paypal', label_trans: 'reg.email_paypal' }),
|
||||
AddCol({ name: 'profile.country_pay', field: 'profile', subfield: 'country_pay', label_trans: 'reg.country_pay' }),
|
||||
AddCol({ name: 'profile.teleg_id', field: 'profile', subfield: 'teleg_id', label_trans: 'reg.teleg_id' }),
|
||||
AddCol({ name: 'profile.teleg_id_old', field: 'profile', subfield: 'teleg_id_old', label_trans: 'reg.teleg_id_old' }),
|
||||
AddCol({ name: 'profile.teleg_checkcode', field: 'profile', subfield: 'teleg_checkcode', label_trans: 'reg.teleg_checkcode' }),
|
||||
AddCol({ name: 'profile.manage_telegram', field: 'profile', subfield: 'manage_telegram', label_trans: 'reg.manage_telegram', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.paymenttypes', field: 'profile', subfield: 'paymenttypes', label_trans: 'reg.paymenttype', fieldtype: tools.FieldType.multiselect, jointable: 'paymenttypes' }),
|
||||
AddCol({ name: 'profile.img', field: 'profile', subfield: 'img', label_trans: 'reg.img', sortable: false }),
|
||||
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: tools.FieldType.date }),
|
||||
// AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'perm', label_trans: 'reg.perm', fieldtype: tools.FieldType.binary, jointable: 'permissions' }),
|
||||
@@ -510,9 +522,10 @@ export const fieldsTable = {
|
||||
],
|
||||
|
||||
colTableUsersSIP: [
|
||||
AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
// AddCol({ name: '_id', label_trans: 'reg.id' }),
|
||||
AddCol({ name: 'ind_order', label_trans: 'reg.ind_order' }),
|
||||
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'sospeso', label_trans: 'reg.sospeso', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'deleted', label_trans: 'reg.deleted', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'username', label_trans: 'reg.username_short' }),
|
||||
AddCol({ name: 'name', label_trans: 'reg.name' }),
|
||||
AddCol({ name: 'surname', label_trans: 'reg.surname' }),
|
||||
@@ -534,8 +547,12 @@ export const fieldsTable = {
|
||||
AddCol({ name: 'profile.teleg_id_old', field: 'profile', subfield: 'teleg_id_old', label_trans: 'reg.teleg_id_old' }),
|
||||
AddCol({ name: 'profile.teleg_checkcode', field: 'profile', subfield: 'teleg_checkcode', label_trans: 'reg.teleg_checkcode' }),
|
||||
AddCol({ name: 'profile.manage_telegram', field: 'profile', subfield: 'manage_telegram', label_trans: 'reg.manage_telegram', fieldtype: tools.FieldType.boolean }),
|
||||
AddCol({ name: 'profile.chisei', field: 'profile', subfield: 'chisei', label_trans: 'reg.chisei' }),
|
||||
AddCol({ name: 'profile.iltuoimpegno', field: 'profile', subfield: 'iltuoimpegno', label_trans: 'reg.iltuoimpegno' }),
|
||||
AddCol({ name: 'profile.come_aiutare', field: 'profile', subfield: 'come_aiutare', label_trans: 'reg.iltuoimpegno' }),
|
||||
AddCol({ name: 'profile.paymenttypes', field: 'profile', subfield: 'paymenttypes', label_trans: 'reg.paymenttype', fieldtype: tools.FieldType.multiselect, jointable: 'paymenttypes' }),
|
||||
AddCol({ name: 'profile.img', field: 'profile', subfield: 'img', label_trans: 'reg.img', sortable: false }),
|
||||
AddCol({ name: 'date_reg', label_trans: 'reg.date_reg', fieldtype: tools.FieldType.date }),
|
||||
AddCol({ name: 'lasttimeonline', label_trans: 'reg.lasttimeonline', fieldtype: tools.FieldType.date }),
|
||||
// AddCol({ name: 'idapp', label_trans: 'reg.idapp', fieldtype: tools.FieldType.string }),
|
||||
AddCol({ name: 'perm', label_trans: 'reg.perm', fieldtype: tools.FieldType.binary, jointable: 'permissions' }),
|
||||
@@ -625,7 +642,7 @@ export const fieldsTable = {
|
||||
label: 'Lista Ingresso',
|
||||
columns: collistaingresso,
|
||||
colkey: '_id',
|
||||
collabel: 'indprimario',
|
||||
collabel: 'ind_order',
|
||||
},
|
||||
{
|
||||
value: 'disciplines',
|
||||
|
||||
@@ -21,10 +21,14 @@ export const lists = {
|
||||
DELETE_EXTRALIST: 330,
|
||||
DELETE_USERLIST: 335,
|
||||
REGALA_INVITATO: 340,
|
||||
REGALA_INVITANTE: 342,
|
||||
SOSTITUISCI: 345,
|
||||
INVIA_MSG_A_DONATORI: 350,
|
||||
INVIA_MSG_A_SINGOLO: 355,
|
||||
DONO_INVIATO: 360,
|
||||
DONO_RICEVUTO: 370,
|
||||
AGGIUNGI_NUOVO_IMBARCO: 380,
|
||||
CANCELLA_IMBARCO: 385,
|
||||
|
||||
CAN_EDIT_TABLE: 400,
|
||||
SHOW_PREV_REC: 401
|
||||
|
||||
@@ -40,6 +40,7 @@ const { height, width } = dom
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
import { forEachComment } from 'tslint'
|
||||
import messages from '@src/statics/i18n'
|
||||
|
||||
const TokenKey = 'Admin-Token'
|
||||
|
||||
@@ -51,6 +52,7 @@ export interface INotify {
|
||||
|
||||
export const tools = {
|
||||
CAN_EDIT: 'q-ce',
|
||||
TABBED_DASHBOARD: 't-db',
|
||||
|
||||
getprefCountries: ['it', 'si', 'us', 'es', 'pt', 'uk', 'fr', 'de', 'ch', 'br', 'sk'],
|
||||
|
||||
@@ -58,6 +60,9 @@ export const tools = {
|
||||
|
||||
APORTADOR_SOLIDARIO: 'apsol',
|
||||
|
||||
IDAPP_AYNI: '7',
|
||||
IDAPP_SIP: '9',
|
||||
|
||||
TipoMsg: {
|
||||
SEND_LINK_CHAT_DONATORI: 1,
|
||||
SEND_MSG: 2,
|
||||
@@ -83,6 +88,7 @@ export const tools = {
|
||||
|
||||
TABUSER: 'users',
|
||||
TABNAVI: 'navi',
|
||||
TABLISTAINGRESSO: 'listaingressos',
|
||||
TABEVENTS: 'myevents',
|
||||
TABEXTRALIST: 'extralist',
|
||||
TABNEWSLETTER: 'newstosent',
|
||||
@@ -1157,7 +1163,7 @@ export const tools = {
|
||||
|
||||
getItemLS(item) {
|
||||
let ris = localStorage.getItem(item)
|
||||
if ((ris == null) || (ris === '') || (ris === 'null')) {
|
||||
if ((ris == null) || (ris === '') || (ris === 'null') || !ris) {
|
||||
ris = ''
|
||||
}
|
||||
|
||||
@@ -1408,8 +1414,8 @@ export const tools = {
|
||||
|
||||
visumenu(elem) { // : IListRoutes
|
||||
let visu = ((elem.onlyAdmin && UserStore.state.isAdmin) || (elem.onlyManager && UserStore.state.isManager)
|
||||
|| (elem.onlyTutor && UserStore.state.isTutor)
|
||||
|| ((!elem.onlyAdmin) && (!elem.onlyManager) && (!elem.onlyTutor))) && elem.active
|
||||
|| (elem.onlyTutor && UserStore.state.isTutor) || (elem.onlyTraduttrici && UserStore.state.isTraduttrici)
|
||||
|| ((!elem.onlyAdmin) && (!elem.onlyManager) && (!elem.onlyTutor) && (!elem.onlyTraduttrici))) && elem.active
|
||||
|
||||
if (!tools.isLoggedToSystem()) {
|
||||
if (elem.onlyif_logged)
|
||||
@@ -1465,22 +1471,117 @@ export const tools = {
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
} else if (func === lists.MenuAction.REGALA_INVITATO) {
|
||||
// console.log('param1', par.param1, 'id', par.param1._id)
|
||||
let mydatatosave = {
|
||||
id: null,
|
||||
username: '',
|
||||
table: '',
|
||||
fieldsvalue: {},
|
||||
notifBot: {}
|
||||
};
|
||||
|
||||
if (!!par.param1.invitante_username) {
|
||||
mydatatosave = {
|
||||
id: par.param1._id,
|
||||
username: par.param1.username,
|
||||
table: tools.TABLISTAINGRESSO,
|
||||
fieldsvalue: { invitante_username: par.param2.aportador_solidario },
|
||||
notifBot: null
|
||||
}
|
||||
} else {
|
||||
mydatatosave = {
|
||||
id: par.param1._id,
|
||||
username: '',
|
||||
table: tools.TABUSER,
|
||||
fieldsvalue: { aportador_solidario: par.param2.aportador_solidario },
|
||||
notifBot: null
|
||||
}
|
||||
}
|
||||
|
||||
console.log('** par.param1', par.param1)
|
||||
console.log('** id', par.param1._id)
|
||||
|
||||
if (par.param3) {
|
||||
mydatatosave.notifBot = { un: par.param2.aportador_solidario, txt: par.param3 }
|
||||
}
|
||||
|
||||
GlobalStore.actions.saveFieldValue(mydatatosave).then((ris) => {
|
||||
console.log('ris saveFieldValue', ris)
|
||||
if (ris) {
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('reg.invitato_regalato') + ' "' + par.param1.name + ' ' + par.param1.surname + '"')
|
||||
myself.update_username()
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
} else if (func === lists.MenuAction.REGALA_INVITANTE) {
|
||||
// console.log('param1', par.param1, 'id', par.param1._id)
|
||||
const mydatatosave = {
|
||||
id: par.param1._id,
|
||||
table: tools.TABUSER,
|
||||
fieldsvalue: { aportador_solidario: par.param2 },
|
||||
id: par.param1,
|
||||
table: tools.TABLISTAINGRESSO,
|
||||
fieldsvalue: { invitante_username: par.param2.invitante_username, ind_order_ingr: par.param2.ind_order_ingr },
|
||||
notifBot: null
|
||||
}
|
||||
|
||||
if (par.param3) {
|
||||
mydatatosave.notifBot = { un: par.param2, txt: par.param3 }
|
||||
mydatatosave.notifBot = { un: par.param2.invitante_username, txt: par.param3 }
|
||||
}
|
||||
|
||||
GlobalStore.actions.saveFieldValue(mydatatosave).then((ris) => {
|
||||
console.log('ris saveFieldValue', ris)
|
||||
if (ris) {
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('reg.invitato_regalato') + ' "' + par.param1.name + ' ' + par.param1.surname + '"')
|
||||
myself.update_username()
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
} else if ((func === lists.MenuAction.AGGIUNGI_NUOVO_IMBARCO) || (func === lists.MenuAction.CANCELLA_IMBARCO)) {
|
||||
const mydatatosave = {
|
||||
username: par.param1.username,
|
||||
invitante_username: '',
|
||||
ind_order: -1,
|
||||
myfunc: func,
|
||||
data: par.param2,
|
||||
notifBot: null
|
||||
}
|
||||
|
||||
if (func === lists.MenuAction.CANCELLA_IMBARCO) {
|
||||
mydatatosave.ind_order = par.param1.ind_order
|
||||
}
|
||||
if (func === lists.MenuAction.AGGIUNGI_NUOVO_IMBARCO) {
|
||||
mydatatosave.invitante_username = par.param1.invitante_username
|
||||
}
|
||||
|
||||
myself.loading = true
|
||||
|
||||
mydatatosave.notifBot = { un: par.param2, txt: par.param3 }
|
||||
|
||||
GlobalStore.actions.callFunz({ mydata: mydatatosave }).then((ris) => {
|
||||
myself.loading = false
|
||||
if (ris) {
|
||||
myself.update_username()
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('reg.invitato_regalato') + ' "' + par.param1.name + ' ' + par.param1.surname + '"')
|
||||
if (func === lists.MenuAction.AGGIUNGI_NUOVO_IMBARCO)
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('steps.sei_stato_aggiunto'))
|
||||
else if (func === lists.MenuAction.CANCELLA_IMBARCO)
|
||||
tools.showPositiveNotif(myself.$q, myself.$t('event.deleted'))
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
} else if (func === lists.MenuAction.SOSTITUISCI) {
|
||||
// console.log('param1', par.param1, 'id', par.param1._id)
|
||||
const mydatatosave = {
|
||||
id: par.param1._id,
|
||||
ind_order: par.param1.ind_order,
|
||||
myfunc: func,
|
||||
data: par.param2,
|
||||
notifBot: null
|
||||
}
|
||||
|
||||
mydatatosave.notifBot = { un: par.param2, txt: par.param3 }
|
||||
|
||||
GlobalStore.actions.callFunz({ mydata: mydatatosave }).then((ris) => {
|
||||
if (ris) {
|
||||
myself.update_nave()
|
||||
tools.showPositiveNotif(myself.$q, par.param3 + '\n' + ' e inviato messaggio per aprire la Gift Chat!')
|
||||
} else
|
||||
tools.showNegativeNotif(myself.$q, myself.$t('db.recfailed'))
|
||||
})
|
||||
@@ -1552,7 +1653,7 @@ export const tools = {
|
||||
const mydatatosave = {
|
||||
id: par.param1._id,
|
||||
table: tools.TABNAVI,
|
||||
fieldsvalue: { made_gift: par.param1.made_gift },
|
||||
fieldsvalue: { made_gift: par.param1.made_gift, riga: par.param1.riga, col: par.param1.col },
|
||||
notifBot: null
|
||||
}
|
||||
|
||||
@@ -1591,6 +1692,7 @@ export const tools = {
|
||||
async askConfirm($q: any, mytitle, mytext, ok, cancel, myself: any, table, funcok: number, funccancel: number, par: IParamDialog) {
|
||||
return $q.dialog({
|
||||
message: mytext,
|
||||
html: true,
|
||||
ok: {
|
||||
label: ok,
|
||||
push: true
|
||||
@@ -1663,12 +1765,14 @@ export const tools = {
|
||||
,
|
||||
|
||||
checkLangPassed(mylang) {
|
||||
// console.log('checkLangPassed')
|
||||
console.log('checkLangPassed ', mylang)
|
||||
|
||||
const mybrowserLang = Quasar.lang.isoName
|
||||
|
||||
if (mylang !== '') {
|
||||
if ((mylang.toLowerCase() === 'enus') || (mylang.toLowerCase() === 'en-us')) {
|
||||
if ((mylang.toLowerCase() === 'enus') || (mylang.toLowerCase() === 'en-us') || (mylang.toLowerCase() === 'uk')
|
||||
|| (mylang.toLowerCase() === 'uk-uk') || (mylang.toLowerCase() === 'en-uk') || (mylang.toLowerCase() === 'en-gb')
|
||||
|| (mylang.toLowerCase() === 'gb-gb')) {
|
||||
mylang = 'enUs'
|
||||
}
|
||||
if ((mylang.toLowerCase() === 'es') || (mylang.toLowerCase() === 'es-es') || (mylang.toLowerCase() === 'eses')) {
|
||||
@@ -1698,6 +1802,7 @@ export const tools = {
|
||||
|
||||
if (!mylang) {
|
||||
mylang = process.env.LANG_DEFAULT
|
||||
console.log('LANG DEFAULT: ', mylang)
|
||||
}
|
||||
|
||||
if (toolsext.getLocale(true) === '') {
|
||||
@@ -1889,6 +1994,10 @@ export const tools = {
|
||||
return UserStore.state.isTutor
|
||||
},
|
||||
|
||||
isTraduttrici() {
|
||||
return UserStore.state.isTraduttrici
|
||||
},
|
||||
|
||||
getstrDate(mytimestamp) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (!!mytimestamp)
|
||||
@@ -1913,6 +2022,14 @@ export const tools = {
|
||||
return ''
|
||||
},
|
||||
|
||||
getstrshortDayDateTime(mytimestamp) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (!!mytimestamp)
|
||||
return date.formatDate(mytimestamp, 'DD HH:mm')
|
||||
else
|
||||
return ''
|
||||
},
|
||||
|
||||
getstrTime(mytimestamp) {
|
||||
// console.log('getstrDate', mytimestamp)
|
||||
if (!!mytimestamp)
|
||||
@@ -2346,15 +2463,16 @@ export const tools = {
|
||||
}
|
||||
,
|
||||
|
||||
askfornotification() {
|
||||
tools.showNotif(this.$q, this.$t('notification.waitingconfirm'), { color: 'positive', icon: 'notifications' })
|
||||
askfornotification(mythis) {
|
||||
console.log('askfornotification')
|
||||
tools.showNotif(mythis.$q, mythis.$t('notification.waitingconfirm'), { color: 'positive', icon: 'notifications' })
|
||||
|
||||
Notification.requestPermission((result) => {
|
||||
console.log('User Choice', result)
|
||||
if (result === 'granted') {
|
||||
tools.showNotif(this.$q, this.$t('notification.confirmed'), { color: 'positive', icon: 'notifications' })
|
||||
tools.showNotif(mythis.$q, mythis.$t('notification.confirmed'), { color: 'positive', icon: 'notifications' })
|
||||
} else {
|
||||
tools.showNotif(this.$q, this.$t('notification.denied'), { color: 'negative', icon: 'notifications' })
|
||||
tools.showNotif(mythis.$q, mythis.$t('notification.denied'), { color: 'negative', icon: 'notifications' })
|
||||
|
||||
// displayConfirmNotification();
|
||||
}
|
||||
@@ -2843,7 +2961,7 @@ export const tools = {
|
||||
tools.showNotif(mythis.$q, msg)
|
||||
} else if (riscode === tools.OK) {
|
||||
mythis.$router.push('/regok')
|
||||
tools.showNotif(mythis.$q, mythis.$t('components.authentication.email_verification.link_sent', {botname: mythis.$t('ws.botname') }), {
|
||||
tools.showNotif(mythis.$q, mythis.$t('components.authentication.email_verification.link_sent', { botname: mythis.$t('ws.botname') }), {
|
||||
color: 'green',
|
||||
textColor: 'black'
|
||||
})
|
||||
@@ -3425,12 +3543,38 @@ export const tools = {
|
||||
return val
|
||||
},
|
||||
|
||||
translate(params, options?) {
|
||||
const msg = params.split('.')
|
||||
const lang = toolsext.getLocale()
|
||||
|
||||
const stringa = messages[lang]
|
||||
|
||||
let ris = stringa
|
||||
if (!!ris) {
|
||||
msg.forEach((param) => {
|
||||
ris = ris[param]
|
||||
})
|
||||
|
||||
if (!!options) {
|
||||
ris = this.myprintf(ris, options)
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log('ERRORE IN TRANSLATE! ', params, ' NON ESISTE!')
|
||||
return params
|
||||
}
|
||||
|
||||
return ris
|
||||
},
|
||||
|
||||
isPayPalSel(user) {
|
||||
let ispaypal = false
|
||||
if (user.profile.paymenttypes) {
|
||||
if (user.profile.paymenttypes.includes('paypal')) {
|
||||
if (user.email_paypal !== '')
|
||||
ispaypal = true
|
||||
if (!!user.profile.email_paypal) {
|
||||
if (user.profile.email_paypal !== '')
|
||||
ispaypal = true
|
||||
}
|
||||
}
|
||||
}
|
||||
return ispaypal
|
||||
@@ -3455,6 +3599,109 @@ export const tools = {
|
||||
return this.getnumrequisiti(user) === 7
|
||||
},
|
||||
|
||||
getRiganave(riga) {
|
||||
let ris = riga - 3
|
||||
if (ris <= 1)
|
||||
ris = 1
|
||||
|
||||
return ris
|
||||
},
|
||||
|
||||
getColnave(col) {
|
||||
let ris = Math.ceil(col / (2 * 4))
|
||||
if (ris <= 1)
|
||||
ris = 1
|
||||
return ris
|
||||
},
|
||||
|
||||
getrigacolstr(mianave) {
|
||||
return this.getRiganave(mianave.riga) + '.' + this.getColnave(mianave.col)
|
||||
},
|
||||
|
||||
getmaxcol(riga) {
|
||||
|
||||
return Math.pow(2, riga - 1)
|
||||
},
|
||||
|
||||
getrigaNaveByPosiz(riga) {
|
||||
let ris = riga + 3
|
||||
if (ris <= 1)
|
||||
ris = 1
|
||||
return ris
|
||||
|
||||
},
|
||||
|
||||
getcolNaveByPosiz(col) {
|
||||
let ris = Math.ceil(col * Math.pow(2, 3) / (2 * 4))
|
||||
if (ris <= 1)
|
||||
ris = 1
|
||||
return ris
|
||||
|
||||
},
|
||||
|
||||
getfirstnaveSognatore(riga, col) {
|
||||
const myriga = this.getrigaNaveByPosiz(riga)
|
||||
const mycol = this.getcolNaveByPosiz(col)
|
||||
|
||||
return { riga: myriga, col: mycol }
|
||||
},
|
||||
|
||||
getnumnavi_finoa(naveorig, navedest, lastnave) {
|
||||
let contaattuale = 0
|
||||
let contatot = 0
|
||||
|
||||
const indrigaattuale = lastnave.riga
|
||||
const indcolattuale = lastnave.col
|
||||
|
||||
if (navedest.riga < indrigaattuale) {
|
||||
return { perc: 100, totale: 0, contaattuale: 0 }
|
||||
}
|
||||
|
||||
for (let indriga = naveorig.riga; indriga <= navedest.riga; indriga++) {
|
||||
|
||||
let startcol = 0
|
||||
if (indriga === naveorig.riga) {
|
||||
startcol = naveorig.col
|
||||
}
|
||||
let endcol = this.getmaxcol(indriga)
|
||||
if (indriga === navedest.riga) {
|
||||
endcol = navedest.col
|
||||
}
|
||||
|
||||
if (indriga <= navedest.riga) {
|
||||
contatot += (endcol - startcol)
|
||||
}
|
||||
|
||||
if (indriga < indrigaattuale) {
|
||||
contaattuale += (endcol - startcol)
|
||||
} else if (indriga === indrigaattuale) {
|
||||
contaattuale += indcolattuale
|
||||
}
|
||||
}
|
||||
|
||||
let perc = 0
|
||||
if (contatot > 0)
|
||||
perc = (contaattuale / contatot) * 100
|
||||
|
||||
if (perc > 100)
|
||||
perc = 100
|
||||
|
||||
console.log('naveorig', naveorig.riga, '.', naveorig.col, 'dest', navedest.riga, ',', navedest.col)
|
||||
console.log('lastnave', lastnave.riga, '.', lastnave.col)
|
||||
console.log('contaattuale', contaattuale, 'contatot', contatot, 'perc', perc)
|
||||
|
||||
return { perc, totale: contatot, contaattuale }
|
||||
},
|
||||
|
||||
sito_online(pertutti) {
|
||||
|
||||
let ris = true
|
||||
const online = this.getValDb('SITO_ONLINE', false, true)
|
||||
ris = UserStore.state.isAdmin && !pertutti ? true : online
|
||||
// console.log('isadmin', UserStore.state.isAdmin)
|
||||
return ris
|
||||
}
|
||||
|
||||
|
||||
// getLocale() {
|
||||
// if (navigator.languages && navigator.languages.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user