fix: honor table search q param on users and related lists

Dashboard sends q, but users/classes/payments ignored it; accept q/search and normalize Persian digits.
This commit is contained in:
2026-08-15 02:57:19 +03:30
parent 4603b45208
commit 7394829d49
5 changed files with 66 additions and 15 deletions
@@ -107,8 +107,8 @@ const getAllActivityLogs = async (queryParams = {}) => {
filter.actor = queryParams.actor;
}
if (queryParams.q) {
const searchRegex = new RegExp(queryParams.q, 'i');
if (queryParams.q || queryParams.search) {
const searchRegex = new RegExp(String(queryParams.q || queryParams.search).replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'i');
filter.$or = [
{ description: searchRegex },
{ actorUsername: searchRegex },