mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-24 07:29:22 +00:00
fix: task.js
This commit is contained in:
@@ -49,9 +49,9 @@ frappe.ui.form.on("Task", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(frm.perm[0].write) {
|
if(frm.perm[0].write) {
|
||||||
if(frm.doc.status!=="Closed" && frm.doc.status!=="Cancelled") {
|
if(frm.doc.status!=="Completed" && frm.doc.status!=="Cancelled") {
|
||||||
frm.add_custom_button(__("Close"), function() {
|
frm.add_custom_button(__("Completed"), function() {
|
||||||
frm.set_value("status", "Closed");
|
frm.set_value("status", "Completed");
|
||||||
frm.save();
|
frm.save();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ frappe.listview_settings['Task'] = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
listview.page.add_menu_item(__("Set as Closed"), function() {
|
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) {
|
get_indicator: function(doc) {
|
||||||
@@ -19,7 +19,7 @@ frappe.listview_settings['Task'] = {
|
|||||||
"Overdue": "red",
|
"Overdue": "red",
|
||||||
"Pending Review": "orange",
|
"Pending Review": "orange",
|
||||||
"Working": "orange",
|
"Working": "orange",
|
||||||
"Closed": "green",
|
"Completed": "green",
|
||||||
"Cancelled": "dark grey"
|
"Cancelled": "dark grey"
|
||||||
}
|
}
|
||||||
return [__(doc.status), colors[doc.status], "status,=," + doc.status];
|
return [__(doc.status), colors[doc.status], "status,=," + doc.status];
|
||||||
|
|||||||
Reference in New Issue
Block a user