Fix multiple user column icon

This commit is contained in:
Adria Navarro 2024-10-10 16:14:53 +02:00
parent e191c90385
commit 41cd0d96d6
2 changed files with 12 additions and 0 deletions

View File

@ -19,6 +19,10 @@ export const getCellID = (rowId, fieldName) => {
} }
export const getColumnIcon = column => { export const getColumnIcon = column => {
if (column.schema.icon) {
return column.schema.icon
}
if (column.schema.autocolumn) { if (column.schema.autocolumn) {
return "MagicWand" return "MagicWand"
} }

View File

@ -337,6 +337,14 @@ export async function enrichSchema(
type: relTableField.type, type: relTableField.type,
subtype: relTableField.subtype, subtype: relTableField.subtype,
} }
if (
!enrichedFieldSchema.icon &&
relTableField.type === FieldType.BB_REFERENCE &&
relTableField.subtype === BBReferenceFieldSubType.USER &&
!helpers.schema.isDeprecatedSingleUserColumn(relTableField)
) {
// Forcing the icon, otherwise we would need to pass the constraints to show the proper icon
enrichedFieldSchema.icon = "UserGroup"
} }
result[relTableFieldName] = enrichedFieldSchema result[relTableFieldName] = enrichedFieldSchema
} }