fix: set draft indicators for Asset Maintenance Log listview
diff --git a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log_list.js b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log_list.js
index b854413..23000e6 100644
--- a/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log_list.js
+++ b/erpnext/assets/doctype/asset_maintenance_log/asset_maintenance_log_list.js
@@ -1,14 +1,15 @@
frappe.listview_settings['Asset Maintenance Log'] = {
add_fields: ["maintenance_status"],
+ has_indicator_for_draft: 1,
get_indicator: function(doc) {
- if(doc.maintenance_status=="Pending") {
- return [__("Pending"), "orange"];
- } else if(doc.maintenance_status=="Completed") {
- return [__("Completed"), "green"];
- } else if(doc.maintenance_status=="Cancelled") {
- return [__("Cancelled"), "red"];
- } else if(doc.maintenance_status=="Overdue") {
- return [__("Overdue"), "red"];
+ if (doc.maintenance_status=="Planned") {
+ return [__(doc.maintenance_status), "orange", "status,=," + doc.maintenance_status];
+ } else if (doc.maintenance_status=="Completed") {
+ return [__(doc.maintenance_status), "green", "status,=," + doc.maintenance_status];
+ } else if (doc.maintenance_status=="Cancelled") {
+ return [__(doc.maintenance_status), "red", "status,=," + doc.maintenance_status];
+ } else if (doc.maintenance_status=="Overdue") {
+ return [__(doc.maintenance_status), "red", "status,=," + doc.maintenance_status];
}
}
};