<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

   <!-- <link href="<?php echo e(asset('images/INB.png')); ?>" rel="icon" type="image/x-icon"/>-->
    <link href="<?php echo e(asset('images/INB.png')); ?>" rel="shortcut icon" type="image/x-icon"/>

    <title><?php echo $__env->yieldContent('title'); ?></title>

    <!-- Bootstrap -->
    <link href="<?php echo e(asset('backend/vendors/bootstrap/dist/css/bootstrap.min.css')); ?>" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="<?php echo e(asset('backend/vendors/font-awesome/css/font-awesome.min.css')); ?>" rel="stylesheet">
    <!-- Custom Theme Style -->
    <link href="<?php echo e(asset('backend/build/css/custom.min.css')); ?>" rel="stylesheet">
    <style type="text/css">
        .error {
            color: red;
        }
        .alert {
            padding: 5px;
            border-radius: 0px;
        }
        hr {
            margin-top: 10px;
            margin-bottom: 20px;
            border: 0;
            border-top: 1px solid #ddd;
        }
        @media(max-width:768px) {
            .btn.btn-app span{
                display:none;
            }
            .user-profile span{
                display:none;
            }
            .btn.btn-app {
                position: relative;
                padding: 4px; 
                margin: 15px 0px 0px 0px;
                min-width: 16px; 
                height: 29px; 
                box-shadow: none;
                border-radius: 0;
                text-align: center;
                color: #666;
                border: 1px solid #ddd;
                background-color: #fafafa;
                font-size: 12px;
            }
            /*.top_nav .navbar-right li {*/
            /*    float: none;*/
            /*}*/
        }
    </style>
     <?php echo $__env->yieldPushContent('css'); ?>
</head>
<body class="nav-md">
<div class="container body">
    <div class="main_container">
        <div class="col-md-3 left_col">
            <div class="left_col scroll-view">
                <div class="navbar nav_title" style="border: 0;">
                    <a href="<?php echo e(route('user.dashboard')); ?>" class="site_title">
                       <!-- <i class="fa fa-dashboard"></i>-->
                        <img src="<?php echo e(asset('storage/about/'.about()->logo)); ?>" alt="<?php echo e(Auth::user()->name); ?>"  height="20" width="20" />
                        <span><?php echo e(about()->bangla_name); ?></span>
                    </a>
                </div>
                <div class="clearfix"></div>
                <!-- menu profile quick info -->
               <!-- <div class="profile clearfix">
                    <div class="profile_pic">
                        <img src="<?php echo e(asset('images/user.png')); ?>" alt="..." class="img-circle profile_img">
                    </div>
                    <div class="profile_info">
                        <span>Welcome,</span>
                        <h2><?php echo e(Auth::user()->name); ?></h2>
                    </div>
                </div>
                <br/>-->
                <!-- sidebar menu -->
                <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
                    <div class="menu_section">
                       <!-- <h3>General</h3>-->
                        <ul class="nav side-menu">
                        <?php 
                            $user = Auth::user();
                            //$module = $user->roles[0]->modules->sortBy('module_rank')->where('view_sidebar','=',1);
                            $groups = $user->roles[0]->mg->sortBy('module_rank')->where('view_sidebar','=',1);
                            $user_role = $user->roles[0]->id;
                         ?>
                            <?php $__currentLoopData = $groups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mg): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php if($mg->modules != ''): ?>
                                    <li>
                                        <a><i class="<?php echo e($mg->module_icon); ?>"></i> <?php echo e($mg->name); ?> <span class="fa fa-chevron-down"></span></a>
                                        <ul class="nav child_menu">
                                        <?php $__currentLoopData = $mg->modules->where('view_sidebar',1)->sortBy('module_rank'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $md): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <?php if(isset($md->rm->where('role_id',$user_role)[0])): ?>
                                         <?php  
                                            $mdn = $md->rm->where('role_id',$user_role)[0]->module; 
                                          ?>
                                            <!--<li><a href="<?php echo e(url($mdn->module_url)); ?>"><?php echo e($mdn->name); ?></a></li>-->
                                           
                                        <?php endif; ?>
                                         <li><a href="<?php echo e(url($md->module_url)); ?>"><?php echo e($md->name); ?></a></li>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </ul>
                                    </li>
                                <?php endif; ?>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                </div>
                <!-- /sidebar menu -->
                <!-- /menu footer buttons -->
                <div class="sidebar-footer hidden-small">
                    <a data-toggle="tooltip" data-placement="top" title="Settings">
                        <span class="glyphicon glyphicon-cog" aria-hidden="true"></span>
                    </a>
                    <a data-toggle="tooltip" data-placement="top" title="FullScreen">
                        <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
                    </a>
                    <a data-toggle="tooltip" data-placement="top" title="Lock">
                        <span class="glyphicon glyphicon-eye-close" aria-hidden="true"></span>
                    </a>
                    <a data-toggle="tooltip" data-placement="top" title="Logout" href="">
                        <span class="glyphicon glyphicon-off" aria-hidden="true"></span>
                    </a>
                </div>
                <!-- /menu footer buttons -->
            </div>
        </div>
        <!-- top navigation -->
        <div class="top_nav">
            <div class="nav_menu">
                <nav>
                    <div class="nav toggle">
                        <a id="menu_toggle"><i class="fa fa-bars"></i></a>
                    </div>

                    <ul class="nav navbar-nav navbar-right">
                        <li class="">
                            <a href="javascript:;" class="user-profile dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                <img src="<?php echo e(asset('storage/user/'.Auth::user()->image)); ?>" alt=""><?php echo e(Auth::user()->name); ?>

                                <span class="fa fa-caret-down"></span>
                            </a>
                            <ul class="dropdown-menu dropdown-usermenu pull-right">
                                <li><a href="<?php echo e(route('profile.changeProfile')); ?>"> <i class="fa fa-user"></i> Update Profile</a></li>
                                <li><a href="<?php echo e(route('change.password')); ?>"> <i class="fa fa-sign-out "></i> Change Password</a></li>
                                <li><a href="<?php echo e(route('user.logout')); ?>"><i class="fa fa-sign-out"></i> Log Out</a>
                                </li>
                            </ul>
                        </li>
                        <li class="pull-left">
                            <a href="<?php echo e(route('customer.list')); ?>" class="btn btn-app btn-xs ">
                                <i class="fa fa-shopping-cart"></i> <span> Customers</span>
                            </a>
                        </li>
                        <li class="pull-left">
                            <a href="<?php echo e(route('stock.stocklist')); ?>" class="btn btn-app btn-xs ">
                                <i class="fa fa-list-alt"></i> <span>Stock </span>
                            </a>
                        </li>
                        <li class="pull-left">
                            <a href="<?php echo e(route('sales.list')); ?>" class="btn btn-app btn-xs ">
                                <i class="fa fa-balance-scale"></i><span>Sales</span> 
                            </a>
                        </li>
                        <?php if(Auth::id() == 1 || Auth::id() == 2 || Auth::id() == 3): ?>
                        <li class="pull-left">
                            <a href="<?php echo e(route('account.cpi')); ?>" class="btn btn-app btn-xs ">
                                <i class="fa fa-dollar"></i> <span> Payment</span>
                            </a>
                        </li>
                        <?php endif; ?>
                        <li role="presentation" class="dropdown">
                            <a href="<?php echo e(route('sms.index')); ?>" class="dropdown-toggle info-number" >
                                <i class="fa fa-envelope-o"></i>
                                <!-- <span class="badge bg-green">2 </span> -->
                            </a>
                          <!--   <ul id="menu1" class="dropdown-menu list-unstyled msg_list" role="menu">
                                <li>
                                    <a>
                                        <span class="image"><img src="<?php echo e(asset('images/user.png')); ?>" alt="Profile Image"/></span>
                                        <span>
                                            <span>Notification</span>
                                            <span class="time">20 minuts ago</span>
                                        </span>
                                        <span class="message"> This is Message About something From somewere Else </span>
                                    </a>
                                </li>
                                <li>
                                    <div class="text-center">
                                        <a>
                                            <strong>See All Alerts</strong>
                                            <i class="fa fa-angle-right"></i>
                                        </a>
                                    </div>
                                </li>
                            </ul> -->
                        </li>
                    </ul>
                </nav>
            </div>
        </div>
        <!-- /top navigation -->
        <!--#####################################################
        ####################################################### -->
        <!-- page content -->
       <?php echo $__env->yieldContent('content'); ?>
        <!-- / page content -->
        <!--#####################################################
         ####################################################### -->
        <!-- footer content -->
        <footer>
            <div class="pull-right">
                Development By <a href="https://www.softtakeit.com" target='_blank'>SOFTTAKEIT</a>
            </div>
            <div class="clearfix"></div>
        </footer>
        <!-- /footer content -->
    </div>
</div>
<!-- jQuery -->
<script src="<?php echo e(asset('backend/vendors/jquery/dist/jquery.min.js')); ?>"></script>
<!-- Bootstrap -->
<script src="<?php echo e(asset('backend/vendors/bootstrap/dist/js/bootstrap.min.js')); ?>"></script>

<!---------------------->
<script src="<?php echo e(asset('backend/build/js/custom.min.js')); ?>"></script>
<script>
    $(document).ready(function() {
        $("#myInput").on("keyup", function() {
			var value = $(this).val().toLowerCase();
			$("tbody tr").filter(function() {
			  $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
			});
		});
        $("#myInput2").on("keyup", function() {
			var value = $(this).val().toLowerCase();
			$("tbody tr").filter(function() {
			  $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
			});
		});
		// submit section
        $("#show").on("change",function(){
            $("#searchForm").submit(); 
        })
        $("input[type='text']").keyup(function() {
            // for input text field only
            var str = $(this).val();
            var spart = str.split(" ");
            for ( var i = 0; i < spart.length; i++ ){
                var j = spart[i].charAt(0).toUpperCase();
                spart[i] = j + spart[i].substr(1);
            }
            $(this).val(spart.join(" "));
            // for text area section
            $('textarea').keyup(function() {
                var caps = $(this).val();
                caps = caps.charAt(0).toUpperCase() + caps.slice(1);
                $(this).val(caps);
            });
        });
        /*-------alert message hide section----------*/
        $(".alert").delay(8000).slideUp(1000, function() {
            $(this).alert('close');
        });
    });
</script>
    <?php echo $__env->yieldPushContent('js'); ?>
</body>
</html>
