fix: task.js
This commit is contained in:
parent
de5f281145
commit
57128e413c
@ -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 {
|
||||
|
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user