116 lines
5.2 KiB
PHP
116 lines
5.2 KiB
PHP
@extends("admin.main")
|
|
@section("content")
|
|
@if(auth()->guard('admins')->user()->can("manager customer"))
|
|
<div class="card card-primary card-outline">
|
|
<div class="card-header">
|
|
<form action="{{ route('customer.index') }}" method="get">
|
|
<div class="row form-group mb-0">
|
|
<div class="col">
|
|
<div class="form-group">
|
|
<label for="inputName">
|
|
Client/Company Name </label>
|
|
<input type="text" name="name" id="inputName" class="form-control" value="{{ request()->name ?? "" }}">
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="form-group">
|
|
<label for="inputEmail">
|
|
Email Address</label>
|
|
<input type="email" name="email" id="inputEmail" class="form-control" value="{{ request()->email ?? "" }}">
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="form-group">
|
|
<label for="inputPhone">
|
|
Phone Number</label>
|
|
<input type="text" name="phone" id="inputPhone" class="form-control" value="{{ request()->phone ?? "" }}">
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<div class="form-group">
|
|
<label for="inputStatus">
|
|
Status</label>
|
|
<select name="status" class="form-control" id="inputStatus">
|
|
<option value="full" @selected(request()->status === "full")>Any</option>
|
|
<option value="active" @selected(request()->status === "active")>Active</option>
|
|
<option value="de_active" @selected(request()->status === "de_active")>In Active</option>
|
|
<option value="closed" @selected(request()->status === "closed")>Closed</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col">
|
|
<label class="clear-search hidden">
|
|
|
|
</label>
|
|
<button type="submit" class="form-control btn btn-block bg-gradient-primary">
|
|
<i class="fas fa-search"></i> Search
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<span>{{ $customers->count() }} Records Found</span>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
<table class="table table-invoice table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 10px">
|
|
<label for=""></label><input type="checkbox" name="check" class="check-all" id="">
|
|
</th>
|
|
<th>First Name</th>
|
|
<th>Last Name</th>
|
|
<th>Company</th>
|
|
<th>Email Address</th>
|
|
<th style="width: 40px">Services</th>
|
|
<th style="width: 40px">Created</th>
|
|
<th style="width: 40px">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if($customers->count())
|
|
@foreach($customers->all() as $item)
|
|
<tr>
|
|
<td>
|
|
<input type="checkbox" name="id[]" id="" value="{{ $item->id }}">
|
|
</td>
|
|
<td>
|
|
<a href="{{ route("customer.info",['userid' => $item->id]) }}"
|
|
title="View Profile"> {{ $item->firstname }}</a>
|
|
</td>
|
|
<td>
|
|
{{ $item->lastname }}
|
|
</td>
|
|
<td>
|
|
{{ $item->company }}
|
|
</td>
|
|
<td>
|
|
{{ $item->email }}
|
|
</td>
|
|
<td class="text-center">
|
|
{!! Helpers::get_count_service($item) !!}
|
|
</td>
|
|
<td>
|
|
@time($item->created_at)
|
|
</td>
|
|
<td>
|
|
{!! $item->getStatus() !!}
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
@endif
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="card-footer">
|
|
{{ $customers->withQueryString()->links() }}
|
|
</div>
|
|
</div>
|
|
@else
|
|
<div class="alert alert-danger alert-dismissible">
|
|
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to any Customer
|
|
management department</h5>
|
|
</div>
|
|
@endif
|
|
@endsection
|