Handle users on search input
This commit is contained in:
parent
6705b67b67
commit
a5477f14d2
|
@ -5,8 +5,10 @@ import {
|
||||||
Table,
|
Table,
|
||||||
DocumentType,
|
DocumentType,
|
||||||
SEPARATOR,
|
SEPARATOR,
|
||||||
|
FieldSubtype,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { db as dbCore } from "@budibase/backend-core"
|
import { db as dbCore } from "@budibase/backend-core"
|
||||||
|
import { utils } from "@budibase/shared-core"
|
||||||
|
|
||||||
function findColumnInQueries(
|
function findColumnInQueries(
|
||||||
column: string,
|
column: string,
|
||||||
|
@ -66,8 +68,14 @@ export function searchInputMapping(table: Table, options: SearchParams) {
|
||||||
for (let [key, column] of Object.entries(table.schema)) {
|
for (let [key, column] of Object.entries(table.schema)) {
|
||||||
switch (column.type) {
|
switch (column.type) {
|
||||||
case FieldType.BB_REFERENCE:
|
case FieldType.BB_REFERENCE:
|
||||||
if (column.subtype === FieldTypeSubtypes.BB_REFERENCE.USER) {
|
const subtype = column.subtype as FieldSubtype
|
||||||
userColumnMapping(key, options)
|
switch (subtype) {
|
||||||
|
case FieldSubtype.USER:
|
||||||
|
case FieldSubtype.USERS:
|
||||||
|
userColumnMapping(key, options)
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
utils.unreachable(subtype)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue