How to bring a popup While clicking Approve and Reject button

Hi! I need a help.
While Clicking the Approve and Reject button I need a popup wording.

frappe.ui.form.on('value',  {
    validate: function(frm) {
		if(frappe.confirm(frm.doc.workflow_state=="Approved By Sales Manager")){
			frappe.msgprint("Approve Clicked");
		}else if(frappe.confirm(frm.doc.workflow_state=="Reject")){
			frappe.msgprint("Reject clicked");

This is my code, Which I have tried, but no notify is popping up.

This are the name of the status,


First thing is, Do not tag any user.
The community is large if we have an answer to it then will reply to it.
Otherwise, anyone can answer you.

Please try it.

frappe.ui.form.on('Your DocType', {
    refresh: function(frm) {
        if (frm.doc.workflow_state == "Approved By Sales Manager") {
            setTimeout(() => {
            }, 10);
	    } else if (frm.doc.workflow_state == "Rejected By Sales Manager") {
            setTimeout(() => {
            }, 10);	        

Please set your doctype and workflow your according.

Thank You!


Thanks, It works!.
Thanks a lot :upside_down_face: