File: /var/www/admin.fixgini.com/storage/framework/views/5c86446c10f63cbbc8feb5efd4e2a7af.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>
<!-- Per Page Dropdown -->
<div class="col-sm-12 col-md-6 text-right">
<div class="form-group mb-0">
<label for="perPage" class="mr-2">Show</label>
<select id="perPage" class="form-control d-inline-block w-auto" wire:model.live="perPage">
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="50">50</option>
<option value="100">100</option>
</select>
<span>entries</span>
</div>
</div>
</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>State</th>
<th hidden>Role</th>
<th>Status</th>
<th>Action</th>
<th>Join Date</th>
</tr>
</thead>
<tbody>
<!--[if BLOCK]><![endif]--><?php $__empty_1 = true; $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
<tr>
<td><?php echo e($user->id); ?></td>
<td><?php echo e($user->name); ?> <?php echo e($user->lastname); ?></td>
<td><?php echo e($user->phone ?? 'NA'); ?></td>
<td><?php echo e($user->email); ?></td>
<td><?php echo e($user->city ?? 'NA'); ?> <?php echo e($user->state ?? 'NA'); ?></td>
<td hidden><?php echo e(ucfirst($user->role)); ?></td>
<td>
<span class="badge <?php echo e($user->status == 'active' ? 'iq-bg-primary' : 'iq-bg-danger'); ?>">
<?php echo e($user->status == 'active' ? 'Enabled' : 'Disabled'); ?>
</span>
</td>
<td>
<div class="d-flex align-items-center list-user-action">
<a href="#" class="iq-bg-primary" wire:click.prevent="editUser(<?php echo e($user->id); ?>)"
data-toggle="tooltip" data-placement="top" data-toggle="modal"
data-target="#editUserUser" 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($user->id); ?>)"
onclick="confirm('Are you sure about this deletion?') || event.stopImmediatePropagation();">
<i class="ri-delete-bin-line"></i>
</a>
</div>
</td>
<td><?php echo e($user->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 customer available</p>
<?php endif; ?><!--[if ENDBLOCK]><![endif]-->
</tbody>
</table>
</div>
<div class="mt-2">
<?php echo e($users->links()); ?>
</div>
<script>
document.addEventListener('livewire:load', function() {
$('.datatable').DataTable({
paging: false,
searching: false,
ordering: false,
info: false
});
});
</script>
<script>
document.addEventListener('DOMContentLoaded', function() {
window.addEventListener('show-modal', () => {
$('#addUser').modal('show');
});
window.addEventListener('hide-modal', () => {
$('#addUser').modal('hide');
});
});
</script>
<div class="modal fade" id="addUser" tabindex="-1" role="dialog" aria-labelledby="addUserTitle"
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="addUserTitle"> Edit User </h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<form wire:submit.prevent="saveUser" class="mt-0">
<div class="form-group">
<label>Enter Firstname</label>
<input type="text" readonly class="form-control mb-0" placeholder="Enter firstname"
wire:model="name">
</div>
<div class="form-group">
<label>Enter Lastname</label>
<input type="text" readonly class="form-control mb-0" placeholder="Enter lastname"
wire:model="lastname">
</div>
<div class="form-group">
<label>Email Address</label>
<input type="email" readonly autocomplete="email" id="email" class="form-control mb-0"
placeholder="Enter email" wire:model="email">
</div>
<div class="form-group">
<label>Phone No</label>
<input type="tel" class="form-control mb-0" readonly wire:model="phone">
</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="seller">Seller</option>
<option value="buyer">Buyer</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($userId): ?>
<div class="form-group">
<label><?php echo e(ucfirst($role)); ?> Status</label>
<select class="form-control mb-0" wire:model="status">
<option selected hidden>Select status</option>
<option value="active">Enabled</option>
<option value="inactive">Disabled</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="sign-info text-center">
<button type="submit" class="btn btn-primary d-block w-100 mb-2"> Update Customer </button>
</div>
</form>
</div>
<div class="modal-footer">
<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/user/index.blade.php ENDPATH**/ ?>