<!doctype html>
<html lang="en" dir="ltr">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- CSRF Token -->
  <meta name="csrf-token" content="{{ csrf_token() }}">

  <title>{{EF::appSetting()['app_name']}} | @yield('page_title')</title>




  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta http-equiv="Content-Language" content="en" />
  <meta name="msapplication-TileColor" content="#2d89ef">
  <meta name="theme-color" content="#4188c9">
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="mobile-web-app-capable" content="yes">
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <link rel="icon" href="{{asset('/graphics/logo/'.EF::appSetting()['first_logo'])}}" type="image/x-icon"/>
  <link rel="icon" href="{{asset('/graphics/logo/'.EF::appSetting()['first_logo'])}}" type="image/x-icon"/>
  <link rel="shortcut icon" type="image/x-icon" href="{{ asset('/favicon.ico') }}" />

  <!-- Fonts -->
  <link rel="dns-prefetch" href="//fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css">

  <!-- Styles -->
  <link href="{{ asset('css/app.css') }}" rel="stylesheet">




  <!-- Fonts -->
  <link rel="dns-prefetch" href="//fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css">

  <!-- Styles -->
  <link href="{{ asset('/css/app.css') }}" rel="stylesheet">

  <link href="{{ asset('/css/custom.css') }}" rel="stylesheet">
  <link rel="stylesheet" href="{{ asset('css/fontawesome_4.7.0.min.css')}}"  rel="stylesheet">

  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,400i,500,500i,600,600i,700,700i&amp;subset=latin-ext">

  <!-- Dashboard Core -->
  <link href="{{asset('/assets/css/dashboard.css')}}" rel="stylesheet" />
  <!-- c3.js Charts Plugin -->
  <link href="{{asset('/assets/plugins/charts-c3/plugin.css')}}" rel="stylesheet" />
  <link href="{{asset('/plugins/morris.js/morris.css')}}" rel="stylesheet" />
  <!-- Google Maps Plugin -->
  <link href="{{asset('/assets/plugins/maps-google/plugin.css')}}" rel="stylesheet" />
  <!-- Input Mask Plugin -->

  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">


  <link rel="stylesheet" type="text/css" href="{{ asset('/css/bootstrap4.datatable.min.css')}}">

  <link href="{{ asset('/css/custom.css') }}" rel="stylesheet">
  <link href="{{ asset('/css/toastr.min.css') }}" rel="stylesheet">

  <link href="{{ asset('/plugins/bootstrap-datepicker-1.6.4-dist/css/bootstrap-datepicker.min.css') }}" rel="stylesheet">

  <link href="{{ asset('/plugins/bootstrap-datepicker-1.6.4-dist/css/bootstrap-datepicker.standalone.min.css') }}" rel="stylesheet">


  <link href="{{ asset('/plugins/bootstrap-datepicker-1.6.4-dist/css/bootstrap-datepicker3.min.css') }}" rel="stylesheet">


  <link href="{{ asset('plugins/bootstrap-datepicker-1.6.4-dist/css/bootstrap-datepicker3.standalone.min.css') }}" rel="stylesheet">

  <link href="{{ asset('plugins/fontawesome_picker/dist/css/fontawesome-iconpicker.min.css') }}" rel="stylesheet">

  <link href="{{asset('/assets/plugins/busy-loader/plugin.css')}}" rel="stylesheet">

  <link href="{{ asset('plugins/search-box/css/search_box.min.css')}}" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.3.2/select2.css" rel="stylesheet" type="text/css">

  <link href="{{ asset('css/jquery-multiautocomplete.min.css') }}" rel="stylesheet">




  <style type="text/css">
   .no-js #loader { display: none;  }
   .js #loader { display: block; position: absolute; left: 100px; top: 0; }
   .se-pre-con {
    position: fixed;

    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background:  center no-repeat #fff;
  }
  .center-logo {
    margin-top: 23%;
  }


</style>

@yield('page_style')

<script type="text/javascript" src="{{asset('/js/loadergif.js')}}"></script>
<script type="text/javascript" src="{{asset('/js/loadergif1.js')}}"></script>


<script type="text/javascript">
//paste this code under the head tag or in a separate js file.
  // Wait for window load


   </script>

</head>
<body>
  <div class="se-pre-con ">
      <center>
        <img class="center-logo" src="{{url('graphics/loader.gif')}}">
        </center>

    </div>
  <div class="page">
    <div class="page-main">
      <!-- TOP HEADER -->
      <div class="header py-4">
        <div class="container">
          <div class="d-flex">
            <a style="color: #E1832C; text-decoration: none; font-weight:bolder;" class="" href="{{url('home')}}">
             <img src="{{asset('/graphics/logo/'.EF::appSetting()['first_logo'])}}" class="header-brand-img" alt="{{EF::appSetting()['app_name']}}"> 
           </a>
            <div class="d-flex order-lg-2 ml-auto">

       {{--   <div class="dropdown d-none d-md-flex">
                <a class="nav-link icon" data-toggle="dropdown">
                  <i class="fa fa-bell"></i>
                  <span class="nav-unread"></span>
                </a>
                <div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
                  <a href="#" class="dropdown-item d-flex">
                    <span class="avatar mr-3 align-self-center" style="background-image: url(demo/faces/male/41.jpg)"></span>
                    <div>
                      <strong>Nathan</strong> pushed new commit: Fix page load performance issue.
                      <div class="small text-muted">10 minutes ago</div>
                    </div>
                  </a>
                  <a href="#" class="dropdown-item d-flex">
                    <span class="avatar mr-3 align-self-center" style="background-image: url(demo/faces/female/1.jpg)"></span>
                    <div>
                      <strong>Alice</strong> started new task: Tabler UI design.
                      <div class="small text-muted">1 hour ago</div>
                    </div>
                  </a>
                  <a href="#" class="dropdown-item d-flex">
                    <span class="avatar mr-3 align-self-center" style="background-image: url(demo/faces/female/18.jpg)"></span>
                    <div>
                      <strong>Rose</strong> deployed new version of NodeJS REST Api V3
                      <div class="small text-muted">2 hours ago</div>
                    </div>
                  </a>
                  <div class="dropdown-divider"></div>
                  <a href="#" class="dropdown-item text-center text-muted-dark">Mark all as read</a>
                </div>
              </div>--}}
              <div class="dropdown">
                <a href="#" class="nav-link pr-0 leading-none" data-toggle="dropdown">
                  <span class="avatar" style="background-image: url({{EF::getFile(Auth::user()->dp)}});"></span>
                  <span class="ml-2 d-none d-lg-block">
                    <span class="text-default">{{Auth::user()->name}}</span>
                    <small class="text-muted d-block mt-1">{{Auth::user()->type}}</small>
                  </span>
                </a>
                <div class="dropdown-menu dropdown-menu-right dropdown-menu-arrow">
                  <a class="dropdown-item {{ Request::segment(1) === 'profile' ? 'active' : null }}" href="{{url('profile')}}">
                    <i class="dropdown-icon fa fa-user"></i> Profile
                  </a>

                  @if(Auth::user()->type === "Administrator")
                  <a  class="dropdown-item {{ Request::segment(1) === 'permission' ? 'active' : null }}" href="{{url('permission')}}">
                    <i class="dropdown-icon fa fa-cogs"></i> Permission
                  </a>
                  @endif



                    <div class="dropdown-divider"></div>
                   <!--  <a class="dropdown-item" href="#">
                      <i class="dropdown-icon fa fa-question"></i> Need help?
                    </a> -->
                    <a class="dropdown-item {{ Request::segment(1) === 'logout' ? 'active' : null }}"  href="{{ route('logout') }}"
                    onclick="event.preventDefault();
                    document.getElementById('logout-form').submit();">
                    <i class="dropdown-icon fa fa-sign-out-alt "></i>    {{ __('Logout') }}
                  </a>

                  <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
                    @csrf
                  </form>

                </div>
              </div>
            </div>
            <a href="#" class="header-toggler d-lg-none ml-3 ml-lg-0" data-toggle="collapse" data-target="#headerMenuCollapse">
              <span class="header-toggler-icon"></span>
            </a>
          </div>
        </div>
      </div>
      <!-- END TOP HEADER -->

      <!-- TOP NAVBAR -->
      <div class="header collapse d-lg-flex p-0" id="headerMenuCollapse">
        <div class="container">
          <div class="row align-items-center">
          <!--   <div class="col-lg-3 ml-auto">

            </div> -->
            <div class="col-lg order-lg-first">

              <ul class="nav nav-tabs border-0 flex-column flex-lg-row">

                @php($hasPermission = ['All','Dashboard'])


                @if(Auth::user()->hasAnyPermission(['All','Dashboard']))
                <li class="nav-item">
                  <a href="{{url('home')}}" class="nav-link {{ Request::segment(1) === 'home' ? 'active' : null }}"><i class="fa fa-home"></i> Dashboard</a>
                </li>
                @endif



                @php($hasPermission = ['All','View Branch'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item dropdown">
                  <a href="{{url('branch')}}" class="nav-link {{ Request::segment(1) === 'branch' ? 'active' : null }}"><i class="fa fa-building"></i>{{ucwords(EF::branchWhiteLabel()['module'])}}</a>
                </li>
                @endif

                @php($hasPermission = ['All','View Customer','View Employee','View Dealer'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item dropdown">
                  <a href="javascript:void(0)" class="nav-link {{ Request::segment(1) === 'customers' ? 'active' : null }}  {{ Request::segment(1) === 'employees' ? 'active' : null }}  {{ Request::segment(1) === 'dealers' ? 'active' : null }}" data-toggle="dropdown"><i class="fa fa-user"></i> Users</a>
                  <div class="dropdown-menu dropdown-menu-arrow">
                    @if(Auth::user()->hasAnyPermission(['All','View Customer']))
                    <a href="{{route('user.customers')}}" class="dropdown-item {{ Request::segment(1) === 'customers' ? 'active' : null }}">Customers</a>
                    <div class="dropdown-divider"></div>
                    @endif
{{--
                    @if(Auth::user()->hasAnyPermission(['All','View Employee']))
                    <a href="{{route('user.employees')}}" class="dropdown-item {{ Request::segment(1) === 'employees' ? 'active' : null }}">Employees</a>
                    @endif
                      <div class="dropdown-divider"></div>
                      --}}

                    @if(Auth::user()->hasAnyPermission(['All','View Dealer']))
                    <a href="{{route('user.dealers')}}" class="dropdown-item {{ Request::segment(1) === 'dealers' ? 'active' : null }}"> Dealers</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All']))
                    <a data-toggle="modal" data-target="#user_types" class="dropdown-item {{ Request::segment(1) === 'usertypes' ? 'active' : null }}"> User Types</a>
                    @endif

                  </div>
                </li>
                @endif
                @php($hasPermission = ['All','View Inventory'])


                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item dropdown">
                  <a href="{{url('plots')}}" class="nav-link {{ Request::segment(1) === 'plots' ? 'active' : null }}"><i class="fa fa-globe"></i>

                  @php($plot_label = EF::plotWhiteLabel())

                    @if(isset($plot_label['module']))
                      {{ucwords(str_replace('_',' ',$plot_label['module']))}}
                    @endif
                  </a>
                </li>
                @endif

                @php($hasPermission = ['All','View Booking','View Cancel Requests','View Transfer Booking','View Soft Booking','View Letter','View Blocked Booking'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item dropdown">
                  <a href="javascript:void(0)" class="nav-link {{ Request::segment(1) === 'transferbooking' ? 'active' : null }}  {{ Request::segment(1) === 'booking' ? 'active' : null }}  {{ Request::segment(1) === 'cancelledbooking' ? 'active' : null }}" data-toggle="dropdown"><i class="fa fa-file"></i> Bookings</a>
                  <div class="dropdown-menu dropdown-menu-arrow">
                    @if(Auth::user()->hasAnyPermission(['All','View Booking']))
                    <a href="{{url('booking')}}" class="dropdown-item {{ Request::segment(1) === 'booking' ? 'active' : null }}">Manage Bookings</a>
                    <div class="dropdown-divider"></div>
                    @endif


                    @if(Auth::user()->hasAnyPermission(['All','View Soft Booking']))
                    <a href="{{url('reservebooking')}}" class="dropdown-item {{ Request::segment(1) === 'reservebooking' ? 'active' : null }}">Soft Bookings</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Cancel Requests']))
                    <a href="{{url('cancelledbooking')}}" class="dropdown-item {{ Request::segment(1) === 'cancelledbooking' ? 'active' : null }}">Cancel Bookings</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Transfer Booking']))
                    <a href="{{url('transferbooking')}}" class="dropdown-item {{ Request::segment(1) === 'transferbooking' ? 'active' : null }}">Transfer Bookings</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Blocked Booking']))
                    <a href="{{url('blockbookings')}}" class="dropdown-item {{ Request::segment(1) === 'blockbookings' ? 'active' : null }}">Blocked Bookings</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Letter']))
                    <a href="{{url('letters')}}" class="dropdown-item {{ Request::segment(1) === 'letters' ? 'active' : null }}">Letters</a>
                    @endif

                  </div>

                </li>
                @endif

                @php($hasPermission = ['All','View Head','View Voucher','View Bank','View Pending Payment'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item dropdown">
                  <a href="javascript:void(0)" class="nav-link {{ Request::segment(1) === 'head' ? 'active' : null }}  {{ Request::segment(1) === 'voucher' ? 'active' : null }}" data-toggle="dropdown"><i class="fa fa-calculator"></i> Finance</a>
                  <div class="dropdown-menu dropdown-menu-arrow">

                    @if(Auth::user()->hasAnyPermission(['All','View Head']))
                    <a href="{{url('head')}}" class="dropdown-item {{ Request::segment(1) === 'head' ? 'active' : null }}">Chart of Accounts</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Pending Payment']))
                    <a href="{{url('pendingpayment')}}" class="dropdown-item {{ Request::segment(1) === 'pendingpayment' ? 'active' : null }}">Pending Payments</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Voucher']))
                    <a href="{{url('voucher')}}" class="dropdown-item {{ Request::segment(1) === 'voucher' ? 'active' : null }}">Manage Vouchers</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','Reject Voucher']))
                    <a href="{{url('rejectvoucher')}}" class="dropdown-item {{ Request::segment(1) === 'rejectvoucher' ? 'active' : null }}">Reject Vouchers</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Bank']))
                      <a href="{{url('bank')}}" class="dropdown-item {{ Request::segment(1) === 'bank' ? 'active' : null }}">Manage Bank</a>
                      <div class="dropdown-divider"></div>
                      @endif
                      {{--
                    @if(Auth::user()->hasAnyPermission(['All','Bills View']))
                      <a href="{{url('billandpayments')}}" class="dropdown-item {{ Request::segment(1) === 'billandpayments' ? 'active' : null }}">Bill and Payments</a>
                      
                    @endif
                    --}}


                    @if(false && Auth::user()->hasAnyPermission(['All','View Vendor and Payments']))
                      <div class="dropdown-divider"></div>

                      <a href="{{url('vendorandpayment')}}" class="dropdown-item {{ Request::segment(1) === 'vendorandpayment' ? 'active' : null }}">Vendor and Payments</a>
                    @endif
                  </div>
                </li>
                @endif

                @php($hasPermission = ['All','View Call'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item">
                  <a href="{{url('callcenter')}}"class="nav-link {{ Request::segment(1) === 'callcenter' ? 'active' : null }}"><i class="fa fa-phone"></i>Call Center</a>
                </li>
                @endif

                   @php($hasPermission = ['All','View HR'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item">
                  <a href="{{url('hr')}}"class="nav-link {{ Request::segment(1) === 'hr' ? 'active' : null }}"><i class="fa fa-group"></i>&nbsp;HR</a>
                </li>
                @endif

                

                @php($hasPermission = ['All','View Inventory Module'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item dropdown">
                  <a href="javascript:void(0)" class="nav-link {{ Request::segment(1) === 'head' ? 'active' : null }}  {{ Request::segment(1) === 'Inventory' ? 'active' : null }}" data-toggle="dropdown"><i class="fas fa-luggage-cart"> </i>&nbsp;  Inventory</a>
                  <div class="dropdown-menu dropdown-menu-arrow">

                    @if(Auth::user()->hasAnyPermission(['All','View Item']))
                    <a href="{{route('item.items')}}" class="dropdown-item {{ Request::segment(1) === 'items' ? 'active' : null }}">Items</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Contractor/Vendor']))
                    <a href="{{route('user.suppliers')}}" class="dropdown-item {{ Request::segment(1) === 'suppliers' ? 'active' : null }}">Contractors / Vendors</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Process']))
                    <a href="{{url('inventory')}}" class="dropdown-item {{ Request::segment(1) === 'inventory' ? 'active' : null }}">Process</a>
                    <div class="dropdown-divider"></div>
                    @endif

                    @if(Auth::user()->hasAnyPermission(['All','View Pending Payments']))
                    <a href="{{url('inventorypendingpayment')}}" class="dropdown-item {{ Request::segment(1) === 'inventorypendingpayment' ? 'active' : null }}">Pending Payments</a>
                    <div class="dropdown-divider"></div>
                    @endif

            @if(Auth::user()->hasAnyPermission(['All','View Intreports']))
            <a href="{{url('inventory_reports')}}" class="dropdown-item {{ Request::segment(1) === 'inventory_reports' ? 'active' : null }}">Reports</a>
            @endif


            <div class="dropdown-divider"></div>

                @if(Auth::user()->hasAnyPermission(['All','View UsertoProjects']))
                <a href="{{url('usertoprojects')}}" class="dropdown-item {{ Request::segment(1) === 'usertoprojects' ? 'active' : null }}">User To Projects</a>
                @endif
                              </div>
                            </li>


               {{-- <li class="nav-item">
                  <a href="{{url('inventory')}}"class="nav-link {{ Request::segment(1) === 'inventory' ? 'active' : null }}"><i class="fa fa-boxes"></i>&nbsp;Inventory</a>
                </li>  --}}
                @endif
                

                @php($hasPermission = ['All','View Report'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item">
                  <a href="{{url('reports')}}" class="nav-link {{ Request::segment(1) === 'reports' ? 'active' : null }}"><i class="fas fa-copy"></i>Reports</a>
                </li>
                @endif

              {{--
                @php($hasPermission = ['All','Support'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item" >
                  <a href="{{url('support')}}"class="nav-link {{ Request::segment(1) === 'support' ? 'active' : null }}"><i class="fa fa-desktop"></i> &nbsp; Help Desk</a>
                </li>
                @endif
                --}}

                  @if(false)
                 <li class="nav-item" >
                  <a href="{{url('vendormodule')}}"class="nav-link {{ Request::segment(1) === 'vendormodule' ? 'active' : null }}"><i class="fa fa-industry"></i> &nbsp; Vendor </a>
                </li>
                @endif


                @php($hasPermission = ['All','View Log'])

                @if(Auth::user()->hasAnyPermission($hasPermission))
                <li class="nav-item" >
                  <a href="{{url('logs')}}"class="nav-link {{ Request::segment(1) === 'logs' ? 'active' : null }}"><i class="fa fa-history"></i> &nbsp; Logs </a>
                </li>
                @endif


                {{--
                <li class="nav-item" >
                  <a href="{{url('crmdashboard')}}"class="nav-link {{ Request::segment(1) === 'logs' ? 'active' : null }}"><i class="fa fa-history"></i> &nbsp; CRM </a>
                </li>
                --}}
              

               
              </ul>
            </div>
          </div>
        </div>
      </div>
      <!-- END NAV BAR -->
      <div class="my-3 my-md-5">
        <div class="container">

            @include('layouts.errors.error_message')
            @yield('page_body')

          </div>
<!--       <footer class="footer fixed-bottom">
        <div class="container">
          <div class="row align-items-center flex-row-reverse">
            <div class="col-auto ml-lg-auto">
              <div class="row align-items-center">
                <div class="col-12  text-center">
              Copyright © {{date('Y')}} <a href="{{url('/')}}">Estatech</a>. Powered by <a href="https://gisplus.net" target="_blank">GIsplus</a> All rights reserved.
            </div>
              </div>
            </div>

          </div>
        </div>
      </footer> -->


    </div>
  </div>
</div>

<!-- MODEL -->
@yield('page_modal')

@include('user.modals.update_user_types')
<!-- END MODEL -->

<!-- BASIC SCRIPT -->


<!-- <script type="text/javascript" src="{{ asset('/js/jquery.3.3.1.js')}}"></script> -->


<script src="{{ asset('js/sweetalert.min.js') }}" ></script>
<script src="{{ asset('js/jquery.min.js') }}" ></script>
<script src="{{ asset('js/toastr.min.js') }}" ></script>

<script src="{{ asset('plugins/bootstrap-datepicker-1.6.4-dist/js/bootstrap-datepicker.min.js') }}" ></script>
<script src="{{ asset('/plugins/morris.js/morris.min.js')}}"></script>
<script src="{{ asset('/plugins/morris.js/raphael.min.js')}}"></script>

<script src="{{ asset('/plugins/fontawesome_picker/dist/js/fontawesome-iconpicker.min.js')}}"></script>


 <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/3.3.2/select2.min.js"></script>

 <script>
 $(document).ready(function() {
     $('.select2').select2();
 });
 </script>




<script type="text/javascript" src="{{asset('/js/custom_js/validation/custom_validation.js')}}"></script>

<script type="text/javascript" src="{{asset('/js/custom_js/validation/bind_validation.js')}}"></script>
<script type="text/javascript" src="{{asset('/js/custom_js/validation/estatech_validation.js')}}"></script>
<script type="text/javascript" src="{{asset('/js/custom_js/estatech.js')}}"></script>



<script type="text/javascript" src="{{asset('/js/jquery_datatable.min.js')}}"></script>

<script type="text/javascript" src="{{asset('js/bootstrap4_datatable.min.js')}}"></script>


<script type="text/javascript" src="{{ asset('js/datatable_column_sort.js')}}"></script>



<script type="text/javascript" src="{{ asset('plugins/search-box/js/search_box.min.js')}}"></script>

<script src="{{ asset('js/jquery-multiautocomplete.min.js')}}"></script>


<script src="{{ asset('/assets/js/require.min.js')}}"></script>
<script>
  requirejs.config({
    baseUrl: "{{url('/')}}"
  });


</script>

<script src="{{ asset('/assets/js/dashboard.js')}}"></script>


<script src="{{asset('/assets/plugins/maps-google/plugin.js')}}"></script>

<script src="{{ asset('/assets/plugins/input-mask/plugin.js')}}"></script>

<script src="{{ asset('/assets/plugins/sp-loader/plugin.js')}}"></script>

<script src="{{ asset('/assets/plugins/easy-auto-complete/plugin.js')}}"></script>


<script src="{{ asset('plugins/easyautocomplete/jquery.easy-autocomplete.min.js')}}"></script>








<!-- <script src="{{ asset('/assets/plugins/busy-loader/plugin.js')}}"></script> 
  
<script src="{{ asset('/assets/plugins/charts-c3/plugin.js')}}"></script>
-->


<script>


setFstDropdown();


 require(['input-mask']);
 require(['sp-loader']);
 require(['easy-auto-complete']);

    // DATA TABLE CONFIGURATIION
    $(document).ready(function() {

        var data = {
            "pageLength": 10,
            "columnDefs": [
                { "type": "numeric-comma", targets: 0 }
            ]};

        loadDataTable($('.cls_datatable'),data);

        loadDataTable($('#cls_datatable'),data);

        loadDataTable($('.cls_datatable_sms'),data);

        loadDataTable($('.cls_datatable_due'),data);

        loadDataTable($('.cls_datatable_installment'),data);

        loadDataTable($('.cls_datatable_commission'),data);


        loadDataTable($('.cls_datatable_nominee'),data);

        loadDataTable($('.cls_datatable_document'),data);

        data = {

          "searching"     : false,
          "bInfo"         : false,
          "bFilter"       : false,
          "bLengthChange" : false,
          "pageLength"    : 10,
          "columnDefs"    : [
              { "type": "numeric-comma", targets: 0 }
        ]};

        loadDataTable($('.payment_receipts'),data);

         var data = {
            "pageLength": 10,
            "columnDefs": [
                { "type": "numeric-comma", targets: 0,
                  "type": "numeric-comma", targets: 2,
                  "type": "numeric-comma", targets: 3,
                  "type": "numeric-comma", targets: 4,
                  "type": "numeric-comma", targets: 5
                 }
            ]};

        loadDataTable($('.tax_datatable'),data);



    });

    function loadDataTable(element,data)
    {
        element.dataTable(data);
    }

    // FOR AJAX BASE LOADING DATA
    var dtTable = $('.cls_datatable');

    function showBranchWiseDataTable(event,branch_object,key,target)
    {
      event.preventDefault();

      showLoader();

      branch_object = $(branch_object).val();

      formdata = {'key':key,'branch_object':branch_object,'_token':token};

      $.post("{{route('datatable.show')}}", formdata, function(data)
        {
            resetDataTable(dtTable);

        $('#'+target).html(data);

          reiniDataTable(dtTable);

        removeLoader();

        },'html')
        .fail(function(data) {


        });
    }


    function showBlocksInDropDown(event,branch_object,key,target)
    {
        // after branch get all blocks of the branch.
      event.preventDefault();

      {{-- console.log('function called after branch'); --}}

      showLoader();

      branch_object = $(branch_object).val();

      formdata = {'key':key,'branch_object':branch_object,'_token':token};

      {{-- console.log(target); --}}

      $.get("{{url('/allblocklist/')}}/"+branch_object, function(data)
        {
            $('.'+target).html(data);

        removeLoader();

        },'html')
        .fail(function(data) {


        });
    }

    function showParameterBranchWiseDataTable(event,branch_object,args1,key,target)
    {
      event.preventDefault();

      showLoader();

      branch_object = $(branch_object).val();

      formdata = {'key':key,'branch_object':branch_object,'args1':args1,'_token':token};

      $.post("{{route('datatable.show')}}", formdata, function(data)
        {
            // resetDataTable(dtTable);

        $('#'+target).html(data);

          reiniDataTable(dtTable);

        removeLoader();

        },'html')
        .fail(function(data) {


        });
    }
    // END DATA TABLE CONFIGURATION



 </script>


 <!-- END SCRIPT -->

 <!-- INCLUDE SCRIPT -->
 <script>
  var token = "{{Session::token()}}";

  var default_encrypt = "{{Crypt::encrypt(0)}}";

 $(window).load(function() {
    // Animate loader off screen
    $(".se-pre-con").fadeOut("slow");;
  });

</script>


<script type="text/javascript">
  $(document).ready(function() {
      window.history.pushState(null, "", window.location.href);
      window.onpopstate = function() {
          window.history.pushState(null, "", window.location.href);
      };
  });
</script>
<script>

</script>

{!! Toastr::message() !!}

<!-- END BASIC SCRIPT -->

<!-- INHERIT SCRIPT ACCORDING TO PAGE DEMAND -->
@yield('page_script')
<!-- END INHERIT SCRIPT ACCORDING TO PAGE DEMAND -->
<div class="">

  <img class="img-responsive" alt="{{EF::appSetting()['app_name']}}" src="/graphics/building.png" style="width:100%; position: fixed; bottom: 0px; height: 300px; z-index: -1">

</div>
</body>
</html>
