request Model is added
This commit is contained in:
@@ -4,45 +4,73 @@
|
||||
|
||||
@section('content')
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<input type="text" class="form-control w-50" placeholder="Search Request by name, email, company or ID">
|
||||
<div>
|
||||
<span class="badge bg-primary">3 Pending</span>
|
||||
<span class="badge bg-success">1 Approved</span>
|
||||
<span class="badge bg-danger">1 Rejected</span>
|
||||
</div>
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h5 class="mb-0">Pending User Requests</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success">{{ session('success') }}</div>
|
||||
@elseif(session('error'))
|
||||
<div class="alert alert-danger">{{ session('error') }}</div>
|
||||
@elseif(session('info'))
|
||||
<div class="alert alert-info">{{ session('info') }}</div>
|
||||
@endif
|
||||
|
||||
<table class="table table-bordered align-middle">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Request ID</th>
|
||||
<th>Requester</th>
|
||||
<th>Company</th>
|
||||
<th>Type</th>
|
||||
<th>Priority</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>REQ-2024-001</td>
|
||||
<td>Amit Patel<br><small>amit.patel@example.com</small></td>
|
||||
<td>Tech Solutions Pvt. Ltd.</td>
|
||||
<td><span class="badge bg-info text-dark">New Account</span></td>
|
||||
<td><span class="badge bg-danger">High</span></td>
|
||||
<td>2024-09-01</td>
|
||||
<td><span class="badge bg-warning text-dark">Pending</span></td>
|
||||
<td>
|
||||
<i class="bi bi-eye text-primary"></i>
|
||||
<i class="bi bi-x-circle text-danger ms-2"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Request ID</th>
|
||||
<th>Name</th>
|
||||
<th>Company</th>
|
||||
<th>Email</th>
|
||||
<th>Mobile</th>
|
||||
<th>Address</th>
|
||||
<th>Priority</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($requests as $req)
|
||||
<tr>
|
||||
<td>{{ $req->id }}</td>
|
||||
<td>{{ $req->request_id }}</td>
|
||||
<td>{{ $req->customer_name }}</td>
|
||||
<td>{{ $req->company_name }}</td>
|
||||
<td>{{ $req->email }}</td>
|
||||
<td>{{ $req->mobile_no }}</td>
|
||||
<td>{{ $req->address }}</td>
|
||||
<td>{{ $req->priority }}</td>
|
||||
<td>{{ $req->date }}</td>
|
||||
<td>
|
||||
@if($req->status == 'approved')
|
||||
<span class="badge bg-success">Approved</span>
|
||||
@elseif($req->status == 'rejected')
|
||||
<span class="badge bg-danger">Rejected</span>
|
||||
@else
|
||||
<span class="badge bg-warning text-dark">Pending</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($req->status == 'pending' || $req->status == null)
|
||||
<a href="{{ route('admin.requests.approve', $req->id) }}"
|
||||
class="btn btn-success btn-sm">Approve</a>
|
||||
<a href="{{ route('admin.requests.reject', $req->id) }}"
|
||||
class="btn btn-danger btn-sm">Reject</a>
|
||||
@else
|
||||
<em>N/A</em>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="8" class="text-center">No requests found</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user