Fix display items
This commit is contained in:
parent
95cf28a417
commit
b13d47e88d
|
@ -186,7 +186,10 @@
|
|||
// don't make field IDs for auto types
|
||||
if (type === AUTO_TYPE || autocolumn) {
|
||||
return type.toUpperCase()
|
||||
} else if (type === FieldType.BB_REFERENCE) {
|
||||
} else if (
|
||||
type === FieldType.BB_REFERENCE ||
|
||||
type === FieldType.BB_REFERENCE_SINGLE
|
||||
) {
|
||||
return `${type}${subtype || ""}`.toUpperCase()
|
||||
} else {
|
||||
return type.toUpperCase()
|
||||
|
@ -363,13 +366,11 @@
|
|||
|
||||
function getAllowedTypes() {
|
||||
if (originalName) {
|
||||
const possibleTypes = (
|
||||
SWITCHABLE_TYPES[field.type] || [editableColumn.type]
|
||||
).map(t => t.toLowerCase())
|
||||
const possibleTypes = SWITCHABLE_TYPES[field.type] || [
|
||||
editableColumn.type,
|
||||
]
|
||||
return Object.entries(FIELDS)
|
||||
.filter(([fieldType]) =>
|
||||
possibleTypes.includes(fieldType.toLowerCase())
|
||||
)
|
||||
.filter(([_, field]) => possibleTypes.includes(field.type))
|
||||
.map(([_, fieldDefinition]) => fieldDefinition)
|
||||
}
|
||||
|
||||
|
|
|
@ -166,6 +166,15 @@ export const FIELDS = {
|
|||
FieldTypeSubtypes.BB_REFERENCE.USER
|
||||
],
|
||||
},
|
||||
// Used for display of editing existing columns
|
||||
OLD_USER: {
|
||||
name: "User",
|
||||
type: FieldType.BB_REFERENCE,
|
||||
subtype: FieldSubtype.USER,
|
||||
icon: TypeIconMap[FieldType.BB_REFERENCE_SINGLE][
|
||||
FieldTypeSubtypes.BB_REFERENCE.USER
|
||||
],
|
||||
},
|
||||
USERS: {
|
||||
name: "Users",
|
||||
type: FieldType.BB_REFERENCE,
|
||||
|
|
Loading…
Reference in New Issue