refactor: Used object to get payment request status indicator
(cherry picked from commit e1c4d6e1e6)
# Conflicts:
# erpnext/accounts/doctype/payment_request/payment_request_list.js
This commit is contained in:
committed by
Mergify
parent
f6f1052a80
commit
e2728db5c2
@@ -1,6 +1,17 @@
|
||||
const INDICATORS = {
|
||||
"Partially Paid": "orange",
|
||||
Cancelled: "red",
|
||||
Draft: "gray",
|
||||
Failed: "red",
|
||||
Initiated: "green",
|
||||
Paid: "blue",
|
||||
Requested: "green",
|
||||
};
|
||||
|
||||
frappe.listview_settings["Payment Request"] = {
|
||||
add_fields: ["status"],
|
||||
get_indicator: function (doc) {
|
||||
<<<<<<< HEAD
|
||||
if (doc.status == "Draft") {
|
||||
return [__("Draft"), "gray", "status,=,Draft"];
|
||||
}
|
||||
@@ -15,5 +26,8 @@ frappe.listview_settings["Payment Request"] = {
|
||||
} else if (doc.status == "Cancelled") {
|
||||
return [__("Cancelled"), "red", "status,=,Cancelled"];
|
||||
}
|
||||
=======
|
||||
return [__(doc.status), INDICATORS[doc.status] || "gray", `status,=,${doc.status}`];
|
||||
>>>>>>> e1c4d6e1e6 (refactor: Used object to get payment request status indicator)
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user