2025-11-06 17:09:52 +05:30
@ extends ( 'admin.layouts.app' )
@ section ( 'page-title' , 'User Requests' )
@ section ( 'content' )
2025-11-11 14:51:35 +05:30
< div class = " container-fluid px-0 " >
< style >
/* 🌟 Smooth fade-in animation */
@ keyframes fadeInUp {
0 % {
transform : translateY ( 20 px );
opacity : 0 ;
}
100 % {
transform : translateY ( 0 );
opacity : 1 ;
}
}
/* ✨ Container animation */
. card , . custom - table - wrapper {
animation : fadeInUp 0.8 s ease both ;
}
/* 🪄 Table hover effect */
. custom - table tbody tr {
transition : all 0.25 s ease - in - out ;
}
. custom - table tbody tr : hover {
background - color : #fffbea;
transform : scale ( 1.01 );
box - shadow : 0 2 px 6 px rgba ( 0 , 0 , 0 , 0.05 );
}
/* 🎯 Priority Badges */
. priority - badge {
display : inline - flex ;
align - items : center ;
font - size : 13.5 px ;
2025-11-26 23:07:12 +05:30
padding : 6 px 16 px ;
2025-11-11 14:51:35 +05:30
border - radius : 12 px ;
2025-11-26 23:07:12 +05:30
font - weight : 600 ;
2025-11-11 14:51:35 +05:30
box - shadow : 0 1 px 2 px 0 rgba ( 130 , 130 , 130 , 0.15 );
2025-11-26 23:07:12 +05:30
width : 90 px ;
2025-11-11 14:51:35 +05:30
min - height : 28 px ;
justify - content : center ;
color : #fff;
margin : 2 px 0 ;
transition : transform 0.2 s ease - in - out ;
}
. priority - badge : hover {
transform : scale ( 1.08 );
}
2025-11-26 23:07:12 +05:30
. priority - high { background : linear - gradient ( 135 deg , #ff8a8a, #d12929); }
. priority - medium { background : linear - gradient ( 135 deg , #ffe390, #f5b041); }
. priority - low { background : linear - gradient ( 135 deg , #b8f0c2, #1d8660); }
2025-11-11 14:51:35 +05:30
/* 🎨 Table Header (keep original bg-light color) */
. custom - table thead th {
text - align : center ;
font - weight : 700 ;
color : #000;
padding : 14 px ;
font - size : 17 px ;
letter - spacing : 0.5 px ;
border - bottom : 2 px solid #bfbfbf;
2025-11-26 23:07:12 +05:30
background - color : #fde4b3; /* Bootstrap bg-light */
2025-11-11 14:51:35 +05:30
}
/* 🟢 Rounded Corners for Header */
. custom - table thead tr : first - child th : first - child {
border - top - left - radius : 12 px ;
}
. custom - table thead tr : first - child th : last - child {
border - top - right - radius : 12 px ;
}
/* 🧾 Table bottom corners */
. custom - table tbody tr : last - child td : first - child {
border - bottom - left - radius : 12 px ;
}
. custom - table tbody tr : last - child td : last - child {
border - bottom - right - radius : 12 px ;
}
/* 💫 Search box styling */
. input - group input {
border - radius : 10 px 0 0 10 px ;
border : 1 px solid #ccc;
box - shadow : inset 0 1 px 3 px rgba ( 0 , 0 , 0 , 0.05 );
}
. input - group . btn {
border - radius : 0 10 px 10 px 0 ;
transition : all 0.2 s ease - in - out ;
}
. input - group . btn : hover {
background : #ffd65a;
border - color : #ffd65a;
color : #000;
}
/* 🎨 Card Style */
. card {
border - radius : 16 px ;
border : none ;
box - shadow : 0 4 px 10 px rgba ( 0 , 0 , 0 , 0.08 );
background : #fff;
}
2025-11-26 23:07:12 +05:30
/* ⚡ Status Badges - NEW ATTRACTIVE STYLES */
2025-11-11 14:51:35 +05:30
. badge {
2025-11-26 23:07:12 +05:30
font - size : 11 px ! important ;
font - weight : 600 ! important ;
padding : 7 px 13 px ! important ;
border - radius : 20 px ! important ;
text - transform : uppercase ;
letter - spacing : 0.3 px ;
display : inline - flex ! important ;
align - items : center ;
justify - content : center ;
background - size : cover ! important ;
background - position : center ! important ;
color : #fff !important;
text - shadow : 0 1 px 2 px rgba ( 0 , 0 , 0 , 0.3 );
border : 2 px solid transparent ! important ;
box - sizing : border - box ;
line - height : 1.2 ;
gap : 6 px ;
animation : pulse 2 s infinite ;
width : 99 px ;
}
/* Status icons */
. status - icon {
font - size : 0 px ;
display : flex ;
align - items : center ;
justify - content : center ;
}
/* Custom status badge backgrounds */
. badge - pending {
background : url ( '/images/status-bg-pending.png' ) ! important ;
}
. badge - approved {
background : url ( '/images/status-bg-approved.png' ) ! important ;
}
. badge - rejected {
background : url ( '/images/status-bg-rejected.png' ) ! important ;
}
/* Fallback colors if images don't load */
. badge . badge - pending {
background : linear - gradient ( 135 deg , #fef3c7, #fde68a) !important;
color : #d97706 !important;
border - color : #f59e0b !important;
width : 85 px ;
}
. badge . badge - approved {
background : linear - gradient ( 135 deg , #d1fae5, #a7f3d0) !important;
color : #065f46 !important;
border - color : #10b981 !important;
width : 85 px ;
}
. badge . badge - rejected {
background : linear - gradient ( 135 deg , #fecaca, #fca5a5) !important;
color : #991b1b !important;
border - color : #ef4444 !important;
width : 85 px ;
}
/* Animation effects for badges */
@ keyframes pulse {
0 % { box - shadow : 0 0 8 px rgba ( 0 , 0 , 0 , 0.1 ); }
50 % { box - shadow : 0 0 14 px rgba ( 0 , 0 , 0 , 0.15 ); }
100 % { box - shadow : 0 0 8 px rgba ( 0 , 0 , 0 , 0.1 ); }
}
/* Count badges at top */
. count - badge {
-- bs - badge - padding - x : 0.65 em ;
-- bs - badge - padding - y : 0.35 em ;
-- bs - badge - font - size : 0.75 em ;
-- bs - badge - font - weight : 700 ;
-- bs - badge - color : #fff;
-- bs - badge - border - radius : var ( -- bs - border - radius );
2025-11-11 14:51:35 +05:30
}
/* ✨ Heading style */
h4 . fw - bold {
background : linear - gradient ( 90 deg , #000000ff 0%, #030302ff 100%);
- webkit - background - clip : text ;
- webkit - text - fill - color : transparent ;
font - weight : 800 ;
letter - spacing : 1 px ;
}
/* ✅ Center align for last column */
. custom - table tbody td : last - child {
text - align : center ! important ;
vertical - align : middle ! important ;
}
</ style >
<!-- Heading and status badges row -->
< div class = " d-flex justify-content-between align-items-center mb-2 mt-3 " >
< h4 class = " fw-bold mb-0 " > User Requests </ h4 >
< div >
2025-11-26 23:07:12 +05:30
< span class = " count-badge badge rounded-pill bg-warning text-dark me-1 " >
2025-11-11 14:51:35 +05:30
{{ $requests -> where ( 'status' , 'pending' ) -> count () }} Pending
</ span >
2025-11-26 23:07:12 +05:30
< span class = " count-badge badge rounded-pill bg-success me-1 " >
2025-11-11 14:51:35 +05:30
{{ $requests -> where ( 'status' , 'approved' ) -> count () }} Approved
</ span >
2025-11-26 23:07:12 +05:30
< span class = " count-badge badge rounded-pill bg-danger " >
2025-11-11 14:51:35 +05:30
{{ $requests -> where ( 'status' , 'rejected' ) -> count () }} Rejected
</ span >
</ div >
2025-11-06 17:09:52 +05:30
</ div >
2025-11-11 14:51:35 +05:30
< div class = " card mb-4 shadow-sm " >
< div class = " card-body pb-1 " >
< form method = " GET " action = " " >
< div class = " input-group mb-2 " >
< input type = " text " name = " search " value = " { { old('search', request('search')) }} " class = " form-control " placeholder = " Search Request by name, email, Company or Request ID " >
< button class = " btn btn-outline-primary " type = " submit " >< i class = " bi bi-search " ></ i ></ button >
</ div >
</ form >
< div class = " table-responsive custom-table-wrapper " >
< table class = " table align-middle mb-0 custom-table " >
< thead class = " bg-light " >
< 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 >
@ foreach ( $requests as $index => $req )
< tr >
< td > {{ $requests -> count () - $index }} </ 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 >
@ if ( strtolower ( $req -> priority ) == 'high' )
2025-11-26 23:07:12 +05:30
< span class = " priority-badge priority-high " > High </ span >
2025-11-11 14:51:35 +05:30
@ elseif ( strtolower ( $req -> priority ) == 'medium' )
2025-11-26 23:07:12 +05:30
< span class = " priority-badge priority-medium " > Medium </ span >
2025-11-11 14:51:35 +05:30
@ elseif ( strtolower ( $req -> priority ) == 'low' )
2025-11-26 23:07:12 +05:30
< span class = " priority-badge priority-low " > Low </ span >
2025-11-11 14:51:35 +05:30
@ else
{{ $req -> priority }}
@ endif
</ td >
< td > {{ $req -> date }} </ td >
< td >
@ if ( $req -> status == 'approved' )
2025-11-26 23:07:12 +05:30
< span class = " badge badge-approved " >
< i class = " bi bi-check-circle-fill status-icon " ></ i >
Approved
</ span >
2025-11-11 14:51:35 +05:30
@ elseif ( $req -> status == 'rejected' )
2025-11-26 23:07:12 +05:30
< span class = " badge badge-rejected " >
< i class = " bi bi-x-circle-fill status-icon " ></ i >
Rejected
</ span >
2025-11-11 14:51:35 +05:30
@ else
2025-11-26 23:07:12 +05:30
< span class = " badge badge-pending " >
< i class = " bi bi-clock-fill status-icon " ></ i >
Pending
</ span >
2025-11-11 14:51:35 +05:30
@ endif
</ td >
< td > N / A </ td >
</ tr >
@ endforeach
</ tbody >
</ table >
@ if ( $requests -> isEmpty ())
< div class = " py-4 text-center text-muted " > No records found .</ div >
@ endif
</ div >
</ div >
2025-11-07 12:08:34 +05:30
</ div >
2025-11-06 17:09:52 +05:30
</ div >
2025-11-26 23:07:12 +05:30
@ endsection