feat: add button in calendar view list to show calendar (#17778)

* feat: add button in calendar view list to show calendar

* style: format JS

* chore: linting

Co-authored-by: gavin <gavin18d@gmail.com>
This commit is contained in:
Ernesto Ruiz 2022-08-11 01:40:30 -06:00 committed by GitHub
parent f51948934f
commit ec2bcda440
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,16 @@
frappe.listview_settings["Calendar View"] = {
button: {
show(doc) {
return doc.name;
},
get_label() {
return frappe.utils.icon("calendar", "sm");
},
get_description(doc) {
return __("View {0}", [`${doc.name}`]);
},
action(doc) {
frappe.set_route("List", doc.reference_doctype, "Calendar", doc.name);
},
},
};