fix: task.js

This commit is contained in:
Rushabh Mehta 2019-02-28 12:43:58 +05:30
parent de5f281145
commit 57128e413c
2 changed files with 5 additions and 5 deletions

View File

@ -49,9 +49,9 @@ frappe.ui.form.on("Task", {
}
if(frm.perm[0].write) {
if(frm.doc.status!=="Closed" && frm.doc.status!=="Cancelled") {
frm.add_custom_button(__("Close"), function() {
frm.set_value("status", "Closed");
if(frm.doc.status!=="Completed" && frm.doc.status!=="Cancelled") {
frm.add_custom_button(__("Completed"), function() {
frm.set_value("status", "Completed");
frm.save();
});
} else {

View File

@ -10,7 +10,7 @@ frappe.listview_settings['Task'] = {
});
listview.page.add_menu_item(__("Set as Closed"), function() {
listview.call_for_selected_items(method, {"status": "Closed"});
listview.call_for_selected_items(method, {"status": "Completed"});
});
},
get_indicator: function(doc) {
@ -19,7 +19,7 @@ frappe.listview_settings['Task'] = {
"Overdue": "red",
"Pending Review": "orange",
"Working": "orange",
"Closed": "green",
"Completed": "green",
"Cancelled": "dark grey"
}
return [__(doc.status), colors[doc.status], "status,=," + doc.status];