

<?php $__env->startSection('content'); ?>


        <div class="content-wrapper">
          <div class="row">
            
            <div class="col-md-6 grid-margin stretch-card">
              <div class="card">
                <div class="card-body">
                  <h4 class="card-title">Assign Home Category</h4>
                  <?php if(count($errors) > 0): ?>
                      <?php if($errors->any()): ?>
                        <div class="alert alert-primary" role="alert">
                          <?php echo e($errors->first()); ?>

                          <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">×</span>
                          </button>
                        </div>
                      <?php endif; ?>
                  <?php endif; ?>
                  <form class="forms-sample" action="<?php echo e(route('InsertAssignHomeCategory')); ?>" method="post" enctype="multipart/form-data">
                      <?php echo e(csrf_field()); ?>

                    <div class="form-group">
                      <label>Home Category</label>
                     
                      <div class="input-group col-xs-12">
                      <input type="text" name="homecate_name" value="<?php echo e($homecat->homecat_name); ?>" class="form-control"  required readonly>
                      <input type="hidden" name="homecat_id" value="<?php echo e($homecat->homecat_id); ?>">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="exampleInputName1">All Category</label>
                      <!--<input type="text" class="form-control" id="exampleInputName1" name="category_name" placeholder="category name" value="" required>-->
                      <select name="selectedcat[]" class="form-control" multiple>
                            <?php foreach($cityadminCategory as $category){ ?>
                                <option value="<?= $category->category_id ?>" <?php if (in_array($category->category_id, $aci)){ echo "style='background: #eaecf4;' disabled"; } ?> ><?= $category->category_name ?>
                                </option>
                            <?php }?>
                          
                      </select>
                    </div>
                    
                    <button type="submit" class="btn btn-success mr-2">Submit</button>
                    <a href="<?php echo e(route('category')); ?>" class="btn btn-light">Cancel</a>
                  </form>
                </div>
              </div>
            </div>
            
            <div class="col-md-6 grid-margin stretch-card">
                <div class="card">
                    <div class="card-body">
      <div class="table-responsive">
        <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
          <thead>
            <tr>
            <th>S.No</th>
            <th align="center">Category Name</th>
            <th>Action</th>
            </tr>
          </thead>
          <tfoot>
            <tr>
            <th>S.No</th>
            <th align="center">Category Name</th>
            <th>Action</th>
            </tr>
          </tfoot>
          <tbody>
          <?php if(count($assigned_categoroy_list)>0): ?>
          <?php $i=1; ?>
          <?php $__currentLoopData = $assigned_categoroy_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $HomeCategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <tr>
            <td><?php echo e($i); ?></td>
            <td><?php echo e($HomeCategory->category_name); ?></td>
            <td>
              <a href="<?php echo e(route('DeleteAssignHomeCategory', [$HomeCategory->assign_id])); ?>" class="btn btn-danger">Delete</a>
            </td>
        </tr>
              <?php $i++; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              <?php else: ?>
                <tr>
                  <td>No data found</td>
                </tr>
              <?php endif; ?>
                       
          </tbody>
        </table>
      </div>
    </div>
                </div>
            </div>
          </div>
        </div>
</div>
 <?php $__env->stopSection(); ?>
<?php echo $__env->make('cityadmin.layout.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>