ver 0.5.51
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
ITodo,
|
||||
IUserFields,
|
||||
Privacy,
|
||||
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam, IUserExport, ISpecialField, IAccount, IMyCircuit, ISendCoin, IMovement, IMovVisu, INotif, IMyElem, IMyCard, ILabelValue, ILabelValueStr, IAnim, ILang,
|
||||
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam, IUserExport, ISpecialField, IAccount, IMyCircuit, ISendCoin, IMovement, IMovVisu, INotif, IMyElem, IMyCard, ILabelValue, ILabelValueStr, IAnim, ILang, IGroupShort,
|
||||
} from '@model'
|
||||
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
@@ -5528,6 +5528,7 @@ export const tools = {
|
||||
updateMyData(res: any) {
|
||||
const userStore = useUserStore()
|
||||
const circuitStore = useCircuitStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
// console.log('OUT', res)
|
||||
|
||||
@@ -5538,6 +5539,9 @@ export const tools = {
|
||||
if (res.listcircuits) {
|
||||
circuitStore.listcircuits = res.listcircuits
|
||||
}
|
||||
if (res.mygroups) {
|
||||
globalStore.mygroups = res.mygroups
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -5641,7 +5645,7 @@ export const tools = {
|
||||
if (res) {
|
||||
notifStore.updateNotification = true
|
||||
if (username === userStore.my.username) {
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IMyGroup) => rec.groupname !== groupnameDest)
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IGroupShort) => rec.groupname !== groupnameDest)
|
||||
}
|
||||
tools.showPositiveNotif($q, t('db.refusedgroup', { username }))
|
||||
}
|
||||
@@ -5833,7 +5837,7 @@ export const tools = {
|
||||
tools.showPositiveNotif($q, t('db.askedtogroup', { groupname: groupnameDest }))
|
||||
} else {
|
||||
// REMOVE to req Friends
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IMyGroup) => rec.groupname !== groupnameDest)
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IGroupShort) => rec.groupname !== groupnameDest)
|
||||
tools.showPositiveNotif($q, t('db.revoketogroup', { groupname: groupnameDest }))
|
||||
}
|
||||
|
||||
@@ -5872,7 +5876,7 @@ export const tools = {
|
||||
userStore.setGroupsCmd($q, t, username, groupnameDest, shared_consts.GROUPSCMD.CANCEL_REQ_GROUP, null).then((res) => {
|
||||
if (res) {
|
||||
if (username === userStore.my.username) {
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IMyGroup) => rec.groupname !== groupnameDest)
|
||||
userStore.my.profile.asked_groups = userStore.my.profile.asked_groups.filter((rec: IGroupShort) => rec.groupname !== groupnameDest)
|
||||
}
|
||||
tools.showPositiveNotif($q, t('db.cancel_req_group'))
|
||||
}
|
||||
@@ -6037,7 +6041,7 @@ export const tools = {
|
||||
return risultato
|
||||
|
||||
},
|
||||
setRequestCircuit($q: any, username: string, circuitname: string, value: boolean) {
|
||||
setRequestCircuit($q: any, username: string, circuitname: string, value: boolean, groupname?: string) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
@@ -6060,7 +6064,7 @@ export const tools = {
|
||||
title: t('db.domanda')
|
||||
}).onOk(() => {
|
||||
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REQ, value)
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REQ, value, { groupname })
|
||||
.then((res: any) => {
|
||||
if (res) {
|
||||
if (value) {
|
||||
@@ -6088,8 +6092,15 @@ export const tools = {
|
||||
|
||||
const username = userStore.my.username
|
||||
|
||||
let orig = sendcoinrec.grouporig ? sendcoinrec.grouporig : ''
|
||||
let dest = sendcoinrec.groupdest ? sendcoinrec.groupdest : sendcoinrec.dest
|
||||
|
||||
let msg = ''
|
||||
msg = t('circuit.question_sendcoinsto', { coin: circuit.symbol, dest: sendcoinrec.dest, qty: sendcoinrec.qty })
|
||||
if (orig) {
|
||||
msg = t('circuit.question_sendcoinsto_from', { coin: circuit.symbol, from: orig, dest, qty: sendcoinrec.qty })
|
||||
} else {
|
||||
msg = t('circuit.question_sendcoinsto', { coin: circuit.symbol, dest, qty: sendcoinrec.qty })
|
||||
}
|
||||
|
||||
return $q.dialog({
|
||||
message: msg,
|
||||
@@ -6124,7 +6135,7 @@ export const tools = {
|
||||
})
|
||||
},
|
||||
|
||||
cancelReqCircuit($q: any, username: string, circuitname: string) {
|
||||
cancelReqCircuit($q: any, username: string, circuitname: string, groupname?: string) {
|
||||
const userStore = useUserStore()
|
||||
$q.dialog({
|
||||
message: t('circuit.domanda_cancel_req', { username, circuitname }),
|
||||
@@ -6133,7 +6144,7 @@ export const tools = {
|
||||
title: t('db.domanda')
|
||||
}).onOk(() => {
|
||||
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.CANCEL_REQ, null).then((res) => {
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.CANCEL_REQ, null, { groupname }).then((res) => {
|
||||
if (res && res.result) {
|
||||
if (username === userStore.my.username) {
|
||||
userStore.my.profile.asked_circuits = userStore.my.profile.asked_circuits.filter((rec: ICircuit) => rec.name !== circuitname)
|
||||
@@ -6145,7 +6156,7 @@ export const tools = {
|
||||
})
|
||||
},
|
||||
|
||||
refuseReqCircuit($q: any, username: string, circuitname: string) {
|
||||
refuseReqCircuit($q: any, username: string, circuitname: string, groupname?: string) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const notifStore = useNotifStore()
|
||||
@@ -6156,7 +6167,7 @@ export const tools = {
|
||||
title: t('db.domanda')
|
||||
}).onOk(() => {
|
||||
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REFUSE_REQ, null).then((res) => {
|
||||
userStore.setCircuitCmd($q, t, username, circuitname, shared_consts.CIRCUITCMD.REFUSE_REQ, null, { groupname }).then((res) => {
|
||||
if (res && res.result) {
|
||||
notifStore.updateNotification = true
|
||||
if (username === userStore.my.username) {
|
||||
@@ -6696,6 +6707,8 @@ export const tools = {
|
||||
symbol: 'RIS',
|
||||
fido_scoperto_default: 100,
|
||||
qta_max_default: 200,
|
||||
fido_scoperto_default_grp: shared_consts.CIRCUIT_PARAMS.SCOPERTO_MIN_GRP,
|
||||
qta_max_default_grp: shared_consts.CIRCUIT_PARAMS.SCOPERTO_MAX_GRP,
|
||||
valuta_per_euro: 1,
|
||||
totTransato: 0,
|
||||
totCircolante: 0,
|
||||
@@ -7415,6 +7428,16 @@ export const tools = {
|
||||
}
|
||||
|
||||
},
|
||||
initprompt() {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
window.addEventListener('beforeinstallprompt', (event) => {
|
||||
event.preventDefault()
|
||||
console.log('beforeinstallprompt !')
|
||||
// Stash the event so it can be triggered later.
|
||||
globalStore.deferredPrompt = event
|
||||
})
|
||||
},
|
||||
|
||||
// FINE !
|
||||
|
||||
|
||||
Reference in New Issue
Block a user