Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Updated filter logic:

Code Block
if (shouldSearchByName) {
				conditions.and.push({ name: { ilike: queryString } });
			} else if (shouldSearchByBothNameAndCode) {
				condition.and.push({
					or: [
						{ name: { ilike: queryString } },
						{ code: { ilike: queryString } }
					]
				});
			} else {
				conditions.and.push({ code: { ilike: queryString } });
			}

...