From c38cfd14f3d3ba16e358ee364ef2772c5fb4bd9a Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Sun, 4 Feb 2024 16:11:42 +0530 Subject: [PATCH] chore: show correct status in list view (cherry picked from commit 1014940953ed54f31a170e0e99d03c1c5f1cd022) --- .../transaction_deletion_record_list.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record_list.js b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record_list.js index 08a35df2c17..7c7b8ff25a7 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record_list.js +++ b/erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record_list.js @@ -1,12 +1,16 @@ // Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt -frappe.listview_settings["Transaction Deletion Record"] = { - get_indicator: function (doc) { - if (doc.docstatus == 0) { - return [__("Draft"), "red"]; - } else { - return [__("Completed"), "green"]; - } +frappe.listview_settings['Transaction Deletion Record'] = { + add_fields: ["status"], + get_indicator: function(doc) { + let colors = { + 'Queued': 'orange', + 'Completed': 'green', + 'Running': 'blue', + 'Failed': 'red', + }; + let status = doc.status; + return [__(status), colors[status], 'status,=,'+status]; }, };