From 63d78d2f18f1297ced85f8c02829ec3d68a25621 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 17 Jun 2022 12:56:22 +0200 Subject: [PATCH] Colors for Status --- msp/msp/doctype/it_object/it_object_list.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 msp/msp/doctype/it_object/it_object_list.js diff --git a/msp/msp/doctype/it_object/it_object_list.js b/msp/msp/doctype/it_object/it_object_list.js new file mode 100644 index 0000000..e14d671 --- /dev/null +++ b/msp/msp/doctype/it_object/it_object_list.js @@ -0,0 +1,19 @@ +frappe.listview_settings['IT Object'] = { + get_indicator: function (doc) { + if (doc.status === "in Production") { + return [__("in Production"), "green", "status,=,in Production"]; + } + else if (doc.status === "Implementation") { + return [__("Implementation"), "blue", "status,=,Implementation"]; + } + else if (doc.status === "in Maintenance") { + return [__("in Maintenance"), "orange", "status,=,in Maintenance"]; + } + else if (doc.status === "failed") { + return [__("failed"), "red", "status,=,failed"]; + } + else if (doc.status === "Decommissioned") { + return [__("Decommissioned"), "grey", "status,=,Decommissioned"]; + } + } +} \ No newline at end of file