{"id":1126,"date":"2021-06-17T09:34:46","date_gmt":"2021-06-17T09:34:46","guid":{"rendered":"http:\/\/www.rmabodyandpaint.com\/?p=1126"},"modified":"2021-06-17T09:38:34","modified_gmt":"2021-06-17T09:38:34","slug":"insurance-partner","status":"publish","type":"post","link":"https:\/\/www.rmabodyandpaint.com\/th\/2021\/06\/17\/insurance-partner\/","title":{"rendered":"Insurance Partner"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1126\" class=\"elementor elementor-1126\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1bde0297 elementor-section-height-min-height elementor-section-boxed elementor-section-height-default elementor-section-items-middle\" data-id=\"1bde0297\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-62482a2a\" data-id=\"62482a2a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6cd54315 elementor-widget elementor-widget-heading\" data-id=\"6cd54315\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Add Your Heading Text Here<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3b93acf6 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3b93acf6\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-66 elementor-top-column elementor-element elementor-element-6ce2e44f\" data-id=\"6ce2e44f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7a8a0a26 elementor-widget elementor-widget-heading\" data-id=\"7a8a0a26\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Insurance partner<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-61ea5379 elementor-widget elementor-widget-image\" data-id=\"61ea5379\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/www.rmabodyandpaint.com\/wp-content\/uploads\/2021\/06\/Pricing-Table-image-1024x683.jpeg\" class=\"attachment-large size-large wp-image-1111\" alt=\"\" srcset=\"https:\/\/www.rmabodyandpaint.com\/wp-content\/uploads\/2021\/06\/Pricing-Table-image-1024x683.jpeg 1024w, https:\/\/www.rmabodyandpaint.com\/wp-content\/uploads\/2021\/06\/Pricing-Table-image-300x200.jpeg 300w, https:\/\/www.rmabodyandpaint.com\/wp-content\/uploads\/2021\/06\/Pricing-Table-image-768x512.jpeg 768w, https:\/\/www.rmabodyandpaint.com\/wp-content\/uploads\/2021\/06\/Pricing-Table-image-1536x1024.jpeg 1536w, https:\/\/www.rmabodyandpaint.com\/wp-content\/uploads\/2021\/06\/Pricing-Table-image-2048x1365.jpeg 2048w, https:\/\/www.rmabodyandpaint.com\/wp-content\/uploads\/2021\/06\/Pricing-Table-image-16x12.jpeg 16w, https:\/\/www.rmabodyandpaint.com\/wp-content\/uploads\/2021\/06\/Pricing-Table-image-1200x800.jpeg 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-62abf414 elementor-widget elementor-widget-text-editor\" data-id=\"62abf414\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.<\/p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-75df6a14\" data-id=\"75df6a14\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-306e8d9a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"306e8d9a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-59f63b61\" data-id=\"59f63b61\" data-element_type=\"column\" data-e-type=\"column\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-63bce8fb elementor-widget elementor-widget-heading\" data-id=\"63bce8fb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-large\">MAKE AN APPOINTMENT<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-25fd32c8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"25fd32c8\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-77940b0a sidebar-appointment\" data-id=\"77940b0a\" data-element_type=\"column\" data-e-type=\"column\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3f3e740d elementor-widget elementor-widget-sidebar\" data-id=\"3f3e740d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"sidebar.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<section id=\"custom_html-2\" class=\"widget_text widget widget_custom_html\"><div class=\"textwidget custom-html-widget\"><script type=\"text\/javascript\">console.log(\"SSL: no alternative certificate subject name matches target host name 'api.autocardealer.app'\")<\/script>\n\n\n<link rel=\"stylesheet\" href=\"\/\/code.jquery.com\/ui\/1.12.1\/themes\/base\/jquery-ui.css\">\n<link rel=\"stylesheet\" href=\"\/resources\/demos\/style.css\">\n<script src=\"https:\/\/code.jquery.com\/jquery-1.12.4.js\"><\/script>\n<script src=\"https:\/\/code.jquery.com\/ui\/1.12.1\/jquery-ui.js\"><\/script>\n\n<script>\n\n  $( function() {\n    $( \"#appointment_date\" ).datepicker( {\n        onSelect: function(date) {\n        \t$('.loading').removeClass('hide');\n        \tif($( \"#service\" ).find(\":selected\").val()==''){\n        \t\talert('Please select branch and service first');\n        \t\t$('.loading').addClass('hide');\n        \t\treturn false;\n        \t}\n\n            $.ajax({\n                url: $('#baseURL').val()+'\/ajax-action.php?action=booking-availability',\n                type: 'POST',\n                data: {date: $( \"#appointment_date\" ).val(), service: $( \"#service\" ).find(\":selected\").val()},\n                success: function (status) {\n                    var result = JSON.parse(status);\n                    \n                    $('#booking-time').html('');\n                    if(result.status){\n                    \tfor(var x=0;x<result.data.timeslots.length;x++){\n                    \t\tif(result.data.available.includes(result.data.timeslots[x])){\n                    \t\t $('#booking-time').append('<span id=\"time'+x+'\" class=\"col-md-3 col-sm-4 btn btn-outline-secondary aval-time\" onclick=\"update_time(`time'+x+'`,`'+result.data.timeslots[x]+'`)\" > '+result.data.timeslots[x]+' <\/span>');\n                    \t\t}else{\n                    \t\t\t$('#booking-time').append('<span id=\"time'+x+'\" class=\"col-md-3 col-sm-4 btn btn-outline-secondary disabled\"> <strike>'+result.data.timeslots[x]+'<\/strike> <\/span>');\n                    \t\t}\n                    \t}\n                    \t$('.loading').addClass('hide');\n                    }else{\n                        $('.error-message').html(\"Error occur, please contact our customer service\");\n                        $('.error').removeClass('hide');\n                        console.log(result);\n                        $('.loading').addClass('hide');\n                        $('#booking-time').html('');\n                    }\n                },\n                error: function(jqXHR, exception){\n                    ajax_error_handling(jqXHR, exception);\n                }\n            });\n        },\n        minDate:new Date(),\n        selectWeek: true,\n        inline: true,\n        firstDay: 1\n    });\n\n    $('#branch').on('change', function() {\n        var branches = JSON.parse($('#branchJson').val());\n        $('#service').html('');\n        $('#service').append('<option value=\"\">--- Choose One ---<\/option>');\n        $('#booking-time').html('');\n        $(\"#appointment_date\").val('');\n        $(\"#appointment_date\").attr(\"disabled\", true);\n        $('.to-hide').addClass('hide');\n        \/\/console.log(branches['services']);\n        if($(this).find(\":selected\").val()!=''){\n\n            for (var key in branches){ \n                if($(this).find(\":selected\").val()==branches[key]['id']){\n                \tfor(var x=0;x<branches[key]['services'].length;x++){\n\t                    $('#service').append('<option value=\"'+branches[key]['services'][x]['id']+'\">'+branches[key]['services'][x]['name']+'<\/option>');\n\t                }\n\t   \t\t\t\t\/\/$(\"#appointment_date\").attr(\"disabled\", false);\n\t                break;\n                }\n            }\n            $('#service').attr(\"disabled\", false);\n        }else{\n            $('#service').attr(\"disabled\", true);\n            $(\"#appointment_date\").attr(\"disabled\", true);\n            $(\"#appointment_date\").val(\"\");\n            $('#booking-time').html('');\n        }\n    });\n\n    $('#service').on('change', function() {\n    \t$(\"#appointment_date\").attr(\"disabled\", true);\n        \/\/$(\"#appointment_date\").val(\"\");\n\n    \tif($(this).find(\":selected\").val()!=''){\n    \t\t$(\"#appointment_date\").attr(\"disabled\", false);\n    \t}\n\n    });\n\n    $(\"#form-booking-submit\").click(function() {\n    \t$('.final-hide').addClass('hide');\n        $('.loading').removeClass('hide');\n        $('.error').addClass('hide');\n\n        if($(\"#name\").val()=='' || $(\"#number\").val()=='' || $(\"#branch\").val()=='' || $(\"#service\").val()=='' || $(\"#appointment_date\").val()=='' || $(\"#appointment_time\").val()=='' || $(\"#brand\").val()=='' || $(\"#model\").val()=='' || $(\"#year\").val()=='' || $(\"#plate_number\").val()=='' || $(\"#email\").val()==''){\n\n        \t$('.error-message').html(\"All fields with start (*) sign are required!\");\n\t        $('.error').removeClass('hide');\n\t        $('.loading').addClass('hide');\n\t        $('.final-hide').removeClass('hide');\n\n        }else{\n\n\t        $.ajax({\n\t            url: $('#baseURL').val()+'\/ajax-action.php?action=submit-booking',\n\t            type: 'POST',\n\t            data: $('#rma-booking-form').serialize(),\n\t            success: function (status) {\n\t                var result = JSON.parse(status);\n\t                if(result.status){\n\t                    \/\/location.reload();\n\t                    \/*var url = window.location.href;    \n\t\t\t\t\t\tif (url.indexOf('?') > -1){\n\t\t\t\t\t\t   url += '&success=1'\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t   url += '?success=1'\n\t\t\t\t\t\t}\n\t\t\t\t\t\twindow.location.href = url;*\/\n\t\t\t\t\t\t$('.form-hide').addClass('hide');\n\t\t\t\t\t\t$('.success-message').html(\"Thank you for your submission! We will contact you shortly.\");\n\t                    $('.success').removeClass('hide');\n\n\n\t                }else{\n\t                \t$('.error-message').html(\"Error occur, please contact our customer service\");\n\t                    $('.error').removeClass('hide');\n\t                    console.log(result);\n\t                    $('.loading').addClass('hide');\n\t                    $('.final-hide').removeClass('hide');\n\t                }\n\t            },\n\t            error: function(jqXHR, exception){\n\t                \/\/ajax_error_handling(jqXHR, exception);\n\t                $('.error-message').html(\"Error occur, please contact our customer service\");\n\t                $('.error').removeClass('hide');\n\t                console.log(result);\n\t                $('.loading').addClass('hide');\n\t                $('.final-hide').removeClass('hide');\n\t            }\n\t        });\n\n    \t}\n    });\n\n    $('#service').attr(\"disabled\", true);\n\n  } );\n\n  function update_time($id,$val){\n    \t$('.aval-time').removeClass('selected-time');\n    \t$('#'+$id).addClass('selected-time');\n    \t$('#appointment_time').val($val);\n    \t$('.to-hide').removeClass('hide');\n    }\n<\/script>\n\n<style type=\"text\/css\">\n\t\/* Create four equal columns that floats next to each other *\/\n\t.hide {\n\t\tdisplay: none;\n\t}\n\t.aval-time{\n\t\tbackground-color: transparent;\n    \tcolor: black;\n    \tmargin: 5px;\n\t}\n\t.aval-time:hover{\n\t\topacity: 0.80;\n\t\tbackground-color: transparent;\n    \tcolor: grey;\n    \tmargin: 5px;\n\t}\n\t.selected-time{\n\t\tbackground-color: #6c757d;\n\t\tfont-weight: 500;\n\t\tborder: 2px solid #154360;\n\t\tcolor:black;\n\n\t}\n\t.selected-time:hover{\n\t\tbackground-color: #6c757d;\n\t\tfont-weight: 500;\n\t\tborder: 2px solid #154360;\n\t\tcolor:black;\n\n\t}\n\t.error{\n\t\tcolor: red;\n\t\ttext-align: center;\n\t}\n\t.loading{\n\t\ttext-align: center;\n\t}\n<\/style>\n\n<div class=\"rma-dealer-booking\">\n\n\t\n\t<div style=\"text-align: center;\">Error Occurs. Please contact our customer service.<\/div>\n\n\t\n<\/div><\/div><\/section>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Add Your Heading Text Here Insurance partner Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"elementor_header_footer","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1126","post","type-post","status-publish","format-standard","hentry","category-services"],"_links":{"self":[{"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/posts\/1126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/comments?post=1126"}],"version-history":[{"count":7,"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/posts\/1126\/revisions"}],"predecessor-version":[{"id":1136,"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/posts\/1126\/revisions\/1136"}],"wp:attachment":[{"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/media?parent=1126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/categories?post=1126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rmabodyandpaint.com\/th\/wp-json\/wp\/v2\/tags?post=1126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}