user popover: Display name of user instead of id in user-type-custom field.

This commit is contained in:
Yashashvi Dave
2018-06-09 19:21:58 +05:30
committed by Tim Abbott
parent 554a0773dc
commit e7a172293f

View File

@@ -181,8 +181,13 @@ function show_user_profile(element, user) {
page_params.custom_profile_fields.forEach(function (field) {
var field_value = people.get_custom_profile_data(user.user_id, field.id);
if (settings_profile_fields.field_type_id_to_string(field.type) === "Date") {
var field_type = settings_profile_fields.field_type_id_to_string(field.type);
if (field_type === "Date") {
profile_data[field.name] = moment(field_value).format(localFormat);
} else if (field_type === "User") {
if (field_value) {
profile_data[field.name] = people.safe_full_names([field_value]);
}
} else {
profile_data[field.name] = field_value;
}