<?php $__env->startSection('title','المهمات'); ?>
<?php $__env->startSection('content'); ?>
<div class="content-wrapper">
	<!-- Content Header (Page header) -->
	<section class="content-header">
		<h1>
			المهمات
            <?php if($currentUser->can('Create Missions')): ?>
			    <a data-toggle="modal" data-target="#myModal" class="btn btn-success pull-right" href="<?php echo e(route('missions.create')); ?>" ><i class="fa fa-plus"></i> إضافة</a>
            <?php endif; ?>
        </h1>
	</section>

	<!-- Main content -->
	<section class="content">

		<div class="row">
			<div class="col-xs-12">
				<div class="box">
				
				<!-- /.box-header -->
					<div class="box-body">
						<table id="dataList" class="table table-bordered table-striped">
							<thead>
							<tr>
								<th>#</th>
								<th>العنوان</th>
								<th>القسم</th>
								<th>الوصف</th>
								<th class="no-sort"></th>
							</tr>
							</thead>
							<tbody>
							<?php $__currentLoopData = $missions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $store): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								<tr>
									<td><?php echo e($loop->iteration); ?></td>
									<td><?php echo e($store->title); ?></td>
									<td><?php echo e(optional($store->department)->name); ?></td>
									<td><?php echo e($store->description); ?></td>

									<td class="actions">
                                        <?php if($currentUser->can('Edit Missions')): ?>
                                            <a data-toggle="modal" data-target="#myModal" href="<?php echo e(route('missions.edit',$store)); ?>" class="btn btn-primary btn-xs">
                                                <i class="fa fa-pencil fa-fw" aria-hidden="true"></i>
                                            </a>
                                        <?php endif; ?>
                                        <?php if($currentUser->can('Delete Missions')): ?>
                                            <?php if($store->id>9): ?>
                                                <a class="btn btn-xs btn-danger remove-record" data-url="<?php echo e(route('missions.destroy',$store)); ?>" data-id="<?php echo e($store->id); ?>">
                                                    <i class="fa fa-trash"></i>
                                                </a>
                                            <?php endif; ?>
                                        <?php endif; ?>

									</td>
								</tr>
							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
							</tbody>
						</table>
					</div>
					<!-- /.box-body -->
				</div>
				<!-- /.box -->
			</div>
			<!-- /.col -->
		</div>
		<!-- /.row -->
	</section>
	<!-- /.content -->

	<div id="myModal" class="modal fade" style="overflow:hidden;" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title"></h4>
				</div>
				<div class="modal-body">
					<p class="text-center"><div class="fa-3x text-center"><i class="fa fa-cog fa-spin"></i>                    << جارى التحميل >>                </div>                </p>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">إغلاق</button>
				</div>
			</div>
		</div>
	</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.front', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/mwarsha2023/public_html/test4.mwarsha.com/resources/views/missions/index.blade.php ENDPATH**/ ?>