From f7b2d103e721231ef34a00a6241c9f1918e37333 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Fri, 2 Jun 2023 10:55:29 +0530 Subject: [PATCH] fix: Task gantt popup style --- erpnext/projects/doctype/task/task_list.js | 42 +++++++++++++++------- 1 file changed, 30 insertions(+), 12 deletions(-) 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}
`; + }, };