Updated riso.app with Site Configuration Parameter

This commit is contained in:
Surya Paolo
2022-11-29 00:16:25 +01:00
parent 58dc1dfdcc
commit 9d32f92589
107 changed files with 738 additions and 1851 deletions

View File

@@ -760,8 +760,8 @@ export const colmyUserGroup = [
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist
}),
AddCol({
name: 'note', label_trans: 'proj.longdescr', fieldtype: costanti.FieldType.html,
titlepopupedit: 'Dettagli', field_extra1: 'groupname', subfield_extra1: ''
name: 'note', label_trans: 'reg.detailsPage', fieldtype: costanti.FieldType.html,
titlepopupedit: 'detailsPage', field_extra1: 'groupname', subfield_extra1: ''
}),
AddCol(ModifRec),
AddCol(DeleteRec),
@@ -2960,9 +2960,9 @@ export const fieldsTable = {
const tablerec: any = this.tablesList.find((rec) => rec.value === mytable)
if (tablerec) {
console.log('tablerec', tablerec.columns)
// console.log('tablerec', tablerec.columns)
const mycol = tablerec.columns.find((col: any) => col.name === namecol)
console.log('mycol = ', mycol)
// console.log('mycol = ', mycol)
return mycol
} else
return null

View File

@@ -2748,7 +2748,7 @@ export const tools = {
}
console.log('static_data.arrLangUsed', static_data.arrLangUsed, 'mylang', mylang)
// console.log('static_data.arrLangUsed', static_data.arrLangUsed, 'mylang', mylang)
if (!(static_data.arrLangUsed.includes(mylang))) {
// console.log('non incluso ', mylang)
// mylang = static_data.arrLangUsed[0]
@@ -5485,7 +5485,7 @@ export const tools = {
// console.log('OUT', res)
if (res && res.userprofile) {
console.log('updateMyData')
// console.log('updateMyData')
userStore.my.profile = res.userprofile
if (res.listcircuits) {
@@ -6711,14 +6711,14 @@ export const tools = {
},
getFullFileName(arrimage: IImgGallery[], table: string, username: string, groupname: string) {
console.log('arrimage', arrimage)
// console.log('arrimage', arrimage)
if (shared_consts.TABLES_DIRECTORY_A_PARTE.includes(table)) {
return `upload/${table}/` + groupname + '/' + arrimage[0].imagefile
} else if (shared_consts.TABLES_DIRECTORY_SINGLE_IMG.includes(table)) {
return `upload/${table}/` + groupname + '/' + arrimage[0].imagefile
} else {
console.log('username', username, 'table', table)
// console.log('username', username, 'table', table)
if (arrimage && arrimage.length > 0) {
return `upload/profile/${username}/${table}` + arrimage[0].imagefile
} else {

View File

@@ -266,7 +266,7 @@ export const toolsext = {
}
console.log('static_data.arrLangUsed', static_data.arrLangUsed, 'mylang', mylang)
// console.log('static_data.arrLangUsed', static_data.arrLangUsed, 'mylang', mylang)
if (!(static_data.arrLangUsed.includes(mylang))) {
// console.log('non incluso ', mylang)

View File

@@ -179,7 +179,7 @@ export const useNotifStore = defineStore('NotifStore', {
},
async updateNotifDataFromServer({ username, lastdataread }: {username: string, lastdataread: Date}) {
console.log('updateNotifDataFromServer', username, lastdataread)
// console.log('updateNotifDataFromServer', username, lastdataread)
return Api.SendReq(`/sendnotif/${username}/${lastdataread}/${process.env.APP_ID}`, 'GET', null)
.then((res) => {

View File

@@ -634,6 +634,7 @@ export const useUserStore = defineStore('UserStore', {
authUser(data: IUserFields) {
try {
this.my = { ...data }
// console.log('**** my', this.my)
if (!this.my.profile) {
this.my.profile = DefaultProfile
@@ -1030,7 +1031,7 @@ export const useUserStore = defineStore('UserStore', {
return await this.setGlobal($router, isLogged)
.then((loadstorage: any) => {
console.log('RISULT setGlobal:', loadstorage)
// console.log('RISULT setGlobal:', loadstorage)
if (loadstorage) {
globalroutines('loadapp', '')

View File

@@ -142,7 +142,34 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
confpages: {
font: '',
show_darkopt: false,
col_toolbar: '',
col_bgfooter: '',
show_darkopt: true,
showProfile: false,
showUserMenu: true,
showRegButton: false,
enableReg: false,
showNL: false,
showMsgs: false,
showNotif: false,
showCoins: false,
showNameSurname: false,
showCompetenze: false,
showConnected: false,
bookingEvents: false,
enableEcommerce: false,
enableGroups: false,
enableCircuits: false,
enableProj: false,
enableTodos: false,
enableRegByBot: false,
enabledRegNeedTelegram: false,
showButtHome: false,
showViewGroups: false,
showViewUsers: false,
showViewProfile: false,
enablePwa: false,
lang: costanti.Lang.IT,
},
},
provinces: [],
@@ -628,7 +655,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
// }
if (!this.site.confpages.enablePwa)
if (!this.site.confpages || !this.site.confpages.enablePwa)
return
if (!('serviceWorker' in navigator)) {
@@ -816,7 +843,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
},
async checkUpdates() {
console.log('checkUpdates')
// console.log('checkUpdates')
const userStore = useUserStore()
@@ -1485,7 +1512,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
console.log('isLogged', isLogged)
// calendarStore.editable = userStore.isAdmin || userStore.isManager || userStore.isFacilitatore
if (res.data.myuser === null) {
if (res.data.myuser === null || (res.data.myuser.idapp !== process.env.APP_ID)) {
if (isLogged) {
// Fai Logout
console.log('Fai Logout', 'isLogged', isLogged)