Aggiunto comune, + filtro regione e provincia

aggiunto Visibilità (da fare check)
This commit is contained in:
Paolo Arena
2022-09-18 20:17:24 +02:00
parent 9d072d4d0d
commit bcb276518f
12 changed files with 127 additions and 19 deletions

View File

@@ -578,6 +578,7 @@ module.exports = {
'title',
'openUrl',
'datenotif',
'date_updated',
'read',
'deleted',
'idapp',
@@ -750,6 +751,8 @@ module.exports = {
content = this.convertHTMLtoText(content);
content = this.ConvertHTMLToPlainText(content);
let payload = {
actions,
title: title,
@@ -1313,6 +1316,10 @@ module.exports = {
},
ConvertHTMLToPlainText(strHTML) {
return strHTML.replace(/<[^>]+>/g, '');
},
convertHTMLtoText(myhtml) {
let msg = myhtml;
msg = msg.replace('&quot;', '"');
@@ -1383,6 +1390,23 @@ module.exports = {
return this.getHostByIdApp(idapp) + '/my/' + username;
},
getLinkUserTelegram: async function(idapp, username, myuser) {
var {User} = require('../models/user');
let u_tg = '';
if (myuser)
u_tg = myuser.profile && myuser.profile.hasOwnProperty('username_telegram') ? myuser.profile.username_telegram : usernametelegram;
if (!u_tg) {
u_tg = await User.getUsernameTelegram(idapp, username);
}
if (u_tg)
return `https://t.me/${u_tg}`;
else
return '';
},
getLinkEditUserProfile: function(idapp) {
return this.getHostByIdApp(idapp) + '/editprofile';
},
@@ -3296,11 +3320,17 @@ module.exports = {
let myhost = this.getHostByIdApp(params.idapp);
if (params.openUrl)
/*if (params.openUrl)
content = content + '\n' + '<a href="' + myhost + params.openUrl + '">' + i18n.__('OPEN PAGE') + '</a>';
*/
}
return content;
},
getAhref(username, link) {
return `<a href='${link}'>${username}</a>`;
}
};