<?php $__env->startSection('title', 'DataTables'); ?>

<?php $__env->startSection('vendor-style'); ?>
  
  <link rel="stylesheet" href="<?php echo e(asset(mix('vendors/css/tables/datatable/dataTables.bootstrap5.min.css'))); ?>">
  <link rel="stylesheet" href="<?php echo e(asset(mix('vendors/css/tables/datatable/responsive.bootstrap5.min.css'))); ?>">
  <link rel="stylesheet" href="<?php echo e(asset(mix('vendors/css/pickers/flatpickr/flatpickr.min.css'))); ?>">
  <link rel="stylesheet" href="<?php echo e(asset(mix('vendors/css/forms/select/select2.min.css'))); ?>">
<?php $__env->stopSection(); ?>

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

<link rel="stylesheet" type="text/css" href="<?php echo e(asset('css/base/plugins/forms/pickers/form-flat-pickr.css')); ?>">

<?php $__env->stopSection(); ?>


<?php $__env->startSection('content'); ?>
<!-- Ajax Sourced Server-side -->
<section id="ajax-datatable">
  <div class="row">
    <div class="col-12">
      <div class="card">
        <div class="card-header border-bottom d-flex " style="justify-content: space-between !important">
          <h4 class="card-title">Data Pengguna  <?php echo e($first->group); ?></h4>
          <div>
              <a href="<?php echo e(url("group/index")); ?>" class="btn btn-warning">Kembali</a>
              <a href="#" class="btn btn-primary"  data-bs-toggle="modal"
              data-bs-target="#tambah">Tambah</a>
          </div>
        </div>
        <div class="modal fade" id="tambah" tabindex="-1" aria-hidden="true">
          <div class="modal-dialog  modal-lg" role="document">
            <form method="POST" enctype="multipart/form-data" class="modal-content" action="<?php echo e(url("group/add_detail_group")); ?>">
              <?php echo csrf_field(); ?>
              <div class="modal-header">
                <input type="hidden" name="id_group" value="<?php echo e($id); ?>">
                <h5 class="modal-title" id="modalFullTitle">Tambah Pengguna Group</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
              </div>
              <div class="modal-body">
                <div class="containers">
                    <div class="mb-1">
                        <label class="form-label" for="select2-nested"><h5>Nama Pengguna*</h5></label>
                        <select class="select2 form-select <?php $__errorArgs = ['uuid_contact'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            is-invalid
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="select2-nested-empat" name="uuid_contact" required>
                            <option value="">Pilih</option>
                            <?php $__currentLoopData = $contact; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $users): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($users->no); ?>"><?php echo e($users->name); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>
                        <?php $__errorArgs = ['uuid_contact'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <small class="text-danger"><?php echo e($message); ?></small>
                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                      </div>
                </div>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-label-secondary" data-bs-dismiss="modal">Close</button>
                <button type="submit" class="btn btn-primary">Simpan</button>
              </div>
            </form>
          </div>
        </div>
        <?php if(session()->get("success")): ?>
            <div class="alert alert-success m-2 p-1"><?php echo e(session()->get("success")); ?></div>
        <?php endif; ?>
        <?php if(session()->get("error")): ?>
        <div class="alert alert-danger m-2 p-1"><?php echo e(session()->get("error")); ?></div>
        <?php endif; ?>
        <?php if($errors->any()): ?>
        <div class="alert m-2 p-1 alert-danger">
            <ul>
                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <li><?php echo e($error); ?></li>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </ul>
        </div>
    <?php endif; ?>
        <div class="card-datatable m-1">
            <div class="table-responsive">
                <table class=" table-hover  table-striped table tables-responsive" style="width:100% !important" id="table">
                  <thead>
                    <tr>
                      <th>#</th>
                      <th>Nama Pegawai</th>
                      <th>No WhatsApp</th>
                      <th>Action</th>
                    </tr>
                  </thead>
                </table>
                
            </div>
        </div>
      </div>
    </div>
  </div>
</section>

<?php $__env->stopSection(); ?>


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

  <script src="<?php echo e(asset(mix('vendors/js/tables/datatable/jquery.dataTables.min.js'))); ?>"></script>
  <script src="<?php echo e(asset(mix('vendors/js/tables/datatable/dataTables.bootstrap5.min.js'))); ?>"></script>
  <script src="<?php echo e(asset(mix('vendors/js/tables/datatable/dataTables.responsive.min.js'))); ?>"></script>
  <script src="<?php echo e(asset(mix('vendors/js/tables/datatable/responsive.bootstrap5.js'))); ?>"></script>
  <script src="<?php echo e(asset(mix('vendors/js/pickers/flatpickr/flatpickr.min.js'))); ?>"></script>
  <script src="<?php echo e(asset(mix('vendors/js/forms/select/select2.full.min.js'))); ?>"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page-script'); ?>
  
  <script src="<?php echo e(asset(mix('js/scripts/tables/table-datatables-advanced.js'))); ?>"></script>
  <script src="<?php echo e(asset(mix('js/scripts/forms/form-select2.js'))); ?>"></script>
  <script src="<?php echo e(asset(mix('js/scripts/components/components-modals.js'))); ?>"></script>
  <script>
    $(document).ready(function(){
      $("#table").DataTable({
                processing: true,
                serverSide: true,
                ajax: "<?php echo e(url('group/detail_data_group/'. $id)); ?>",
                columns: [{
                        data: "DT_RowIndex",
                        name: "DT_RowIndex",
                        orderable: false,
                        searchable: false
                    },
                    {
                        data: 'nama_pegawai',
                        name: 'nama_pegawai'
                    },
                    {
                        data: 'no_wa',
                        name: 'no_wa'
                    },
                    {
                        data: 'action',
                        name: 'action'
                    }
                ]
            });
    });
  </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts/contentLayoutMaster', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\project\project_ews_clone\resources\views//content/group/detail.blade.php ENDPATH**/ ?>