-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: show correct status in list view
- Loading branch information
1 parent
86b5e2e
commit 1014940
Showing
1 changed file
with
11 additions
and
7 deletions.
There are no files selected for viewing
18 changes: 11 additions & 7 deletions
18
erpnext/setup/doctype/transaction_deletion_record/transaction_deletion_record_list.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]; | ||
}, | ||
}; |