diff --git a/erpnext/projects/doctype/task/task_list.js b/erpnext/projects/doctype/task/task_list.js index 98d2bbc81a4a..5ab8bae2e1d6 100644 --- a/erpnext/projects/doctype/task/task_list.js +++ b/erpnext/projects/doctype/task/task_list.js @@ -25,20 +25,38 @@ frappe.listview_settings['Task'] = { } return [__(doc.status), colors[doc.status], "status,=," + doc.status]; }, - gantt_custom_popup_html: function(ganttobj, task) { - var html = `
${ganttobj.name}
`; + gantt_custom_popup_html: function (ganttobj, task) { + let html = ` + + ${ganttobj.name} + + `; - if(task.project) html += `

Project: ${task.project}

`; - html += `

Progress: ${ganttobj.progress}

`; - - if(task._assign_list) { - html += task._assign_list.reduce( - (html, user) => html + frappe.avatar(user) - , ''); + if (task.project) { + html += `

${__("Project")}: + + ${task.project} + +

`; } + html += `

+ ${__("Progress")}: + ${ganttobj.progress}% +

`; - return html; - } + if (task._assign) { + const assign_list = JSON.parse(task._assign); + const assignment_wrapper = ` + Assigned to: + + ${assign_list.map((user) => frappe.user_info(user).fullname).join(", ")} + + `; + html += assignment_wrapper; + } + return `
${html}
`; + }, };