refactor: color coded status in list view

(cherry picked from commit cfeffbb354)
This commit is contained in:
ruthra kumar
2026-06-01 12:51:04 +05:30
committed by Mergify
parent de42a9e86e
commit e955b4a3b9

View File

@@ -0,0 +1,17 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
// render
frappe.listview_settings["Process Period Closing Voucher"] = {
add_fields: ["status"],
get_indicator: function (doc) {
const status_colors = {
Queued: "blue",
Running: "orange",
Paused: "gray",
Completed: "green",
Cancelled: "red",
};
return [__(doc.status), status_colors[doc.status], "status,=," + doc.status];
},
};