
<?php $__env->startSection('main-container'); ?>
<main id="main" class="main">
<?php echo $__env->make('cdn', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
 <script src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
 <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>

<div class="container h-100" style="margin-top:10px;">
      
<h5>Group Members</h5>
        <div class="" >
          <form action="<?php echo e(url('add-groupuser/'.$group->id)); ?>" method="post">
               <?php echo e(csrf_field()); ?>

               <div class="row mb-3">
                    <label for="inputText" class="col-sm-2 col-form-label">Group Name<span style="color:red;">*</span>:</label>
                    <div class="col-sm-4">
                      <input type="text" name="name" value="<?php echo e($group->name); ?>" class="form-control" style="text-transform: capitalize;" readonly>
                    </div> 
                </div>
               
              <div class="card " style="width:auto; height:270px; overflow-y: scroll;">
                <div class="card-body">
                     
                    <div class="row mb-3"> 
                          <label for="inputText" class="col-sm-5 col-form-label">Group Members:</label>
                      </div>  
                      <div class="row mb-3"> 
                          <div class="col-sm-12"> 
                           <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <div class="form-check-inline">
                              <?php if($group->group_manager!=$user->id): ?>
                              <?php if(in_array($user->id,$allgroupusers)): ?>
                              <input class="form-check-input p-2" type="checkbox" name="user[]" id="inlineCheckbox1" value="<?php echo e($user->id); ?>" checked>
                              <?php else: ?>
                               <input class="form-check-input p-2" type="checkbox" name="user[]" id="inlineCheckbox1" value="<?php echo e($user->id); ?>">
                              <?php endif; ?>
                              <label class="form-check-label p-2" for="inlineCheckbox1" style="text-transform:capitalize;"><?php echo e($user->name); ?></label>
                              <?php endif; ?>
                             </div>
                           <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>                              
                          </div>
                        </div>
                    </div> 
                </div> 
             </div> 
            <div class="text-center">
                <button type="submit" class="btn btn-primary">Save</button> 
                <a href="<?php echo e(url('/newgroup')); ?>" class="btn btn-primary" style="color:white;">Back</a> 
            </div>    
         </form>     
</div>
</div>
</main>
<!-- <script type="text/javascript">
    function changeRole(argument) {

        $.ajax({
            url: 'onchangerole/'+ argument,
            type: 'Get',
            dataType: 'json',    
            success:function(response)
            {
               
                $('.role-permission').html(response);
            },
            error: function(response) {
            }
        });
        
    }
</script> -->
 
<?php $__env->stopSection(); ?>


<?php echo $__env->make('frontend.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\CRM\resources\views/frontend/groupMember.blade.php ENDPATH**/ ?>