Allow filter search for country and region.

This commit is contained in:
Mike Cao 2024-11-27 23:43:28 -08:00
parent 2ed7628997
commit a18d1a923c
5 changed files with 55 additions and 17 deletions

View file

@ -119,11 +119,11 @@ function getTimestampDiffSQL(field1: string, field2: string): string {
}
}
function getSearchSQL(column: string): string {
function getSearchSQL(column: string, param: string = 'search'): string {
const db = getDatabaseType();
const like = db === POSTGRESQL ? 'ilike' : 'like';
return `and ${column} ${like} {{search}}`;
return `and ${column} ${like} {{${param}}`;
}
function mapFilter(column: string, operator: string, name: string, type: string = '') {