"use client" import { useState } from "react" import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card" import { Button } from "@/components/ui/button" import { Badge } from "@/components/ui/badge" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select" import { Input } from "@/components/ui/input" import { Search, Plus, Edit, Trash2, Eye, Users, Calendar, MapPin, DollarSign, MoreVertical, Briefcase, Clock, TrendingUp, Copy, ExternalLink, Pause, Play, Zap, } from "lucide-react" import Link from "next/link" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" // Mock data - in production this would come from API const mockJobs = [ { id: "1", title: "Senior Full Stack Developer", type: "Full Time", location: "São Paulo, SP", workMode: "hybrid", salary: "R$ 12,000 - R$ 18,000", applications: 45, views: 320, postedAt: "2 days ago", expiresAt: "28 days left", status: "active", }, { id: "2", title: "Designer UX/UI", type: "Full Time", location: "Remote", workMode: "remote", salary: "R$ 8,000 - R$ 12,000", applications: 32, views: 256, postedAt: "5 days ago", expiresAt: "25 days left", status: "active", }, { id: "3", title: "Product Manager", type: "Full Time", location: "São Paulo, SP", workMode: "onsite", salary: "R$ 15,000 - R$ 20,000", applications: 28, views: 189, postedAt: "1 week ago", expiresAt: "21 days left", status: "active", }, { id: "4", title: "DevOps Engineer", type: "Full Time", location: "São Paulo, SP", workMode: "hybrid", salary: "R$ 14,000 - R$ 20,000", applications: 15, views: 98, postedAt: "2 weeks ago", expiresAt: "14 days left", status: "paused", }, { id: "5", title: "Junior Frontend Developer", type: "Full Time", location: "São Paulo, SP", workMode: "onsite", salary: "R$ 4,000 - R$ 6,000", applications: 120, views: 450, postedAt: "1 month ago", expiresAt: "Expired", status: "closed", }, ] const statusConfig = { active: { label: "Active", color: "bg-green-100 text-green-800 border-green-200" }, paused: { label: "Paused", color: "bg-yellow-100 text-yellow-800 border-yellow-200" }, closed: { label: "Closed", color: "bg-gray-100 text-gray-800 border-gray-200" }, draft: { label: "Draft", color: "bg-blue-100 text-blue-800 border-blue-200" }, } const workModeConfig = { remote: { label: "Remote", color: "bg-cyan-100 text-cyan-800" }, hybrid: { label: "Hybrid", color: "bg-violet-100 text-violet-800" }, onsite: { label: "On-site", color: "bg-orange-100 text-orange-800" }, } export default function MyJobsPage() { const [jobs] = useState(mockJobs) const [statusFilter, setStatusFilter] = useState("all") const [searchTerm, setSearchTerm] = useState("") const filteredJobs = jobs.filter((job) => { const matchesStatus = statusFilter === "all" || job.status === statusFilter const matchesSearch = job.title.toLowerCase().includes(searchTerm.toLowerCase()) || job.location.toLowerCase().includes(searchTerm.toLowerCase()) return matchesStatus && matchesSearch }) const stats = { total: jobs.length, active: jobs.filter((j) => j.status === "active").length, applications: jobs.reduce((acc, j) => acc + j.applications, 0), views: jobs.reduce((acc, j) => acc + j.views, 0), } return (
{/* Header */}

My Jobs

Manage your job postings

{/* Stats */}
{stats.total}

Total Jobs

{stats.active}

Active

{stats.applications}

Applications

{stats.views}

Total Views

{/* Filters */}
setSearchTerm(e.target.value)} />
{/* Jobs List */}
{filteredJobs.length === 0 ? (

No jobs found

Start by posting your first job.

) : ( filteredJobs.map((job) => (
{/* Job Info */}

{job.title}

{statusConfig[job.status as keyof typeof statusConfig].label} {workModeConfig[job.workMode as keyof typeof workModeConfig].label}
View Edit Duplicate Preview {/* Boost Feature (Roadmap) */} Boost Job {job.status === "active" ? ( Pause ) : job.status === "paused" ? ( Activate ) : null} Delete
{job.location} {job.salary} {job.expiresAt}
{job.applications} applications
{job.views} views
Posted {job.postedAt}
{/* Actions */}
)) )}
) }