<?php

$page_name='OS_MODULE_CONFIG';

?>



<?php $__env->startSection('content'); ?>
<div class="container">
    <div class="row justify-content-center container_layout">
        
        <div class="col-md-12 mobile_view">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item">
                            <a href="<?php echo e(route('adminhome')); ?>">
                                <i class="material-icons">home</i>
                            </a>
                        </li>
                        <li class="breadcrumb-item"><a href="<?php echo e(route('organizationalstructure')); ?>">Organizational Structure</a></li>
                        <li class="breadcrumb-item active">
                            <a href="<?php echo e(route('module_config')); ?>"> Module Configuration</a>
                        </li>
                    </ol>
                </nav>
        </div> 
        
        
        <div class="col-md-8 col-md-push-2 mt10">
            <div class="card">
               <!-- <div class="card-header text-center"><b> Module Configuration</b></div>-->
              <form action="<?php echo e(route('module_update')); ?>" method="post">
                  <?php echo e(csrf_field()); ?>

                <div class="card-body">
                    <div class="row custom_header">
                       <div class="col-md-3">
                           Modules Code
                        </div>
                       <div class="col-md-6">
                           Modules Name
                        </div>
                        <div class="col-md-2">
                            Action
                        </div>
                        <div class="col-md-1">
                            
                        </div>
                    </div>
                 <?php 
                    
                  $i=0;    
                  foreach ($data as $key => $val){  ?>
                    <div class="row custom_body">
                       <div class="col-md-3">
                           <?php echo e($val->module_code); ?>

                        </div>
                       <div class="col-md-6">
                          <?php echo e($val->module_name); ?>

                        </div>
                        <div class="col-md-1">
                            <input type="checkbox" name="<?php echo e($val->module_code); ?>" <?php if($val->is_active==1){ echo 'checked'; }  ?> >
                        </div>
                       <?php if($i==0){   ?>
                        <div class="col-md-2">
                          ALL <input type="checkbox" id="checkAll" >
                        </div>
                       <?php } ?>
                    </div>
                    <?php $i++; 
                    
                   }
                    
                    ?>
                <input type="hidden" name="total_data" value="<?php echo e($i); ?>" >

                </div>
                <div class="card-footer">
                    <div class="row justify-content-end">
                        <div class="col-md-5 col-md-push-8">
                           <button type="submit" class="btn btn-success"> SAVE </button>
                           <a href="<?php echo e(route('organizationalstructure')); ?>" class="btn btn-warning"> CANCEL </a>
                        </div>
                    </div>                              
                </div>
                
              </form>
            </div>
        </div>
        
 
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app2', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>