- pagine admin: Accounts, Movements e Circuits.
- add change min e max range circuiti (per tutti i record).
This commit is contained in:
@@ -182,7 +182,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
mygroups: [],
|
||||
selElem: {},
|
||||
editOn: false,
|
||||
myselector: { data: {}, table: ''},
|
||||
myselector: { data: {}, table: '' },
|
||||
addNewRecord: '',
|
||||
isAppRunning: false,
|
||||
deferredPrompt: null,
|
||||
@@ -254,6 +254,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
let ris: any = []
|
||||
|
||||
const calendarStore = useCalendarStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
const userStore = useUserStore()
|
||||
const messageStore = useMessageStore()
|
||||
const notifStore = useNotifStore()
|
||||
@@ -285,6 +286,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === 'departments') ris = state.departments
|
||||
else if (table === 'sharewithus') ris = state.sharewithus
|
||||
else if (table === 'paymenttypes') ris = state.paymenttypes
|
||||
else if (table === 'circuits') ris = circuitStore.listcircuits
|
||||
else if (table === 'listcircuits') ris = circuitStore.getCircuitsLabelValue()
|
||||
else if (table === 'listaccounts') ris = circuitStore.getAccountsListNameValue()
|
||||
else if (table === 'bookings')
|
||||
return calendarStore.bookedevent
|
||||
else if (table === 'users')
|
||||
@@ -491,6 +495,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
infooter: true,
|
||||
}
|
||||
|
||||
// console.log('Sito Online? ', toolsext.sito_online(false))
|
||||
|
||||
if (!toolsext.sito_online(false)) {
|
||||
static_data.routes = [sito_offline, last]
|
||||
} else {
|
||||
@@ -519,8 +525,26 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if (!$router.hasRoute(route.name)) {
|
||||
$router.addRoute(route)
|
||||
}
|
||||
|
||||
if (route.routes2) {
|
||||
for (const route2 of route.routes2) {
|
||||
if (!$router.hasRoute(route2.name)) {
|
||||
$router.addRoute(route2)
|
||||
}
|
||||
|
||||
if (route2.routes2) {
|
||||
for (const route3 of route2.routes2) {
|
||||
if (!$router.hasRoute(route3.name)) {
|
||||
$router.addRoute(route3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
if (!tools.sito_online(false)) {
|
||||
$router.replace('/sito_offline')
|
||||
}
|
||||
@@ -1458,6 +1482,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
calendarStore.contribtype = (res.data.contribtype) ? res.data.contribtype : []
|
||||
|
||||
circuitStore.listcircuits = (res.data.listcircuits) ? res.data.listcircuits : []
|
||||
circuitStore.listaccounts = (res.data.listaccounts) ? res.data.listaccounts : []
|
||||
|
||||
this.settings = (res.data.settings) ? [...res.data.settings] : []
|
||||
this.disciplines = (res.data.disciplines) ? [...res.data.disciplines] : []
|
||||
@@ -1483,7 +1508,6 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
this.mygroups = (res.data.mygroups) ? [...res.data.mygroups] : []
|
||||
this.adtypes = (res.data.adtypes) ? [...res.data.adtypes] : []
|
||||
this.adtypegoods = (res.data.adtypegoods) ? [...res.data.adtypegoods] : []
|
||||
circuitStore.listcircuits = (res.data.listcircuits) ? [...res.data.listcircuits] : []
|
||||
|
||||
// console.log('res.data.cart', res.data.cart)
|
||||
|
||||
@@ -1750,7 +1774,13 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if (costanti.TABLES_ARRAY.includes(table)) {
|
||||
const newarr = []
|
||||
for (const value of myarr) {
|
||||
newarr.push({ value, label: value })
|
||||
let label = value
|
||||
if (table === 'mygroups')
|
||||
label = value.descr
|
||||
else if (table === 'circuits')
|
||||
label = value.name
|
||||
|
||||
newarr.push({ value, label })
|
||||
}
|
||||
|
||||
myarr = newarr
|
||||
@@ -1814,7 +1844,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
const collab = fieldsTable.getLabelByTable(col.jointable)
|
||||
|
||||
for (let index = 0; index < myarrtab.length; index++) {
|
||||
let obj = {label: '', value: 0}
|
||||
let obj = { label: '', value: 0 }
|
||||
obj.label = myarrtab[index][collab]
|
||||
obj.value = myarrtab[index][key]
|
||||
myarrrec.push(obj)
|
||||
|
||||
Reference in New Issue
Block a user