admin dashboard dropdown search no submission found message added
This commit is contained in:
parent
2ddb4619ad
commit
1455eed578
@ -133,9 +133,12 @@ const SubmissionTable = ({ selectedQuarter, selectedYear }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="border border-[#E5E7EB] bg-white shadow-[0_16px_32px_rgba(15,23,42,0.06)] rounded-[8px]"
|
className="border border-[#E5E7EB] bg-white shadow-[0_16px_32px_rgba(15,23,42,0.06)] rounded-[8px]"
|
||||||
style={{ width: '1250px', minHeight: '780px' }}
|
style={{
|
||||||
>
|
width: '1250px',
|
||||||
|
minHeight: filtered.length === 0 || loading ? 'auto' : '780px',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div className="space-y-[1px] overflow-x-auto">
|
<div className="space-y-[1px] overflow-x-auto">
|
||||||
<div className="px-6 pt-6 pb-4">
|
<div className="px-6 pt-6 pb-4">
|
||||||
<h2 className="text-[18px] leading-[28px] font-medium text-[#232528]">
|
<h2 className="text-[18px] leading-[28px] font-medium text-[#232528]">
|
||||||
@ -144,84 +147,88 @@ const SubmissionTable = ({ selectedQuarter, selectedYear }) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div className="flex items-center justify-center h-[500px] text-gray-500">
|
<div className="flex items-center justify-center h-[500px] text-gray-500">
|
||||||
Loading submissions...
|
Loading submissions...
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : filtered.length === 0 ? (
|
||||||
<div className="min-w-[1200px]">
|
<div className="flex items-center justify-center py-8 min-h-[180px] text-[#7B5C1F] font-semibold text-[15px]">
|
||||||
<Table
|
No Submission Found
|
||||||
headers={headers}
|
</div>
|
||||||
rows={tableRows}
|
) : (
|
||||||
separated
|
<div className="min-w-[1200px]">
|
||||||
rowGapClass="border-spacing-y-1"
|
<Table
|
||||||
pagination={{
|
headers={headers}
|
||||||
currentPage,
|
rows={tableRows}
|
||||||
onPageChange: setCurrentPage,
|
separated
|
||||||
pageSize,
|
rowGapClass="border-spacing-y-1"
|
||||||
totalItems: filtered.length,
|
pagination={{
|
||||||
}}
|
currentPage,
|
||||||
columnWidths={columnWidths}
|
onPageChange: setCurrentPage,
|
||||||
renderCell={(value, _, columnIndex) => {
|
pageSize,
|
||||||
if (columnIndex === 10) {
|
totalItems: filtered.length,
|
||||||
const item = value;
|
}}
|
||||||
return (
|
columnWidths={columnWidths}
|
||||||
<div className="flex items-center justify-center gap-[10px]">
|
renderCell={(value, _, columnIndex) => {
|
||||||
<div className="relative group">
|
if (columnIndex === 10) {
|
||||||
<CheckCircle2
|
const item = value;
|
||||||
size={22}
|
return (
|
||||||
className="text-green-600 cursor-pointer hover:scale-110 transition-transform"
|
<div className="flex items-center justify-center gap-[10px]">
|
||||||
onClick={() =>
|
<div className="relative group">
|
||||||
navigate(`/admin/validations/${item.id}`, {
|
<CheckCircle2
|
||||||
state: { actionType: 'approve' },
|
size={22}
|
||||||
})
|
className="text-green-600 cursor-pointer hover:scale-110 transition-transform"
|
||||||
}
|
onClick={() =>
|
||||||
/>
|
navigate(`/admin/validations/${item.id}`, {
|
||||||
<span className="absolute bottom-full mb-1 left-1/2 -translate-x-1/2 bg-black text-white text-xs px-2 py-[2px] rounded opacity-0 group-hover:opacity-100 transition">
|
state: { actionType: 'approve' },
|
||||||
Approve
|
})
|
||||||
</span>
|
}
|
||||||
</div>
|
/>
|
||||||
|
<span className="absolute bottom-full mb-1 left-1/2 -translate-x-1/2 bg-black text-white text-xs px-2 py-[2px] rounded opacity-0 group-hover:opacity-100 transition">
|
||||||
|
Approve
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="relative group">
|
<div className="relative group">
|
||||||
<XCircle
|
<XCircle
|
||||||
size={22}
|
size={22}
|
||||||
className="text-red-600 cursor-pointer hover:scale-110 transition-transform"
|
className="text-red-600 cursor-pointer hover:scale-110 transition-transform"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate(`/admin/validations/${item.id}`, {
|
navigate(`/admin/validations/${item.id}`, {
|
||||||
state: { actionType: 'reject' },
|
state: { actionType: 'reject' },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<span className="absolute bottom-full mb-1 left-1/2 -translate-x-1/2 bg-black text-white text-xs px-2 py-[2px] rounded opacity-0 group-hover:opacity-100 transition">
|
<span className="absolute bottom-full mb-1 left-1/2 -translate-x-1/2 bg-black text-white text-xs px-2 py-[2px] rounded opacity-0 group-hover:opacity-100 transition">
|
||||||
Reject
|
Reject
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="relative group">
|
<div className="relative group">
|
||||||
<Eye
|
<Eye
|
||||||
size={22}
|
size={22}
|
||||||
className={`cursor-pointer hover:scale-110 transition-transform ${
|
className={`cursor-pointer hover:scale-110 transition-transform ${
|
||||||
item.status?.toLowerCase() === 'pending'
|
item.status?.toLowerCase() === 'pending'
|
||||||
? 'text-[#9E792B]'
|
? 'text-[#9E792B]'
|
||||||
: 'text-gray-500'
|
: 'text-gray-500'
|
||||||
}`}
|
}`}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate(`/admin/validations/${item.id}`, {
|
navigate(`/admin/validations/${item.id}`, {
|
||||||
state: { actionType: 'view' },
|
state: { actionType: 'view' },
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<span className="absolute bottom-full mb-1 left-1/2 -translate-x-1/2 bg-black text-white text-xs px-2 py-[2px] rounded opacity-0 group-hover:opacity-100 transition">
|
<span className="absolute bottom-full mb-1 left-1/2 -translate-x-1/2 bg-black text-white text-xs px-2 py-[2px] rounded opacity-0 group-hover:opacity-100 transition">
|
||||||
View
|
View
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex justify-end px-6 pb-14 pt-6">
|
<div className="flex justify-end px-6 pb-14 pt-6">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user