chore: remove unwanted UI code
This commit is contained in:
@@ -10,40 +10,19 @@ frappe.ui.form.on("Transaction Deletion Record", {
|
|||||||
callback: function (r) {
|
callback: function (r) {
|
||||||
doctypes_to_be_ignored_array = r.message;
|
doctypes_to_be_ignored_array = r.message;
|
||||||
populate_doctypes_to_be_ignored(doctypes_to_be_ignored_array, frm);
|
populate_doctypes_to_be_ignored(doctypes_to_be_ignored_array, frm);
|
||||||
frm.fields_dict["doctypes_to_be_ignored"].grid.set_column_disp("no_of_docs", false);
|
frm.refresh_field('doctypes_to_be_ignored');
|
||||||
frm.refresh_field("doctypes_to_be_ignored");
|
}
|
||||||
},
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
frm.get_field('doctypes_to_be_ignored').grid.cannot_add_rows = true;
|
frm.get_field('doctypes_to_be_ignored').grid.cannot_add_rows = true;
|
||||||
frm.fields_dict['doctypes_to_be_ignored'].grid.set_column_disp('no_of_docs', false);
|
|
||||||
frm.fields_dict['doctypes_to_be_ignored'].grid.set_column_disp('done', false);
|
|
||||||
frm.refresh_field('doctypes_to_be_ignored');
|
|
||||||
|
|
||||||
frm.get_field('doctypes').grid.cannot_add_rows = true;
|
|
||||||
frm.fields_dict['doctypes'].grid.set_column_disp('no_of_docs', true);
|
|
||||||
frm.refresh_field('doctypes');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh: function (frm) {
|
refresh: function(frm) {
|
||||||
frm.fields_dict["doctypes_to_be_ignored"].grid.set_column_disp("no_of_docs", false);
|
|
||||||
frm.refresh_field("doctypes_to_be_ignored");
|
|
||||||
|
|
||||||
if (frm.doc.docstatus==1 && ['Queued', 'Failed'].find(x => x == frm.doc.status)) {
|
if (frm.doc.docstatus==1 && ['Queued', 'Failed'].find(x => x == frm.doc.status)) {
|
||||||
let execute_btn = __("Start / Resume")
|
let execute_btn = __("Start Deletion")
|
||||||
|
|
||||||
frm.add_custom_button(execute_btn, () => {
|
|
||||||
frm.call({
|
|
||||||
method: 'start_deletion_process',
|
|
||||||
doc: frm.doc
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (frm.doc.docstatus==1 && ['Queued', 'Failed'].find(x => x == frm.doc.status)) {
|
|
||||||
let execute_btn = __("Start Chain of Events")
|
|
||||||
|
|
||||||
frm.add_custom_button(execute_btn, () => {
|
frm.add_custom_button(execute_btn, () => {
|
||||||
frm.call({
|
frm.call({
|
||||||
|
|||||||
Reference in New Issue
Block a user