Aggiornamento Traduzioni ...
This commit is contained in:
@@ -831,6 +831,29 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
|
||||
async function GetData(context, { data }) {
|
||||
console.log('GetData')
|
||||
|
||||
const mydata = {
|
||||
idapp: process.env.APP_ID,
|
||||
data
|
||||
}
|
||||
|
||||
return await Api.SendReq('/dashboard/getdata', 'POST', mydata)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
if (res.data.code === serv_constants.RIS_CODE_OK) {
|
||||
return res.data.ris
|
||||
}
|
||||
}
|
||||
return null
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
return null
|
||||
})
|
||||
}
|
||||
|
||||
async function GetArrDoniNavi(context, { ricalcola }) {
|
||||
console.log('GetArrDoniNavi')
|
||||
|
||||
@@ -934,25 +957,37 @@ namespace Actions {
|
||||
})
|
||||
}
|
||||
|
||||
function isMyLang(rec) {
|
||||
if (!rec.lang)
|
||||
return true
|
||||
|
||||
return (rec.lang === tools.getLocale(false) || tools.getLocale() === '')
|
||||
}
|
||||
|
||||
async function addDynamicPages(context) {
|
||||
|
||||
const arrpagesroute: IListRoutes[] = []
|
||||
for (const page of state.mypage) {
|
||||
if (page.active) {
|
||||
arrpagesroute.push({
|
||||
active: true,
|
||||
order: page.order,
|
||||
path: '/' + page.path,
|
||||
name: undefined,
|
||||
text: page.title,
|
||||
materialIcon: page.icon,
|
||||
component: () => import('@/root/mypage/mypage.vue'),
|
||||
inmenu: page.inmenu,
|
||||
infooter: page.infooter,
|
||||
onlyif_logged: page.onlyif_logged,
|
||||
level_child: page.l_child,
|
||||
level_parent: page.l_par,
|
||||
})
|
||||
// console.log('page', page.lang)
|
||||
if (isMyLang(page)) {
|
||||
// console.log('page', page.lang, 'OK')
|
||||
arrpagesroute.push({
|
||||
active: true,
|
||||
order: page.order,
|
||||
lang: page.lang,
|
||||
path: '/' + page.path,
|
||||
name: undefined,
|
||||
text: page.title,
|
||||
materialIcon: page.icon,
|
||||
component: () => import('@/root/mypage/mypage.vue'),
|
||||
inmenu: page.inmenu,
|
||||
infooter: page.infooter,
|
||||
onlyif_logged: page.onlyif_logged,
|
||||
level_child: page.l_child,
|
||||
level_parent: page.l_par,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1005,6 +1040,7 @@ namespace Actions {
|
||||
InviaMsgADonatori: b.dispatch(InviaMsgADonatori),
|
||||
GetArrNavi: b.dispatch(GetArrNavi),
|
||||
GetArrDoniNavi: b.dispatch(GetArrDoniNavi),
|
||||
GetData: b.dispatch(GetData),
|
||||
addDynamicPages: b.dispatch(addDynamicPages)
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import translate from './../../globalroutines/util'
|
||||
import * as Types from '@src/store/Api/ApiTypes'
|
||||
import { ICalendarState, ICfgServer } from '@src/model'
|
||||
import { shared_consts } from '../../common/shared_vuejs'
|
||||
import { IDataPass } from '@src/model/GlobalStore'
|
||||
|
||||
const bcrypt = require('bcryptjs')
|
||||
|
||||
@@ -353,6 +354,7 @@ namespace Mutations {
|
||||
localStorage.setItem(tools.localStorage.lang, state.lang)
|
||||
}
|
||||
|
||||
|
||||
function UpdatePwd(mystate: IUserState, x_auth_token: string) {
|
||||
mystate.x_auth_token = x_auth_token
|
||||
if (!mystate.my.tokens) {
|
||||
@@ -481,6 +483,26 @@ namespace Actions {
|
||||
|
||||
}
|
||||
|
||||
async function setLangServer(context) {
|
||||
|
||||
const mydata = {
|
||||
username: state.my.username,
|
||||
lang: state.lang
|
||||
}
|
||||
|
||||
return await Api.SendReq(`/setlang`, '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 requestpwd(context, paramquery) {
|
||||
|
||||
const usertosend = {
|
||||
@@ -957,6 +979,7 @@ namespace Actions {
|
||||
importemail: b.dispatch(importemail),
|
||||
importExtraList: b.dispatch(importExtraList),
|
||||
execDbOp: b.dispatch(execDbOp),
|
||||
setLangServer: b.dispatch(setLangServer),
|
||||
newsletterload: b.dispatch(newsletterload),
|
||||
newsletter_setactivate: b.dispatch(newsletter_setactivate),
|
||||
getDashboard: b.dispatch(getDashboard),
|
||||
|
||||
@@ -488,6 +488,7 @@ export const fieldsTable = {
|
||||
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' }),
|
||||
|
||||
@@ -1682,6 +1682,9 @@ export const tools = {
|
||||
if ((mylang.toLowerCase() === 'it') || (mylang.toLowerCase() === 'it-it') || (mylang.toLowerCase() === 'itit')) {
|
||||
mylang = 'it'
|
||||
}
|
||||
if ((mylang.toLowerCase() === 'si') || (mylang.toLowerCase() === 'si-si') || (mylang.toLowerCase() === 'sisi')) {
|
||||
mylang = 'si'
|
||||
}
|
||||
|
||||
if (!(static_data.arrLangUsed.includes(mylang))) {
|
||||
// console.log('non incluso ', mylang)
|
||||
@@ -2187,7 +2190,7 @@ export const tools = {
|
||||
es: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'iernes', 'Sábado'],
|
||||
pt: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'],
|
||||
de: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
|
||||
si: ['nedelja', 'Ponedeljek', 'torek', 'sreda', 'četrtek', 'petek', 'sobota'],
|
||||
si: ['Nedelja', 'Ponedeljek', 'Torek', 'Sreda', 'četrtek', 'Petek', 'Sobota'],
|
||||
}
|
||||
|
||||
return isNaN(dayOfWeek) ? '' : myday[lang][dayOfWeek].substring(0, 3)
|
||||
@@ -2706,10 +2709,12 @@ export const tools = {
|
||||
})
|
||||
})
|
||||
|
||||
GlobalStore.actions.addDynamicPages()
|
||||
|
||||
// this.$q.lang.set(mylang)
|
||||
|
||||
}
|
||||
,
|
||||
},
|
||||
|
||||
getappname(mythis, short) {
|
||||
if (mythis === undefined)
|
||||
return ''
|
||||
@@ -3281,6 +3286,8 @@ export const tools = {
|
||||
return 'fa-flag-fr'
|
||||
else if (lang === 'SI')
|
||||
return 'fa-flag-si'
|
||||
else if (lang === 'NG')
|
||||
return 'fa-flag-ng'
|
||||
else if (lang === 'SK')
|
||||
return 'fa-flag-sk'
|
||||
else if (lang === 'CH')
|
||||
@@ -3297,6 +3304,8 @@ export const tools = {
|
||||
return 'fa-flag-hr'
|
||||
else if (lang === 'RO')
|
||||
return 'fa-flag-ro'
|
||||
else if (lang === 'VE')
|
||||
return 'fa-flag-ve'
|
||||
else if (lang === 'CL')
|
||||
return 'fa-flag-cl'
|
||||
else if (lang === 'PL')
|
||||
@@ -3336,6 +3345,8 @@ export const tools = {
|
||||
return 'Slovenia'
|
||||
} else if (nat === 'SK') {
|
||||
return 'Slovakia'
|
||||
} else if (nat === 'NG') {
|
||||
return 'Nigeria'
|
||||
} else if (nat === 'ES') {
|
||||
return 'Spain'
|
||||
} else if (nat === 'DE') {
|
||||
@@ -3374,6 +3385,8 @@ export const tools = {
|
||||
return 'Ukraine'
|
||||
} else if (nat === 'RO') {
|
||||
return 'Romania'
|
||||
} else if (nat === 'VE') {
|
||||
return 'Venezuela'
|
||||
} else if (nat === 'CL') {
|
||||
return 'Chile'
|
||||
} else if (nat === 'PL') {
|
||||
|
||||
Reference in New Issue
Block a user