Quando si inserisce un evento, su giunge alla fine, si salva, NON SI MEMORIZZANO foto, data e orario!

This commit is contained in:
Surya Paolo
2023-06-07 17:25:14 +02:00
parent 9908558bf7
commit 1a57d5a2e3
11 changed files with 239 additions and 57 deletions

View File

@@ -10,6 +10,7 @@ import {
IParamsQuery,
ISettings,
ISites,
IStatusSkill,
StateConnection,
} from '@model'
import { static_data } from '@src/db/static_data'
@@ -198,6 +199,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
testpao1_getter_contatore: (state: IGlobalState) => (param1: number) => state.testp1.contatore + 100 + param1,
testpao1_getter_array: (state: IGlobalState) => (param1: number) => state.testp1.mioarray.filter((item) => item).map((item) => item.valore),
getConfigbyId: (state: IGlobalState) => (id: string) => state.arrConfig.find((item) => item._id === id),
getConfigStringbyId: (state: IGlobalState) => (params: any) => {
const config = state.arrConfig.find((item) => item._id === params.id)
@@ -207,6 +209,19 @@ export const useGlobalStore = defineStore('GlobalStore', {
return params.default
}
},
getColByStatusSkills: (state: IGlobalState) => (id: number) => {
const ctrec = state.statusSkills.find((mystatus: IStatusSkill) => mystatus._id === id)
return (ctrec && ctrec.color) ? ctrec.color : 'green'
},
getStatusSkillById: (state: IGlobalState) => (id: number) => {
const ctrec = state.statusSkills.find((mystatus: IStatusSkill) => mystatus._id === id)
return (ctrec) ? ctrec.descr : ''
},
isNewVersionAvailable: (state: IGlobalState) => {
// console.log('cfgServer', cfgServer)
const serversrec = state.cfgServer.find((x) => (x.chiave === toolsext.SERVKEY_VERS) && (x.idapp === process.env.APP_ID))