Sh3ll
OdayForums


Server : Apache
System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64
User : tradze ( 1001)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /home/tradze/public_html/storage-old/framework/views/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/tradze/public_html/storage-old/framework/views/2171eee990cf7f957d63166bea9f0a21f68f3071.php
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Tradze, <?php echo $__env->yieldContent('title'); ?></title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE"/>
    <meta property="og:title" content="<?php echo $__env->yieldContent('meta_title'); ?>">
    <meta property="og:description" content="<?php echo $__env->yieldContent('meta_description'); ?>">

    <!-- Global styles START -->
<?php echo $__env->make('frontend_new.partials.core-css', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<!-- Global styles END -->

    <!-- Start css page -->

    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/plugins/owl.carousel/owl-carousel/owl.theme.css')); ?>" type="text/css" media="screen"/>
    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/plugins/owl.carousel/owl-carousel/owl.carousel.css')); ?>" type="text/css" media="screen"/>

    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/plugins/FlipClock/compiled/flipclock.css')); ?>" type="text/css" media="screen">
    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/css/bootstrap-css/bootstrap-datepicker.css')); ?>" type="text/css" media="screen">
    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/css/css-carousel-treatments.css')); ?>" type="text/css" media="screen"/>

    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/css/typehead-bootstrap3.css')); ?>" type="text/css" media="screen">
    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/css/font-awesome.min.css')); ?>" type="text/css" media="screen">
    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/css/salon_detail.css')); ?>" type="text/css" media="screen">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.min.css" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
    
    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/css/css-top-contact.css')); ?>" type="text/css" media="screen"/>
    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/css/build.css')); ?>" type="text/css" media="screen"/>
    <link rel="stylesheet" href="<?php echo e(asset('/themes/frontend_new/assets/css/css-book-massage-later-NEW.css')); ?>" type="text/css" media="screen"/>

    <?php echo $__env->yieldContent('css_page'); ?>
</head>
<body class="no_testimonials_page">
<style>
.cmn_background_cover{ 
    background-image: url("<?php echo e(asset('/themes/frontend_new/assets/img/no_availiblity_book_later_with_text.png')); ?>");
        padding: 30px 0;
}
.cmn_background_page{
    padding-top: 0px;
    padding-bottom: 0px;
}
.loadertrue {
    display: none !important;
}
.loaderfalse {
    display: '';
}

#loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loader-inner {
  /*border: 16px solid #f3f3f3;*/
  /*border-top: 16px solid #3498db;*/
  border-radius: 50%;
  /*width: 10px;
  height: 10px;*/
  animation: spin 1s linear infinite;
  color: #fff;
}

.menu-background, .menu-fix-categs-tel, .footer-main {
    z-index: 99999 !important;
}

footer {
    z-index: 99999 !important;
}

#loader-inner img {
  opacity: 0.7;
  max-height: 370px;
  padding: 20px 0;
}

#loader span#loader-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100vh;
}

#loader span#loader-inner img {
    max-height: max-content;
    max-width: 240px;
    padding: 0 !important;
    opacity: 1;
}
#loader {
    background-color: #ffffff;
}
#loader h2 {
    color: #000;
    font-size: 25px;
    margin: 80px 0 20px 0;
}
</style>
<?php /*start header*/ ?>
<?php echo $__env->make('frontend_new.partials.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php /*end start header*/ ?>

<?php /*start contact top*/ ?>
<?php echo $__env->make('frontend_new.partials.contact-top', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php /*end contact top*/ ?>

<div id="loader">
    <span id="loader-inner" class="row">
        <h2 class="col-md-12 text-center display-1">Searching for providers Please wait…</h2>
         <span class="col-md-12 text-center"><img src="<?php echo e(asset('/themes/frontend_new/assets/loader/loader.gif')); ?>" alt="Loading..." /></span>
    </span>
</div>
<div id="maincomponent1">
<?php echo $__env->yieldContent('content'); ?>
</div>
<!-- Modal -->

<div class="modal fade" id="info-therapist" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>

            <div class="modal-body">
                <?php /*load ajax therapis info*/ ?>
            </div>
        </div>
    </div>
</div>

<?php /*start footer*/ ?>
<?php echo $__env->make('frontend_new.partials.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php /*end footer*/ ?>

<?php echo e(csrf_field()); ?>


<?php /*start core js*/ ?>
<?php echo $__env->make('frontend_new.partials.core-js', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php /*end core js*/ ?>

<?php /*page scripts*/ ?>
<script src="<?php echo e(asset('/themes/frontend_new/assets/plugins/FlipClock/compiled/flipclock.js')); ?>"></script>
<script src="<?php echo e(asset('/themes/frontend_new/assets/js/bootstrap-datepicker.js')); ?>"></script>
<script src="<?php echo e(asset('/themes/frontend_new/assets/js/typeahead.bundle.js')); ?>"></script>


<script type="text/javascript">
    $(document).ready(function () {

        var CSRF_TOKEN = $('input[name="_token"]').val();
        $.ajaxSetup({
            headers: {
                'X-CSRF-TOKEN': CSRF_TOKEN
            }
        });

//        selectdate();

        //find address
        var addressList = new Bloodhound({
            datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
            queryTokenizer: Bloodhound.tokenizers.whitespace,
            remote: {
                url: 'getaddresslist/',
                replace: function (url, uriEncodedQuery) {
                    var res = url + encodeURIComponent(uriEncodedQuery);
                    return res;
                }
            }
        });

        addressList.initialize();
        var addAddress = $('.typeahead').typeahead(null, {
            name: 'address',
            displayKey: 'StreetAddress',
            source: addressList,
            hint: false,
            highlight: true,
            minLength: 2,
            limit: 1000,
            templates: {
                empty: [
                    '<div class="row">' +
                    '<div class="col-md-16 text-center text-danger">' +
                    '<i class="fa fa-exclamation-triangle "></i> The Postcode is not found!' +
                    '</div>' +
                    '</div>'

                ],
                suggestion: function (data) {
                    if (data.Error) {
                        return '<div><i class="fa fa-info-circle"></i> ' + data.Cause + '</div>'
                    }
                    else
                        return '<div><i class="fa fa-map-marker"></i> ' + data.StreetAddress + ' - ' + data.Place + '</span></div>'
                }
            }
        });

        //get postcode address and checkit into bd
        addAddress.on('typeahead:selected', function (evt, data) {

            if (data.Error) {
                return false;
            }

            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.getaddressdetails')); ?>",
                cache: false,
                data: {id: data.Id, _token: CSRF_TOKEN},
                dataType: "json",
            })
                .done(function (addr) {

                    var completeAddress = addr.Line1 + ' ' + addr.Line2 + ' ' + addr.Line3;

                    $.ajax({
                        method: "POST",
                        url: "<?php echo e(route('bookings.setpostcode')); ?>",
                        cache: false,
                        data: {postcode: addr.Postcode, address: completeAddress},
                        dataType: "json",
                    })
                        .error(function (data) {
                            var response = jQuery.parseJSON(data.responseText);
                            $('#modalInfo').find('.modal-title').text('ERROR');
                            $('#modalInfo').find('.modal-body').html("<h5 class='text-danger'>" + response.message + "</h5>");
                            $('#modalInfo').modal('show');
                        })
                        .done(function (data) {
                            selecttype();
                            load_hours(date);
                            $('#modalInfo').find('.modal-title').text('SUCCESS');
                            $('#modalInfo').find('.modal-body').html("<h5 class='text-success'>" + data.message + "</h5>");
                            $('#modalInfo').modal('show');
                        });
                });
        });

        var reservedTime = "300";

        //date
        if ($("#datepicker").length > 0) {
            <?php if(isset($booking['date'])): ?>
            $("#datepicker").datepicker().datepicker("setDate", new Date('<?php echo e($booking['date']); ?>'));
            var date = $('3datepicker').datepicker('getFormattedDate', "yyyy-mm-dd");
                    <?php else: ?>
            var date = $('#datepicker').datepicker('getFormattedDate', "yyyy-mm-dd");
            <?php endif; ?>
        }
        else {
            var date = '<?php echo e(\Carbon\Carbon::now()->format('Y-m-d')); ?>';
        }

        //select no of therapists
        selecttype();

        // POPOVER FOCAL POINT
        $('[data-toggle="popover"]').popover();


        $(".focalpoint").click(function () {
            $(this).toggleClass('selected');

            var selectedfp = [];
            $(".focalpoint.selected").each(function (i, el) {
                selectedfp.push($(el).attr('focal_point'));
            });

            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.setfocalpoints')); ?>",
                cache: false,
                data: {fp: selectedfp},
                dataType: "json",
            })

        });


        //add to basket
        $("body").on('click', '.checkout-pay, .add-basket', function () {
            var url = $(this).attr('url');
            var toUrl = '<?php echo e(route("bookings.basket.index")); ?>';
            var bigContainer = $('.light-bg');

            $.ajax({
                method: "GET",
                url: url,
                cache: false,
                beforeSend: function () {
                    bigContainer.addClass('blocked');
                }
            })
                .error(function (data) {
                    bigContainer.removeClass('blocked');
                    var response = jQuery.parseJSON(data.responseText);
                    $('#modalInfo').find('.modal-title').text('ERROR');
                    $('#modalInfo').find('.modal-body').html("<h5 class='text-danger'>" + response.message + "</h5>");
                    $('#modalInfo').modal('show');
                })
                .done(function (data) {

                    window.location.href = toUrl;
                });
        });

        // COUNTER
        var clock = $('.clock-01').FlipClock(reservedTime, {
            countdown: true,
            clockFace: 'MinuteCounter',
            autoStart: false,
        });

        var clock2 = $('.clock-02').FlipClock(reservedTime, {
            countdown: true,
            clockFace: 'MinuteCounter',
            autoStart: false,
        });

        // DATE PICKER
        $('#datepicker').datepicker({
            startDate: '+1d',
        });

        displayTherapists();

        // CUSTOM RADIO BUTTONS
        function changeState(el) {
            if (el.readOnly) el.checked = el.readOnly = false;
            else if (!el.checked) el.readOnly = el.indeterminate = true;
        }

        //select massage info:location, duration, massage type
        $("#validpostalcode").click(function () {
            var postalcode = $("#postalcode");
            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.setpostcode')); ?>",
                cache: false,
                data: {postcode: postalcode.val()},
                dataType: "json",
            })
                .error(function (data) {
                    var response = jQuery.parseJSON(data.responseText);
                    $('#modalInfo').find('.modal-title').text('ERROR');
                    $('#modalInfo').find('.modal-body').html("<h5 class='text-danger'>" + response.message + "</h5>");
                    $('#modalInfo').modal('show');
                })
                .done(function (data) {
                    selecttype();
                    load_hours(date);
                    $('#modalInfo').find('.modal-title').text('SUCCESS');
                    $('#modalInfo').find('.modal-body').html("<h5 class='text-success'>" + data.message + "</h5>");
                    $('#modalInfo').modal('show');
                });
        });

        $("#duration").change(function () {
            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.setduration')); ?>",
                cache: false,
                data: {duration: $(this).val()},
                dataType: "json",
            })
                .error(function (data) {
                    var response = jQuery.parseJSON(data.responseText);
                })
                .done(function (data) {
                    load_hours(date);
                });

        });

        $("#massage").change(function () {
            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.setmassage')); ?>",
                cache: false,
                data: {massage: $(this).val()},
                dataType: "json",
            })
                .error(function (data) {
                    var response = jQuery.parseJSON(data.responseText);
                })
                .done(function (data) {
                    load_hours(date);
//            load_therapists();
//            displayTherapists();
                });

        });

        //select an hour
        $("body").on('click', '.selecthour', function () {
            var hour_val = $(this).attr('hour-val');
            var timeline = $('#timeline-hours');
            var timelineHours = timeline.find('.item');
            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.sethour')); ?>",
                cache: false,
                data: {hour: hour_val},
                dataType: "json",
            })
                .error(function (data) {
                    var response = jQuery.parseJSON(data.responseText);
                })
                .done(function (data) {
                    load_therapists();
                    displayTherapists();

                    timelineHours.each(function () {
                        if($(this).hasClass('active-hour'))
                        {
                            $(this).removeClass('active-hour');
                        }
                        if($(this).attr('hour-val') == hour_val)
                        {
                            $(this).addClass('active-hour');
                        }
                    })
                });
        });

        //select an hour
        $("body").on('click', '.selecthour-therapist', function () {

            if ($(this).hasClass('disable-hour')) {
                event.preventDefault(); // Prevent the default action
                // Optionally, you can also stop the event from propagating
                // event.stopPropagation();
                return;
            }
            var hour_val = $(this).attr('hour-val');
            var therapist = $(this).attr('therapist');
            var date = $(this).attr('date');

            var timeline = $('#timeline-therapist-hours');
            var timelineHours = timeline.find('.item_hour');

            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.settherapisthour')); ?>",
                cache: false,
                data: {'thID': therapist,'date': date,'hour': hour_val},
                dataType: "json",
            })
                .error(function (data) {
                    var response = jQuery.parseJSON(data.responseText);
                })
                .done(function (data) {
                    timelineHours.each(function () {
                        if($(this).hasClass('active-hour'))
                        {
                            $(this).removeClass('active-hour');
                        }
                        if($(this).attr('hour-val') == hour_val)
                        {
                            $(this).addClass('active-hour');
                        }
                    })

                    $('#info-therapist').find('#modal-booking-action').html(data.partial_button_book_therapist);
                    $('#info-therapist').find('#modal-booking-action').show('fade');
                });
        });

        //book a therapist
        $("body").on('click', '.book-therapist-now', function () {
                var has_message_table = document.getElementById('has_message_table_'+$(this).attr('therapist')).value;
                console.log(has_message_table);
                // if(has_message_table != 1) {
                //     var confirmed = confirm('Please note: This practitioner does not provide Equipment/Massage Table, you can book with a practitioner that provides Equipment (Please check service provider profile). Alternatively if you do not require Equipment/ Massage Table please continue. ');
                //     // var confirmed = confirm('<span style="font-weight: bold;">Please note:</span> This practitioner does not provide <span style="font-weight: bold;">Equipment/Massage Table,</span> you can book with a practitioner that provides Equipment <span style="font-weight: bold;">(Please check service provider profile).</span> Alternatively if you do not require <span style="font-weight: bold;">Equipment/ Massage Table</span> please continue. ');
                //     if (confirmed) {
                //         // User clicked OK, you can perform additional actions here
                //     } else {
                //         // User clicked Cancel, handle accordingly or do nothing
                //         return;
                //     }
                // }
                // return;
            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.settherapists')); ?>",
                cache: false,
                data: {'thID': $(this).attr('therapist')},
                dataType: "json",
            })
                .error(function (data) {
                    var response = jQuery.parseJSON(data.responseText);
                })
                .done(function (data) {
                    /*
                    date = selectdate();
                    displayTherapists();
                    load_hours(date);
                    */
                    $.ajax({
                        method: "GET",
                        url: "<?php echo e(route('bookings.basket.add')); ?>",
                        cache: false,
                        dataType: "json",
                    })
                        .error(function (data) {
                            var response = jQuery.parseJSON(data.responseText);
                            $('#modalInfo').find('.modal-title').text('ERROR');
                            $('#modalInfo').find('.modal-body').html("<h5 class='text-danger'>" + response.message + "</h5>");
                            $('#modalInfo').modal('show');
                        })
                        .done(function (data) {
                            if(data.message)
                            {
                                console.log(data.message);
                                // $('#modalInfo').find('.modal-title').text('SUCCESS');
                                // $('#modalInfo').find('.modal-body').html("<h5 class='text-success'>" + data.message + "</h5>");
                                // $('#modalInfo').modal('show');

                                setTimeout(
                                    function()
                                    {
                                        var url_checkout ="<?php echo e(route('bookings.basket.checkout')); ?>";
                                        window.location.replace(url_checkout);
                                    }, 2000);
                            }
                        });
                });

        });

        //book a therapist modal
        $("body").on('click', '.book-therapist-now-modal', function () {

            var massageTableStatus = document.getElementById('message_table_status_value').value;
            var isMassageStatus = document.getElementById('is_message_value').value;
            // console.log(massageTableStatus, isMassageStatus);
               if (massageTableStatus == 0) {
                    // var confirmed = confirm('Please note: This practitioner does not provide Equipment/Massage Table, you can book with a practitioner that provides Equipment (Please check service provider profile). Alternatively if you do not require Equipment/ Massage Table please continue. ');
                    // var confirmed = confirm('<span style="font-weight: bold;">Please note:</span> This practitioner does not provide <span style="font-weight: bold;">Equipment/Massage Table,</span> you can book with a practitioner that provides Equipment <span style="font-weight: bold;">(Please check service provider profile).</span> Alternatively if you do not require <span style="font-weight: bold;">Equipment/ Massage Table</span> please continue. ');
                    
            }
            // console.log("booking done");
            // return;
            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.settherapists-modal')); ?>",
                cache: false,
                data: {'thID': $(this).attr('therapist'),'date': $(this).attr('date'),'hour': $(this).attr('hour')},
                dataType: "json",
            })
                .error(function (data) {
                    var response = jQuery.parseJSON(data.responseText);
                })
                .done(function (data) {
                    $.ajax({
                        method: "GET",
                        url: "<?php echo e(route('bookings.basket.add')); ?>",
                        cache: false,
                        dataType: "json",
                    })
                        .error(function (data) {
                            var response = jQuery.parseJSON(data.responseText);
                            $('#info-therapist').modal('hide');
                            $('#modalInfo').find('.modal-title').text('ERROR');
                            $('#modalInfo').find('.modal-body').html("<h5 class='text-danger'>" + response.message + "</h5>");
                            $('#modalInfo').modal('show');
                        })
                        .done(function (data) {
                            if(data.message)
                            {
                                console.log(data.message);
                                // $('#modalInfo').find('.modal-title').text('SUCCESS');
                                // $('#modalInfo').find('.modal-body').html("<h5 class='text-success'>" + data.message + "</h5>");
                                // $('#modalInfo').modal('show');

                                setTimeout(
                                    function()
                                    {
                                        var url_checkout ="<?php echo e(route('bookings.basket.checkout')); ?>";
                                        window.location.replace(url_checkout);
                                    }, 2000);
                            }
                        });
                });

        });

        //view therapist info
        $("body").on('click','.see-therapist-info, .see-availablility', function () {
            var bigContainer = $('.light-bg');
            var thId = $(this).attr('therapist');
            $.ajax({
                method: "POST",
                url: "<?php echo e(route('bookings.view-therapist-info')); ?>",
                cache: false,
                data: {'thID': thId,'availability': $(this).attr('availability')},
                beforeSend: function () {},
                dataType: "json",
            })
                .done(function (data) {
                    bigContainer.removeClass('blocked');
                    $('#info-therapist').find('.modal-body').html("<span><i class='fa fa-spin fa-spinner fa-4x'></i></span>");
                    $('#info-therapist').find('.modal-body').html(data.partial);
                    $('[data-toggle="tooltip"]').tooltip();

                    if(!data.availability)
                    {
                        $('#info-therapist').find('#modal-booking-action').hide();
                    }
                    $('#info-therapist').modal('show');

                    $(".owl-select-date-tab").owlCarousel({
                        autoPlay: false, //Set AutoPlay to 3 seconds
                        navigation: true,
                        pagination: false,
                        itemsCustom: [
                            [0, 3],
                            [450, 3],
                            [600, 3],
                            [700, 4],
                            [1000, 6],
                            [1200, 5],
                            [1400, 5],
                            [1600, 6]
                        ],
                    });
                    load_therapist_hours(data.selected_date,thId);
                });
        });

        $('body').on('click','.pick-a-day-selected-teharpist', function () {
            console.log("here");
            var date = $(this).attr('date');
            var thId = $(this).attr('thId');
            var calendar = $('#selected-teharpist-calendar-dates');
            var calendarDates = calendar.find('.item');

            calendarDates.each(function () {
                if($(this).hasClass('active-item'))
                {
                    $(this).removeClass('active-item');
                }
                if($(this).attr('date') == date)
                {
                    $(this).addClass('active-item');
                }
            })

            load_therapist_hours(date,thId);
        });

        //select a therapist
        $("body").on('click', '.thNo', function () {
            selecttype();
        });
    });

    function selectdate() {
        //date
        if ($("#datepicker-later").length > 0) {
                    <?php /*<?php if(isset($booking['date'])): ?>*/ ?>
                    <?php /*console.log('aici');*/ ?>
                    <?php /*$("#datepicker-later").datepicker().datepicker("setDate", new Date('<?php echo e($booking['date']); ?>'));*/ ?>
                    <?php /*var date = $('#datepicker-later').datepicker('getFormattedDate',"yyyy-mm-dd");*/ ?>
                    <?php /*<?php else: ?>*/ ?>
            var date = $('#datepicker-later').datepicker('getFormattedDate', "yyyy-mm-dd");
            <?php /*<?php endif; ?>*/ ?>

        }
        else {
            var date = '<?php echo e(\Carbon\Carbon::now()->format('Y-m-d')); ?>';
        }

        return date;
    }

    function selecttype() {

        var el = $(".thNo:checked");

        $.ajax({
            method: "POST",
            url: "<?php echo e(route('bookings.settherapistsno')); ?>",
            cache: false,
            data: {'thNo': el.val()},
            dataType: "json",
        })
            .error(function (data) {
                var response = jQuery.parseJSON(data.responseText);
            })
            .done(function (data) {
                load_hours(data.date);
                displayTherapists();
            });
    }

    function displayTherapists() {
        var therapistsnfo = $("#therapists_info");
        $.ajax({
            method: "GET",
            url: "<?php echo e(route('bookings.selectedtherapists')); ?>",
            cache: false,
            beforeSend: function () {
//                therapistsnfo.html("<span><i class='fa fa-spin fa-spinner fa-4x'></i></span>");
            },
            dataType: "html",
        })
            .done(function (data) {
                therapistsnfo.hide(0);
                therapistsnfo.html(data);
                therapistsnfo.fadeIn();
            });
    }

    //load therapist hours
    function load_therapist_hours(date,thId) {
        var hours = $("#therapist-hours");
        console.log("here 2");
        //get hours
        $.ajax({
            method: "POST",
            url: "<?php echo e(route('bookings.gettherapisthours')); ?>",
            data: {'thID': thId,'date': date},
            cache: false,
            beforeSend: function () {
                hours.html("<span><i class='fa fa-spin fa-spinner fa-4x'></i></span>");
            },
            dataType: "html",
        })
            .done(function (data) {
                var data = JSON.parse(data);
                console.log(data.hours_count);
                hours.hide(0);
                if(data.hours_count > 0) {
                    console.log("inside condition");
                    hours.html(data.partial_therapist_hours);
                } else {
                    console.log("inside condition 2");
                    hours.html(data.partial_therapist_hours);
                    $('#info-therapist').find('#modal-booking-action').html('');
                }
                hours.fadeIn();
            });
    }
    //load hours
    function load_hours(date) {
        var hours = $("#hours");

        //set date
        $.ajax({
            method: "POST",
            url: "<?php echo url('booking/setdate'); ?>",
            cache: false,
            data: {date: date}
        })
            .done(function () {
                //get hours
                $.ajax({
                    method: "GET",
                    url: "<?php echo url('booking/gethours'); ?>/" + date,
                    cache: false,
                    beforeSend: function () {
                        hours.html("<span><i class='fa fa-spin fa-spinner fa-4x'></i></span>");
                    },
                    dataType: "html",
                })
                    .done(function (data) {
                        hours.hide(0);
                        hours.html(data);
                        hours.fadeIn();

                        $(".owl-select-hour").owlCarousel({
                            autoPlay: false, //Set AutoPlay to 3 seconds
                            navigation: true,
                            pagination: false,
                            itemsCustom: [
                                [0, 5],
                                [450, 5],
                                [600, 4],
                                [700, 9],
                                [1000, 14],
                                [1200, 15],
                                [1400, 15],
                                [1600, 15]
                            ],
                        });

                        load_therapists();
                        displayTherapists();
                    });
            });


    } //end load hours

    //load therapists
    function load_therapists() {
        var therapists = $("#therapists");
        var maincomponent = $("#maincomponent");
        var loader = $("#loader");
        $.ajax({
            method: "GET",
            url: "<?php echo route('bookings.gettherapists'); ?>",
            cache: false,
            beforeSend: function () {
                // therapists.html("<span><i class='fa fa-spin fa-spinner fa-4x'></i></span>");
                therapists.html("");
                maincomponent.removeClass();
                loader.removeClass();
                maincomponent.addClass("loadertrue");
                loader.addClass("loaderfalse");
                $('.booking-banner-main').css('display', 'none');
            },
            dataType: "html",
        })
            .done(function (data) {
                maincomponent.removeClass("loadertrue");
                loader.removeClass("loaderfalse");
                maincomponent.addClass("loaderfalse");
                loader.addClass("loadertrue");
                var data1 = JSON.parse(data);
                if(data1.count == 0){
                    // $('#background_cover').addClass('cmn_background_cover');
                    // $('#background_page_pd').addClass('cmn_background_page');
                    // console.log($imageURL);
                    // $('#background_cover').css('background-color','#000');
                    // Show the banner by setting display:block
                    $('.booking-banner-main').css('display', 'block');
                } else {
                    // $('#background_cover').removeClass('cmn_background_cover');
                    // $('#background_page_pd').removeClass('cmn_background_page');
                    // Hide the banner by setting display:none
                    $('.booking-banner-main').css('display', 'none');
                }
                therapists.hide(0);
                therapists.html(data1.data);
                therapists.fadeIn();
                $('[data-toggle="tooltip"]').tooltip();
            });

        // $.ajax({
        //     method: "GET",
        //     url: "<?php echo route('bookings.gettherapists'); ?>",
        //     cache: false,
        //     beforeSend: function () {
        //         therapists.html("<span><i class='fa fa-spin fa-spinner fa-4x'></i></span>");
        //     },
        //     dataType: "html",
        // })
        //     .done(function (data) {
        //         console.log(data);
        //         therapists.hide(0);
        //         therapists.html(data);
        //         therapists.fadeIn();
        //         $('[data-toggle="tooltip"]').tooltip();
        //     });
    } //end load therapists
</script>
<?php /*end scripts*/ ?>

<?php /*start custom scripts*/ ?>
<?php echo $__env->yieldContent('custom_scripts'); ?>
<?php /*end custom scripts*/ ?>

<?php /*Page JS*/ ?>
<script type="text/javascript" src="<?php echo e(asset('/themes/frontend_new/assets/js/fontawesome.js')); ?>"></script>
<script type="text/javascript" src="<?php echo e(asset('/themes/frontend_new/assets/plugins/owl.carousel/owl-carousel/owl.carousel.js')); ?>"></script>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.min.js"></script>
<script>
    $(document).ready(function () {

        $(".owl-treatments").owlCarousel({
            autoPlay: 3000, //Set AutoPlay to 3 seconds
            navigation: false,
            pagination: true,
            itemsCustom: [
                [0, 2],
                [450, 2],
                [600, 3],
                [700, 4],
                [1000, 5],
                [1200, 6],
                [1400, 6],
                [1600, 7]
            ],
        });
        $(".owl-select-date").owlCarousel({
            autoPlay: false, //Set AutoPlay to 3 seconds
            navigation: true,
            pagination: false,
            itemsCustom: [
                [0, 4],
                [450, 4],
                [600, 4],
                [700, 10],
                [1000, 14],
                [1200, 14],
                [1400, 14],
                [1600, 14]
            ],
        });
        $(".owl-social").owlCarousel({
            autoPlay: 3000, //Set AutoPlay to 3 seconds
            navigation: false,
            pagination: true,
            itemsCustom: [
                [0, 2],
                [450, 2],
                [600, 3],
                [700, 3],
                [1000, 4],
                [1200, 5],
                [1400, 5],
                [1600, 5]
            ],
        });

        $(".owl-event").owlCarousel({
            autoPlay: 3000, //Set AutoPlay to 3 seconds
            navigation: true,
            pagination: false,
            itemsCustom: [
                [0, 1],
                [450, 1],
                [600, 3],
                [700, 3],
                [1000, 4],
                [1200, 4],
                [1400, 5],
                [1600, 5]
            ],
        });

    });
</script>

</body>
</html>

ZeroDay Forums Mini