{"id":162,"date":"2024-11-05T20:20:39","date_gmt":"2024-11-05T17:20:39","guid":{"rendered":"https:\/\/bool.soap.zone\/b009\/book-appointment\/"},"modified":"2024-11-05T20:36:38","modified_gmt":"2024-11-05T17:36:38","slug":"book-appointment","status":"publish","type":"page","link":"https:\/\/bool.soap.zone\/b009\/","title":{"rendered":"Book Appointment"},"content":{"rendered":"<input type=\"hidden\" id=\"aior_admin_global_nonce\" name=\"aior_admin_global_nonce\" value=\"e69793622f\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/b009\/wp-json\/wp\/v2\/pages\/162\" \/>\t\t<input type=\"hidden\" class=\"aior_abpid\" value=\"168\">\n\t\t<input type=\"hidden\" id=\"aior_slot_type\" value=\"1\">\n\t\t<input type=\"hidden\" id=\"aior_booking_type\" value=\"guest\">\n\t\t<input type=\"hidden\" id=\"aior_reservation_type\" value=\"\">\n\t\t<input type=\"hidden\" id=\"aior_login_page\" value=\"https:\/\/bool.soap.zone\/b009\/wp-login.php\">\n\t\t<input type=\"hidden\" id=\"appointment_limit\" value=\"\">\n\t\t<input type=\"hidden\" id=\"prevent_before_date\" value=\"\">\n\t\t<input type=\"hidden\" id=\"holiday_dates\" value=\"Array\n(\n    [replace_this] => Array\n        (\n            [holidays_date_from] => \n            [holidays_date_to] => \n        )\n\n)\n\">\n\t\t<input type=\"hidden\" id=\"prevent_after_date\" value=\"\">\n\t\t<input type=\"hidden\" id=\"user_count\" value=\"0\">\n\t\t<input type=\"hidden\" id=\"is_user_login\" value=\"\">\n\t\t<input type=\"hidden\" id=\"aior_layout_type\" value=\"design1\">\n\t\t<input type=\"hidden\" id=\"aior-ab-calendar-168\">\n\t\t<div id=\"aior-ab-c-cnt\" class=\"aior_cftheme_1\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<script>\n\t\tjQuery(document).ready(function(){\n\t\t\t(function(){\n\t\t\t\tvar today = new Date();\n\t\t\t\tvar enableDate = [\n\t\t\t\t\t\t\t\t];\n\t\t\t\tlocalStorage.setItem(\"service_name\", \"\");\n\t\t\t\tvar holiday_dates = $('#holiday_dates').val();\n\t\t\t\tvar prevent_before_date = $('#prevent_before_date').val();\n\t\t\t\tvar start_date = '';\n\t\t\t\tvar prevent_after_date = $('#prevent_after_date').val();\n\t\t\t\tvar end_date = '';\n\t\t\t\tif( prevent_before_date !== null && prevent_before_date !== '' ) {\n\t\t\t\t\tstart_date = prevent_before_date;\n\t\t\t\t} else {\n\t\t\t\t\tstart_date = new Date();\n\t\t\t\t}\n\t\t\t\tif( prevent_after_date !== null && prevent_after_date !== '' ) {\n\t\t\t\t\tend_date = prevent_after_date;\n\t\t\t\t} else {\n\t\t\t\t\tend_date = false;\n\t\t\t\t}\n\t\t\t\t$('#aior-ab-calendar-168').dateRangePicker({\n\t\t\t\t\tcontainer  : '#aior-ab-c-cnt',\n\t\t\t\t\tstartDate  : start_date,\n\t\t\t\t\tendDate    : end_date,\n\t\t\t\t\tinline     : true,\n\t\t\t\t\talwaysOpen : true,\n\t\t\t\t\tsingleMonth: true,\n\t\t\t\t\tsingleDate : true,\n\t\t\t\t\tautoUpdateInput: true,\n\t\t\t\t\tbeforeShowDay:off_days,\t\t\t\t});\n\t\t\t\tfunction off_custom(date) {\n\t\t\t\t\tif(date){\n\t\t\t\t\t\tnd = moment(date).format('YYYY-MM-DD');\n\t\t\t\t\t\tholiday_array = [];\n\t\t\t\t\t\t\t\t\t\t\t\tif( enableDate.includes(nd) && ( $.inArray( nd, holiday_array ) === -1 )){\n\t\t\t\t\t\t\treturn [true,\"\",'Available']\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( date.getDate() === 32) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar valid = !( $.inArray( nd, holiday_array ) !== -1 );\n\t\t\t\t\t\t\t\tvar _class = '';\n\t\t\t\t\t\t\t\tvar _tooltip = valid ? '' : 'Holiday';\n\t\t\t\t\t\t\t\treturn [valid,_class,_tooltip];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn [false,\"\",\"\"]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tfunction off_days(date) {\n\t\t\t\t\tnd = moment(date).format('YYYY-MM-DD');\n\t\t\t\t\tholiday_array = [];\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t(\n\t\t\t\t\t\tdate.getDay() === 1 || date.getDay() === 2 || date.getDay() === 3\t\t\t\t\t\t) && ( $.inArray( nd, holiday_array ) === -1 )\n\t\t\t\t\t){\n\t\t\t\t\t\treturn [true,\"\",\"\"]\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ( date.getDate() === 32) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tvar valid = !( $.inArray( nd, holiday_array ) !== -1 );\n\t\t\t\t\t\t\tvar _class = '';\n\t\t\t\t\t\t\tvar _tooltip = valid ? '' : 'Holiday';\n\t\t\t\t\t\t\treturn [valid,_class,_tooltip];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn [false,\"date-closed\",\"\"];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t$('#service_name').on(\"change\", function() {\n\t\t\t\t\tvar current_service_name = $(this).val();\n\t\t\t\t\tlocalStorage.setItem(\"service_name\", current_service_name);\n\t\t\t\t});\n\t\t\t\t\/* Ajax Call *\/\n\t\t\t\t$('#aior-ab-c-cnt .month-wrapper').on('click','.day', function(){\n\t\t\t\t\tif($(this).hasClass('invalid')){}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$(\".sol_ap_s_date\").remove();\n\t\t\t\t\t\tvar weekday       = [\"sunday\",\"monday\",\"tuesday\",\"wednesday\",\"thursday\",\"friday\",\"saturday\"];\n\t\t\t\t\t\tvar container     = $(this).parent().parent();\n\t\t\t\t\t\t\tselected_day  = Number($(this).attr('time'));\n\t\t\t\t\t\t\tobjday        = new Date(selected_day);\n\t\t\t\t\t\t\tselected_date = Number($(this).attr('time'));\n\t\t\t\t\t\t\tobjdate       = new Date(selected_date);\n\t\t\t\t\t\t\tsdate         = objdate.toDateString();\n\t\t\t\t\t\t\tslot_weekly   = $(this).attr( 'slot_weekly' );\n\t\t\t\t\t\t\tabcid         = $('.aior_abpid').attr('value');\n\t\t\t\t\t\t\tnonce         = $('#aior_admin_global_nonce').val();\n\t\t\t\t\t\t\tstype         = $('#aior_slot_type').val();\n\t\t\t\t\t\t\tfdate         = moment(selected_date).format('YYYY-MM-DD');\n\t\t\t\t\t\t\tservice_name  = localStorage.getItem(\"service_name\");\n\n\t\t\t\t\t\t$.ajax({\n\t\t\t\t\t\t\ttype    : 'POST',\n\t\t\t\t\t\t\tdataType: 'html',\n\t\t\t\t\t\t\turl     : aior_obj.ajaxurl,\n\t\t\t\t\t\t\tdata    : {  \n\t\t\t\t\t\t\t\taction       : 'aoir_reservation_global_ajax',\n\t\t\t\t\t\t\t\tact          : 'get_day_appointment_data',\n\t\t\t\t\t\t\t\tslot_type    : stype,\n\t\t\t\t\t\t\t\tselected_date: sdate,\n\t\t\t\t\t\t\t\tslot_weekly  : slot_weekly,\n\t\t\t\t\t\t\t\tselected_day : weekday[objday.getDay()],\n\t\t\t\t\t\t\t\tpost_id      : abcid,\n\t\t\t\t\t\t\t\tservice_name : service_name,\n\t\t\t\t\t\t\t\tnonce        : nonce\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbeforeSend:function(){Swal.fire({allowOutsideClick:false,showConfirmButton:false,didOpen:()=>{Swal.showLoading()}})},\n\t\t\t\t\t\t\tsuccess:function(res){\n\t\t\t\t\t\t\t\tswal.close();\n\t\t\t\t\t\t\t\tif(res){\n\t\t\t\t\t\t\t\t\tad  = JSON.parse(res);\n\t\t\t\t\t\t\t\t\th   = '';\n\t\t\t\t\t\t\t\t\th  += '<tr class=\"sol_ap_s_date\"><td colspan=\"7\"><div class=\"so_ap_s_cnt\">';\n\t\t\t\t\t\t\t\t\tif( res === 'null' || res === '[]' ) {\n\t\t\t\t\t\t\t\t\t\th  += '<header><strong>Sorry, No Slots Found.<\/strong><\/header>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\th  += '<header>Available Appointments <strong>'+sdate+'<\/strong><\/header>';\n\t\t\t\t\t\t\t\t\t\th  += '<div class=\"solrow solarowhead\">';\n\t\t\t\t\t\t\t\t\t\th  += '<div class=\"solcol solacol_1\">Service<\/div>';\n\t\t\t\t\t\t\t\t\t\th  += '<div class=\"solcol solacol_2\">Time<\/div>';\n\t\t\t\t\t\t\t\t\t\th  += '<div class=\"solcol solacol_3\">Space<\/div>';\n\t\t\t\t\t\t\t\t\t\th  += '<div class=\"solcol solacol_4\">Price<\/div>';\n\t\t\t\t\t\t\t\t\t\th  += '<div class=\"solcol solacol_5\">Book<\/div>';\n\t\t\t\t\t\t\t\t\t\th  += '<\/div>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif( 1==stype ){\n\t\t\t\t\t\t\t\t\t\tfor(k in ad){\n\t\t\t\t\t\t\t\t\t\t\tfor(i=0;i<ad[k].length;i++){\n\t\t\t\t\t\t\t\t\t\t\t\ttitle  = ad[k][i].t;\n\t\t\t\t\t\t\t\t\t\t\t\tdesc   = ad[k][i].d;\n\t\t\t\t\t\t\t\t\t\t\t\tstime  = ad[k][i].st;\n\t\t\t\t\t\t\t\t\t\t\t\tetime  = ad[k][i].et;\n\t\t\t\t\t\t\t\t\t\t\t\tspace  = ad[k][i].s;\n\t\t\t\t\t\t\t\t\t\t\t\tprice  = ad[k][i].p;\n\t\t\t\t\t\t\t\t\t\t\t\tsid    = ad[k][i].q;\n\t\t\t\t\t\t\t\t\t\t\t\ttid    = k;\n\t\t\t\t\t\t\t\t\t\t\t\ttno    = i;\n\t\t\t\t\t\t\t\t\t\t\t\taspace = ad[k][i].u;\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solrow\">';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_1\"><span class=\"stitle tooltip\">'+title+'<br><span class=\"tooltiptext\">'+desc+'<\/span><\/span><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_2\"><span class=\"stime\">'+stime+'<\/span><span class=\"setme\">-<\/span><span class=\"etime\">'+etime+'<\/span><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_3\"><span class=\"sspace\">'+aspace+'<\/span><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_4\"><span class=\"sprice\">'+price+'<\/span><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_5\"><a data-sid=\"'+sid+'\" data-space=\"'+aspace+'\" data-abcid=\"'+abcid+'\" data-taskid=\"'+k+'\" data-taskno=\"'+i+'\" data-taskdate=\"'+fdate+'\" data-price=\"'+price+'\" href=\"javascript:void(0)\" class=\"book-apppointment-now\">Book Now<\/a><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<\/div>';\n\t\t\t\t\t\t\t\t\t\t\t}    \n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\t\t\t\tfor(j=0;j<ad.length;j++){\n\t\t\t\t\t\t\t\t\t\t\ttid   = ad[j]['tid'];\n\t\t\t\t\t\t\t\t\t\t\tsdate = ad[j]['task'];\n\t\t\t\t\t\t\t\t\t\t\tslot  = ad[j]['slot'];\n\t\t\t\t\t\t\t\t\t\t\ttitle = sdate.t;\n\t\t\t\t\t\t\t\t\t\t\tdesc  = sdate.d;\n\t\t\t\t\t\t\t\t\t\t\tfor(l=0;l<slot.length;l++){\n\t\t\t\t\t\t\t\t\t\t\t\tsid    = slot[l].q;\n\t\t\t\t\t\t\t\t\t\t\t\tstime  = slot[l].s;\n\t\t\t\t\t\t\t\t\t\t\t\tetime  = slot[l].e;\n\t\t\t\t\t\t\t\t\t\t\t\tspace  = slot[l].r;\n\t\t\t\t\t\t\t\t\t\t\t\tprice  = slot[l].p;\n\t\t\t\t\t\t\t\t\t\t\t\taspace = slot[l].u;\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solrow\">';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_1\"><span class=\"stitle tooltip\">'+title+'<span class=\"tooltiptext\">'+desc+'<\/span><\/span><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_2\"><span class=\"stime\">'+stime+'<\/span><span class=\"setme\">-<\/span><span class=\"etime\">'+etime+'<\/span><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_3\"><span class=\"sspace\">'+aspace+'<\/span><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_4\"><span class=\"sprice\">'+price+'<\/span><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<div class=\"solcol solacol_5\"><a data-sid=\"'+sid+'\" data-space=\"'+aspace+'\" data-abcid=\"'+abcid+'\" data-taskid=\"'+tid    +'\" data-taskno=\"'+l+'\"  data-taskdate=\"'+fdate+'\" data-price=\"'+price+'\"  href=\"javascript:void(0)\" class=\"book-apppointment-now\">Book Now<\/a><\/div>';\n\t\t\t\t\t\t\t\t\t\t\t\th += '<\/div>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\th+='<\/div><\/td><\/tr>';\n\t\t\t\t\t\t\t\t\tcontainer.after(h);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}(jQuery))\n\t\t});\n\t\t<\/script>\n\t\t<div class=\"aior_payment_gateways\">\n\t\t\t\t\t\t\t\t<ul class=\"social-buttons\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"button__share button__share--facebook\"><a href=\"javascript:void(window.open('https:\/\/www.facebook.com\/sharer.php?u=' + encodeURIComponent(document.location) + '?t=' + encodeURIComponent(document.title),'_blank'))\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" class=\"bi bi-facebook\" viewBox=\"0 0 24 24\"><path d=\"M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z\"\/><\/svg>Facebook<\/a><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li class=\"button__share button__share--twitter\"><a href=\"javascript:void(window.open('https:\/\/twitter.com\/share?url=' + encodeURIComponent(document.location) + '&amp;text=' + encodeURIComponent(document.title) + '&amp;via=fabienb&amp;hashtags=koandesign','_blank'))\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" class=\"bi bi-twitter\" viewBox=\"0 0 24 24\"><path d=\"M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z\"\/><\/svg>Twitter<\/a><\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t<\/div>\n\t\t\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-162","page","type-page","status-publish","hentry"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/bool.soap.zone\/b009\/wp-json\/wp\/v2\/pages\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bool.soap.zone\/b009\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bool.soap.zone\/b009\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bool.soap.zone\/b009\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bool.soap.zone\/b009\/wp-json\/wp\/v2\/comments?post=162"}],"version-history":[{"count":1,"href":"https:\/\/bool.soap.zone\/b009\/wp-json\/wp\/v2\/pages\/162\/revisions"}],"predecessor-version":[{"id":169,"href":"https:\/\/bool.soap.zone\/b009\/wp-json\/wp\/v2\/pages\/162\/revisions\/169"}],"wp:attachment":[{"href":"https:\/\/bool.soap.zone\/b009\/wp-json\/wp\/v2\/media?parent=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}