Visu Sent Monete

This commit is contained in:
Paolo Arena
2022-09-13 12:28:33 +02:00
parent f59691985a
commit 44c75768c6
29 changed files with 301 additions and 69 deletions

View File

@@ -27,6 +27,7 @@ import { costanti } from '@costanti'
import { IMyGroup } from '@model/UserStore'
import globalroutines from '../globalroutines/index'
import { useNotifStore } from '@store/NotifStore'
export const DefaultUser: IUserFields = {
_id: '',
@@ -1226,9 +1227,14 @@ export const useUserStore = defineStore('UserStore', {
},
async setCircuitCmd($q: any, t: any, usernameOrig: string, circuitname: string, cmd: number, value: any, extrarec?: any) {
return Api.SendReq('/users/circuits/cmd', 'POST', { usernameOrig, circuitname, cmd, value, extrarec })
return await Api.SendReq('/users/circuits/cmd', 'POST', { usernameOrig, circuitname, cmd, value, extrarec })
.then((res) => {
this.updateTables = true
if (res.data.recnotif) {
const notifStore = useNotifStore()
notifStore.updateRecNotif(res.data.recnotif)
}
return res.data
}).catch((error) => {
tools.showNegativeNotif($q, t('db.recfailed'))