Home Page With Element ! (Modular)
Arcadei Project... Inscription
This commit is contained in:
@@ -108,6 +108,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
gallery: [],
|
||||
mailinglist: [],
|
||||
mypage: [],
|
||||
myelems: [],
|
||||
calzoom: [],
|
||||
producers: [],
|
||||
groups: [],
|
||||
@@ -191,7 +192,6 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
|
||||
return mystate.menulinks
|
||||
|
||||
//return cfgrouter.getmenu()
|
||||
},
|
||||
|
||||
getRespByUsername: (state: IGlobalState) => (username: string) => {
|
||||
@@ -224,6 +224,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === toolsext.TABOPZEMAIL) ris = state.opzemail
|
||||
else if (table === toolsext.TABMAILINGLIST) ris = state.mailinglist
|
||||
else if (table === toolsext.TABMYPAGE) ris = state.mypage
|
||||
else if (table === toolsext.TABMYELEMS) ris = state.myelems
|
||||
else if (table === toolsext.TABCALZOOM) ris = state.calzoom
|
||||
else if (table === 'producers') ris = state.producers
|
||||
else if (table === 'storehouses') ris = state.storehouses
|
||||
@@ -424,7 +425,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if ($router) {
|
||||
if (tools.sito_online(false)) {
|
||||
// console.log('SITO ONLINE', arrpagesroute)
|
||||
arrpagesroute.forEach(function (route: any) {
|
||||
arrpagesroute.forEach((route: any) => {
|
||||
$router.addRoute(route)
|
||||
})
|
||||
|
||||
@@ -444,7 +445,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
|
||||
const trovato = this.mypage.filter((rec: IMyPage) => (rec.path === mypathsel) && (rec.active))
|
||||
|
||||
//if ($router.currentRoute.value.fullPath in ) {
|
||||
// if ($router.currentRoute.value.fullPath in ) {
|
||||
if (trovato) {
|
||||
$router.replace(mypathsel)
|
||||
}
|
||||
@@ -643,7 +644,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
// console.log('saveSubscriptionToServer: ', newSub)
|
||||
// console.log('context', context)
|
||||
|
||||
let options = null
|
||||
const options = null
|
||||
let notreg = false
|
||||
|
||||
if (userStore.isTokenInvalid) {
|
||||
@@ -870,7 +871,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
|
||||
async caricaTabella(table: string, extrapar: string) {
|
||||
|
||||
let myarr = []
|
||||
const myarr = []
|
||||
const sortBy = 'descr'
|
||||
const descending = 1
|
||||
const myobj: any = {}
|
||||
@@ -940,7 +941,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
|
||||
console.log('loadPageTest')
|
||||
|
||||
let obj = { test: 'OK! Versione Client: ' + tools.getvers() }
|
||||
const obj = { test: 'OK! Versione Client: ' + tools.getvers() }
|
||||
|
||||
return Api.SendReq('/testServer', 'POST', obj)
|
||||
.then((res) => {
|
||||
@@ -963,7 +964,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if (res.data.rec) {
|
||||
return res.data.rec
|
||||
} else {
|
||||
res.data
|
||||
return res.data
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1405,7 +1406,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
this.mailinglist = (res.data.mailinglist) ? [...res.data.mailinglist] : []
|
||||
}
|
||||
this.mypage = (res.data.mypage) ? [...res.data.mypage] : []
|
||||
console.log('this.mypage', this.mypage)
|
||||
this.myelems = (res.data.myelems) ? [...res.data.myelems] : []
|
||||
// console.log('this.mypage', this.mypage)
|
||||
|
||||
let isLogged = false
|
||||
|
||||
@@ -1578,8 +1580,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
let mydateend = tools.addDays(mydate, numdays)
|
||||
mydate = tools.getstrYYMMDDDate(mydate)
|
||||
mydateend = tools.getstrYYMMDDDate(mydateend)
|
||||
let filter = { dateTimeStart: { $gte: mydate, $lte: mydateend } }
|
||||
let obj = { _id: num, datestr: mystr, filter }
|
||||
const filter = { dateTimeStart: { $gte: mydate, $lte: mydateend } }
|
||||
const obj = { _id: num, datestr: mystr, filter }
|
||||
|
||||
return obj
|
||||
},
|
||||
@@ -1587,7 +1589,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
getArrDateEvent() {
|
||||
const arr = []
|
||||
|
||||
let obj = {}
|
||||
const obj = {}
|
||||
|
||||
arr.push(this.getItemDate(1, -30, 30, 'Eventi Passati'))
|
||||
arr.push(this.getItemDate(2, 0, 14, 'Da Oggi a 2 sett.'))
|
||||
@@ -1604,7 +1606,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
let obj = {}
|
||||
|
||||
for (let i = 0; i < 120; i++) {
|
||||
let mydate = tools.addDays(tools.getDateNow(), i - 30)
|
||||
const mydate = tools.addDays(tools.getDateNow(), i - 30)
|
||||
obj = { _id: mydate, datestr: tools.getstrVeryShortDate(mydate) }
|
||||
arr.push(obj)
|
||||
}
|
||||
@@ -1624,9 +1626,11 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === 'confsite_opt') myarr = tools.ConfSiteOpt
|
||||
else if (table === 'bottype') myarr = shared_consts.BotType
|
||||
else if (table === 'visibility') myarr = shared_consts.Visibility
|
||||
else if (table === 'cat_interesse_arcadei') myarr = shared_consts.Cat_Interesse_Arcadei
|
||||
else if (table === 'pub_to_share') myarr = shared_consts.Pub_to_Share
|
||||
else if (table === 'visibilGroup') myarr = shared_consts.VisibilGroup
|
||||
else if (table === 'statuscircuit') myarr = shared_consts.StatusCircuit
|
||||
else if (table === 'elemtypes') myarr = shared_consts.TypesElem
|
||||
else if (table === 'lang') myarr = shared_consts.Lang
|
||||
else if (table === 'regions') myarr = shared_consts.Regions
|
||||
else if (table === 'shippings') myarr = shared_consts.Shippings
|
||||
@@ -1658,14 +1662,14 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if (addnone) {
|
||||
const mykey = fieldsTable.getKeyByTable(table)
|
||||
const collab = fieldsTable.getLabelByTable(table)
|
||||
let obj: any = {}
|
||||
const obj: any = {}
|
||||
obj[mykey] = costanti.FILTER_NESSUNO
|
||||
obj[collab] = '[Nessuno]'
|
||||
|
||||
if (table === toolsext.TABMYGOODS) {
|
||||
obj['idSectorGood'] = []
|
||||
obj.idSectorGood = []
|
||||
} else if ((table === toolsext.TABMYSKILLS)) {
|
||||
obj['idSector'] = []
|
||||
obj.idSector = []
|
||||
}
|
||||
|
||||
myarr = [obj, ...myarr]
|
||||
|
||||
Reference in New Issue
Block a user