fix(UX): Disable number card filters on standard (#26676)
This commit is contained in:
parent
5a8e00af38
commit
f3100d05cb
1 changed files with 6 additions and 0 deletions
|
|
@ -273,6 +273,9 @@ frappe.ui.form.on("Number Card", {
|
|||
}
|
||||
|
||||
table.on("click", () => {
|
||||
if (!frappe.boot.developer_mode && frm.doc.is_standard) {
|
||||
frappe.throw(__("Cannot edit filters for standard number cards"));
|
||||
}
|
||||
let dialog = new frappe.ui.Dialog({
|
||||
title: __("Set Filters"),
|
||||
fields: fields.filter((f) => !is_dynamic_filter(f)),
|
||||
|
|
@ -357,6 +360,9 @@ frappe.ui.form.on("Number Card", {
|
|||
);
|
||||
|
||||
frm.dynamic_filter_table.on("click", () => {
|
||||
if (!frappe.boot.developer_mode && frm.doc.is_standard) {
|
||||
frappe.throw(__("Cannot edit filters for standard number cards"));
|
||||
}
|
||||
let dialog = new frappe.ui.Dialog({
|
||||
title: __("Set Dynamic Filters"),
|
||||
fields: fields,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue