GOOD SHELL MAS BOY
Server: Apache/2.4.52 (Ubuntu)
System: Linux vmi1836763.contaboserver.net 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 17:59:53 UTC 2024 x86_64
User: www-data (33)
PHP: 8.4.10
Disabled: NONE
Upload Files
File: /var/www/admin.fixgini.com/storage/framework/views/b22c763c823af62f1287840338655905.php
<div class="iq-card-body">
    <div class="table-responsive">
        <div class="row justify-content-between">

            <div class="col-sm-12 col-md-6">
                <div id="user_list_datatable_info" class="dataTables_filter">
                    <form class="mr-3 position-relative">
                        <div class="form-group mb-0">
                            <input type="search" class="form-control" wire:model.live="search" placeholder="Search"
                                aria-controls="user-list-table">
                        </div>
                    </form>
                </div>
            </div>

            <!--[if BLOCK]><![endif]--><?php if(Auth::guard('admin')->user() && Auth::guard('admin')->user()->role === 'superadmin'): ?>
            <div class="col-sm-12 col-md-6">
                <div class="user-list-files d-flex float-right">
                    <a class="iq-bg-danger" href="javascript:void();" data-toggle="modal" data-target="#addAdminUser">
                        Add Admin User
                    </a>
                </div>
            </div>
            <?php endif; ?><!--[if ENDBLOCK]><![endif]-->

        </div>
        <table id="user-list-table" class="table table-striped table-bordered mt-4" role="grid"
            aria-describedby="user-list-page-info">
            <thead>
                <tr>
                    <th wire:click="sortBy('id')" style="cursor: pointer;">
                        #ID
                        <!--[if BLOCK]><![endif]--><?php if($sortField === 'id'): ?>
                        <i class="fa fa-sort-<?php echo e($sortDirection === 'asc' ? 'up' : 'down'); ?>"></i>
                        <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    </th>
                    <th wire:click="sortBy('name')" style="cursor: pointer;">
                        Name
                        <!--[if BLOCK]><![endif]--><?php if($sortField === 'name'): ?>
                        <i class="fa fa-sort-<?php echo e($sortDirection === 'asc' ? 'up' : 'down'); ?>"></i>
                        <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    </th>
                    <th>Phone</th>
                    <th>Email</th>
                    <th>Country</th>
                    <th>Permissions</th>
                    <th>Role</th>
                    <th>Status</th>
                    <!--[if BLOCK]><![endif]--><?php if(Auth::guard('admin')->user()->role === 'superadmin'): ?><th>Action</th><?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    <th>Join Date</th>
                </tr>
            </thead>
            <tbody>

                <!--[if BLOCK]><![endif]--><?php $__empty_1 = true; $__currentLoopData = $admins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $admin): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td><?php echo e($admin->id); ?></td>
                    <td><?php echo e($admin->name); ?> <?php echo e($admin->lastname); ?></td>
                    <td><?php echo e($admin->phone); ?></td>
                    <td><?php echo e($admin->email); ?></td>
                    <td>Nigeria</td>
                    <td>
                        <!--[if BLOCK]><![endif]--><?php if(is_array($admin->permissions)): ?>
                        <!--[if BLOCK]><![endif]--><?php $__currentLoopData = $admin->permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <span><?php echo e($permission); ?></span><br>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><!--[if ENDBLOCK]><![endif]-->
                        <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    </td>

                    <td><?php echo e($admin->role); ?></td>
                    <td>
                        <span class="badge <?php echo e($admin->status == 'active' ? 'iq-bg-primary' : 'iq-bg-danger'); ?>">
                            <?php echo e(ucfirst($admin->status)); ?>

                        </span>
                    </td>
                    <!--[if BLOCK]><![endif]--><?php if(Auth::guard('admin')->user()->role === 'superadmin'): ?>
                    <td>
                        <div class="d-flex align-items-center list-user-action">
                            <a href="#" class="iq-bg-primary" wire:click.prevent="editAdmin(<?php echo e($admin->id); ?>)"

                                data-toggle="tooltip" data-placement="top" data-toggle="modal"
                                data-target="#editAdminUser" title="Edit" data-original-title="Edit">
                                <i class="ri-pencil-line"></i>
                            </a>

                            <a href="#" class="iq-bg-danger" data-toggle="tooltip" data-placement="top" title="Delete"
                                data-original-title="Delete" wire:click.prevent="confirmDeletion(<?php echo e($admin->id); ?>)"
                                onclick="confirm('Are you sure about this deletion?') || event.stopImmediatePropagation();">
                                <i class="ri-delete-bin-line"></i>
                            </a>

                        </div>
                    </td>
                    <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    <td><?php echo e($admin->created_at->format('jS M, Y') ?? ''); ?></td>

                </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <p class="text-center text-danger"> No admin available</p>

                <?php endif; ?><!--[if ENDBLOCK]><![endif]-->

            </tbody>
        </table>

    </div>
    <div class="mt-2">
        <?php echo e($admins->links()); ?>

    </div>
    <script>
        document.addEventListener('livewire:load', function() {
            $('.datatable').DataTable({
                paging: false, // Disable Datatable pagination
                searching: false, // Disable Datatable search
                ordering: false, // Disable Datatable sorting
                info: false
            });
        });
    </script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            window.addEventListener('show-modal', () => {
                $('#addAdminUser').modal('show');
            });
            window.addEventListener('hide-modal', () => {
                $('#addAdminUser').modal('hide');
            });
        });
    </script>

    <div class="modal fade" id="addAdminUser" tabindex="-1" role="dialog" aria-labelledby="addAdminUserTitle"
        aria-hidden="true">
        <div class="modal-dialog modal-dialog-scrollable" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="addAdminUserTitle"> <!--[if BLOCK]><![endif]--><?php if($adminId): ?> Edit Admin User <?php else: ?> Add Admin User
                        <?php endif; ?><!--[if ENDBLOCK]><![endif]--> </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 wire:submit.prevent="saveAdminUser" class="mt-0">
                        <div class="form-group">
                            <label>Enter Firstname</label>
                            <input type="text" class="form-control mb-0" placeholder="Enter firstname"
                                wire:model="name">

                            <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
                        </div>
                        <div class="form-group">
                            <label>Enter Lastname</label>
                            <input type="text" class="form-control mb-0" placeholder="Enter lastname"
                                wire:model="lastname">
                            <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['lastname'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
                        </div>
                        <div class="form-group">
                            <label>Email Address</label>
                            <input type="email" autocomplete="email" id="email" class="form-control mb-0"
                                placeholder="Enter email" wire:model="email">
                            <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
                        </div>
                        <div class="form-group">
                            <label>Phone No</label>
                            <input type="tel" class="form-control mb-0" placeholder="Enter phone no" wire:model="phone">
                            <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['phone'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
                        </div>
                        <div class="form-group">
                            <label>Role</label>
                            <select class="form-control mb-0" wire:model="role">
                                <option selected hidden>Select role</option>
                                <option value="superadmin">Super Admin</option>
                                <option value="admin">Admin</option>
                                <option value="support">Support</option>
                                <option value="finance">Finance</option>
                            </select>
                            <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['role'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
                        </div>
                        <!--[if BLOCK]><![endif]--><?php if($adminId): ?>
                        <div class="form-group">
                            <label>Admin Status</label>
                            <select class="form-control mb-0" wire:model="status">
                                <option selected hidden>Select status</option>
                                <option value="active">Active</option>
                                <option value="inactive">Inactive</option>
                            </select>
                            <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span class="text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
                        </div>
                        <?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                        <div class="form-group">
                            <label>Permissions</label>
                            <div>
                                <!-- User Management -->
                                <div class="form-check">
                                    <input type="checkbox" class="form-check-input" id="user" value="user"
                                        wire:model="permissions">
                                    <label class="form-check-label" for="user">User Management</label>
                                </div>

                                <!-- Support Team -->
                                <div class="form-check">
                                    <input type="checkbox" class="form-check-input" id="support" value="support"
                                        wire:model="permissions">
                                    <label class="form-check-label" for="support">Support Team</label>
                                </div>

                                <!-- Task Management -->
                                <div class="form-check">
                                    <input type="checkbox" class="form-check-input" id="task" value="task"
                                        wire:model="permissions">
                                    <label class="form-check-label" for="task">Task Management</label>
                                </div>

                                <!-- Wallet Management -->
                                <div class="form-check">
                                    <input type="checkbox" class="form-check-input" id="wallet" value="wallet"
                                        wire:model="permissions">
                                    <label class="form-check-label" for="wallet">Wallet Management</label>
                                </div>

                                <!-- Payment Management -->
                                <div class="form-check">
                                    <input type="checkbox" class="form-check-input" id="payment" value="payment"
                                        wire:model="permissions">
                                    <label class="form-check-label" for="payment">Payment Management</label>
                                </div>

                                <!-- Settings Management -->
                                <div class="form-check">
                                    <input type="checkbox" class="form-check-input" id="setting" value="setting"
                                        wire:model="permissions">
                                    <label class="form-check-label" for="setting">Setting Management</label>
                                </div>

                            </div>

                            <!-- Validation Error -->
                            <!--[if BLOCK]><![endif]--><?php $__errorArgs = ['permissions'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                            <span class="text-danger"><?php echo e($message); ?></span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?><!--[if ENDBLOCK]><![endif]-->
                        </div>

                        <div hidden class="form-group">
                            <label>Authorization Pin</label>
                            <input type="text" class="form-control mb-0" wire:model="pin" readonly>
                        </div>
                        <div class="sign-info text-center">
                            <button type="submit" class="btn btn-primary d-block w-100 mb-2"> <!--[if BLOCK]><![endif]--><?php if($adminId): ?> Update
                                Admin User <?php else: ?> Add Admin User <?php endif; ?><!--[if ENDBLOCK]><![endif]--> </button>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <!--[if BLOCK]><![endif]--><?php if($adminId): ?><button wire:click="sendTempoPassword" class="btn btn-primary"> Send Temporary Password </button><?php endif; ?><!--[if ENDBLOCK]><![endif]-->
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                </div>

            </div>
        </div>
    </div>
</div><?php /**PATH /var/www/admin.fixgini.com/resources/views/livewire/admin/index.blade.php ENDPATH**/ ?>