"use client"; // <-- Add this line to use state import Link from "next/link"; import { useState } from "react"; // <-- Import useState import { FaMapMarkerAlt, FaBriefcase, FaPaperPlane, FaArrowRight, FaRegClock, FaSearch, } from "react-icons/fa"; import { demoVacancies } from "@/lib/demo-data/vacancies"; import { Vacancy } from "@/types"; import Button from "@/components/ui/Button"; import Modal from "@/components/ui/Modal"; // <-- Import your Modal component import { COLORS } from "@/constants"; import VacancyApplicationForm from "@/components/VacancyApplicationForm"; // Metadata object might need adjustment depending on your setup with client components // If using App Router, keep it, Next.js handles it. /* export const metadata: Metadata = { title: "Current Vacancies | OMS", description: "Explore exciting career opportunities at OMS. Find your perfect role or submit your CV for future consideration.", }; */ // Define gold color for consistency (if COLORS.primary is not '#e1c44a', adjust accordingly) const goldColor = COLORS.primary || "#e1c44a"; // Use COLORS.primary or fallback // --- VacancyCard Component (no changes needed here) --- interface VacancyCardProps { vacancy: Vacancy; } function VacancyCard({ vacancy }: VacancyCardProps) { const formatDate = (dateString: string | undefined) => { if (!dateString) return "Date N/A"; try { return new Date(dateString).toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric", }); } catch { return "Invalid Date"; } }; const postedDate = formatDate(vacancy.postedDate); return (

{vacancy.title}

{vacancy.postedDate && ( )}
View Details
); } // --- End Vacancy Card Component --- // --- Vacancies Page --- export default function VacanciesPage() { // TODO: Replace demoVacancies with actual API call if needed client-side, // or fetch server-side and pass as props if using Pages Router. // For App Router, `async function` fetches server-side by default. const vacancies = demoVacancies; // --- State for the "Future Positions" Modal --- const [isFuturePositionModalOpen, setIsFuturePositionModalOpen] = useState(false); const handleOpenFuturePositionModal = () => setIsFuturePositionModalOpen(true); const handleCloseFuturePositionModal = () => setIsFuturePositionModalOpen(false); // --- End State --- return (
{/* Section 1: Hero / Page Header */}

Career Opportunities

Join our team of innovators and experts. Explore current openings at OMS or submit your CV for future consideration.

{/* Section 2: Vacancy List */}

Current Openings

{vacancies.length > 0 ? (
{vacancies.map((vacancy) => ( ))}
) : (

No Open Vacancies Right Now

We're not actively hiring for specific roles at the moment, but we're always looking for passionate and talented individuals. Check back soon or submit your CV below!

)}
{/* Section 3: Future Positions / CV Submission */}
{" "} {/* Ensure icon contrast */}

{" "} {/* Ensure heading contrast */} Don't See the Right Fit?

{" "} {/* Ensure text contrast */} We're always looking for talented individuals to join our journey. Submit your CV, and we'll keep you in mind for future openings that match your profile.

{/* --- Updated Button --- */} {/* --- End Updated Button --- */}
{/* --- Modal for Future Position Application --- */}
); }