- Migliorata la Notifica degli Eventi su Telegram
- Gli annunci (beni/servizi/ospitalità) ora possono essere visti anche tramite un link, anche per chi non è dentro alla App. - Aggiunto bottone "Aggiorna" per aggiornare il Saldo attuale. - I "Conti Collettivi" ora vengono chiamati Gruppi (o Conto di Gruppo).
This commit is contained in:
@@ -608,15 +608,19 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return tools.getUrlSite() + '/registrati/' + username
|
||||
},
|
||||
|
||||
isTelegIdOk(): boolean {
|
||||
return (this.my.profile.teleg_id! > 0 || this.my.profile.teleg_id_old! > 0)
|
||||
},
|
||||
|
||||
isUserOk(): boolean {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
if (globalStore.site.confpages.enableRegMultiChoice) {
|
||||
return ((this.my.profile.teleg_id! > 0 && this.isUsernameTelegOk()) || this.my.verified_email!) && this.my.verified_by_aportador!
|
||||
return ((this.isTelegIdOk() && this.isUsernameTelegOk()) || this.my.verified_email!) && this.my.verified_by_aportador!
|
||||
} else {
|
||||
return this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador! && this.isUsernameTelegOk()
|
||||
return this.isTelegIdOk() && this.my.verified_by_aportador! && this.isUsernameTelegOk()
|
||||
}
|
||||
// return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
|
||||
// return this.my.verified_email! && this.isTelegIdOk() && this.my.verified_by_aportador!
|
||||
},
|
||||
|
||||
isUserWaitingVerifAportador(): boolean {
|
||||
@@ -625,17 +629,17 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
isOldRegNotFinished(): boolean {
|
||||
return tools.isLogged() && ((!this.my.profile.teleg_id || this.my.profile.teleg_id <= 0) || !this.isUsernameTelegOk())
|
||||
// return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
|
||||
// return this.my.verified_email! && this.isTelegIdOk() && this.my.verified_by_aportador!
|
||||
},
|
||||
|
||||
isTelegOk(): boolean {
|
||||
return this.my.profile.teleg_id! > 0
|
||||
// return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
|
||||
return this.isTelegIdOk()
|
||||
// return this.my.verified_email! && this.isTelegIdOk() && this.my.verified_by_aportador!
|
||||
},
|
||||
|
||||
isUsernameTelegOk(): boolean {
|
||||
return !!this.my.profile.username_telegram
|
||||
// return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
|
||||
// return this.my.verified_email! && this.isTelegIdOk() && this.my.verified_by_aportador!
|
||||
},
|
||||
|
||||
getNameSurnameByUserId(userId: string): string {
|
||||
@@ -1702,6 +1706,12 @@ export const useUserStore = defineStore('UserStore', {
|
||||
.then((res) => {
|
||||
if (res && res.data.state === 1) {
|
||||
if (myrec) {
|
||||
if (!myrec.myreact) {
|
||||
myrec.myreact = {
|
||||
numfav: 0,
|
||||
}
|
||||
}
|
||||
|
||||
if (!recreaction)
|
||||
this.my.profile.reaction.push({ id: objectId(), idrec: id, tab, username: this.my.username, fav: true })
|
||||
else
|
||||
@@ -1739,6 +1749,11 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return await Api.SendReq('/reactions/cmd', 'POST', { cmd: CMD_REACTION.SET_ATTEND, id, tab, value })
|
||||
.then((res) => {
|
||||
if (res && res.data.state === 1) {
|
||||
if (!myrec.myreact) {
|
||||
myrec.myreact = {
|
||||
numattend: 0,
|
||||
}
|
||||
}
|
||||
if (!myrec.myreact.attend)
|
||||
myrec.myreact.attend = false
|
||||
// create a record
|
||||
@@ -1800,6 +1815,11 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return await Api.SendReq('/reactions/cmd', 'POST', { cmd: CMD_REACTION.SET_BOOKMARK, id, tab, value })
|
||||
.then((res) => {
|
||||
if (res && res.data.state === 1) {
|
||||
if (!myrec.myreact) {
|
||||
myrec.myreact = {
|
||||
numseen: 0,
|
||||
}
|
||||
}
|
||||
if (!myrec.mybook)
|
||||
myrec.mybook = []
|
||||
if (!recreaction)
|
||||
@@ -1813,8 +1833,8 @@ export const useUserStore = defineStore('UserStore', {
|
||||
//++ this.my.profile.reaction = tools.removeIObjectOnce(this.my.profile.reaction, { id, tab, })
|
||||
if ((myrec && myrec.mybook) && recreaction)
|
||||
recreaction.book = false
|
||||
myrec.myreact.numbook--
|
||||
//myrec.mybook = myrec.mybook.filter((rec: IFavBook) => rec.username !== this.my.username)
|
||||
myrec.myreact.numbook--
|
||||
//myrec.mybook = myrec.mybook.filter((rec: IFavBook) => rec.username !== this.my.username)
|
||||
tools.showNegativeNotif($q, t('cmd.bookmark_unset'))
|
||||
}
|
||||
}).catch((error) => {
|
||||
@@ -1856,6 +1876,11 @@ export const useUserStore = defineStore('UserStore', {
|
||||
.then((res) => {
|
||||
if (res && res.data.state === 1) {
|
||||
if (value) {
|
||||
if (!myrec.myreact) {
|
||||
myrec.myreact = {
|
||||
numseen: 0,
|
||||
}
|
||||
}
|
||||
myrec.myreact.numseen++
|
||||
if (!recreaction)
|
||||
this.my.profile.reaction.push({ id: objectId(), idrec: id, tab, username: this.my.username, seen: true })
|
||||
|
||||
Reference in New Issue
Block a user