
<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-md">
            <div class="card card-user">
                <div class="card-header pt-4" style="align-self: center;justify-content: center;width: 75%;border-bottom: none;">
                    <h3>All Notifications</h3>
                </div>
                <div class="card-body">
                    <?php if(isset($notifications)): ?>
                        <div class="table-responsive p-2">
                            <table class="table table-hover">
                                <thead class="text-dark">
                                    <tr>
                                        <th class="text-center" scope="col">S.No.</th>
                                        <th class="text-center" scope="col">From</th>
                                        <th class="text-center" scope="col">To</th>
                                        <th class="text-center" scope="col">Subject</th>
                                        <!-- <th scope="col" class="d-flex justify-content-center">Action</th> -->
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php $__empty_1 = true; $__currentLoopData = $notifications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                        <?php
                                            // dd($value->content);
                                        ?>
                                        <tr>
                                            <td class="text-center" scope="row"><?php echo e($loop->iteration); ?></td>
                                            <td class="text-center"><?php echo e($value->from); ?></td>
                                            <td class="text-center"><?php echo e($value->to); ?></td>
                                            <td class="text-center"><?php echo e($value->subject); ?></td>
                                            <td class="text-center" style="padding: 0px">
                                                <?php
                                                    $url = "";
                                                    if($value->type == 'usercreate'){
                                                        $url = url('viewOrEditRole/view') . '/' . $value->content;
                                                    }else if($value->type == 'newMapping'){
                                                        $contents = explode(", ", $value->content);
                                                        $id = $contents[1];
                                                        $role = $contents[0] == 'marshal' ? 'sitemarshal' : $contents[0];
                                                        $url = url('existingMap') . '/' . $role . '/' . $id;
                                                    }else if($value->type == 'newEvent'){
                                                        $url = url('notification/event') . '/' . $value->content;
                                                    }else if($value->type == 'newConcern'){
                                                        $url = url('view/concern') . '/' . $value->content;
                                                    }
                                                ?>
                                                <!-- <a class="btn btn-info mx-1" style="color: cornsilk;font-size: smaller;font-weight: bold;" title="View" href="<?php echo e($url); ?>">
                                                    <i class="fa fa-eye"></i>
                                                </a>
                                                <a class="btn btn-danger mx-1" style="color: cornsilk;font-size: smaller;font-weight: bold;" title="Delete" href="#">
                                                    <i class="fa fa-trash"></i>
                                                </a> -->
                                            </td>
                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                        <tr>
                                            <td colspan="7" align="center">No Notifications Yet!</td>
                                        </tr>
                                    <?php endif; ?>
                                </tbody>
                            </table>
                        </div>
                    <?php endif; ?>
                </div>
                <div class="card-footer p-0" style="align-self: center;text-align: center;border-bottom: none;border-top: none;color: #d45353;display: flex;justify-content: center;">
                    <h6><?php echo e($notifications->links()); ?></h6>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.masterDashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/nexaipaybr/public_html/foodycraft/app/Modules/Vendor/Views/notifications.blade.php ENDPATH**/ ?>