-Quando insersci l'username telegram sul Profilo, devo togliergli la chiocciola !
- anche nella ricerca User
This commit is contained in:
@@ -2068,6 +2068,10 @@ module.exports = {
|
|||||||
data[rec.field] = filter.trim();
|
data[rec.field] = filter.trim();
|
||||||
} else if (rec.type === this.FieldType.string) {
|
} else if (rec.type === this.FieldType.string) {
|
||||||
data[rec.field] = myregexp;
|
data[rec.field] = myregexp;
|
||||||
|
if (rec.field === 'profile.username_telegram') {
|
||||||
|
myregexp = new RegExp(this.rimuoviAtPrimoCarattere(filter).trim().replace(' ', '|'), 'ig');
|
||||||
|
data[rec.field] = myregexp
|
||||||
|
}
|
||||||
} else if ((rec.type === this.FieldType.number) ||
|
} else if ((rec.type === this.FieldType.number) ||
|
||||||
(rec.type === this.FieldType.hours)) {
|
(rec.type === this.FieldType.hours)) {
|
||||||
data[rec.field] = parseFloat(filter.trim());
|
data[rec.field] = parseFloat(filter.trim());
|
||||||
@@ -4813,6 +4817,14 @@ module.exports = {
|
|||||||
miastr = miastr.replace(/<br>$/, '');
|
miastr = miastr.replace(/<br>$/, '');
|
||||||
|
|
||||||
return miastr;
|
return miastr;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
rimuoviAtPrimoCarattere(stringa) {
|
||||||
|
if (stringa.charAt(0) === '@') {
|
||||||
|
return stringa.slice(1);
|
||||||
|
} else {
|
||||||
|
return stringa;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user