
		
		<!--**********************************
            Header start
        ***********************************-->
        <div class="header">
            <div class="header-content">
                <nav class="navbar navbar-expand">
                    <div class="collapse navbar-collapse justify-content-between">
                        <div class="header-left">
                            <div class="dashboard_bar">
                                <?php echo $__env->yieldContent('title', $page_title ?? 'Dashboard'); ?>
                            </div>
                        </div>
                        <?php
                            $orgs = \App\Models\Settings\Organisation::all();
                        ?>
                        <ul class="navbar-nav header-right">
                            <?php if(session('centre')): ?>
                            <li class="nav-item">
                                <select class="form-control" id="selectedCentre" onclick="setcentrefromnav(this.value);">
                                    <?php $__currentLoopData = $orgs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $org): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <?php if($org->id==session('centre')): ?>
                                            <option value="<?php echo e($org->id); ?>" selected><?php echo e($org->remarks); ?>, <?php echo e($org->city); ?></option>
                                        <?php else: ?>
                                            <option value="<?php echo e($org->id); ?>"><?php echo e($org->remarks); ?>, <?php echo e($org->city); ?></option>
                                        <?php endif; ?>
                                        
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </li>
                            <?php endif; ?>

                            <?php if(auth()->guard('publicuser')->check()): ?>
							<li class="nav-item">
                                Welcome &nbsp;<b><?php echo e(auth('publicuser')->user()->name); ?></b>
                            </li>
                            <?php endif; ?>
                            <li class="nav-item dropdown header-profile">
                                <a class="nav-link" href="#" role="button" data-toggle="dropdown">
									<img  src="<?php echo e(asset('images/profile/pic1.jpg')); ?>" width="20" alt=""/>
                                </a>
                               
                                <div class="dropdown-menu dropdown-menu-right">
                                    <?php if(auth()->guard('publicuser')->guest()): ?>
                                    <a href="<?php echo url('/user/login'); ?>" class="dropdown-item ai-icon">
                                        <i class="flaticon-381-user"></i>
                                        <span class="ml-2">Login </span>
                                    </a>
                                    <?php endif; ?>

                                    <?php if(auth()->guard('publicuser')->check()): ?>
                                    <a href="<?php echo url('/user/profile'); ?>" class="dropdown-item ai-icon">
                                        <svg id="icon-user1" xmlns="http://www.w3.org/2000/svg" class="text-primary" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
                                        <span class="ml-2">Profile </span>
                                    </a>

                                    <a href="<?php echo url('/user/my-bookings'); ?>" class="dropdown-item ai-icon">
                                        <svg id="icon-user1" xmlns="http://www.w3.org/2000/svg" class="text-primary" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
                                        <span class="ml-2">My Bookings </span>
                                    </a>
                                    

                                    <a class="dropdown-item ai-icon" href="#"
                                       onclick="event.preventDefault();
                                                     document.getElementById('logout-form').submit();">

                                        <svg id="icon-logout" xmlns="http://www.w3.org/2000/svg" class="text-danger" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
                                        <span class="ml-2">Logout </span>
                                    </a>
                                    <form id="logout-form" action="<?php echo e(url('user/logout')); ?>" method="POST" class="d-none">
                                        <?php echo csrf_field(); ?>
                                    </form>
                                    <?php endif; ?>
                                </div>
                            </li>
							
                        </ul>
					</div>
                </nav>
            </div>
        </div>

<script>
function setcentrefromnav(org_id)
{
    var csrf = "<?php echo e(csrf_token()); ?>";
    $.ajax({
      type: "POST",
      url: "<?php echo e(url('user/setcentre')); ?>",
      dataType : 'json',
      data: {_token: csrf, centre: org_id},
      success: function( result ) {
        
         
        if(result.statusCode == 200){
                
            $('#inputCentre').val(org_id);
        }
        else{
            alert("something wrong... please try later");
        }
        
      }
    });   
}
</script><?php /**PATH /var/www/html/ksstmprod/resources/views/elements/publicheader.blade.php ENDPATH**/ ?>