<?php $__env->startSection('judul_halaman','Voters'); ?>
<?php $__env->startSection('konten'); ?>
<?php $judul = 'Voters'; ?>
	<div class="panel panel-headline">
		<div class="panel-heading">
			<div class="panel-title">E-Voting | Voters</div>
			<div class="panel-subtitle">Periode : 2024-2025</div>
		</div>
		<div class="panel-body">
			<div class="row">
				<div class="col-md-10">
					<!-- <a href="#" class="btn btn-success mb-5"><i class="fa fa-fw fa-user-plus"></i><span> Tambah Voter</span></a> -->
					<a href="<?php echo e(route('admin.voters.tambah')); ?>" class="btn btn-primary mb-5"><i class="fa fa-fw fa-users"></i><span> Tambah Random Voters</span></a>
					<a href="<?php echo e(route('admin.voters.hapus')); ?>" class="btn btn-danger mb-5"><i class="fa fa-fw fa-trash"></i><span> Hapus Akun Voting Masal</span></a>
					<a href="<?php echo e(route('admin.voters.export_excel')); ?>" class="btn btn-success my-3" target="_blank">EXPORT EXCEL</a>
                    
                    <!-- Button trigger modal -->
                    <button type="button" class="btn btn-warning" data-toggle="modal" data-target="#exampleModal">
                        IMPORT EXCEL
                    </button>
                    <a style="text-decoration: none;" href="<?php echo e(route('admin.voters.download')); ?>">
                        <button class="btn btn-primary">Dwonload Format Voters</button>
                    </a>
                    <!-- Modal -->
                    <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
                        <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                            <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                            </div>
                            <div class="modal-body">
                            <form action="<?php echo e(route('admin.voters.import_excel')); ?>" method="post" enctype="multipart/form-data">
                                <?php echo e(csrf_field()); ?>

                                <input type="file" name="file" class="form-control">

                            </div>
                            <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                            <button type="submit" class="btn btn-primary">Save changes</button>
                            </form>
                            </div>
                        </div>
                        </div>
                    </div>

                    
                </div>
			</div>
			<div class="row" style="margin-top:10px;">
				<div class="col-md-12">
					 <div class="table-responsive">
                <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                  <thead>
                    <tr>
                        <th>#</th>
                        <th>NIS</th>
                        <th>Nama</th>
                        <th>Kelas</th>
                        <th>Token</th>
                        <th>Status</th>
                        <th>Kandidat Dipilih</th>
                    </tr>
                  </thead>
                  <tbody>
                    <?php $i=1; ?>
                    <?php $__currentLoopData = $pemilih; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <tr>
                          <td width="10%"><?php echo e($i++); ?></td>
                          <td><?php echo e($data->nis); ?></td>
                          <td><?php echo e($data->nama); ?></td>
                          <td><?php echo e($data->kelas); ?></td>
                          <td style="font-family: 'Times New Roman', Times, serif;"><?php echo e($data->token); ?></td>
                          <td><?php echo e($data->status); ?></td>
                          <td><?php echo e($data->kandidat_dipilih); ?></td>
                      </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              		</tbody>
           		     </table>
					</div>
					</div>
				</div>
			</div>
			</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
  <script src="<?php echo e(asset('/vendor/datatables/jquery.dataTables.min.js')); ?>"></script>
  <script src="<?php echo e(asset('/vendor/datatables/dataTables.bootstrap4.min.js')); ?>"></script>
  <script src="<?php echo e(asset('/vendor/dataTables/datatables-demo.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('dashboard.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\evoting-smpn3babelan\resources\views/dashboard/voter/voters.blade.php ENDPATH**/ ?>