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:
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user