Skip to content

Commit

Permalink
chore(wiki-page-patch): remove approve button
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadGenie committed May 6, 2024
1 parent 8435daf commit 272094a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
16 changes: 0 additions & 16 deletions wiki/wiki/doctype/wiki_page_patch/wiki_page_patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,5 @@ frappe.ui.form.on("Wiki Page Patch", {
}
},
});

if (frm.doc.status !== "Approved")
frm.add_custom_button("Approve", () => {
frm.call({
doc: frm.doc,
method: "approve_patch",
callback: (r) => {
if (r.message) {
frappe.show_alert({
message: "Wiki Page Patch Approved",
indicator: "green",
});
}
},
});
});
},
});
7 changes: 0 additions & 7 deletions wiki/wiki/doctype/wiki_page_patch/wiki_page_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@ def update_sidebars(self):
"Wiki Group Item", {"wiki_page": str(item["name"])}, {"parent_label": sidebar, "idx": idx}
)

@frappe.whitelist()
def approve_patch(self):
self.approved_by = frappe.session.user
self.status = "Approved"
self.save()
return True


@frappe.whitelist()
def add_comment_to_patch(reference_name, content):
Expand Down

0 comments on commit 272094a

Please sign in to comment.