fix(Employee): add context to status in List View (#48576)

This commit is contained in:
Raffael Meyer
2025-07-14 15:37:00 +02:00
committed by GitHub
parent b8bf4319ac
commit d99f258d61

View File

@@ -2,8 +2,10 @@ frappe.listview_settings["Employee"] = {
add_fields: ["status", "branch", "department", "designation", "image"],
filters: [["status", "=", "Active"]],
get_indicator: function (doc) {
var indicator = [__(doc.status), frappe.utils.guess_colour(doc.status), "status,=," + doc.status];
indicator[1] = { Active: "green", Inactive: "red", Left: "gray", Suspended: "orange" }[doc.status];
return indicator;
return [
__(doc.status, null, "Employee"),
{ Active: "green", Inactive: "red", Left: "gray", Suspended: "orange" }[doc.status],
"status,=," + doc.status,
];
},
};