jQuery(document).ready(function(o){(o=jQuery.noConflict())(".bkinz-delete-staff").on("click",function(t){t.preventDefault(),t=o(this).attr("data-id"),o.post(TCN_BIND.GET_URL,"action=bp_delete_staff&id="+t,function(t){location.reload()})}),o(".bookingor-delete-service").on("click",function(t){t.preventDefault(),t="action=bp_delete_service&id="+o(this).attr("data-id"),t+="&nonce="+TCN_BIND.nonce,o.post({url:TCN_BIND.GET_URL,data:t,dataType:"json",success:function(t){"success"===t.status?(o.toast({text:t.message,icon:"success",position:"bottom-right"}),location.replace("./admin.php?page=bookingor-services")):o.toast({text:t.message,icon:"error",position:"bottom-right"})}})});var n=o("#bookingTable"),i=o("#example");o("#myTable").hide(),i.hide(),n.hide(),i.DataTable({language:{searchPlaceholder:"Search"},buttons:[{extend:"collection",text:"Flag",buttons:[{text:"High priority",action:function(){}},{text:"Medium priority",action:function(){}},{text:"Low priority",action:function(){}}],fade:!0}],scrollX:!0,autoWidth:!1,responsive:!0,initComplete:function(t,e){i.show(),o("#myTable").show(),o(".table").show()}}),i.find("tr").removeAttr("role"),n.DataTable({rowGroup:{dataSrc:0,render:function(t,e,o,n){var t=new Date(t),i=new Date,a=new Date(i.setDate(i.getDate()-1));return t.toDateString()===i.toDateString()?"Today":t.toDateString()===a.toDateString()?"Yesterday":t.getDate()+" "+t.toLocaleString("default",{month:"long"})+" "+t.getFullYear()}},language:{searchPlaceholder:"Search"},buttons:[{extend:"collection",text:"Flag",buttons:[{text:"High priority",action:function(){}},{text:"Medium priority",action:function(){}},{text:"Low priority",action:function(){}}],fade:!0}],scrollX:!0,autoWidth:!1,responsive:!0,initComplete:function(t,e){n.show(),o("#myTable").show(),o(".table").show(),n.find("thead").show()}})});