Versione 1.0.17

- Fix saldo pendente
- aggiunto bottone markup Telegram
- aggionta opzione per registrarsi direttamente su Telegram, senza doversi registrare ad un sito
This commit is contained in:
Surya Paolo
2023-10-21 15:28:01 +02:00
parent 018cf0bd99
commit cb11903707
73 changed files with 4176 additions and 162 deletions

View File

@@ -14,6 +14,7 @@ import { Api } from '@api'
import { toolsext } from '@store/Modules/toolsext'
import { static_data } from '@src/db/static_data'
import { useUserStore } from '@store/UserStore'
import { useNotifStore } from '@store/NotifStore'
import { shared_consts } from '@/common/shared_vuejs'
@@ -109,8 +110,14 @@ export const useCircuitStore = defineStore('CircuitStore', {
},
async aggiornaSaldo(circuitId: string) {
return Api.SendReq('/users/updatesaldo', 'POST', { circuitId })
async aggiornaSaldo(circuitId: string, groupname: string) {
const userStore = useUserStore()
const notifStore = useNotifStore()
const username = userStore.my.username
const lastdr = notifStore.getLastDataRead(username)
return Api.SendReq('/users/updatesaldo', 'POST', { circuitId, groupname, lastdr })
.then((res) => {
if (res.data.ris)
tools.updateMyData(res.data.ris)

View File

@@ -276,6 +276,18 @@ export const tools = {
label: 'Notif Reg Push (all\'Admin)',
value: shared_consts.ConfSite.Notif_Reg_Push_Admin,
},
{
label: 'Chiedi sul Bot chi ti ha invitato',
value: shared_consts.ConfSite.AskInvitantesulBot,
},
{
label: 'Chiedi l\'Username sul Bot',
value: shared_consts.ConfSite.AskUsernameSulBot,
},
{
label: 'Permetti di registrarsi in automatico solo entrando sul BOT',
value: shared_consts.ConfSite.registerUserWithBot,
},
],
@@ -5683,9 +5695,14 @@ export const tools = {
const userStore = useUserStore()
const circuitStore = useCircuitStore()
const globalStore = useGlobalStore()
const notifStore = useNotifStore()
// console.log('updateMyData: ', res)
if (res && res.arrrecnotif) {
notifStore.updateArrRecNotifFromServer(res.arrrecnotif)
}
if (res && res.userprofile) {
// console.log('updateMyData', res.userprofile)
userStore.my.profile = res.userprofile

View File

@@ -190,7 +190,7 @@ export const useNotifStore = defineStore('NotifStore', {
},
async updateNotifDataFromServer({ username, lastdataread }: { username: string, lastdataread: Date }) {
console.log('updateNotifDataFromServer', username, lastdataread)
// console.log('updateNotifDataFromServer', username, lastdataread)
return Api.SendReq(`/sendnotif/${username}/${lastdataread}/${process.env.APP_ID}`, 'GET', null)
.then((res) => {

View File

@@ -545,6 +545,9 @@ export const useUserStore = defineStore('UserStore', {
}
return null
},
getGroupByGroupname(groupname: string): any {
return this.my.profile.manage_mygroups.find((rec: IMyGroup) => rec.groupname === groupname)
},
getAccountsListNameValue(): any[] {
let arr = []
const circuitStore = useCircuitStore()