Aggio App
This commit is contained in:
@@ -831,7 +831,7 @@ export const colmyGoods = [
|
||||
name: 'note', label_trans: 'proj.descrapprof', fieldtype: costanti.FieldType.html,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
titlepopupedit: 'Dettagli', field_extra1: 'username', subfield_extra1: '',
|
||||
minlength: 50,
|
||||
// minlength: 50,
|
||||
isadvanced_field: true,
|
||||
required: false,
|
||||
}),
|
||||
|
||||
@@ -427,6 +427,20 @@ export const useUserStore = defineStore('UserStore', {
|
||||
return `(${username})`
|
||||
},
|
||||
|
||||
getNameToShow(user: IUserFields): string {
|
||||
let name = ''
|
||||
if (!!user.name)
|
||||
name = user.name
|
||||
if (!!user.surname)
|
||||
name += ' ' + user.surname
|
||||
|
||||
if (!name) {
|
||||
name = user.username
|
||||
}
|
||||
|
||||
return name
|
||||
},
|
||||
|
||||
getUserByUserId(userId: string): IUserFields | null {
|
||||
// Check if is this User!
|
||||
if (this.my._id === userId) return this.my
|
||||
@@ -1239,18 +1253,29 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
async sendMsgToBotTelegram($q: any, t: any, mydata: IMsgGlobParam, showmsgsent: boolean) {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
return Api.SendReq('/users/mgt', 'POST', { mydata })
|
||||
.then((res) => {
|
||||
console.log('res', res)
|
||||
|
||||
let msgok = (res.data.nummsgsent === 1) ? res.data.nummsgsent + ' ' + t('cal.sendmsg_sent') : res.data.nummsgsent + ' ' + t('cal.sendmsgs_sent')
|
||||
if (mydata.cmd === shared_consts.MsgTeleg.SHARE_MSGREG) {
|
||||
msgok = t('cal.sendmsg_sent_sharedlink') + ' ' + tools.getBotName()
|
||||
if (tools.isTelegOk()) {
|
||||
msgok = t('cal.sendmsg_sent_sharedlink') + ' ' + tools.getBotName()
|
||||
} else {
|
||||
msgok = t('cal.sendmsg_sent_sharedlink_copied')
|
||||
}
|
||||
showmsgsent = true
|
||||
}
|
||||
|
||||
if (showmsgsent && res.data.nummsgsent >= 0) {
|
||||
tools.showPositiveNotif($q, msgok)
|
||||
if (mydata.cmd === shared_consts.MsgTeleg.SHARE_MSGREG) {
|
||||
if (!tools.isTelegOk()) {
|
||||
// console.log('text', res.data.text)
|
||||
tools.copyStringToClipboardSilent(res.data.text)
|
||||
}
|
||||
if (res.data.textsent) {
|
||||
return res.data.textsent
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user