CasperSecurity
<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">{{$page_names}}</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 {{$page_name}}</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="client_name">Client Name</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">Decending</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-left">
Client 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-left">
Client Category
</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">
Address
</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">
Contact Person 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-cent er">
Contact Person Mobile
</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-cent er">
Contact Person Email-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-cent er">
Created At
</th>
</tr>
</thead>
<tbody>
@if(sizeof($clientdetails)>0)
@foreach($clientdetails as $client)
<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);"
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"
wire:click="updateclick({{$client->id}})"><i
class="fas fa-pencil-alt text-[0.875em]"></i></a>
<a href="javascript:void(0);"
class="btn w-[1.625rem] h-[1.625rem] leading-[1.625rem] rounded-md text-center text-white bg-danger hover:bg-danger-hover duration-300"
wire:click="deleteclick({{$client->id}})"><i
class="fa fa-trash 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">
@if($client->status == '1')
<span
class="text-xs py-[5px] px-3 rounded font-medium leading-[1.5] text-success bg-success-light">Active</span>
@else
<span
class="text-xs py-[5px] px-3 rounded font-medium leading-[1.5] text-dark bg-d-light-2">Inactive</span>
@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">{{$client->client_name}}</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">{{$client->getClientCategory->category_name}}</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">{{$client->client_address}}</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">{{$client->contact_name}}</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">{{$client->contact_mobile}}</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">{{$client->contact_mail}}</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">{{\Carbon\Carbon::parse($client->created_at)->format('d-m-Y H:i A')}}</td>
</tr>
@endforeach
@else
<tr class="bg-transparent">
<td colspan="10"
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>
@endif
</tbody>
</table>
</div>
<div class="w-full" wire:ignore.self>
{{$clientdetails->links('livewire.pagination-livewire')}}
</div>
</div>
</div>
@if(!$showmodal)
<div wire:ignore.self>
<x-notify::notify/>
</div>
@endif
</div>
<div wire:ignore.self>
<div
class="fixed top-0 right-0 flex flex-col xl:w-full md:w-[500px] w-[350px] h-[100vh] z-[1045] bg-white dark:bg-[#1E1E1E] text-body-color duration-500 ease-in-out offcanvas @if($showmodal) @else is-closed @endif"
id="offcanvasExample">
<div class="ml-4 flex items-center justify-between p-4">
@if($modelid)
<h5 class="modal-title" id="#gridSystemModal">Update {{$page_name}}</h5>
@else
<h5 class="modal-title" id="#gridSystemModal">Add New {{$page_name}}</h5>
@endif
<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="w-2/3">
<div class="row">
<div class="xl:w-1/4 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Client Name<span class="text-danger">*</span></label>
<input type="text" name="client_name" wire:model.defer="client_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="exampleFormControlInputfirst" placeholder="Enter Client Name" pattern="[A-Za-z\s]+" title="Please enter only characters">
@error('client_name') <span class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/4 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Client Category<span
class="text-danger">*</span></label>
<select name="client_category_id" wire:model="client_category_id"
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">
<option value="">Choose Client Category</option>
@foreach($clientcategories as $cat)
<option value="{{$cat->id}}">{{$cat->category_name}}</option>
@endforeach
</select>
@error('client_category_id') <span
class="error text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/4 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Country<span
class="text-danger">*</span></label>
<select name="client_country" wire:model="client_country"
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">
<option value="">Select</option>
@foreach($countrys as $country)
<option value="{{$country->id}}">{{$country->country_name}}</option>
@endforeach
</select>
@error('client_country') <span
class="error text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/4 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">State<span
class="text-danger">*</span></label>
<select name="client_state" wire:model="client_state"
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">
<option value="">Select</option>
@foreach($states as $state)
<option value="{{$state->id}}">{{$state->state_name}}</option>
@endforeach
</select>
@error('client_state') <span
class="error text-danger">{{ $message }}</span> @enderror
</div>
<div class="mb-4 md:w-1/2">
<label class="form-label text-body-color dark:text-white mb-3">Client Address<span
class="text-danger">*</span></label>
<textarea
class="relative text-[13px] h-auto min-h-auto border border-b-color block rounded-md p-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full resize-y"
rows="3" id="r_address" wire:model.defer="client_address"></textarea>
@error('client_address') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="mb-4 md:w-1/2">
<label class="form-label text-body-color dark:text-white mb-3">Billing Address<span
class="text-danger">*</span></label>
<textarea
class="relative text-[13px] h-auto min-h-auto border border-b-color block rounded-md p-3 duration-500 focus:border-primary dark:hover:border-b-color outline-none w-full resize-y"
rows="3" id="r_address" wire:model.defer="billing_address"></textarea>
@error('billing_address') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/4 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Contact Person Name</label>
<input type="text" name="contact_name" wire:model.defer="contact_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="exampleFormControlInputfirst" placeholder="Enter Person's Name">
@error('contact_name') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/4 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Contact Person Mobile
No.</label>
<input type="text" maxlength="10" name="contact_mobile"
wire:model.defer="contact_mobile" onkeypress="return onlyNumberKey(event)"
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="exampleFormControlInputfirst" placeholder="Enter Mobile Number">
@error('contact_mobile') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/4 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Contact Person Email</label>
<input type="email" name="contact_mail" wire:model.defer="contact_mail"
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="exampleFormControlInputfirst" placeholder="Enter Contact Mail">
@error('contact_mail') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/4 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Fax</label>
<input type="text" name="fax" wire:model.defer="fax"
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="exampleFormControlInputfirst" placeholder="Enter Fax">
@error('fax') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/3 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">CIN No</label>
<input type="text" name="cin_no" wire:model.defer="cin_no"
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="exampleFormControlInputfirst" placeholder="Enter CIN No">
@error('cin_no') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/3 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">PAN No</label>
<input type="text" name="pan_no" wire:model.defer="pan_no"
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="exampleFormControlInputfirst" pattern="[A-Za-z0-9\s]+" title="Please enter letters and numbers only" placeholder="Enter PAN No" maxlength="10" minlength="10">
@error('pan_no') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-1/3 mb-4">
<label for="exampleFormControlInputfirst" class="form-label">GST No</label>
<input type="text" name="gst_no" wire:model.defer="gst_no"
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="exampleFormControlInputfirst" placeholder="Enter GST No" maxlength="15" minlength="15">
@error('gst_no') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
</div>
@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>
@endif
</div>
<div class="w-1/3">
<div class="row">
<div class="xl:w-full mb-4">
<label class="form-label text-body-color dark:text-white">Upload Logo</label>
<x-forms.filepond
wire:model="logo"
allowImagePreview
imagePreviewMaxHeight="200"
allowFileTypeValidation
acceptedFileTypes="['image/*']"
allowFileSizeValidation
maxFileSize="4mb"
/>
@error('logo') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="xl:w-full mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Work Location</label>
<input type="text" name="work_location" wire:model.defer="work_location"
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="exampleFormControlInputfirst" placeholder="Enter Work Location" maxlength="15" minlength="15">
@error('work_location') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
<div class="mb-4 md:w-full">
<div class="flex justify-between w-full px-2 py-2">
<div>
<label class="form-label text-body-color dark:text-white mb-3">Location Type<span
class="text-danger">*</span></label>
</div>
<div class="flex">
<div>
<input type="radio" id="select" name="location_type" value="0" wire:model.debounce.0s="location_type" class="mr-2" checked >
<label for="select" class="mr-4">Single</label>
</div>
<div>
<input type="radio" id="complete" name="" value="1" wire:model.debounce.0s="location_type" class="mr-2" >
<label for="complete" class="mr-4">Multi</label>
</div>
</div>
@error('') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
</div>
@if($multi_area)
<div class="xl:w-full mb-4">
<label for="exampleFormControlInputfirst" class="form-label">Other Locations</label>
<input type="text" name="work_location" wire:model.defer="other_location"
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="exampleFormControlInputfirst" placeholder="Enter Work Location" maxlength="15" minlength="15">
@error('work_location') <span
class="w-full mt-1 text-xs text-danger">{{ $message }}</span> @enderror
</div>
@endif
</div>
</div>
</div>
<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>
@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="update">Update
</button>
@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="save">Submit
</button>
@endif
</div>
</div>
</div>
</div>
@if($showmodal)
<x-notify::notify/>
@endif
</div>
</div>
</div>
@section('externaljs')
<script>
</script>
@endsection