fix(Leave Application): 'Cancelled' status shown as 'Open' in list view
This commit is contained in:
parent
59de303b13
commit
cf04683ad3
@ -1,13 +1,14 @@
|
||||
frappe.listview_settings['Leave Application'] = {
|
||||
frappe.listview_settings["Leave Application"] = {
|
||||
add_fields: ["leave_type", "employee", "employee_name", "total_leave_days", "from_date", "to_date"],
|
||||
has_indicator_for_draft: 1,
|
||||
get_indicator: function (doc) {
|
||||
if (doc.status === "Approved") {
|
||||
return [__("Approved"), "green", "status,=,Approved"];
|
||||
} else if (doc.status === "Rejected") {
|
||||
return [__("Rejected"), "red", "status,=,Rejected"];
|
||||
} else {
|
||||
return [__("Open"), "red", "status,=,Open"];
|
||||
}
|
||||
let status_color = {
|
||||
"Approved": "green",
|
||||
"Rejected": "red",
|
||||
"Open": "orange",
|
||||
"Cancelled": "red",
|
||||
"Submitted": "blue"
|
||||
};
|
||||
return [__(doc.status), status_color[doc.status], "status,=," + doc.status];
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user