|
|
@ -162,10 +162,9 @@ export function useViewFilters( |
|
|
|
|
|
|
|
|
|
|
|
const placeholderFilter = (): Filter => { |
|
|
|
const placeholderFilter = (): Filter => { |
|
|
|
return { |
|
|
|
return { |
|
|
|
// TODO: fix type
|
|
|
|
|
|
|
|
comparison_op: comparisonOpList(options.value?.[0].uidt as UITypes).filter((compOp) => |
|
|
|
comparison_op: comparisonOpList(options.value?.[0].uidt as UITypes).filter((compOp) => |
|
|
|
isComparisonOpAllowed({ fk_column_id: options.value?.[0].id }, compOp), |
|
|
|
isComparisonOpAllowed({ fk_column_id: options.value?.[0].id }, compOp), |
|
|
|
)?.[0].value, |
|
|
|
)?.[0].value as FilterType['comparison_op'], |
|
|
|
value: '', |
|
|
|
value: '', |
|
|
|
status: 'create', |
|
|
|
status: 'create', |
|
|
|
logical_op: 'and', |
|
|
|
logical_op: 'and', |
|
|
@ -281,7 +280,6 @@ export function useViewFilters( |
|
|
|
comparison: filter.comparison_op, |
|
|
|
comparison: filter.comparison_op, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// todo: return type of dbTableFilter is void?
|
|
|
|
|
|
|
|
filters.value[i] = await $api.dbTableFilter.create(view.value.id!, { |
|
|
|
filters.value[i] = await $api.dbTableFilter.create(view.value.id!, { |
|
|
|
...filter, |
|
|
|
...filter, |
|
|
|
fk_parent_id: parentId, |
|
|
|
fk_parent_id: parentId, |
|
|
|