|
|
@ -84,7 +84,7 @@ export class FormFilters { |
|
|
|
|
|
|
|
|
|
|
|
// Method to group filters by fk_parent_column_id
|
|
|
|
// Method to group filters by fk_parent_column_id
|
|
|
|
getNestedGroupedFilters() { |
|
|
|
getNestedGroupedFilters() { |
|
|
|
const groupedFiltes = this.allViewFilters.reduce((acc, filter) => { |
|
|
|
const groupedFilters = this.allViewFilters.reduce((acc, filter) => { |
|
|
|
const groupingKey = filter.fk_parent_column_id || 'ungrouped' |
|
|
|
const groupingKey = filter.fk_parent_column_id || 'ungrouped' |
|
|
|
|
|
|
|
|
|
|
|
if (!acc[groupingKey]) { |
|
|
|
if (!acc[groupingKey]) { |
|
|
@ -96,7 +96,7 @@ export class FormFilters { |
|
|
|
return acc |
|
|
|
return acc |
|
|
|
}, {} as typeof this.groupedFilters) |
|
|
|
}, {} as typeof this.groupedFilters) |
|
|
|
|
|
|
|
|
|
|
|
this.groupedFilters = groupedFiltes |
|
|
|
this.groupedFilters = groupedFilters |
|
|
|
|
|
|
|
|
|
|
|
const nestedGroupedFilters = this.loadFilters() |
|
|
|
const nestedGroupedFilters = this.loadFilters() |
|
|
|
|
|
|
|
|
|
|
@ -313,7 +313,7 @@ export class FormFilters { |
|
|
|
val = !!this.formState[field] |
|
|
|
val = !!this.formState[field] |
|
|
|
break |
|
|
|
break |
|
|
|
case 'number': |
|
|
|
case 'number': |
|
|
|
val = isNaN(parseFloat(this.formState[field])) ? this.formState[field] : +this.formState[field] |
|
|
|
val = Number.isNaN(parseFloat(this.formState[field])) ? this.formState[field] : +this.formState[field] |
|
|
|
break |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -340,10 +340,10 @@ export class FormFilters { |
|
|
|
res = val != filter.value |
|
|
|
res = val != filter.value |
|
|
|
break |
|
|
|
break |
|
|
|
case 'like': |
|
|
|
case 'like': |
|
|
|
res = this.toString(val).toLowerCase()?.indexOf(filter.value?.toLowerCase()) > -1 |
|
|
|
res = this.toString(val).toLowerCase()?.includes(filter.value?.toLowerCase()) |
|
|
|
break |
|
|
|
break |
|
|
|
case 'nlike': |
|
|
|
case 'nlike': |
|
|
|
res = this.toString(val).toLowerCase()?.indexOf(filter.value?.toLowerCase()) === -1 |
|
|
|
res = !this.toString(val).toLowerCase()?.includes(filter.value?.toLowerCase()) |
|
|
|
break |
|
|
|
break |
|
|
|
case 'empty': |
|
|
|
case 'empty': |
|
|
|
case 'blank': |
|
|
|
case 'blank': |
|
|
@ -360,7 +360,7 @@ export class FormFilters { |
|
|
|
res = !val |
|
|
|
res = !val |
|
|
|
break |
|
|
|
break |
|
|
|
case 'null': |
|
|
|
case 'null': |
|
|
|
res = res = val === null |
|
|
|
res = val === null |
|
|
|
break |
|
|
|
break |
|
|
|
case 'notnull': |
|
|
|
case 'notnull': |
|
|
|
res = val !== null |
|
|
|
res = val !== null |
|
|
|