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:
@@ -232,6 +232,8 @@ export const shared_consts = {
|
||||
BOTTYPE_LINK: 2,
|
||||
BOTTYPE_TEXT: 3,
|
||||
BOTTYPE_MENU: 4,
|
||||
BOTTYPE_MARKDOWN: 5,
|
||||
BOTTYPE_BOTTONI_INLINE: 6,
|
||||
|
||||
CashType: {
|
||||
None: 0,
|
||||
@@ -269,6 +271,14 @@ export const shared_consts = {
|
||||
value: 4, // BOTTYPE_MENU
|
||||
label: 'Menu',
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: 'MarkDown',
|
||||
},
|
||||
{
|
||||
value: 6,
|
||||
label: 'Bottoni InLine',
|
||||
},
|
||||
],
|
||||
|
||||
Shippings: [
|
||||
@@ -650,6 +660,10 @@ export const shared_consts = {
|
||||
value: 'ONL',
|
||||
label: 'On Line',
|
||||
},
|
||||
{
|
||||
value: 'ITA',
|
||||
label: 'Italia',
|
||||
},
|
||||
],
|
||||
|
||||
Lang: [
|
||||
@@ -1013,6 +1027,9 @@ export const shared_consts = {
|
||||
Notif_Reg_Bot_ToManagers: 1,
|
||||
Notif_Reg_Push_Admin: 2,
|
||||
Need_Aportador_On_DataReg_To_Verify_Reg: 4,
|
||||
AskInvitantesulBot: 8,
|
||||
AskUsernameSulBot: 16,
|
||||
registerUserWithBot: 32,
|
||||
},
|
||||
|
||||
MsgTeleg: {
|
||||
|
||||
@@ -1085,7 +1085,7 @@ export default defineComponent({
|
||||
const myfilternow = myfilter.value
|
||||
const myfilterandnow = myfilterand.value
|
||||
|
||||
console.log('onUpdateData')
|
||||
// console.log('onUpdateData')
|
||||
|
||||
if (ordinam.value) {
|
||||
sortBy = ordinam.value
|
||||
@@ -1097,7 +1097,7 @@ export default defineComponent({
|
||||
savefilter()
|
||||
|
||||
if (!mytable.value) {
|
||||
console.log(' startsearch.value', startsearch.value)
|
||||
// console.log(' startsearch.value', startsearch.value)
|
||||
startsearch.value = false
|
||||
if (myinfscroll.value) {
|
||||
// @ts-ignore
|
||||
@@ -1118,7 +1118,7 @@ export default defineComponent({
|
||||
|
||||
startsearch.value = true
|
||||
|
||||
console.log(' TRUE: startsearch.value', startsearch.value)
|
||||
// console.log(' TRUE: startsearch.value', startsearch.value)
|
||||
|
||||
if ((startRow < pagination.value.rowsNumber) || clickbuttsearch.value) {
|
||||
|
||||
@@ -1160,7 +1160,7 @@ export default defineComponent({
|
||||
changetable.value = false
|
||||
startsearch.value = false
|
||||
|
||||
console.log(' FINE- startsearch.value', startsearch.value)
|
||||
// console.log(' FINE- startsearch.value', startsearch.value)
|
||||
|
||||
if (myinfscroll.value) {
|
||||
// @ts-ignore
|
||||
@@ -1197,7 +1197,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function refresh_infscroll(done: any) {
|
||||
console.log('refresh_infscroll', 'pag', pagination.value.rowsNumber, 'done', done)
|
||||
// console.log('refresh_infscroll', 'pag', pagination.value.rowsNumber, 'done', done)
|
||||
rowclicksel.value = null
|
||||
|
||||
onUpdateData(0,
|
||||
@@ -1209,7 +1209,7 @@ export default defineComponent({
|
||||
|
||||
|
||||
function refresh() {
|
||||
console.log('refresh', 'startsearch', startsearch.value)
|
||||
// console.log('refresh', 'startsearch', startsearch.value)
|
||||
|
||||
clickbuttsearch.value = true
|
||||
// console.log('refresh')
|
||||
@@ -1260,7 +1260,7 @@ export default defineComponent({
|
||||
myvertical.value === costanti.VISUTABLE_SCHEDA_USER ||
|
||||
(props.showType === costanti.SHOW_USERINFO))) {
|
||||
|
||||
console.log('REFRR - updateTables.value', newval)
|
||||
// console.log('REFRR - updateTables.value', newval)
|
||||
refresh()
|
||||
|
||||
userStore.updateTables = false
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
:arrfilters="myarrfilterand"
|
||||
:filterdef="myfilterdef"
|
||||
:prop_codeId="todoId"
|
||||
:defaultnewrec="getdefaultnewrec"
|
||||
:defaultnewrec="getdefaultnewrec()"
|
||||
:extraparams="extraparams()"
|
||||
labeladd="Aggiungi Ora">
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ export default defineComponent({
|
||||
const circuitStore = useCircuitStore()
|
||||
|
||||
const table = ref(toolsext.TABMYGROUPS)
|
||||
const loadSaldo = ref(false)
|
||||
|
||||
const circuit = ref(<ICircuit | null | undefined>null)
|
||||
|
||||
@@ -95,6 +96,22 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
|
||||
function loadAccount() {
|
||||
// console.log('loadAccount')
|
||||
// Group
|
||||
const grp = userStore.getGroupByGroupname(props.grp.groupname)
|
||||
if (grp)
|
||||
myaccount.value = grp.account
|
||||
}
|
||||
|
||||
|
||||
async function aggiornaSaldo() {
|
||||
loadSaldo.value = true
|
||||
await circuitStore.aggiornaSaldo(circuit.value!._id, props.grp ? props.grp.groupname : '');
|
||||
loadAccount()
|
||||
loadSaldo.value = false
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -112,6 +129,8 @@ export default defineComponent({
|
||||
t,
|
||||
myaccount,
|
||||
save,
|
||||
aggiornaSaldo,
|
||||
loadSaldo,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
<q-separator />
|
||||
|
||||
|
||||
<CSaldo
|
||||
v-if="tools.isUserOk() && myaccount"
|
||||
:account="myaccount"
|
||||
@@ -17,6 +16,23 @@
|
||||
>
|
||||
</CSaldo>
|
||||
|
||||
<div class="text-center">
|
||||
<div class="text-center">
|
||||
<q-spinner v-if="loadSaldo" color="primary" size="3em" :thickness="2" />
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="myaccount && !loadSaldo && (grp ? tools.iAmAdminGroup(grp.groupname) : tools.iAmAdminCircuit(circuit.name))"
|
||||
outline
|
||||
rounded
|
||||
dense
|
||||
color="green"
|
||||
icon="fas fa-redo"
|
||||
:label="t('movement.updatewallet')"
|
||||
@click="aggiornaSaldo()"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<q-card-section>
|
||||
<div v-if="myaccount.date_created" class="container">
|
||||
<q-icon name="fas fa-lightbulb" class="iconcirc"></q-icon>
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
:saldo="grp.account.saldo"
|
||||
>
|
||||
</CSaldo>
|
||||
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
<q-separator />
|
||||
|
||||
|
||||
|
||||
<CSaldo
|
||||
v-if="tools.isUserOk() && myaccount"
|
||||
:account="myaccount"
|
||||
:symbol="circuit.symbol"
|
||||
:color="circuit.color"
|
||||
:saldo="myaccount.saldo"
|
||||
:saldo="myaccount.saldo_pend"
|
||||
:qtarem="myaccount ? circuitStore.getRemainingCoinsToSend(myaccount) : 0"
|
||||
>
|
||||
</CSaldo>
|
||||
|
||||
@@ -367,14 +367,14 @@ export default defineComponent({
|
||||
*/
|
||||
|
||||
function RefreshApp() {
|
||||
// Unregister Service Worker
|
||||
navigator.serviceWorker.getRegistrations().then((registrations) => {
|
||||
for (const registration of registrations) {
|
||||
registration.unregister()
|
||||
}
|
||||
})
|
||||
|
||||
if (Platform.is.ios) {
|
||||
// Unregister Service Worker
|
||||
navigator.serviceWorker.getRegistrations().then((registrations) => {
|
||||
for (const registration of registrations) {
|
||||
registration.unregister()
|
||||
}
|
||||
})
|
||||
|
||||
// window.location.reload()
|
||||
} else {
|
||||
|
||||
@@ -281,6 +281,7 @@ export interface IPolicy {
|
||||
lastdataupdate: string
|
||||
country: string
|
||||
}
|
||||
|
||||
export interface ISites {
|
||||
_id?: string
|
||||
attiva?: boolean
|
||||
@@ -1171,8 +1172,14 @@ export interface IAccount {
|
||||
qta_maxConcessa: number
|
||||
importo_iniziale?: number
|
||||
saldo: number
|
||||
saldo_pend: number
|
||||
totTransato: number
|
||||
totTransato_pend: number
|
||||
regulation_ok: boolean
|
||||
date_created?: Date
|
||||
date_updated?: Date
|
||||
// Memory
|
||||
notifspending: any[]
|
||||
}
|
||||
export interface IAnim {
|
||||
name: string,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:prop_mycolumns="colmybot"
|
||||
prop_colkey="_id"
|
||||
nodataLabel="Nessun Bot Configurato"
|
||||
:defaultnewrec="getdefaultnewrec"
|
||||
:defaultnewrec="getdefaultnewrec()"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
</CGridTableRec>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
prop_mytable="groups"
|
||||
prop_mytitle="Gruppi"
|
||||
:prop_mycolumns="colTablegroups"
|
||||
:defaultnewrec="getdefaultnewrec"
|
||||
:defaultnewrec="getdefaultnewrec()"
|
||||
prop_colkey="descr"
|
||||
nodataLabel="Nessun Gruppo"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -554,6 +554,14 @@
|
||||
></q-btn>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<q-btn
|
||||
label="updateSaldoAndTransato_AllAccounts"
|
||||
color="primary"
|
||||
@click="EseguiFunz('updateSaldoAndTransato_AllAccounts')"
|
||||
></q-btn>
|
||||
<br />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" src="./dbop.ts">
|
||||
</script>
|
||||
|
||||
@@ -47,7 +47,7 @@ export default defineComponent({
|
||||
const showonlymine = ref(true)
|
||||
const tabellare = ref(false)
|
||||
const groupsListAdmin = ref(<IMyGroup[]>[])
|
||||
const groupnameSel = ref('')
|
||||
const groupnameSel = ref(<any>null)
|
||||
|
||||
const showsendCoinTo = ref(false)
|
||||
const showrules = ref(false)
|
||||
@@ -116,7 +116,7 @@ export default defineComponent({
|
||||
fidoConcesso.value = account.value ? account.value.fidoConcesso : (circuit.value ? circuit.value.fido_scoperto_default : 0)
|
||||
qtaMax.value = account.value ? account.value.qta_maxConcessa : (circuit.value ? circuit.value.qta_max_default : 0)
|
||||
qtarem.value = account.value ? circuitStore.getRemainingCoinsToSend(account.value) : 0
|
||||
saldo.value = account.value ? account.value.saldo : 0
|
||||
saldo.value = account.value ? account.value.saldo_pend : 0
|
||||
}
|
||||
|
||||
|
||||
@@ -365,9 +365,11 @@ export default defineComponent({
|
||||
'profile.resid_province': 1,
|
||||
'account._id': 1,
|
||||
'account.saldo': 1,
|
||||
'account.saldo_pend': 1,
|
||||
'account.fidoConcesso': 1,
|
||||
'account.qta_maxConcessa': 1,
|
||||
'account.totTransato': 1,
|
||||
'account.totTransato_pend': 1,
|
||||
reported: 1,
|
||||
date_report: 1,
|
||||
username_who_report: 1,
|
||||
@@ -470,7 +472,7 @@ export default defineComponent({
|
||||
|
||||
async function aggiornaSaldo() {
|
||||
loadSaldo.value = true
|
||||
await circuitStore.aggiornaSaldo(circuit.value!._id);
|
||||
await circuitStore.aggiornaSaldo(circuit.value!._id, '');
|
||||
loadAccount()
|
||||
loadSaldo.value = false
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
import { CMyFriends } from '@/components/CMyFriends'
|
||||
import { CMyUser } from '@/components/CMyUser'
|
||||
import { CNotifAtTop } from '@/components/CNotifAtTop'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CProfile } from '@/components/CProfile'
|
||||
import { CCheckIfIsLogged } from '@/components/CCheckIfIsLogged'
|
||||
@@ -28,7 +29,7 @@ export default defineComponent({
|
||||
name: 'mygroup',
|
||||
components: {
|
||||
CProfile, CTitleBanner, CMyFieldRec,
|
||||
CInfoAccount, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged
|
||||
CInfoAccount, CSkill, CDateTime, CMyFriends, CGridTableRec, CMyUser, CCheckIfIsLogged, CNotifAtTop
|
||||
},
|
||||
props: {},
|
||||
setup() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<CNotifAtTop />
|
||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||
<div v-if="!mygrp && !loading">
|
||||
<div v-if="mystatus === 403">
|
||||
|
||||
Reference in New Issue
Block a user