You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					554 lines
				
				20 KiB
			
		
		
			
		
	
	
					554 lines
				
				20 KiB
			| 
								 
											2 years ago
										 
									 | 
							
								<!DOCTYPE html>
							 | 
						||
| 
								 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								    if (env('APP_MODE') == 'demo') {
							 | 
						||
| 
								 | 
							
								        $site_direction = session()->get('site_direction_vendor');
							 | 
						||
| 
								 | 
							
								    }else{
							 | 
						||
| 
								 | 
							
								        $site_direction = session()->has('vendor_site_direction')?session()->get('vendor_site_direction'):'ltr';
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								?>
							 | 
						||
| 
								 | 
							
								<html dir="{{ $site_direction }}" lang="{{ str_replace('_', '-', app()->getLocale()) }}"  class="{{ $site_direction === 'rtl'?'active':'' }}"><head>
							 | 
						||
| 
								 | 
							
								    <meta charset="utf-8">
							 | 
						||
| 
								 | 
							
								    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
							 | 
						||
| 
								 | 
							
								    <!-- Title -->
							 | 
						||
| 
								 | 
							
								    <title>@yield('title')</title>
							 | 
						||
| 
								 | 
							
								    <!-- Favicon -->
							 | 
						||
| 
								 | 
							
								    @php($logo=\App\Models\BusinessSetting::where(['key'=>'icon'])->first()->value)
							 | 
						||
| 
								 | 
							
								    <link rel="shortcut icon" href="">
							 | 
						||
| 
								 | 
							
								    <link rel="icon" type="image/x-icon" href="{{asset('storage/app/public/business/'.$logo??'')}}">
							 | 
						||
| 
								 | 
							
								    <!-- Font -->
							 | 
						||
| 
								 | 
							
								    <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">
							 | 
						||
| 
								 | 
							
								    <!-- CSS Implementing Plugins -->
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="{{asset('public/assets/admin')}}/css/vendor.min.css">
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="{{asset('public/assets/admin')}}/vendor/icon-set/style.css">
							 | 
						||
| 
								 | 
							
								    <!-- CSS Front Template -->
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="{{ asset('public/assets/admin') }}/css/bootstrap.min.css">
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="{{ asset('public/assets/admin') }}/css/theme.minc619.css?v=1.0">
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="{{ asset('public/assets/admin') }}/css/style.css">
							 | 
						||
| 
								 | 
							
								    <!-- Provider Panel Update CSS -->
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="{{asset('public/assets/admin')}}/css/vendor.css">
							 | 
						||
| 
								 | 
							
								    @stack('css_or_js')
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <script src="{{asset('public/assets/admin')}}/vendor/hs-navbar-vertical-aside/hs-navbar-vertical-aside-mini-cache.js"></script>
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="{{asset('public/assets/admin')}}/css/toastr.css">
							 | 
						||
| 
								 | 
							
								</head>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<body class="footer-offset">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    @if (env('APP_MODE')=='demo')
							 | 
						||
| 
								 | 
							
								    <div class="direction-toggle">
							 | 
						||
| 
								 | 
							
								        <i class="tio-settings"></i>
							 | 
						||
| 
								 | 
							
								        <span></span>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								    @endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <div class="pre--loader">
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								{{--loader--}}
							 | 
						||
| 
								 | 
							
								<div class="container">
							 | 
						||
| 
								 | 
							
								    <div class="row">
							 | 
						||
| 
								 | 
							
								        <div class="col-md-12">
							 | 
						||
| 
								 | 
							
								            <div id="loading" class="initial-hidden">
							 | 
						||
| 
								 | 
							
								                <div class="loading--1">
							 | 
						||
| 
								 | 
							
								                    <img width="200" src="{{asset('public/assets/admin/img/loader.gif')}}">
							 | 
						||
| 
								 | 
							
								                </div>
							 | 
						||
| 
								 | 
							
								            </div>
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								{{--loader--}}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<!-- Builder -->
							 | 
						||
| 
								 | 
							
								@include('layouts.vendor.partials._front-settings')
							 | 
						||
| 
								 | 
							
								<!-- End Builder -->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<!-- JS Preview mode only -->
							 | 
						||
| 
								 | 
							
								@include('layouts.vendor.partials._header')
							 | 
						||
| 
								 | 
							
								@include('layouts.vendor.partials._sidebar')
							 | 
						||
| 
								 | 
							
								<!-- END ONLY DEV -->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<main id="content" role="main" class="main pointer-event">
							 | 
						||
| 
								 | 
							
								    <!-- Content -->
							 | 
						||
| 
								 | 
							
								@yield('content')
							 | 
						||
| 
								 | 
							
								<!-- End Content -->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <!-- Footer -->
							 | 
						||
| 
								 | 
							
								@include('layouts.vendor.partials._footer')
							 | 
						||
| 
								 | 
							
								<!-- End Footer -->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <div class="modal fade" id="popup-modal">
							 | 
						||
| 
								 | 
							
								        <div class="modal-dialog modal-dialog-centered" role="document">
							 | 
						||
| 
								 | 
							
								            <div class="modal-content">
							 | 
						||
| 
								 | 
							
								                <div class="modal-body">
							 | 
						||
| 
								 | 
							
								                    <div class="row">
							 | 
						||
| 
								 | 
							
								                        <div class="col-12">
							 | 
						||
| 
								 | 
							
								                            <center>
							 | 
						||
| 
								 | 
							
								                                <h2 class="color-8a8a8a">
							 | 
						||
| 
								 | 
							
								                                    <i class="tio-shopping-cart-outlined"></i> {{translate('messages.You have new order, Check Please.')}}
							 | 
						||
| 
								 | 
							
								                                </h2>
							 | 
						||
| 
								 | 
							
								                                <hr>
							 | 
						||
| 
								 | 
							
								                                <button onclick="check_order()" class="btn btn-primary">{{translate('messages.Ok, let me check')}}</button>
							 | 
						||
| 
								 | 
							
								                            </center>
							 | 
						||
| 
								 | 
							
								                        </div>
							 | 
						||
| 
								 | 
							
								                    </div>
							 | 
						||
| 
								 | 
							
								                </div>
							 | 
						||
| 
								 | 
							
								            </div>
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								    <div class="modal fade" id="popup-modal-msg">
							 | 
						||
| 
								 | 
							
								        <div class="modal-dialog modal-dialog-centered" role="document">
							 | 
						||
| 
								 | 
							
								            <div class="modal-content">
							 | 
						||
| 
								 | 
							
								                <div class="modal-body">
							 | 
						||
| 
								 | 
							
								                    <div class="row">
							 | 
						||
| 
								 | 
							
								                        <div class="col-12">
							 | 
						||
| 
								 | 
							
								                            <center>
							 | 
						||
| 
								 | 
							
								                                <h2 class="8a8a8a">
							 | 
						||
| 
								 | 
							
								                                    <i class="tio-messages"></i> {{translate('messages.message_description')}}
							 | 
						||
| 
								 | 
							
								                                </h2>
							 | 
						||
| 
								 | 
							
								                                <hr>
							 | 
						||
| 
								 | 
							
								                                <button onclick="check_message()" class="btn btn-primary">{{translate('messages.Ok, let me check')}}</button>
							 | 
						||
| 
								 | 
							
								                            </center>
							 | 
						||
| 
								 | 
							
								                        </div>
							 | 
						||
| 
								 | 
							
								                    </div>
							 | 
						||
| 
								 | 
							
								                </div>
							 | 
						||
| 
								 | 
							
								            </div>
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								</main>
							 | 
						||
| 
								 | 
							
								<!-- ========== END MAIN CONTENT ========== -->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<!-- ========== END SECONDARY CONTENTS ========== -->
							 | 
						||
| 
								 | 
							
								<script src="{{asset('public/assets/admin')}}/js/custom.js"></script>
							 | 
						||
| 
								 | 
							
								<!-- The core Firebase JS SDK is always required and must be listed first -->
							 | 
						||
| 
								 | 
							
								<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
							 | 
						||
| 
								 | 
							
								<script src="https://www.gstatic.com/firebasejs/8.3.2/firebase.js"></script>
							 | 
						||
| 
								 | 
							
								<!-- JS Implementing Plugins -->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								@stack('script')
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<!-- JS Front -->
							 | 
						||
| 
								 | 
							
								<script src="{{asset('public/assets/admin')}}/js/vendor.min.js"></script>
							 | 
						||
| 
								 | 
							
								<script src="{{asset('public/assets/admin')}}/js/theme.min.js"></script>
							 | 
						||
| 
								 | 
							
								<script src="{{asset('public/assets/admin')}}/js/sweet_alert.js"></script>
							 | 
						||
| 
								 | 
							
								<script src="{{asset('public/assets/admin')}}/js/toastr.js"></script>
							 | 
						||
| 
								 | 
							
								{!! Toastr::message() !!}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								@if ($errors->any())
							 | 
						||
| 
								 | 
							
								    <script>
							 | 
						||
| 
								 | 
							
								        @foreach($errors->all() as $error)
							 | 
						||
| 
								 | 
							
								        toastr.error('{{translate($error)}}', Error, {
							 | 
						||
| 
								 | 
							
								            CloseButton: true,
							 | 
						||
| 
								 | 
							
								            ProgressBar: true
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								        @endforeach
							 | 
						||
| 
								 | 
							
								    </script>
							 | 
						||
| 
								 | 
							
								@endif
							 | 
						||
| 
								 | 
							
								<!-- JS Plugins Init. -->
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    $(document).on('ready', function(){
							 | 
						||
| 
								 | 
							
								        $(".direction-toggle").on("click", function () {
							 | 
						||
| 
								 | 
							
								            if($('html').hasClass('active')){
							 | 
						||
| 
								 | 
							
								                $('html').removeClass('active')
							 | 
						||
| 
								 | 
							
								                setDirection(1);
							 | 
						||
| 
								 | 
							
								            }else {
							 | 
						||
| 
								 | 
							
								                setDirection(0);
							 | 
						||
| 
								 | 
							
								                $('html').addClass('active')
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								        if ($('html').attr('dir') == "rtl") {
							 | 
						||
| 
								 | 
							
								            $(".direction-toggle").find('span').text('Toggle LTR')
							 | 
						||
| 
								 | 
							
								        } else {
							 | 
						||
| 
								 | 
							
								            $(".direction-toggle").find('span').text('Toggle RTL')
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        function setDirection(status) {
							 | 
						||
| 
								 | 
							
								            if (status == 1) {
							 | 
						||
| 
								 | 
							
								                $("html").attr('dir', 'ltr');
							 | 
						||
| 
								 | 
							
								                $(".direction-toggle").find('span').text('Toggle RTL')
							 | 
						||
| 
								 | 
							
								            } else {
							 | 
						||
| 
								 | 
							
								                $("html").attr('dir', 'rtl');
							 | 
						||
| 
								 | 
							
								                $(".direction-toggle").find('span').text('Toggle LTR')
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								            $.get({
							 | 
						||
| 
								 | 
							
								                    url: '{{ route('vendor.business-settings.site_direction_vendor') }}',
							 | 
						||
| 
								 | 
							
								                    dataType: 'json',
							 | 
						||
| 
								 | 
							
								                    data: {
							 | 
						||
| 
								 | 
							
								                        status: status,
							 | 
						||
| 
								 | 
							
								                    },
							 | 
						||
| 
								 | 
							
								                    success: function() {
							 | 
						||
| 
								 | 
							
								                        alert(ok);
							 | 
						||
| 
								 | 
							
								                    },
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                });
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								    $(document).on('ready', function () {
							 | 
						||
| 
								 | 
							
								        // ONLY DEV
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        if (window.localStorage.getItem('hs-builder-popover') === null) {
							 | 
						||
| 
								 | 
							
								            $('#builderPopover').popover('show')
							 | 
						||
| 
								 | 
							
								                .on('shown.bs.popover', function () {
							 | 
						||
| 
								 | 
							
								                    $('.popover').last().addClass('popover-dark')
							 | 
						||
| 
								 | 
							
								                });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            $(document).on('click', '#closeBuilderPopover', function () {
							 | 
						||
| 
								 | 
							
								                window.localStorage.setItem('hs-builder-popover', true);
							 | 
						||
| 
								 | 
							
								                $('#builderPopover').popover('dispose');
							 | 
						||
| 
								 | 
							
								            });
							 | 
						||
| 
								 | 
							
								        } else {
							 | 
						||
| 
								 | 
							
								            $('#builderPopover').on('show.bs.popover', function () {
							 | 
						||
| 
								 | 
							
								                return false
							 | 
						||
| 
								 | 
							
								            });
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        // END ONLY DEV
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // BUILDER TOGGLE INVOKER
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        $('.js-navbar-vertical-aside-toggle-invoker').click(function () {
							 | 
						||
| 
								 | 
							
								            $('.js-navbar-vertical-aside-toggle-invoker i').tooltip('hide');
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // INITIALIZATION OF MEGA MENU
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        // var megaMenu = new HSMegaMenu($('.js-mega-menu'), {
							 | 
						||
| 
								 | 
							
								        //     desktop: {
							 | 
						||
| 
								 | 
							
								        //         position: 'left'
							 | 
						||
| 
								 | 
							
								        //     }
							 | 
						||
| 
								 | 
							
								        // }).init();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // INITIALIZATION OF NAVBAR VERTICAL NAVIGATION
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        var sidebar = $('.js-navbar-vertical-aside').hsSideNav();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // INITIALIZATION OF TOOLTIP IN NAVBAR VERTICAL MENU
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        $('.js-nav-tooltip-link').tooltip({boundary: 'window'})
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        $(".js-nav-tooltip-link").on("show.bs.tooltip", function (e) {
							 | 
						||
| 
								 | 
							
								            if (!$("body").hasClass("navbar-vertical-aside-mini-mode")) {
							 | 
						||
| 
								 | 
							
								                return false;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // INITIALIZATION OF UNFOLD
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        $('.js-hs-unfold-invoker').each(function () {
							 | 
						||
| 
								 | 
							
								            var unfold = new HSUnfold($(this)).init();
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // INITIALIZATION OF FORM SEARCH
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        $('.js-form-search').each(function () {
							 | 
						||
| 
								 | 
							
								            new HSFormSearch($(this)).init()
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // INITIALIZATION OF SELECT2
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        $('.js-select2-custom').each(function () {
							 | 
						||
| 
								 | 
							
								            var select2 = $.HSCore.components.HSSelect2.init($(this));
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // INITIALIZATION OF DATERANGEPICKER
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        $('.js-daterangepicker').daterangepicker();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        $('.js-daterangepicker-times').daterangepicker({
							 | 
						||
| 
								 | 
							
								            timePicker: true,
							 | 
						||
| 
								 | 
							
								            startDate: moment().startOf('hour'),
							 | 
						||
| 
								 | 
							
								            endDate: moment().startOf('hour').add(32, 'hour'),
							 | 
						||
| 
								 | 
							
								            locale: {
							 | 
						||
| 
								 | 
							
								                format: 'M/DD hh:mm A'
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        var start = moment();
							 | 
						||
| 
								 | 
							
								        var end = moment();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        function cb(start, end) {
							 | 
						||
| 
								 | 
							
								            $('#js-daterangepicker-predefined .js-daterangepicker-predefined-preview').html(start.format('MMM D') + ' - ' + end.format('MMM D, YYYY'));
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        $('#js-daterangepicker-predefined').daterangepicker({
							 | 
						||
| 
								 | 
							
								            startDate: start,
							 | 
						||
| 
								 | 
							
								            endDate: end,
							 | 
						||
| 
								 | 
							
								            ranges: {
							 | 
						||
| 
								 | 
							
								                'Today': [moment(), moment()],
							 | 
						||
| 
								 | 
							
								                'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
							 | 
						||
| 
								 | 
							
								                'Last 7 Days': [moment().subtract(6, 'days'), moment()],
							 | 
						||
| 
								 | 
							
								                'Last 30 Days': [moment().subtract(29, 'days'), moment()],
							 | 
						||
| 
								 | 
							
								                'This Month': [moment().startOf('month'), moment().endOf('month')],
							 | 
						||
| 
								 | 
							
								                'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        }, cb);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        cb(start, end);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        // INITIALIZATION OF CLIPBOARD
							 | 
						||
| 
								 | 
							
								        // =======================================================
							 | 
						||
| 
								 | 
							
								        $('.js-clipboard').each(function () {
							 | 
						||
| 
								 | 
							
								            var clipboard = $.HSCore.components.HSClipboard.init(this);
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								    });
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								@stack('script_2')
							 | 
						||
| 
								 | 
							
								<audio id="myAudio">
							 | 
						||
| 
								 | 
							
								    <source src="{{asset('public/assets/admin/sound/notification.mp3')}}" type="audio/mpeg">
							 | 
						||
| 
								 | 
							
								</audio>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								    var audio = document.getElementById("myAudio");
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    function playAudio() {
							 | 
						||
| 
								 | 
							
								        audio.play();
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    function pauseAudio() {
							 | 
						||
| 
								 | 
							
								        audio.pause();
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								    // @if(\App\CentralLogics\Helpers::employee_module_permission_check('order'))
							 | 
						||
| 
								 | 
							
								    // var order_type = 'all';
							 | 
						||
| 
								 | 
							
								    // setInterval(function () {
							 | 
						||
| 
								 | 
							
								    //     $.get({
							 | 
						||
| 
								 | 
							
								    //         url: '{{route('vendor.get-restaurant-data')}}',
							 | 
						||
| 
								 | 
							
								    //         dataType: 'json',
							 | 
						||
| 
								 | 
							
								    //         success: function (response) {
							 | 
						||
| 
								 | 
							
								    //             let data = response.data;
							 | 
						||
| 
								 | 
							
								    //             if (data.new_pending_order > 0) {
							 | 
						||
| 
								 | 
							
								    //                 order_type = 'pending';
							 | 
						||
| 
								 | 
							
								    //                 playAudio();
							 | 
						||
| 
								 | 
							
								    //                 $('#popup-modal').appendTo("body").modal('show');
							 | 
						||
| 
								 | 
							
								    //             }
							 | 
						||
| 
								 | 
							
								    //             else if(data.new_confirmed_order > 0)
							 | 
						||
| 
								 | 
							
								    //             {
							 | 
						||
| 
								 | 
							
								    //                 order_type = 'confirmed';
							 | 
						||
| 
								 | 
							
								    //                 playAudio();
							 | 
						||
| 
								 | 
							
								    //                 $('#popup-modal').appendTo("body").modal('show');
							 | 
						||
| 
								 | 
							
								    //             }
							 | 
						||
| 
								 | 
							
								    //         },
							 | 
						||
| 
								 | 
							
								    //     });
							 | 
						||
| 
								 | 
							
								    // }, 10000);
							 | 
						||
| 
								 | 
							
								    // @endif
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    function check_message() {
							 | 
						||
| 
								 | 
							
								        location.href = '{{url('/')}}/restaurant-panel/message/list';
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    function route_alert(route, message) {
							 | 
						||
| 
								 | 
							
								        Swal.fire({
							 | 
						||
| 
								 | 
							
								            title: '{{ translate('messages.Are you sure ?') }}',
							 | 
						||
| 
								 | 
							
								            text: message,
							 | 
						||
| 
								 | 
							
								            type: 'warning',
							 | 
						||
| 
								 | 
							
								            showCancelButton: true,
							 | 
						||
| 
								 | 
							
								            cancelButtonColor: 'default',
							 | 
						||
| 
								 | 
							
								            confirmButtonColor: '#FC6A57',
							 | 
						||
| 
								 | 
							
								            cancelButtonText: '{{ translate('messages.No') }}',
							 | 
						||
| 
								 | 
							
								            confirmButtonText: '{{ translate('messages.Yes') }}',
							 | 
						||
| 
								 | 
							
								            reverseButtons: true
							 | 
						||
| 
								 | 
							
								        }).then((result) => {
							 | 
						||
| 
								 | 
							
								            if (result.value) {
							 | 
						||
| 
								 | 
							
								                location.href = route;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        })
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    function form_alert(id, message) {
							 | 
						||
| 
								 | 
							
								        Swal.fire({
							 | 
						||
| 
								 | 
							
								            title: '{{ translate('messages.Are you sure ?') }}',
							 | 
						||
| 
								 | 
							
								            text: message,
							 | 
						||
| 
								 | 
							
								            type: 'warning',
							 | 
						||
| 
								 | 
							
								            showCancelButton: true,
							 | 
						||
| 
								 | 
							
								            cancelButtonColor: 'default',
							 | 
						||
| 
								 | 
							
								            confirmButtonColor: '#FC6A57',
							 | 
						||
| 
								 | 
							
								            cancelButtonText: '{{ translate('messages.No') }}',
							 | 
						||
| 
								 | 
							
								            confirmButtonText: '{{ translate('messages.Yes') }}',
							 | 
						||
| 
								 | 
							
								            reverseButtons: true
							 | 
						||
| 
								 | 
							
								        }).then((result) => {
							 | 
						||
| 
								 | 
							
								            if (result.value) {
							 | 
						||
| 
								 | 
							
								                $('#'+id).submit()
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        })
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    function set_filter(url, id, filter_by) {
							 | 
						||
| 
								 | 
							
								        var nurl = new URL(url);
							 | 
						||
| 
								 | 
							
								        nurl.searchParams.set(filter_by, id);
							 | 
						||
| 
								 | 
							
								        location.href = nurl;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								    @php($fcm_credentials = \App\CentralLogics\Helpers::get_business_settings('fcm_credentials'))
							 | 
						||
| 
								 | 
							
								    var firebaseConfig = {
							 | 
						||
| 
								 | 
							
								        apiKey: "{{isset($fcm_credentials['apiKey']) ? $fcm_credentials['apiKey'] : ''}}",
							 | 
						||
| 
								 | 
							
								        authDomain: "{{isset($fcm_credentials['authDomain']) ? $fcm_credentials['authDomain'] : ''}}",
							 | 
						||
| 
								 | 
							
								        projectId: "{{isset($fcm_credentials['projectId']) ? $fcm_credentials['projectId'] : ''}}",
							 | 
						||
| 
								 | 
							
								        storageBucket: "{{isset($fcm_credentials['storageBucket']) ? $fcm_credentials['storageBucket'] : ''}}",
							 | 
						||
| 
								 | 
							
								        messagingSenderId: "{{isset($fcm_credentials['messagingSenderId']) ? $fcm_credentials['messagingSenderId'] : ''}}",
							 | 
						||
| 
								 | 
							
								        appId: "{{isset($fcm_credentials['appId']) ? $fcm_credentials['appId'] : ''}}",
							 | 
						||
| 
								 | 
							
								        measurementId: "{{isset($fcm_credentials['measurementId']) ? $fcm_credentials['measurementId'] : ''}}"
							 | 
						||
| 
								 | 
							
								    };
							 | 
						||
| 
								 | 
							
								    firebase.initializeApp(firebaseConfig);
							 | 
						||
| 
								 | 
							
								    const messaging = firebase.messaging();
							 | 
						||
| 
								 | 
							
								    function startFCM() {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        messaging
							 | 
						||
| 
								 | 
							
								            .requestPermission()
							 | 
						||
| 
								 | 
							
								            .then(function () {
							 | 
						||
| 
								 | 
							
								                return messaging.getToken()
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            }).then(function (response) {
							 | 
						||
| 
								 | 
							
								                @php($restaurant_id=\App\CentralLogics\Helpers::get_restaurant_id())
							 | 
						||
| 
								 | 
							
								                subscribeTokenToTopic(response, "restaurant_panel_{{$restaurant_id}}_message");
							 | 
						||
| 
								 | 
							
								                // $.ajaxSetup({
							 | 
						||
| 
								 | 
							
								                //     headers: {
							 | 
						||
| 
								 | 
							
								                //         'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
							 | 
						||
| 
								 | 
							
								                //     }
							 | 
						||
| 
								 | 
							
								                // });
							 | 
						||
| 
								 | 
							
								                // $.ajax({
							 | 
						||
| 
								 | 
							
								                //     url: '{{ route('vendor.store.token') }}',
							 | 
						||
| 
								 | 
							
								                //     type: 'POST',
							 | 
						||
| 
								 | 
							
								                //     data: {
							 | 
						||
| 
								 | 
							
								                //         token: response
							 | 
						||
| 
								 | 
							
								                //     },
							 | 
						||
| 
								 | 
							
								                //     // error: function (error) {
							 | 
						||
| 
								 | 
							
								                //     //     alert(error);
							 | 
						||
| 
								 | 
							
								                //     // },
							 | 
						||
| 
								 | 
							
								                // });
							 | 
						||
| 
								 | 
							
								            }).catch(function (error) {
							 | 
						||
| 
								 | 
							
								                console.log(error);
							 | 
						||
| 
								 | 
							
								            });
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    @php($key = \App\Models\BusinessSetting::where('key', 'push_notification_key')->first())
							 | 
						||
| 
								 | 
							
								    function subscribeTokenToTopic(token, topic) {
							 | 
						||
| 
								 | 
							
								        fetch('https://iid.googleapis.com/iid/v1/' + token + '/rel/topics/' + topic, {
							 | 
						||
| 
								 | 
							
								            method: 'POST',
							 | 
						||
| 
								 | 
							
								            headers: new Headers({
							 | 
						||
| 
								 | 
							
								                'Authorization': 'key={{ $key ? $key->value : '' }}'
							 | 
						||
| 
								 | 
							
								            })
							 | 
						||
| 
								 | 
							
								        }).then(response => {
							 | 
						||
| 
								 | 
							
								            if (response.status < 200 || response.status >= 400) {
							 | 
						||
| 
								 | 
							
								                throw 'Error subscribing to topic: ' + response.status + ' - ' + response.text();
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								            console.log('Subscribed to "' + topic + '"');
							 | 
						||
| 
								 | 
							
								        }).catch(error => {
							 | 
						||
| 
								 | 
							
								            console.error(error);
							 | 
						||
| 
								 | 
							
								        })
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    function getUrlParameter(sParam) {
							 | 
						||
| 
								 | 
							
								        var sPageURL = window.location.search.substring(1);
							 | 
						||
| 
								 | 
							
								        var sURLVariables = sPageURL.split('&');
							 | 
						||
| 
								 | 
							
								        for (var i = 0; i < sURLVariables.length; i++) {
							 | 
						||
| 
								 | 
							
								            var sParameterName = sURLVariables[i].split('=');
							 | 
						||
| 
								 | 
							
								            if (sParameterName[0] == sParam) {
							 | 
						||
| 
								 | 
							
								                return sParameterName[1];
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    function converationList() {
							 | 
						||
| 
								 | 
							
								        $.ajax({
							 | 
						||
| 
								 | 
							
								            url: "{{ route('vendor.message.list') }}",
							 | 
						||
| 
								 | 
							
								            success: function(data) {
							 | 
						||
| 
								 | 
							
								                $('#conversation-list').empty();
							 | 
						||
| 
								 | 
							
								                $("#conversation-list").append(data.html);
							 | 
						||
| 
								 | 
							
								                var user_id = getUrlParameter('user');
							 | 
						||
| 
								 | 
							
								                $('.customer-list').removeClass('conv-active');
							 | 
						||
| 
								 | 
							
								                $('#customer-' + user_id).addClass('conv-active');
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        })
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    function conversationView() {
							 | 
						||
| 
								 | 
							
								        var conversation_id = getUrlParameter('conversation');
							 | 
						||
| 
								 | 
							
								        var user_id = getUrlParameter('user');
							 | 
						||
| 
								 | 
							
								        var url= '{{url('/')}}/restaurant-panel/message/view/'+conversation_id+'/' + user_id;
							 | 
						||
| 
								 | 
							
								        $.ajax({
							 | 
						||
| 
								 | 
							
								            url: url,
							 | 
						||
| 
								 | 
							
								            success: function(data) {
							 | 
						||
| 
								 | 
							
								                $('#view-conversation').html(data.view);
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        })
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    var order_type = 'all';
							 | 
						||
| 
								 | 
							
								    messaging.onMessage(function (payload) {
							 | 
						||
| 
								 | 
							
								        console.log(payload.data);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        if(payload.data.order_id && payload.data.type == 'new_order'){
							 | 
						||
| 
								 | 
							
								            @if(\App\CentralLogics\Helpers::employee_module_permission_check('order'))
							 | 
						||
| 
								 | 
							
								            order_type = payload.data.order_type
							 | 
						||
| 
								 | 
							
								            playAudio();
							 | 
						||
| 
								 | 
							
								            $('#popup-modal').appendTo("body").modal('show');
							 | 
						||
| 
								 | 
							
								            @endif
							 | 
						||
| 
								 | 
							
								        }else if(payload.data.type == 'message'){
							 | 
						||
| 
								 | 
							
								            var conversation_id = getUrlParameter('conversation');
							 | 
						||
| 
								 | 
							
								            var user_id = getUrlParameter('user');
							 | 
						||
| 
								 | 
							
								            var url= '{{url('/')}}/restaurant-panel/message/view/'+conversation_id+'/' + user_id;
							 | 
						||
| 
								 | 
							
								            $.ajax({
							 | 
						||
| 
								 | 
							
								                url: url,
							 | 
						||
| 
								 | 
							
								                success: function(data) {
							 | 
						||
| 
								 | 
							
								                    $('#view-conversation').html(data.view);
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 | 
							
								            })
							 | 
						||
| 
								 | 
							
								            toastr.success('{{ translate('messages.New message arrived') }}', {
							 | 
						||
| 
								 | 
							
								                        CloseButton: true,
							 | 
						||
| 
								 | 
							
								                        ProgressBar: true
							 | 
						||
| 
								 | 
							
								                    });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            if($('#conversation-list').scrollTop() == 0){
							 | 
						||
| 
								 | 
							
								                converationList();
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								    });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    function check_order() {
							 | 
						||
| 
								 | 
							
								        location.href = '{{url('/')}}/restaurant-panel/order/list/all';
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    startFCM();
							 | 
						||
| 
								 | 
							
								    converationList();
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    if(getUrlParameter('conversation')){
							 | 
						||
| 
								 | 
							
								        conversationView();
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    // conversationView();
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								    function call_demo(){
							 | 
						||
| 
								 | 
							
								        toastr.info('Update option is disabled for demo!', {
							 | 
						||
| 
								 | 
							
								            CloseButton: true,
							 | 
						||
| 
								 | 
							
								            ProgressBar: true
							 | 
						||
| 
								 | 
							
								        });
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    function set_time_filter(url, id) {
							 | 
						||
| 
								 | 
							
								            var nurl = new URL(url);
							 | 
						||
| 
								 | 
							
								            nurl.searchParams.set('filter', id);
							 | 
						||
| 
								 | 
							
								            location.href = nurl;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								<!-- IE Support -->
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								    if (/MSIE \d|Trident.*rv:/.test(navigator.userAgent)) document.write('<script src="{{asset('public/assets/admin')}}/vendor/babel-polyfill/polyfill.min.js"><\/script>');
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								<script>
							 | 
						||
| 
								 | 
							
								    $(window).on('load', ()=> $('.pre--loader').fadeOut(600))
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								</body>
							 | 
						||
| 
								 | 
							
								</html>
							 |