InfiniteScroll 3

fix user list
send telegram text
invited show in profile
This commit is contained in:
paoloar77
2022-08-18 05:26:21 +02:00
parent 8a41aff739
commit ed6abf2b07
23 changed files with 131 additions and 61 deletions

View File

@@ -2393,6 +2393,7 @@ export const colTableCircuitComplete = [
AddCol({ name: 'name', label_trans: 'circuit.name' }),
AddCol({ name: 'subname', label_trans: 'circuit.subname' }),
AddCol({ name: 'longdescr', label_trans: 'circuit.descr', fieldtype: costanti.FieldType.html }),
AddCol({ name: 'regulation', label_trans: 'circuit.regulation', fieldtype: costanti.FieldType.html }),
AddCol({ name: 'systemUserDescr', label_trans: 'circuit.systemUserDescr' }),
AddCol({ name: 'systemUserId', label_trans: 'circuit.systemUserId', fieldtype: costanti.FieldType.select, jointable: 'users', }),
AddCol({ name: 'founderUserId', label_trans: 'circuit.founderUserId', fieldtype: costanti.FieldType.select, jointable: 'users', }),

View File

@@ -5611,25 +5611,29 @@ export const tools = {
return window.location.pathname.indexOf('signup') >= 0
},
async sendMsgTelegram($q: any, $t: any, mydata: IMsgGlobParam) {
async sendMsgTelegram($q: any, $t: any, mydata: IMsgGlobParam, showmsgsent: boolean) {
const userStore = useUserStore()
return userStore.sendMsgToBotTelegram($q, $t, mydata)
return userStore.sendMsgToBotTelegram($q, $t, mydata, showmsgsent)
},
async sendMsgTelegramCmd($q: any, $t: any, cmd: number) {
async sendMsgTelegramCmd($q: any, $t: any, cmd: number, showmsgsent: boolean, text?: string, title?: string) {
let mydata: IMsgGlobParam = {
typemsg: 0,
typesend: shared_consts.TypeSend.TELEGRAM,
cmd,
content: text,
title,
}
if (cmd === shared_consts.CmdToSend.SHARE_MSGREG) {
if ((cmd === shared_consts.CmdToSend.SHARE_MSGREG) || (cmd === shared_consts.CmdToSend.SHARE_TEXT)) {
mydata.typemsg = shared_consts.TypeMsg.SEND_TO_MYSELF
// if yourself , don't need to say I send to me
showmsgsent = false
}
return this.sendMsgTelegram($q, $t, mydata)
return this.sendMsgTelegram($q, $t, mydata, showmsgsent)
},

View File

@@ -1140,7 +1140,7 @@ export const useUserStore = defineStore('UserStore', {
},
async sendMsgToBotTelegram($q: any, t: any, mydata: IMsgGlobParam) {
async sendMsgToBotTelegram($q: any, t: any, mydata: IMsgGlobParam, showmsgsent: boolean) {
return Api.SendReq('/users/mgt', 'POST', { mydata })
.then((res) => {
console.log('res', res)
@@ -1148,7 +1148,7 @@ export const useUserStore = defineStore('UserStore', {
if (mydata.cmd === shared_consts.MsgTeleg.SHARE_MSGREG) {
msgok = t('cal.sendmsg_sent_sharedlink') + ' ' + tools.getBotName()
}
if (res.data.nummsgsent >= 0) {
if (showmsgsent && res.data.nummsgsent >= 0) {
tools.showPositiveNotif($q, msgok)
return true
}