fix: replace document states with list settings
This commit is contained in:
@@ -200,7 +200,7 @@
|
||||
],
|
||||
"is_submittable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-01-17 19:33:52.345823",
|
||||
"modified": "2022-05-23 19:33:52.345823",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Employee Advance",
|
||||
@@ -236,41 +236,6 @@
|
||||
"search_fields": "employee,employee_name",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": [
|
||||
{
|
||||
"color": "Red",
|
||||
"custom": 1,
|
||||
"title": "Draft"
|
||||
},
|
||||
{
|
||||
"color": "Green",
|
||||
"custom": 1,
|
||||
"title": "Paid"
|
||||
},
|
||||
{
|
||||
"color": "Orange",
|
||||
"custom": 1,
|
||||
"title": "Unpaid"
|
||||
},
|
||||
{
|
||||
"color": "Blue",
|
||||
"custom": 1,
|
||||
"title": "Claimed"
|
||||
},
|
||||
{
|
||||
"color": "Gray",
|
||||
"title": "Returned"
|
||||
},
|
||||
{
|
||||
"color": "Yellow",
|
||||
"title": "Partly Claimed and Returned"
|
||||
},
|
||||
{
|
||||
"color": "Red",
|
||||
"custom": 1,
|
||||
"title": "Cancelled"
|
||||
}
|
||||
],
|
||||
"title_field": "employee_name",
|
||||
"track_changes": 1
|
||||
}
|
||||
15
erpnext/hr/doctype/employee_advance/employee_advance_list.js
Normal file
15
erpnext/hr/doctype/employee_advance/employee_advance_list.js
Normal file
@@ -0,0 +1,15 @@
|
||||
frappe.listview_settings["Employee Advance"] = {
|
||||
get_indicator: function(doc) {
|
||||
let status_color = {
|
||||
"Draft": "red",
|
||||
"Submitted": "blue",
|
||||
"Cancelled": "red",
|
||||
"Paid": "green",
|
||||
"Unpaid": "orange",
|
||||
"Claimed": "blue",
|
||||
"Returned": "gray",
|
||||
"Partly Claimed and Returned": "yellow"
|
||||
};
|
||||
return [__(doc.status), status_color[doc.status], "status,=,"+doc.status];
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user