Viewing file: 742037eb5b37b9a85cd3b8b5dcb55935b7022c1c.php (53.08 KB) -rwxrwxrwx Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?> <?php echo e(json_decode(get_settings('site_setting'))->name); ?> - <?php echo e(trans('multirestaurant::layout.multi_restaurants_home')); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('css'); ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" />
<style> /* main */ .main-section-top { position: relative; padding: 0px 5%; margin-left: auto; box-sizing: border-box; margin-right: auto; }
.main-section-top .carousel-item img { border-radius: 10px; }
.main-section-top .carousel-inner { box-shadow: 0 0 10px; border-radius: 10px; }
.checkout-list { display: flex; justify-content: center; align-items: center; position: absolute; width: 100%; top: -80px; }
.checkout-list-content { padding: 1rem .75rem !important; width: 75%; background-color: #fff; box-shadow: 0 19px 38px rgba(0, 0, 0, 0.30), 0 15px 12px rgba(0, 0, 0, 0.22); border-radius: 5px; }
.checkout-list-content-links .nav-tabs .nav-link.active { color: #495057; background-color: #fff; border-bottom: 2px solid #000; }
.checkout-list-content-links .nav-tabs .nav-link { color: #000; }
.checkout-list-content-links .nav-tabs .nav-link { border: none; }
.checkout-list-content-links .nav-tabs .nav-link:hover { border-bottom: 2px solid #000; }
.checkout-list-content-links .nav-tabs { border-bottom: 1px solid #dee2e6; gap: 10px; }
.restaurant-content { background-color: transparent !important; border-color: transparent !important; box-shadow: none !important; box-sizing: border-box; margin: 0; padding: 4px 11px 4px; color: rgba(0, 0, 0, 0.88); font-size: 14px; line-height: 1; list-style: none; position: relative; display: inline-flex; align-items: center; background: #ffffff; border: 1px solid #d9d9d9; border-radius: 4px; transition: border 0.2s, box-shadow 0.2s; }
.restaurant-content-section { position: relative; display: inline-flex; align-items: center; width: 100%; gap: 1rem; }
.restaurant-content-section-items { padding: .5rem; padding-left: .25rem; padding-right: .25rem; gap: .25rem; display: flex; align-items: center; flex-direction: row; cursor: pointer; }
.restaurant-content-section-items .icon { width: 1em; height: 1em; overflow: hidden; display: inline-block; text-align: center; color: #401B60; font-size: 25px; }
.restaurant-content-section-items .contents { margin-top: 6px; margin-bottom: 6px; margin-left: .5rem; }
.restaurant-content-section-items .contents span { margin: 0; font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 23px; }
.restaurant-content-section-items .contents p { margin: 0; font-weight: 400; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.restaurant-first-two { display: flex; justify-content: center; align-items: center; gap: 1rem; }
.restaurant-first-two .inputs { font-weight: 400; background-color: #f1f5f9; font-size: 1rem; line-height: 1.4375em; color: rgba(0, 0, 0, 0.87); box-sizing: border-box; position: relative; cursor: text; display: inline-flex; align-items: center; margin-top: .25rem; margin-bottom: .25rem; padding: 10px 20px; border-radius: 5px; }
.restaurant-first-two .inputs .inputs-icon { width: 1em; height: 1em; overflow: hidden; display: inline-block; text-align: center; color: #401B60; font-size: 25px; margin-right: 1rem; }
.restaurant-first-two .inputs input { font: inherit; letter-spacing: inherit; color: currentColor; padding: 4px 0 5px; border: 0; box-sizing: content-box; background: none; height: 1.4375em; margin: 0; display: block; min-width: 0; width: 100%; }
.restaurant-first-two .inputs input::placeholder { color: gray; opacity: 1; transition: color 0.3s ease; }
.restaurant-first-two .inputs input:focus { outline: 0; }
.restaurant-first-two-btn { background-color: #401b60; color: #FFF; padding: 12px 15px; border-radius: 5px; font-size: 22px; outline: none; border: none; z-index: 100; }
.carousel-inner.dragging { cursor: grabbing; }
.my-carousel { padding-top: 200px; }
.owl-carousel-food { position: relative; height: 100%; background-color: #ece8ef; padding: 20px 20px; text-align: center; border-radius: 5px; margin: 10px 0px; }
.owl-carousel-food p { font-weight: 600; margin-bottom: 0; margin-top: 20px; color: #000; }
.owl-carousel-food-img { display: flex; justify-content: center; }
.owl-carousel-food-img img { width: 75px !important; height: 75px !important; }
.my-carousel-harder-title { margin-bottom: 30px; text-align: center; font-weight: 600; }
.owl-theme .owl-controls .owl-page span { width: 8px; height: 8px; }
.restaurants-harder-subtitle { font-size: 13px; display: block; max-width: 24rem; line-height: 20px; margin: 0 auto; margin-top: 20px; }
.popularTown { text-align: end; margin-top: 50px; margin-bottom: 25px; }
.popularTown2 { text-align: start; }
.popularTown h4 { margin: 0; font-weight: 600; font-size: 20px; }
.popularTown p { margin: 0; font-size: 13px; color: #64748b; font-weight: 600; }
.restaurant { padding-top: 6px; padding-bottom: 6px; padding-left: 10px; padding-right: 10px; border-radius: 1rem; border: 2px solid #e2e8f0; position: relative; }
.restaurant img { color: transparent; border-radius: .75rem; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); }
.restaurant-details { padding: .5rem; margin-top: .5rem; padding-left: .75rem; padding-right: .75rem; border: 1px solid #e2e8f0; border-radius: .75rem; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); }
.restaurant-details h6 { font-size: 13px; font-weight: 700; margin: 0; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
a { text-decoration: none; }
a:hover { text-decoration: none; }
.restaurant-location { display: flex; align-items: center; gap: .5rem; font-size: 12px; color: #64748b; }
.restaurant-location span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 200px; }
.restaurant-rate { margin-top: 5px; display: flex; justify-content: space-between; align-content: center; }
.restaurant-rate .stars i { color: #faaf00; font-size: 14px; }
.restaurant-rate .reviews span { font-size: 11px; color: #64748b; }
.works-title { font-weight: 600; text-align: center; font-size: 30px; }
.apps { padding: 2rem; margin-top: 2.75rem; margin-bottom: 1rem; background-color: #e2e8f0; }
.apps-img { display: flex; align-items: center; justify-content: center; }
.apps-img img { width: 250px; height: 350px; }
.apps-details h2 { color: #533270; font-weight: 600; margin: 0; }
.apps-details h4 { color: #533270; font-weight: 600; margin: 0; }
.apps-details p { color: #475569; font-weight: 600; margin: 0; }
.apps-details .instant { font-size: 14px; font-weight: 700; }
.apps-links { display: flex; align-content: center; gap: 1rem; }
.apps-links .btn { padding-top: 10px !important; padding-bottom: 10px !important; padding-right: 50px !important; padding-left: 50px !important; background-color: #0C0950 !important; border-radius: 30px; }
.apps-links a img { width: 100px; height: 50px; }
.location-areas .nav-tabs { gap: 1rem; }
.location-areas .nav-tabs .nav-link { border: none; margin-bottom: 0; font-weight: 600; font-size: 14px; }
.location-areas .nav-tabs .nav-link:hover { border-bottom: 2px solid #401b60; }
.location-areas .nav-tabs .nav-link.active { color: #401b60; border-bottom: 2px solid #401b60; }
.area-shops { padding: 1.5rem; }
.area-shops .links { margin: 0; color: #000; font-weight: 600; font-size: 0.875rem; line-height: 2.57; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-shops .links { color: #000; }
.area-shops .links:hover { color: #401b60; }
.no-data { padding-top: 2.5rem !important; display: flex; justify-content: center; align-items: center; }
.no-data-icon { margin-block: 32px; color: rgba(0, 0, 0, 0.25); margin-inline: 8px; font-size: 14px; line-height: 1.5714285714285714; text-align: center; }
.no-data-icon .icon-box { height: 40px; margin-bottom: 8px; opacity: 1; }
.no-data-icon .icon-box i { font-size: 50px; }
.no-data-icon span { color: rgba(0, 0, 0, 0.25); }
.owl-dots { display: flex; justify-content: center; align-items: center; gap: .5rem; margin-top: 8px; }
.owl-carousel button.owl-dot { background: #6c757d; padding: 3px !important; border-radius: 50px; }
.owl-carousel button.owl-dot.active { background: #495057; padding: 4px !important; }
@media (max-width: 991.98px) { .restaurant-first-one { display: flex; width: 100%; justify-content: center; } }
@media (max-width: 575.98px) { .restaurant-first-one { display: none !important; } .area-shops { padding: 0.5rem; } .checkout-list { position: relative; top: 15px; }
.main-section-top { padding: 0 !important; margin-top: 20px; }
.main-section-top .carousel-item img { min-height: 200px; max-height: 200px; border-radius: 5px; } .main-section-top .carousel { padding: 0 !important; }
.checkout-list-content { width: 100%; }
.apps { padding: 2rem .5rem; }
.my-carousel { padding-top: 100px; } .owl-carousel-food p{ font-size: 12px; } }
.owl-carousel .owl-item .restaurant img { min-height: 150px; max-height: 150px }
p { margin: 0; }
.carosel-item-img { min-height: 400px; max-height: 400px; }
.input-selection { position: absolute; z-index: 99999999999; top: 100%; right: -22%; }
input#customSelect { border: 1px solid #262222; width: 100%; height: 35px; border-radius: 10px; padding: 0px 15px; }
.count-of-people { font-size: 10px !important; font-weight: 400 !important; margin-top: -7px !important; padding: 0px !important; }
.customSelect { font-size: 13px !important; }
.custom-badge { position: absolute; right: 10px; top: 6px; padding: 5px 8px !important; font-size: 9px; padding: 5px 8px !important; border-radius: 0%; border-top-right-radius: 10px; } .badge-primary.custom-badge{ background-color: #007bff !important; } .badge-success.custom-badge{ background-color: #28a745 !important; } </style> <?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?> <main class="main"> <?php $template = json_decode(get_settings('multirestaurant_template')); if(isset($template) && $template && isset($template->banner_bg_image_file_names) && $template->banner_bg_image_file_names){ $banner_bg_images = $template->banner_bg_image_file_names ?? []; }else{ $banner_bg_images = []; } ?> <section class="position-relative"> <div class="main-section-top"> <div id="carouselExampleIndicators" class="carousel slide p-4" data-ride="carousel"> <div class="carousel-inner"> <?php if(isset($banner_bg_images) && !empty($banner_bg_images)): ?> <?php $__currentLoopData = $banner_bg_images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $image): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="carousel-item <?php echo e($index == 0 ? 'active' : ''); ?>"> <img src="<?php echo e(asset('uploads/' . $image)); ?>" class="d-block carosel-item-img" alt="..."> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> </div>
<!-- Carousel controls --> <button class="carousel-control-prev" type="button" data-target="#carouselExampleIndicators" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </button> <button class="carousel-control-next" type="button" data-target="#carouselExampleIndicators" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </button> </div> </div> <div class="position-relative"> <div class="checkout-list"> <div class="checkout-list-content"> <div class="checkout-list-content-links"> <div class="tab-content" id="nav-tabContent"> <div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab"> <div class="mt-2 row align-items-center"> <div class="col-lg-6"> <div class="restaurant-first-one"> <div class="restaurant-content"> <div class="restaurant-content-section"> <div class="restaurant-content-section-items" id="checkin-date"> <div class="icon"> <i class="fa fa-calendar"></i> </div> <div class="contents"> <span><?php echo e(trans('multirestaurant::layout.check_in')); ?></span> <p id="checkin-label"><?php echo e(trans('multirestaurant::layout.pick_date')); ?></p> </div> <input type="text" id="checkin-datepicker" style="position: absolute; visibility: hidden;" /> </div> <div class="restaurant-content-section-items" id="checkin-time"> <div class="icon"> <i class="fa fa-clock-o"></i> </div> <div class="contents"> <span><?php echo e(trans('multirestaurant::layout.time')); ?></span> <p id="checkin-time-label"><?php echo e(trans('multirestaurant::layout.pick_time')); ?></p> </div> <input type="text" id="checkin-timepicker" style="position: absolute; visibility: hidden;" /> </div> <div class="restaurant-content-section-items" id="guestInputSection"> <div class="icon"> <i class="fa fa-user-circle"></i> </div> <div class="contents"> <span><?php echo e(trans('multirestaurant::layout.guest')); ?></span> <div class="count-of-people"> <span class="count-of-people" id="selected_guest_count"></span> <?php echo e(trans('multirestaurant::layout.people')); ?></div> <div class="input-selection d-none"> <select name="customSelect" class="form-control customSelect" id="customSelect"> <option value="" disabled selected>Select number of guests</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="15">15</option> <option value="20">20</option> <option value="25">25</option> <option value="50">50</option> </select> </div>
</div> </div>
</div> </div> </div> </div> <div class="col-lg-6"> <div class="restaurant-first-two"> <div class="inputs"> <span class="inputs-icon"> <i class="fa fa-cutlery"></i> </span> <input type="text" id="dynamicInput"> </div> <button class="restaurant-first-two-btn" id="restaurant-find-btn"> <i class="fa fa-search"></i> </button> </div> </div> </div> </div> </div> </div> </div> </div> </div> </section> <section class="my-carousel"> <h3 class="my-carousel-harder-title"><?php echo e(trans('multirestaurant::layout.cuisines')); ?></h3> <div id="my-carousel" class="owl-carousel"> <?php $__currentLoopData = $categorys; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="pl-2 pr-2"> <a href="<?php echo e(route('multirestaurant::restaurants', ['categories' => $category->id])); ?>"> <div class="owl-carousel-food"> <div class="owl-carousel-food-img"> <img src="<?php echo e(asset('uploads/' . $category->image)); ?>" alt=""> </div> <p><?php echo e($category->name); ?></p> </div> </a> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </section> <section class="mt-5"> <div class=""> <h3 class="my-carousel-harder-title mb-0"><?php echo e(trans('multirestaurant::layout.restaurants')); ?></h3> <p class="restaurants-harder-subtitle text-center"><?php echo e(trans('multirestaurant::layout.restaurants_details')); ?></p> </div> <div class="popularTown popularTown2"> <h4><?php echo e(trans('multirestaurant::layout.featured_restaurant')); ?></h4> </div> <div id="my-carousel4" class="owl-carousel"> <?php $__currentLoopData = $featured_restaurants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $restaurant): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="pr-2 pl-2"> <a href="<?php echo e(route('multirestaurant::restaurant', $restaurant->id)); ?>"> <div class="restaurant"> <span class="badge badge-primary custom-badge">Featured</span> <img src="<?php echo e(asset('uploads/' . $restaurant->profile_image)); ?>" alt=""> <div class="restaurant-details"> <h6><?php echo e($restaurant->name); ?></h6> <div class="restaurant-location"> <i class="fa fa-map-marker"></i> <span> <?php echo e($restaurant->location); ?>
</span> </div> <div class="restaurant-location"> <b><?php echo e($restaurant->currency_symbol); ?></b> <span> <?php echo $restaurant->description; ?>
</span> </div> <div class="restaurant-rate"> <?php $reviews = $restaurant->reviews; $totalRating = $reviews->sum('rating'); $averageRating = $reviews->count() > 0 ? $totalRating / $reviews->count() : 0;
$fullStars = floor($averageRating); $halfStar = ($averageRating - $fullStars) > 0 ? 1 : 0; $emptyStars = 5 - $fullStars - $halfStar;
$starsHtml = '';
for ($i = 0; $i < $fullStars; $i++) { $starsHtml .='<i class="fa fa-star" ></i>' ; } if ($halfStar) { $starsHtml .='<i class="fa fa-star-half-o" ></i>' ; } for ($i=0; $i < $emptyStars; $i++) { $starsHtml .='<i class="fa fa-star-o" ></i>' ; } ?> <div class="stars"> <?php echo $starsHtml; ?>
</div> <div class="reviews"> <span> <?php echo e($reviews->count()); ?> <?php echo e(trans('multirestaurant::layout.reviews')); ?>
</span> </div> </div> </div> </div> </a> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </section> <section class="mt-5" id="popularTown"> <div class="popularTown"> <h4><?php echo e(trans('multirestaurant::layout.popular_in_town')); ?></h4> </div> <div id="my-carousel2" class="owl-carousel">
</div> </section> <section class="mt-5"> <div class="popularTown popularTown2"> <h4><?php echo e(trans('multirestaurant::layout.new_reserveit')); ?></h4> <p><?php echo e(trans('multirestaurant::layout.explore_new_reserveit')); ?></p> </div> <div id="my-carousel3" class="owl-carousel"> <?php $__currentLoopData = $restaurants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $restaurant): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="pr-2 pl-2"> <a href="<?php echo e(route('multirestaurant::restaurant', $restaurant->id)); ?>"> <div class="restaurant"> <span class="badge badge-danger custom-badge">New</span> <img src="<?php echo e(asset('uploads/' . $restaurant->profile_image)); ?>" alt=""> <div class="restaurant-details"> <h6><?php echo e($restaurant->name); ?></h6> <div class="restaurant-location"> <i class="fa fa-map-marker"></i> <span> <?php echo e($restaurant->location); ?>
</span> </div> <div class="restaurant-location"> <b><?php echo e($restaurant->currency_symbol); ?></b> <span> <?php echo $restaurant->description; ?>
</span> </div> <div class="restaurant-rate"> <?php $reviews = $restaurant->reviews; $totalRating = $reviews->sum('rating'); $averageRating = $reviews->count() > 0 ? $totalRating / $reviews->count() : 0;
$fullStars = floor($averageRating); $halfStar = ($averageRating - $fullStars) > 0 ? 1 : 0; $emptyStars = 5 - $fullStars - $halfStar;
$starsHtml = '';
for ($i = 0; $i < $fullStars; $i++) { $starsHtml .='<i class="fa fa-star" ></i>' ; } if ($halfStar) { $starsHtml .='<i class="fa fa-star-half-o" ></i>' ; } for ($i=0; $i < $emptyStars; $i++) { $starsHtml .='<i class="fa fa-star-o" ></i>' ; } ?> <div class="stars"> <?php echo $starsHtml; ?>
</div> <div class="reviews"> <span> <?php echo e($reviews->count()); ?> <?php echo e(trans('multirestaurant::layout.reviews')); ?>
</span> </div> </div> </div> </div> </a> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </div> </section> <section class="mt-5"> <h4 class="works-title"><?php echo e(trans('multirestaurant::layout.how_works')); ?></h4> <img src="https://www.reserveitbd.com/howitworks.svg" alt=""> <div class="apps row align-items-center justify-content-center"> <div class="col-lg-4 col-md-4 col-12"> <div class="apps-img"> <img src="<?php echo e(isset($template->section_mobile_image) ? asset('uploads/' . $template->section_mobile_image) : asset('images/no-image.png')); ?>" alt="Section Image"> </div> </div> <div class="col-lg-7 col-md-7 col-12 apps-details"> <h2><?php echo e($template->section_mobile_title ?? ''); ?> </h2> <p class="mt-3"><?php echo e($template->section_mobile_sub_title ?? ''); ?></p> <div class="instant mt-4"> <?php echo e($template->section_mobile_description ?? ''); ?>
</div> <div class="apps-links mt-4"> <a class="btn btn-info" href="<?php echo e(route('login',['type'=>request()->get('type','customer')])); ?>">Get Started</a> </div> </div> </div> <div class="location-areas mt-5"> <h4 class="works-title">Locations</h4> <div class="mt-4" id="locations">
</div> </div> </section> </main> <?php $__env->stopSection(); ?> <?php $__env->startSection('js'); ?> <script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script>
<script> $(document).on('click', '#cash_on_delivery_btn', (e) => { e.preventDefault(); const order_type_cash_on_delivery = $('#cash_on_delivery_btn').attr('order-type'); const lat = $('#lat').val(); const long = $('#long').val(); if (lat || long) { $('#error').addClass('d-none'); const address = $('#address').val(); $('#modal-input-order-type').val(order_type_cash_on_delivery) $('#modal-input').val(address) $('#input_lat').val(lat) $('#input_long').val(long) let html_location_map = `<iframe width="100%" height="380px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=${address}&layer=tc&t=m&z=18&source=embed&output=svembed"></iframe>` $('#locationMap').html(html_location_map) $(".location-modal").toggle(); } else { <?php if(env('APP_DEMO')): ?> $("#error").html('This option is not available in the demo version'); <?php else: ?> $("#error").html('select a location address form the list'); <?php endif; ?> } });
$(document).on('click', '#takeaway_btn', (e) => { e.preventDefault(); const order_type_takeaway = $('#takeaway_btn').attr('order-type'); const lat = $('#lat').val(); const long = $('#long').val(); if (lat || long) { $('#error').addClass('d-none'); const address = $('#address').val(); $('#modal-input-order-type').val(order_type_takeaway) $('#modal-input').val(address) $('#input_lat').val(lat) $('#input_long').val(long) let html_location_map = `<iframe width="100%" height="380px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=${address}&layer=tc&t=m&z=18&source=embed&output=svembed"></iframe>` $('#locationMap').html(html_location_map) $(".location-modal").toggle(); } else { <?php if(env('APP_DEMO')): ?> $("#error").html('This option is not available in the demo version'); <?php else: ?> $("#error").html('select a location address form the list'); <?php endif; ?>
} });
$(document).on('click', '#table_booking_btn', (e) => { e.preventDefault(); $('.city-par').addClass('d-none'); const order_type_table_booking = $('#table_booking_btn').attr('order-type'); const lat = $('#lat').val(); const long = $('#long').val(); if (lat || long) { $('#error').addClass('d-none'); const address = $('#address').val(); $('#modal-input-order-type').val(order_type_table_booking) $('#modal-input').val(address) $('#input_lat').val(lat) $('#input_long').val(long) let html_location_map = `<iframe width="100%" height="380px" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=${address}&layer=tc&t=m&z=18&source=embed&output=svembed"></iframe>` $('#locationMap').html(html_location_map) $(".location-modal").toggle(); } else { <?php if(env('APP_DEMO')): ?> $("#error").html('This option is not available in the demo version'); <?php else: ?> $("#error").html('select a location address form the list'); <?php endif; ?> }
}); $(document).on('click', '.locationClose', (e) => { e.preventDefault(); $(".location-modal").toggle(); location.reload(); }); <?php if(!env('APP_DEMO')): ?> $(document).on('keyup or past', '#pac-input', function(e) { e.preventDefault(); const cityname = $(this).val(); const key = $('#api_key').val(); if (key) { const search_string = "https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurants+in+" + cityname + "&sensor=false&key=" + key + ""; $.ajax({ url: search_string }).done(function(data) { $('.city-par').removeClass('d-none'); let html_city = ''; $.each(data['results'], function(index, value) { html_city += `<li class="p-1 locationCity" data-lat="${value.geometry.location.lat}" data-long="${value.geometry.location.lng}" data-address="${value.formatted_address}"> ${value.formatted_address}</li>`
}); $("#showCity").html(html_city); }); }
}); <?php endif; ?> $(document).on('click', '.locationCity', function(e) { e.preventDefault(); const lat = $(this).attr('data-lat'); const long = $(this).attr('data-long'); const address = $(this).attr('data-address'); $('#lat').val(lat) $('#long').val(long) $('#address').val(address) $('#pac-input').val(address) $('.city-par').addClass('d-none'); }); </script> <script> $(document).ready(function() { $("#my-carousel").owlCarousel({ items: 1, loop: true, autoplay: true, autoplayTimeout: 3000, dots: true, responsive: { 0: { items: 2 }, 600: { items: 5 }, 1000: { items: 6 } } }); $("#my-carousel2").owlCarousel({ items: 1, loop: true, autoplay: true, autoplayTimeout: 3000, dots: true, responsive: { 0: { items: 1 }, 600: { items: 3 }, 1000: { items: 5 } } }); $("#my-carousel3").owlCarousel({ items: 1, loop: true, autoplay: true, autoplayTimeout: 3000, dots: true, responsive: { 0: { items: 1 }, 600: { items: 3 }, 1000: { items: 5 } } }); $("#my-carousel4").owlCarousel({ items: 1, loop: true, autoplay: true, autoplayTimeout: 3000, dots: true, responsive: { 0: { items: 1 }, 600: { items: 3 }, 1000: { items: 5 } } }); }); </script> <script> const input = document.getElementById('dynamicInput');
const messages = [ "Name", "Area", "Cuisine", ];
let msgIndex = 0; let charIndex = 0; let isDeleting = false; const prefix = "Restaurant ";
function typeEffect() { const currentWord = messages[msgIndex]; const fullText = prefix + currentWord; const currentPlaceholder = prefix + currentWord.substring(0, charIndex);
input.placeholder = currentPlaceholder;
if (!isDeleting) { if (charIndex < currentWord.length) { charIndex++; setTimeout(typeEffect, 200); } else { setTimeout(() => { isDeleting = true; typeEffect(); }, 3000); } } else { if (charIndex > 0) { charIndex--; setTimeout(typeEffect, 150); } else { isDeleting = false; msgIndex = (msgIndex + 1) % messages.length; setTimeout(typeEffect, 500); } } }
typeEffect(); </script> <script> $(document).ready(function() { var requestUrl = "https://ipinfo.io/json";
$.ajax({ url: requestUrl, type: 'GET', success: function(json) {
$.ajax({ url: '<?php echo e(route('multirestaurant::get.by.restaurants')); ?>', method: "GET", data: { country: json.country, city: json.city, }, success: function(res) { if (res.state && Array.isArray(res.state)) { let $navTabs = $('<div class="nav nav-tabs" id="nav-tab" role="tablist"></div>'); let $tabContent = $('<div class="tab-content" id="nav-tabContent"></div>'); let uniqueStates = [...new Set(res.state)]; uniqueStates.forEach(function(state, index) { let stateId = state.toLowerCase().replace(/\s+/g, '-'); let $button = $(` <button class="nav-link ${index === 0 ? 'active' : ''}" id="nav-${stateId}-tab" data-toggle="tab" data-target="#nav-${stateId}" type="button" role="tab" aria-controls="nav-${stateId}" aria-selected="${index === 0}"> ${state} </button> `);
let filteredRestaurants = res.country_res.filter(function(restaurant) { return restaurant.state === state; });
let $paneContent = filteredRestaurants.map(function(restaurant) { let location = restaurant.location; let link = "<?php echo e(route('multirestaurant::restaurants', ['location' => '__location__'])); ?>"; link = link.replace('__location__', location); return ` <div class="col-lg-3 col-md-4 col-12"> <a href="${link}" class="links">${location}</a> </div> `; }).join('');
let $pane = $(` <div class="tab-pane fade ${index === 0 ? 'show active' : ''}" id="nav-${stateId}" role="tabpanel" aria-labelledby="nav-${stateId}-tab"> <div> <div class="area-shops row"> ${$paneContent} </div> </div> </div> `);
$navTabs.append($button); $tabContent.append($pane); });
$('#locations').empty().append( $('<nav></nav>').append($navTabs), $tabContent ); }
if (res.data && Array.isArray(res.data)) { var baseUrl = "<?php echo e(route('multirestaurant::restaurant', ['id' => '__ID__'])); ?>"; var restaurantsHtml = ''; res.data.forEach(function(restaurant) { var restaurantUrl = baseUrl.replace('__ID__', restaurant.id);
var totalRating = 0; var reviews = restaurant.reviews || []; reviews.forEach(function(review) { totalRating += review.rating; }); var averageRating = reviews.length ? totalRating / reviews.length : 0; var fullStars = Math.floor(averageRating); var halfStar = (averageRating - fullStars) > 0 ? 1 : 0; var emptyStars = 5 - fullStars - halfStar;
var starsHtml = ''; for (var i = 0; i < fullStars; i++) { starsHtml += '<i class="fa fa-star" ></i>'; } if (halfStar) { starsHtml += '<i class="fa fa-star-half-o" ></i>'; } for (var i = 0; i < emptyStars; i++) { starsHtml += '<i class="fa fa-star-o" ></i>'; }
restaurantsHtml += ` <div class="pr-2 pl-2"> <a href="${restaurantUrl}"> <div class="restaurant"> <span class="badge badge-success custom-badge">Popular</span> <img src="<?php echo e(asset('uploads')); ?>/${restaurant.profile_image}" alt=""> <div class="restaurant-details"> <h6>${restaurant.name}</h6> <div class="restaurant-location"> <i class="fa fa-map-marker"></i> <span>${restaurant.location}</span> </div> <div class="restaurant-location"> <b>${restaurant.currency_symbol}</b> <span>${restaurant.description}</span> </div> <div class="restaurant-rate"> <div class="stars"> ${starsHtml} </div> <div class="reviews"> <span>${reviews.length} Reviews</span> </div> </div> </div> </div> </a> </div> `; });
var $carousel = $('#my-carousel2'); $carousel.trigger('destroy.owl.carousel'); $carousel.html(restaurantsHtml);
$carousel.owlCarousel({ items: 1, loop: true, autoplay: true, autoplayTimeout: 3000, dots: true, responsive: { 0: { items: 1 }, 600: { items: 3 }, 1000: { items: 5 } } }); } }, error: function(err) { console.error('Error fetching restaurants:', err); } });
}, error: function(err) { console.log("Location request failed: ", err); } }); }); </script> <script> $(document).ready(function () { $("#checkin-datepicker").datepicker({ dateFormat: "D, M d yy", minDate: 0, // Prevent past date selection onSelect: function (dateText) { $("#checkin-label").text(dateText); } });
$("#checkin-date").on("click", function () { $("#checkin-datepicker").datepicker("show"); });
$("#checkin-timepicker").timepicker({ timeFormat: 'h:mm TT', onSelect: function (timeText) { $("#checkin-time-label").text(timeText); } });
$("#checkin-time").on("click", function () { $("#checkin-timepicker").timepicker("show"); });
$('#restaurant-find-btn').on("click",function(){ let date = $('#checkin-datepicker').val(); let time = $('#checkin-timepicker').val(); let name = $('#dynamicInput').val();
let url = `/multirestaurant/restaurants?name=${name}&date=${date}&time=${time}`; window.location.href = url; }); }); </script>
<script> let selectedGuest = ''; $(document).ready(function () { $("#guestInputSection").click(function (e) { e.stopPropagation(); $(".input-selection").removeClass("d-none"); selectedGuest = $("#customSelect").val(); console.log(selectedGuest,'okkkkk'); $("#selected_guest_count").text(selectedGuest); });
$(document).click(function (e) { if (!$(e.target).closest('#guestInputSection, .input-selection').length) { $(".input-selection").addClass("d-none"); } }); });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('multirestaurant::layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/test.qr.picotech.app/public_html/Modules/MultiRestaurant/Resources/views/index.blade.php ENDPATH**/ ?>
|