CasperSecurity
<div>
<div class="row">
<div class="card z-auto p-[25px]" style="min-height: 690px;">
<div class="card-header">
<div class="flex justify-between items-center mb-2">
<h1 class="heading text-[1.8rem] font-medium uppercase">User</h1>
<div class="flex items-center">
<a class="btn btn-primary duration-500 hover:bg-hover-primary py-[5px] px-3 text-[13px] rounded text-white bg-primary leading-[18px] inline-block border border-primary ml-2 offcanvas-toggle cursor-pointer"
wire:click="showmodalclick">+ Add New User</a>
</div>
</div>
</div>
<div class="card-body">
<div class="p-[1.563rem]">
<div class="flex justify-between">
<div class="w-1/4 px-0 py-2">
<input wire:model="search" type="text"
class="form-control relative text-[13px] text-dark h-[2.813rem] border border-dark block rounded-md py-1.5 px-3 duration-500 dark:hover:border-b-color outline-none w-full"
id="search" placeholder="Search ..." autocomplete="off"/>
</div>
<div class="w-1/3 px-1">
<div class="row flex justify-between">
<div class="w-1/3 px-2 py-2 justify-end">
<select name="orderBy" wire:model="orderBy"
class="form-select w-full rounded-md style-1 py-1.5 px-3 bg-transparent text-[13px] font-normal outline-none relative focus:ring-0 border border-dark text-dark h-[2.813rem] leading-[1.813rem]">
<option value="id">ID</option>
<option value="name">Name</option>
<option value="email">Email</option>
</select>
</div>
<div class="w-1/3 px-2 py-2 justify-end">
<select name="orderAsc" wire:model="orderAsc"
class="form-select w-full rounded-md style-1 py-1.5 px-3 bg-transparent text-[13px] font-normal outline-none relative focus:ring-0 border border-dark text-dark h-[2.813rem] leading-[1.813rem]">
<option value="1">Ascending</option>
<option value="0">Descending</option>
</select>
</div>
<div class="w-1/3 px-2 py-2 justify-end">
<select name="perPage" wire:model="perPage"
class="form-select w-full rounded-md style-1 py-1.5 px-3 bg-transparent text-[13px] font-normal outline-none relative focus:ring-0 border border-dark text-dark h-[2.813rem] leading-[1.813rem]">
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="100">100</option>
<option value="500">500</option>
</select>
</div>
</div>
</div>
</div>
<div class="overflow-x-auto table-scroll">
<table id="dept_datatable" class="display table w-full">
<thead>
<tr class="bg-transparent">
<th class="text-black py-2 px-[0.9375rem] border-2 border-solid border-[#E6E6E6] dark:border-[#444444] capitalize whitespace-nowrap text-xs font-medium text-center">
Action
</th>
<th class="text-black py-2 px-[0.9375rem] border-2 border-solid border-[#E6E6E6] dark:border-[#444444] capitalize whitespace-nowrap text-xs font-medium text-center">
Status
</th>
<th class="text-black py-2 px-[0.9375rem] border-2 border-solid border-[#E6E6E6] dark:border-[#444444] capitalize whitespace-nowrap text-xs font-medium text-center">
ID
</th>
<th class="text-black py-2 px-[0.9375rem] border-2 border-solid border-[#E6E6E6] dark:border-[#444444] capitalize whitespace-nowrap text-xs font-medium text-center">
Name
</th>
<th class="text-black py-2 px-[0.9375rem] border-2 border-solid border-[#E6E6E6] dark:border-[#444444] capitalize whitespace-nowrap text-xs font-medium text-center">
Email
</th>
<th class="text-black py-2 px-[0.9375rem] border-2 border-solid border-[#E6E6E6] dark:border-[#444444] capitalize whitespace-nowrap text-xs font-medium text-center">
Designation
</th>
<th class="text-black py-2 px-[0.9375rem] border-2 border-solid border-[#E6E6E6] dark:border-[#444444] capitalize whitespace-nowrap text-xs font-medium text-center">
Created At
</th>
</tr>
</thead>
<tbody>
<?php if(sizeof($dataTable)>0): ?>
<?php $__currentLoopData = $dataTable; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr class="bg-transparent">
<td class="bg-transparent border-2 border-solid border-[#E6E6E6] dark:border-[#444444] py-2 px-[0.9375rem] capitalize whitespace-nowrap text-[15px] font-normal text-center">
<div class="flex justify-center">
<a href="javascript:void(0);" wire:key="<?php echo e($user->id); ?>"
wire:click="updateClick(<?php echo e($user->id); ?>)"
class="btn w-[1.625rem] h-[1.625rem] leading-[1.625rem] rounded-md text-center text-white bg-primary hover:bg-hover-primary duration-300 mr-1 offcanvas-toggle"><i
class="fas fa-pencil-alt text-[0.875em]"></i></a>
</div>
</td>
<td class="text-black border-2 border-solid border-[#E6E6E6] dark:border-[#444444] bg-transparent xl:py-2 py-2 xl:px-[0.9375rem] px-[0.9375rem] capitalize whitespace-nowrap text-xs font-normal text-center">
<?php if($user->status == '1'): ?>
<span class="text-xs py-[5px] px-3 rounded font-medium leading-[1.5] text-success bg-success-light">Active</span>
<?php else: ?>
<span class="text-xs py-[5px] px-3 rounded font-medium leading-[1.5] text-dark bg-d-light-2">Inactive</span>
<?php endif; ?>
</td>
<td class="text-black border-2 border-solid border-[#E6E6E6] dark:border-[#444444] bg-transparent xl:py-2 py-2 xl:px-[0.9375rem] px-[0.9375rem] whitespace-nowrap text-xs font-normal text-left">
#USER-<?php echo e($user->id); ?><br/>
</td>
<td class="text-black border-2 border-solid border-[#E6E6E6] dark:border-[#444444] bg-transparent xl:py-2 py-2 xl:px-[0.9375rem] px-[0.9375rem] whitespace-nowrap text-xs font-normal text-left">
<?php echo e($user->name); ?><br/>
</td>
<td class="text-black border-2 border-solid border-[#E6E6E6] dark:border-[#444444] bg-transparent xl:py-2 py-2 xl:px-[0.9375rem] px-[0.9375rem] whitespace-nowrap text-xs font-normal text-left"><?php echo e($user->email); ?></td>
<td class="text-black border-2 border-solid border-[#E6E6E6] dark:border-[#444444] bg-transparent xl:py-2 py-2 xl:px-[0.9375rem] px-[0.9375rem] whitespace-nowrap text-xs font-normal text-left"><?php echo e($user->designation); ?></td>
<td class="text-black border-2 border-solid border-[#E6E6E6] dark:border-[#444444] bg-transparent xl:py-2 py-2 xl:px-[0.9375rem] px-[0.9375rem] whitespace-nowrap text-xs font-normal text-center"><?php echo e(\Carbon\Carbon::parse($user->created_at)->format('d-m-Y H:i A')); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<tr class="bg-transparent">
<td colspan="5"
class="text-danger border-2 border-solid border-[#E6E6E6] dark:border-[#444444] bg-transparent xl:py-2 py-2 xl:px-[0.9375rem] px-[0.9375rem] capitalize whitespace-nowrap xl:text-[15px] text-[15px] font-bold text-center">
No Data Available
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
<div class="w-full" wire:ignore.self>
<?php echo e($dataTable->links('livewire.pagination-livewire')); ?>
</div>
</div>
</div>
<?php if(!$showmodal): ?>
<div wire:ignore.self>
<?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'notify::components.notify','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('notify::notify'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<div wire:ignore.self>
<div class="fixed top-0 right-0 flex flex-col xl:w-[500px] md:w-[500px] w-[350px] h-[100vh] z-[1045] bg-white dark:bg-[#1E1E1E] text-body-color duration-500 ease-in-out offcanvas <?php if($showmodal): ?> <?php else: ?> is-closed <?php endif; ?>"
id="offcanvasExample">
<div class="ml-4 flex items-center justify-between p-4">
<h5 class="modal-title" id="#gridSystemModal"><?php if($modelid != null): ?> Update User <?php else: ?> Add
New User <?php endif; ?></h5>
<button type="button"
class="offcanvas-close h-6 w-6 box-content bg-danger-light rounded-md text-lg mr-4 p-2 opacity-50 hover:opacity-100 text-red"
wire:click="closemodalclick">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<div class="p-4 overflow-y-auto overflow-x-hidden dz-scroll">
<div class="container-fluid px-[15px] py-0">
<div>
<div class="row">
<div class="leading-normal block custom-checkbox ">
<input type="checkbox" class="form-check-input" id="customCheckBox1"
required="" wire:model="import_flag">
<label class="mt-[5px] text-body-color ml-[0.3125rem]"
for="customCheckBox1">Assign from registered?</label>
</div>
<?php if($import_flag): ?>
<div class="xl:w-full mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Enter Employee ID,Phone number or Email<span
class="text-danger">*</span></label>
<div class="flex mx-1">
<input type="text" name="comparision_data" wire:model.defer="comparision_data"
class="form-control relative text-[13px] text-body-color h-[2.813rem] border border-b-color block rounded-md py-1.5 px-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full mx-1"
id="exampleFormControlInputfirst" placeholder="Enter Details">
<?php $__errorArgs = ['comparision_data'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span
class="error text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
<button class="btn btn-primary xl:py-[0.710rem] py-2 xl:px-[0.719rem] px-3 duration-300 xl:text-[15px] text-[13px] font-medium rounded text-white bg-primary leading-5 inline-block border-primary hover:bg-hover-primary" wire:click='searchemp'> <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11.7664" cy="11.7666" r="8.98856" stroke="var(--white)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></circle>
<path d="M18.0181 18.4851L21.5421 22" stroke="var(--white)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
</svg></button>
</div>
</div>
<?php endif; ?>
<div class="xl:w-1/2 mb-4">
<label for="name" class="form-label">User Name<span
class="text-danger">*</span></label>
<input type="text" name="name" wire:model.defer="name"
class="form-control relative text-[13px] text-body-color h-[2.813rem] border border-b-color block rounded-md py-1.5 px-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full"
id="name" placeholder="Enter User Name" <?php if($import_flag): ?> disabled <?php else: ?> <?php 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="error text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
<div class="xl:w-1/2 mb-4">
<label for="email" class="form-label">Email<span
class="text-danger">*</span></label>
<input type="text" name="email"
wire:model.defer="email"
class="form-control relative text-[13px] text-body-color h-[2.813rem] border border-b-color block rounded-md py-1.5 px-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full"
id="email" placeholder="Enter email" <?php if($import_flag): ?> disabled <?php else: ?> <?php 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="error text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
<div class="xl:w-1/2 mb-4">
<label for="password" class="form-label">Password<span
class="text-danger">*</span></label>
<input type="password" name="password" wire:model.defer="password"
class="form-control relative text-[13px] text-body-color h-[2.813rem] border border-b-color block rounded-md py-1.5 px-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full"
id="password" placeholder="Enter Password">
<?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span
class="error text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
<div class="xl:w-1/2 mb-4">
<label for="password_confirmation" class="form-label">Confirm Password<span
class="text-danger">*</span></label>
<input type="password" name="password_confirmation"
wire:model.defer="password_confirmation"
class="form-control relative text-[13px] text-body-color h-[2.813rem] border border-b-color block rounded-md py-1.5 px-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full"
id="password_confirmation" placeholder="Confirm Password">
<?php $__errorArgs = ['password_confirmation'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span
class="error text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
<div class="xl:w-1/2 mb-4">
<label for="roleId" class="form-label">Attach a role<span
class="text-danger">*</span></label>
<select name="roleId" wire:model.defer="roleId"
class="form-select w-full rounded-md style-1 py-1.5 px-3 bg-transparent text-[13px] font-normal outline-none relative focus:ring-0 border border-b-color block rounded-md py-1.5 px-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full"
<?php if($import_flag): ?> disabled <?php else: ?> <?php endif; ?>>
<option value="">Choose Role</option>
<?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($role->id); ?>"><?php echo e($role->display_name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php $__errorArgs = ['roleId'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span
class="error text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
<div class="xl:w-1/2 mb-4">
<label for="designationId" class="form-label">Select Designation<span
class="text-danger">*</span></label>
<select name="designationId" wire:model.defer="designationId"
class="form-select w-full rounded-md style-1 py-1.5 px-3 bg-transparent text-[13px] font-normal outline-none relative focus:ring-0 border border-b-color block rounded-md py-1.5 px-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full"
>
<option value="">Choose Designation</option>
<?php $__currentLoopData = $designations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $des): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($des->id); ?>"><?php echo e($des->designation_name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php $__errorArgs = ['designationId'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span
class="error text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
<div class="xl:w-1/2 mb-4">
<label for="selectedDepartments" class="form-label">Select Department<span
class="text-danger">*</span></label>
<select name="selectedDepartments" wire:model.defer="selectedDepartments"
class="form-select w-full rounded-md style-1 py-1.5 px-3 bg-transparent text-[13px] font-normal outline-none relative focus:ring-0 border border-b-color block rounded-md py-1.5 px-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full"
<?php if($import_flag): ?> disabled <?php else: ?> <?php endif; ?>>
<option value="">Choose Department</option>
<?php $__currentLoopData = $departments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dept): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($dept->id); ?>"><?php echo e($dept->display_name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php $__errorArgs = ['selectedDepartments'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> <span
class="error text-danger"><?php echo e($message); ?></span> <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
</div>
</div>
<?php if($modelid): ?>
<div class="flex justify-end mt-3 items-center">
<div class="xl:w-full mb-4 flex justify-between">
<label for="exampleFormControlInputfirst" class="form-label mt-4">Status</label>
<div class="row">
<div class="flex justify-end w-full px-2 py-2">
<select name="orderAsc" wire:model="status"
class="form-select w-full rounded-md style-1 py-1.5 px-3 bg-transparent text-[13px] font-normal outline-none relative focus:ring-0 border border-b-color block rounded-md py-1.5 px-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full">
<option value="1">Active</option>
<option value="0">Inactive</option>
</select>
</div>
</div>
</div>
</div>
<?php endif; ?>
<div class="flex justify-center">
<button class="btn xl:py-[0.719rem] mr-4 py-2.5 xl:px-[1.563rem] px-4 duration-300 xl:text-[15px] text-[13px] font-medium rounded text-danger bg-danger-light leading-5 inline-block border border-danger-light btn-danger light hover:text-white hover:bg-danger offcanvas-close"
wire:click="closemodalclick">Cancel
</button>
<?php if($modelid): ?>
<button class="btn btn-primary xl:py-[0.719rem] py-2.5 xl:px-[1.563rem] px-4 duration-300 xl:text-[15px] text-[13px] font-medium rounded text-white bg-primary leading-5 inline-block border border-primary hover:bg-hover-primary"
wire:click="updateUser">update
</button>
<?php else: ?>
<button class="btn btn-primary xl:py-[0.719rem] py-2.5 xl:px-[1.563rem] px-4 duration-300 xl:text-[15px] text-[13px] font-medium rounded text-white bg-primary leading-5 inline-block border border-primary hover:bg-hover-primary"
wire:click="submitUser">Submit
</button>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php if($showmodal): ?>
<?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'notify::components.notify','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('notify::notify'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php $__env->startSection('externaljs'); ?>
<script>
</script>
<?php $__env->stopSection(); ?>
<?php /**PATH /var/www/orientalss.com/resources/views/livewire/organisation/user-livewire.blade.php ENDPATH**/ ?>