message: fix(origin-backend): filter users table for admin
diff: @@ -263,9 +263,24 @@ export class UserService {
  const { orgName, status, kycStatus } = filter;
  const isNullOrUndefined = (variable: any) => variable === null || variable === undefined;
  -
  - const _orgName = `%${orgName ?? ''}%`;
  - const result = await this.repository
  + let result;
  + if (orgName === undefined || '') {
  + result = await this.repository
  + .createQueryBuilder('user')
  + .leftJoinAndSelect('user.organization', 'organization')
  + .where(
  + `${isNullOrUndefined(status) ? '' : 'user.status = :status'}
  + ${
  + isNullOrUndefined(kycStatus)
  + ? ''
  + : `${isNullOrUndefined(status) ? '' : ' and '} user.kycStatus = :kycStatus`
  + }`,
  + { status, kycStatus }
  + )
  + .getMany();
  + } else {
  + const _orgName = `%${orgName}%`;
  + result = await this.repository
  .createQueryBuilder('user')
  .leftJoinAndSelect('user.organization', 'organization')
  .where(
  @@ -275,7 +290,7 @@ export class UserService {
  { _orgName, status, kycStatus }
  )
  .getMany();
  -
  + }
  return result;
  }
  