<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
            <?php echo e(__('الحضور')); ?>

        </h2>
     <?php $__env->endSlot(); ?>

    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
                <div class="p-6 text-gray-900">
                    <?php echo e(__("You're logged in!")); ?>

                </div>



<div class="col-md-12 ">
    <!-- Area 1 -->
    <div style="color: black;" class="col-md-4 flex-1 bg-blue-500 text-white rounded-lg shadow p-6">
       
        <p> 
             <button style="background-color: cadetblue;color: white;" 
             class="" id="openModal">تسجيل</button>
        </p>
    </div>

    <!-- Area 2 -->
    <div style="color: black;" class="col-md-4 flex-1 bg-green-500 text-white rounded-lg shadow p-6">
        <h3 class="text-lg font-bold mb-2"> x</h3>
        <p>x x...</p>
    </div>

    <!-- Area 3 -->
    <div style="color: black;" class="col-md-4 flex-1 bg-purple-500 text-white rounded-lg shadow p-6">
        <h3 class="text-lg font-bold mb-2">x </h3>
        <p>x x...</p>
    </div>
</div>
<div class="col-md-12">
    <br>
</div>
<div class="col-md-12 ">
    <!-- Area 1 -->
    <div style="color: black;" class="col-md-4 flex-1text-white rounded-lg shadow">
        <h3 class="text-lg font-bold mb-2"> قائمة الحضور اليوم </h3>
        <p>محتوى هنا...</p>
    </div>

    <!-- Area 2 -->
 
      <div style="overflow-x: auto; direction: rtl; " class="p-6  shadow">
        <h3 class="text-lg font-bold mb-2"> قائمة المدعوين : </h3>
      
        <table id="registrationsTable" class="display" style="scale: 0.870;">
    <thead>
        <tr>
            <th>الإسم بالكامل</th>
            <th>البريد الإلكتروني</th>
            <th>التلفون</th>
            <th>الولاية</th>
            <th>المؤسسة</th>
           
            <th>الوظيفة</th>
            <th>رقم الهوية</th>
            <th>ملف الهوية</th>
            <th> barcode </th>
        </tr>
    </thead>
</table>
    </div>
</div>


<div class="col-md-12">
    
                    <div class="my-settings footer-center" style="padding-top: 30px;text-align: center;">
                        <p>
                            <br>
                            وزارة الصحة الاتحادية - تقنية المعلومات <i class="fa fa-computer"></i>
                            <!--img class="flex items-center justify-end" src="<?php echo e(url('img/logo-fmoh1.png')); ?>" width="30" height="30" -->
                        </p>

                    </div>
</div>
    
                 

                 <!-- Modal -->
  <div id="registerModal" class="modal">
    <div class="modal-content">
      <span class="close" id="closeModal">&times;</span>
      <h3>تسجيل</h3>
    <form action="<?php echo e(route('attendance.store')); ?>" method="post" enctype="multipart/form-data">
    <?php echo csrf_field(); ?>
        <div class="form-group">
          <input type="text" name="Full_Name" placeholder="الإسم بالكامل" required>
          <input type="hidden" name="lng" value="Ar">
        </div>
        <div class="form-group">
          <input type="email" name="E_mail" placeholder="البريد الإلكتروني" required>
        </div>
        <div class="form-group"> 
          <input type="text" name="Tel" placeholder="التلفون" pattern="[0-9]+" required>
        </div>
        <div class="form-group">
          <select name="state_id" required>
            <option value="">----- إختر الولاية -----</option>
            <?php $__currentLoopData = $states; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $state): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <option value="<?php echo e($state->id); ?>"><?php echo e($state->StatesName); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <!-- باقي الخيارات -->
          </select>
        </div>
        <div class="form-group">
          <select name="participant_id" required>
            <option value="">---- المؤسسة ---</option>
           <?php $__currentLoopData = $Participant; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $Parti): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <option value="<?php echo e($Parti->id); ?>"><?php echo e($Parti->Participant_name); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            <!-- باقي الخيارات -->
          </select>
        </div>
        <div class="form-group">
          <input type="text" name="Job" placeholder="أدخل إسم الإدارة / المنظمة / القطاع الخاص" required>
        </div>
        <div class="form-group">
          <select name="attendance_id" required>
            <option value="">----- طريقة الحضور -----</option>
            <?php $__currentLoopData = $Attendance; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $Atte): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <option value="<?php echo e($Atte->id); ?>"><?php echo e($Atte->attendances_type); ?></option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          </select>
        </div>
        <div class="form-group">
          <input type="text" name="Identification" placeholder="رقم الهوية" pattern="[0-9]+" required>
        </div>
        <div class="form-group">
          <label>إرفاق إثبات الشخصية (ID)</label>
          <input type="file" name="Identification_File" required>
        </div>
        <div class="form-group">
          <button type="submit">إرسال</button>
        </div>
      </form>
    </div>
  </div>
  

                

            </div>
        </div>
    </div>

    <script>
    // Open modal
    document.getElementById("openModal").onclick = function() {
      document.getElementById("registerModal").style.display = "block";
    }
    // Close modal
    document.getElementById("closeModal").onclick = function() {
      document.getElementById("registerModal").style.display = "none";
    }
    // Close when clicking outside
    window.onclick = function(event) {
      if (event.target == document.getElementById("registerModal")) {
        document.getElementById("registerModal").style.display = "none";
      }
    }
  </script>
  <script>
$(function() {
    $('#registrationsTable').DataTable({
        processing: true,
        serverSide: true,
        ajax: '<?php echo e(route('attendance.data')); ?>',
        columns: [
            { data: 'Full_Name', name: 'Full_Name' },
            { data: 'E_mail', name: 'E_mail' },
            { data: 'Tel', name: 'Tel' },
            { data: 'StatesName', name: 'StatesName' },
            { data: 'Participant_name', name: 'Participant_name' },
           // { data: 'attendances_type', name: 'attendances_type' },
            { data: 'Job', name: 'Job' },
            { data: 'Identification', name: 'Identification' },
            //{ data: 'Identification_File', name: 'Identification_File' },
             { data: 'file', name: 'file', orderable: false, searchable: false },
             { data: 'Card', name: 'Card', orderable: false, searchable: false }
    ]
    });
});
</script>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH /var/www/html/conference-system/resources/views/registration/Attendance.blade.php ENDPATH**/ ?>