From aded64e651fc6280a3258bb3c7e7ffbcf8549960 Mon Sep 17 00:00:00 2001 From: Karan Wilson Date: Sat, 11 May 2024 12:18:48 +0530 Subject: [PATCH] prettier: amended spacing as per 'prettier' in precommit --- .../doctype/customize_form/customize_form.js | 14 +++++++------- frappe/public/js/frappe/form/grid_row.js | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/frappe/custom/doctype/customize_form/customize_form.js b/frappe/custom/doctype/customize_form/customize_form.js index e85f0a8d3c65..3df303fdf525 100644 --- a/frappe/custom/doctype/customize_form/customize_form.js +++ b/frappe/custom/doctype/customize_form/customize_form.js @@ -335,14 +335,14 @@ frappe.ui.form.on("Customize Form Field", { }, }); -let parenttype, parent; // used in the form events for the child tables: links, actions and states +let parenttype, parent; // used in the form events for the child tables: links, actions and states // can't delete standard links frappe.ui.form.on("DocType Link", { before_links_remove: function (frm, doctype, name) { let row = frappe.get_doc(doctype, name); - parenttype = row.parenttype; // used in the event links_remove - parent = row.parent; // used in the event links_remove + parenttype = row.parenttype; // used in the event links_remove + parent = row.parent; // used in the event links_remove if (!(row.custom || row.__islocal)) { frappe.msgprint(__("Cannot delete standard link. You can hide it if you want")); throw "cannot delete standard link"; @@ -363,8 +363,8 @@ frappe.ui.form.on("DocType Link", { frappe.ui.form.on("DocType Action", { before_actions_remove: function (frm, doctype, name) { let row = frappe.get_doc(doctype, name); - parenttype = row.parenttype; // used in the event actions_remove - parent = row.parent; // used in the event actions_remove + parenttype = row.parenttype; // used in the event actions_remove + parent = row.parent; // used in the event actions_remove if (!(row.custom || row.__islocal)) { frappe.msgprint(__("Cannot delete standard action. You can hide it if you want")); throw "cannot delete standard action"; @@ -385,8 +385,8 @@ frappe.ui.form.on("DocType Action", { frappe.ui.form.on("DocType State", { before_states_remove: function (frm, doctype, name) { let row = frappe.get_doc(doctype, name); - parenttype = row.parenttype; // used in the event states_remove - parent = row.parent; // used in the event states_remove + parenttype = row.parenttype; // used in the event states_remove + parent = row.parent; // used in the event states_remove if (!(row.custom || row.__islocal)) { frappe.msgprint(__("Cannot delete standard document state.")); throw "cannot delete standard document state"; diff --git a/frappe/public/js/frappe/form/grid_row.js b/frappe/public/js/frappe/form/grid_row.js index 1d5752e4e969..19683edcf2a3 100644 --- a/frappe/public/js/frappe/form/grid_row.js +++ b/frappe/public/js/frappe/form/grid_row.js @@ -1438,8 +1438,7 @@ export default class GridRow { if (field) { // the below if statement is added to factor in the exception when this.doc is undefined - // - after row removals via customize_form.js on links, actions and states child-tables - if (this.doc) - field.docname = this.doc.name; + if (this.doc) field.docname = this.doc.name; field.refresh(); }