Feat: Refactored the whole ui
This commit is contained in:
@@ -19,18 +19,18 @@ export default async function JobsListPage() {
|
||||
const jobsWithCompany = await getAllJobsWithCompany();
|
||||
|
||||
return (
|
||||
<div className="container mx-auto py-10 space-y-8">
|
||||
<h1 className="text-3xl font-bold mb-6">All Jobs</h1>
|
||||
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
<div className="py-10 space-y-8 bg-[#f8fafc] min-h-screen">
|
||||
<h1 className="text-3xl font-bold mb-6 text-blue-800">All Jobs</h1>
|
||||
<div className="grid gap-8 md:grid-cols-2 lg:grid-cols-3">
|
||||
{jobsWithCompany.length === 0 && (
|
||||
<p className="text-muted-foreground">No jobs found.</p>
|
||||
<p className="text-gray-400">No jobs found.</p>
|
||||
)}
|
||||
{jobsWithCompany.map((job) => (
|
||||
<Card key={job.id} className="flex flex-col bg-white text-black border border-gray-200">
|
||||
<Card key={job.id} className="flex flex-col bg-white text-[#1e293b] border-l-8 border-blue-500 border border-gray-200 shadow-md rounded-2xl">
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2">
|
||||
<span>{job.title}</span>
|
||||
<span className="ml-auto text-xs px-2 py-1 rounded bg-gray-100 border text-gray-600">
|
||||
<span className={`ml-auto text-xs px-2 py-1 rounded font-semibold ${job.active ? 'bg-blue-100 text-blue-700' : 'bg-red-100 text-red-700'}`}>
|
||||
{job.active ? 'Active' : 'Inactive'}
|
||||
</span>
|
||||
</CardTitle>
|
||||
@@ -46,23 +46,23 @@ export default async function JobsListPage() {
|
||||
<div className="text-xs text-gray-500">{job.company?.email}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-2">
|
||||
<div className="text-sm"><strong>Location:</strong> {job.location}</div>
|
||||
<div className="text-sm"><strong>Salary:</strong> {job.salary}</div>
|
||||
<div className="text-sm"><strong>Deadline:</strong> {job.applicationDeadline.toLocaleDateString()}</div>
|
||||
<div className="text-sm"><strong>Min CGPA:</strong> {job.minCGPA}</div>
|
||||
<div className="text-sm"><strong>Min SSC:</strong> {job.minSSC}</div>
|
||||
<div className="text-sm"><strong>Min HSC:</strong> {job.minHSC}</div>
|
||||
<div className="text-sm"><strong>Allow Dead KT:</strong> {job.allowDeadKT ? 'Yes' : 'No'}</div>
|
||||
<div className="text-sm"><strong>Allow Live KT:</strong> {job.allowLiveKT ? 'Yes' : 'No'}</div>
|
||||
<div className="text-sm"><strong>Job Link:</strong> <a href={job.link} target="_blank" rel="noopener noreferrer" className="underline text-primary">{job.link}</a></div>
|
||||
<div className="text-sm"><strong>Description:</strong> <span className="whitespace-pre-line">{job.description}</span></div>
|
||||
<div className="text-xs text-gray-400 mt-2">Created: {job.createdAt.toLocaleDateString()} | Updated: {job.updatedAt.toLocaleDateString()}</div>
|
||||
<div className="mt-2 grid grid-cols-2 gap-x-4 gap-y-1 text-sm">
|
||||
<div><strong>Location:</strong> {job.location}</div>
|
||||
<div><strong>Salary:</strong> {job.salary}</div>
|
||||
<div><strong>Deadline:</strong> {job.applicationDeadline.toLocaleDateString()}</div>
|
||||
<div><strong>Min CGPA:</strong> {job.minCGPA}</div>
|
||||
<div><strong>Min SSC:</strong> {job.minSSC}</div>
|
||||
<div><strong>Min HSC:</strong> {job.minHSC}</div>
|
||||
<div><strong>Dead KT:</strong> {job.allowDeadKT ? 'Yes' : 'No'}</div>
|
||||
<div><strong>Live KT:</strong> {job.allowLiveKT ? 'Yes' : 'No'}</div>
|
||||
</div>
|
||||
<div className="text-sm mt-2"><strong>Job Link:</strong> <a href={job.link} target="_blank" rel="noopener noreferrer" className="underline text-blue-700 hover:text-red-600">{job.link}</a></div>
|
||||
<div className="text-sm"><strong>Description:</strong> <span className="whitespace-pre-line">{job.description}</span></div>
|
||||
<div className="text-xs text-gray-400 mt-2">Created: {job.createdAt.toLocaleDateString()} | Updated: {job.updatedAt.toLocaleDateString()}</div>
|
||||
</CardContent>
|
||||
<div className="p-4 pt-0 mt-auto flex gap-2">
|
||||
<Link href={`/jobs/${job.id}`}>
|
||||
<Button variant="outline" className="bg-white text-primary border-primary">View Details</Button>
|
||||
<Button variant="outline" className="bg-blue-700 text-white border-blue-700 hover:bg-red-600 hover:border-red-600 transition">View Details</Button>
|
||||
</Link>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user