diff --git a/frontend/src/common/js/tableUtils.js b/frontend/src/common/js/tableUtils.js index 4c5ebd8222..7670767713 100644 --- a/frontend/src/common/js/tableUtils.js +++ b/frontend/src/common/js/tableUtils.js @@ -428,14 +428,29 @@ export function getCustomFieldValue(row, field, members) { for (let i = 0; i < row.customFields.length; i++) { let item = row.customFields[i]; if (item.name === field.name) { - if (field.type === 'member' || field.type === 'multipleMember') { + if (field.type === 'member') { for (let j = 0; j < members.length; j++) { let member = members[j]; if (member.id === item.value) { return member.name; } } - } else if (['radio', 'select', 'multipleSelect', 'checkbox'].indexOf(field.type) > -1) { + } else if (field.type === 'multipleMember') { + if (item.value) { + let values = ''; + item.value.forEach(v => { + for (let j = 0; j < members.length; j++) { + let member = members[j]; + if (member.id === v) { + values += member.name; + values += " "; + break; + } + } + }); + return values; + } + } else if (['radio', 'select'].indexOf(field.type) > -1) { for (let j = 0; j < field.options.length; j++) { let option = field.options[j]; if (option.value === item.value) { @@ -443,6 +458,22 @@ export function getCustomFieldValue(row, field, members) { } } } + else if (['multipleSelect', 'checkbox'].indexOf(field.type) > -1) { + if (item.value) { + let values = ''; + item.value.forEach(v => { + for (let j = 0; j < field.options.length; j++) { + let option = field.options[j]; + if (option.value === v) { + values += (field.system ? i18n.t(option.text) : option.text); + values += " "; + break; + } + } + }); + return values; + } + } return item.value; } }