chore: show correct status in list view

(cherry picked from commit 1014940953)
This commit is contained in:
ruthra kumar
2024-02-04 16:11:42 +05:30
committed by Mergify
parent 341e467056
commit c38cfd14f3

View File

@@ -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];
},
};