632 lines
19 KiB
TypeScript
632 lines
19 KiB
TypeScript
"use client";
|
|
|
|
import React, { useState, useMemo } from 'react';
|
|
import { Clapperboard, Volume2, Globe, Search, ChevronDown, ChevronUp } from 'lucide-react';
|
|
|
|
const parseEuro = (str: string) => {
|
|
if (!str || str === '-') return null;
|
|
const cleaned = str.replace(/\s/g, '').replace('€', '').replace(',', '.');
|
|
return parseFloat(cleaned);
|
|
};
|
|
|
|
const euro = (n: number | null) => {
|
|
if (n === null) return '-';
|
|
return new Intl.NumberFormat('fr-FR', {
|
|
minimumFractionDigits: 2,
|
|
maximumFractionDigits: 2
|
|
}).format(n) + ' €';
|
|
};
|
|
|
|
interface Emploi {
|
|
nom: string;
|
|
filiere: string;
|
|
niveau: string;
|
|
cddu: {
|
|
semaine35h: number | null;
|
|
semaine39h: number | null;
|
|
jour7h: number | null;
|
|
jour8h: number | null;
|
|
mois35h: number | null;
|
|
mois39h: number | null;
|
|
};
|
|
cdi: number | null;
|
|
}
|
|
|
|
const emploisData: Emploi[] = [
|
|
// Filière G - Réalisation
|
|
{
|
|
nom: "1er assistant réalisateur",
|
|
filiere: "G",
|
|
niveau: "II",
|
|
cddu: {
|
|
semaine35h: parseEuro("948,41 €"),
|
|
semaine39h: parseEuro("1 083,90 €"),
|
|
jour7h: parseEuro("210,76 €"),
|
|
jour8h: parseEuro("240,87 €"),
|
|
mois35h: parseEuro("3 603,95 €"),
|
|
mois39h: parseEuro("4 118,79 €"),
|
|
},
|
|
cdi: parseEuro("2 892,47 €"),
|
|
},
|
|
{
|
|
nom: "2ème assistant réalisateur",
|
|
filiere: "G",
|
|
niveau: "IV",
|
|
cddu: {
|
|
semaine35h: parseEuro("793,15 €"),
|
|
semaine39h: parseEuro("906,46 €"),
|
|
jour7h: parseEuro("176,26 €"),
|
|
jour8h: parseEuro("201,43 €"),
|
|
mois35h: parseEuro("3 013,97 €"),
|
|
mois39h: parseEuro("3 444,52 €"),
|
|
},
|
|
cdi: parseEuro("1 988,58 €"),
|
|
},
|
|
{
|
|
nom: "Assistant réalisateur",
|
|
filiere: "G",
|
|
niveau: "IIIB",
|
|
cddu: {
|
|
semaine35h: parseEuro("881,28 €"),
|
|
semaine39h: parseEuro("1 007,18 €"),
|
|
jour7h: parseEuro("195,84 €"),
|
|
jour8h: parseEuro("223,82 €"),
|
|
mois35h: parseEuro("3 348,87 €"),
|
|
mois39h: parseEuro("3 827,27 €"),
|
|
},
|
|
cdi: parseEuro("2 229,61 €"),
|
|
},
|
|
{
|
|
nom: "Conseiller technique à la réalisation",
|
|
filiere: "G",
|
|
niveau: "II",
|
|
cddu: {
|
|
semaine35h: parseEuro("1 035,68 €"),
|
|
semaine39h: parseEuro("1 183,63 €"),
|
|
jour7h: parseEuro("230,15 €"),
|
|
jour8h: parseEuro("263,03 €"),
|
|
mois35h: parseEuro("3 935,57 €"),
|
|
mois39h: parseEuro("4 497,78 €"),
|
|
},
|
|
cdi: parseEuro("3 013,00 €"),
|
|
},
|
|
{
|
|
nom: "Réalisateur",
|
|
filiere: "G",
|
|
niveau: "HN",
|
|
cddu: {
|
|
semaine35h: null,
|
|
semaine39h: null,
|
|
jour7h: null,
|
|
jour8h: null,
|
|
mois35h: null,
|
|
mois39h: null,
|
|
},
|
|
cdi: null,
|
|
},
|
|
{
|
|
nom: "Scripte",
|
|
filiere: "G",
|
|
niveau: "IIIA",
|
|
cddu: {
|
|
semaine35h: parseEuro("948,41 €"),
|
|
semaine39h: parseEuro("1 083,90 €"),
|
|
jour7h: parseEuro("210,76 €"),
|
|
jour8h: parseEuro("240,87 €"),
|
|
mois35h: parseEuro("3 603,95 €"),
|
|
mois39h: parseEuro("4 118,79 €"),
|
|
},
|
|
cdi: parseEuro("2 651,44 €"),
|
|
},
|
|
{
|
|
nom: "Storyboarder",
|
|
filiere: "G",
|
|
niveau: "IIIB",
|
|
cddu: {
|
|
semaine35h: parseEuro("881,28 €"),
|
|
semaine39h: parseEuro("1 007,18 €"),
|
|
jour7h: parseEuro("195,84 €"),
|
|
jour8h: parseEuro("223,82 €"),
|
|
mois35h: parseEuro("3 348,87 €"),
|
|
mois39h: parseEuro("3 827,27 €"),
|
|
},
|
|
cdi: parseEuro("2 169,36 €"),
|
|
},
|
|
|
|
// Filière H - Son
|
|
{
|
|
nom: "Assistant son",
|
|
filiere: "H",
|
|
niveau: "IV",
|
|
cddu: {
|
|
semaine35h: parseEuro("703,86 €"),
|
|
semaine39h: parseEuro("804,41 €"),
|
|
jour7h: parseEuro("156,41 €"),
|
|
jour8h: parseEuro("178,76 €"),
|
|
mois35h: parseEuro("2 674,68 €"),
|
|
mois39h: parseEuro("3 056,77 €"),
|
|
},
|
|
cdi: parseEuro("1 928,32 €"),
|
|
},
|
|
{
|
|
nom: "Assistant son adjoint",
|
|
filiere: "H",
|
|
niveau: "VI",
|
|
cddu: {
|
|
semaine35h: parseEuro("456,50 €"),
|
|
semaine39h: parseEuro("521,72 €"),
|
|
jour7h: parseEuro("101,45 €"),
|
|
jour8h: parseEuro("115,94 €"),
|
|
mois35h: parseEuro("2 342,34 €"),
|
|
mois39h: parseEuro("2 676,95 €"),
|
|
},
|
|
cdi: parseEuro("1 828,83 €"),
|
|
},
|
|
{
|
|
nom: "Bruiteur",
|
|
filiere: "H",
|
|
niveau: "IIIA",
|
|
cddu: {
|
|
semaine35h: parseEuro("1 035,68 €"),
|
|
semaine39h: parseEuro("1 183,63 €"),
|
|
jour7h: parseEuro("230,15 €"),
|
|
jour8h: parseEuro("263,03 €"),
|
|
mois35h: parseEuro("3 935,57 €"),
|
|
mois39h: parseEuro("4 497,78 €"),
|
|
},
|
|
cdi: parseEuro("2 530,92 €"),
|
|
},
|
|
{
|
|
nom: "Chef OPS / Ingénieur du son",
|
|
filiere: "H",
|
|
niveau: "IIIA",
|
|
cddu: {
|
|
semaine35h: parseEuro("1 194,86 €"),
|
|
semaine39h: parseEuro("1 365,55 €"),
|
|
jour7h: parseEuro("265,52 €"),
|
|
jour8h: parseEuro("303,46 €"),
|
|
mois35h: parseEuro("4 540,45 €"),
|
|
mois39h: parseEuro("5 189,07 €"),
|
|
},
|
|
cdi: parseEuro("2 651,44 €"),
|
|
},
|
|
{
|
|
nom: "Mixeur (direct ou conditions du direct)",
|
|
filiere: "H",
|
|
niveau: "IIIA",
|
|
cddu: {
|
|
semaine35h: parseEuro("1 035,68 €"),
|
|
semaine39h: parseEuro("1 183,63 €"),
|
|
jour7h: parseEuro("230,15 €"),
|
|
jour8h: parseEuro("263,03 €"),
|
|
mois35h: parseEuro("3 935,57 €"),
|
|
mois39h: parseEuro("4 497,78 €"),
|
|
},
|
|
cdi: parseEuro("2 530,92 €"),
|
|
},
|
|
{
|
|
nom: "OPS",
|
|
filiere: "H",
|
|
niveau: "IIIB",
|
|
cddu: {
|
|
semaine35h: parseEuro("881,28 €"),
|
|
semaine39h: parseEuro("1 007,18 €"),
|
|
jour7h: parseEuro("195,84 €"),
|
|
jour8h: parseEuro("223,82 €"),
|
|
mois35h: parseEuro("3 348,87 €"),
|
|
mois39h: parseEuro("3 827,27 €"),
|
|
},
|
|
cdi: parseEuro("2 169,36 €"),
|
|
},
|
|
{
|
|
nom: "Perchiste / 1er assistant son",
|
|
filiere: "H",
|
|
niveau: "IIIA",
|
|
cddu: {
|
|
semaine35h: parseEuro("869,19 €"),
|
|
semaine39h: parseEuro("993,36 €"),
|
|
jour7h: parseEuro("193,15 €"),
|
|
jour8h: parseEuro("220,75 €"),
|
|
mois35h: parseEuro("3 302,93 €"),
|
|
mois39h: parseEuro("3 774,77 €"),
|
|
},
|
|
cdi: parseEuro("2 410,40 €"),
|
|
},
|
|
{
|
|
nom: "Technicien instruments (backliner)",
|
|
filiere: "H",
|
|
niveau: "IIIB",
|
|
cddu: {
|
|
semaine35h: parseEuro("881,28 €"),
|
|
semaine39h: parseEuro("1 007,18 €"),
|
|
jour7h: parseEuro("195,84 €"),
|
|
jour8h: parseEuro("223,82 €"),
|
|
mois35h: parseEuro("3 348,87 €"),
|
|
mois39h: parseEuro("3 827,27 €"),
|
|
},
|
|
cdi: parseEuro("2 386,53 €"),
|
|
},
|
|
|
|
// Filière I - Web
|
|
{
|
|
nom: "Assistant technique web",
|
|
filiere: "I",
|
|
niveau: "VI",
|
|
cddu: {
|
|
semaine35h: parseEuro("456,50 €"),
|
|
semaine39h: parseEuro("521,72 €"),
|
|
jour7h: parseEuro("101,45 €"),
|
|
jour8h: parseEuro("115,94 €"),
|
|
mois35h: parseEuro("1 976,67 €"),
|
|
mois39h: parseEuro("2 259,04 €"),
|
|
},
|
|
cdi: parseEuro("1 828,83 €"),
|
|
},
|
|
{
|
|
nom: "Concepteur de programme web",
|
|
filiere: "I",
|
|
niveau: "I",
|
|
cddu: {
|
|
semaine35h: parseEuro("774,28 €"),
|
|
semaine39h: parseEuro("884,89 €"),
|
|
jour7h: parseEuro("172,06 €"),
|
|
jour8h: parseEuro("196,64 €"),
|
|
mois35h: parseEuro("3 352,63 €"),
|
|
mois39h: parseEuro("3 831,57 €"),
|
|
},
|
|
cdi: parseEuro("2 969,12 €"),
|
|
},
|
|
{
|
|
nom: "Coordinateur de diffusion web",
|
|
filiere: "I",
|
|
niveau: "IIIB",
|
|
cddu: {
|
|
semaine35h: parseEuro("512,31 €"),
|
|
semaine39h: parseEuro("585,49 €"),
|
|
jour7h: parseEuro("113,85 €"),
|
|
jour8h: parseEuro("130,11 €"),
|
|
mois35h: parseEuro("2 218,29 €"),
|
|
mois39h: parseEuro("2 535,18 €"),
|
|
},
|
|
cdi: parseEuro("1 959,62 €"),
|
|
},
|
|
{
|
|
nom: "Coordinateur de production web",
|
|
filiere: "I",
|
|
niveau: "II",
|
|
cddu: {
|
|
semaine35h: parseEuro("582,17 €"),
|
|
semaine39h: parseEuro("665,34 €"),
|
|
jour7h: parseEuro("129,37 €"),
|
|
jour8h: parseEuro("147,85 €"),
|
|
mois35h: parseEuro("2 520,81 €"),
|
|
mois39h: parseEuro("2 880,91 €"),
|
|
},
|
|
cdi: parseEuro("2 197,15 €"),
|
|
},
|
|
{
|
|
nom: "Designer web",
|
|
filiere: "I",
|
|
niveau: "IIIA",
|
|
cddu: {
|
|
semaine35h: parseEuro("535,60 €"),
|
|
semaine39h: parseEuro("612,11 €"),
|
|
jour7h: parseEuro("119,02 €"),
|
|
jour8h: parseEuro("136,03 €"),
|
|
mois35h: parseEuro("2 319,14 €"),
|
|
mois39h: parseEuro("2 650,44 €"),
|
|
},
|
|
cdi: parseEuro("2 019,01 €"),
|
|
},
|
|
{
|
|
nom: "Editeur artistique web",
|
|
filiere: "I",
|
|
niveau: "IV",
|
|
cddu: {
|
|
semaine35h: parseEuro("494,84 €"),
|
|
semaine39h: parseEuro("565,53 €"),
|
|
jour7h: parseEuro("109,96 €"),
|
|
jour8h: parseEuro("125,67 €"),
|
|
mois35h: parseEuro("2 142,66 €"),
|
|
mois39h: parseEuro("2 448,75 €"),
|
|
},
|
|
cdi: parseEuro("1 900,24 €"),
|
|
},
|
|
{
|
|
nom: "Gestionnaire de diffusion internet (traffic manager)",
|
|
filiere: "I",
|
|
niveau: "V",
|
|
cddu: {
|
|
semaine35h: parseEuro("456,50 €"),
|
|
semaine39h: parseEuro("521,72 €"),
|
|
jour7h: parseEuro("101,45 €"),
|
|
jour8h: parseEuro("115,94 €"),
|
|
mois35h: parseEuro("1 976,67 €"),
|
|
mois39h: parseEuro("2 259,04 €"),
|
|
},
|
|
cdi: parseEuro("1 828,83 €"),
|
|
},
|
|
{
|
|
nom: "Opérateur web / Opérateur multicam web",
|
|
filiere: "I",
|
|
niveau: "IIIA",
|
|
cddu: {
|
|
semaine35h: parseEuro("558,88 €"),
|
|
semaine39h: parseEuro("638,72 €"),
|
|
jour7h: parseEuro("124,20 €"),
|
|
jour8h: parseEuro("141,94 €"),
|
|
mois35h: parseEuro("2 419,95 €"),
|
|
mois39h: parseEuro("2 765,65 €"),
|
|
},
|
|
cdi: parseEuro("2 137,77 €"),
|
|
},
|
|
{
|
|
nom: "Technicien de développement web",
|
|
filiere: "I",
|
|
niveau: "IIIB",
|
|
cddu: {
|
|
semaine35h: parseEuro("512,31 €"),
|
|
semaine39h: parseEuro("585,49 €"),
|
|
jour7h: parseEuro("113,85 €"),
|
|
jour8h: parseEuro("130,11 €"),
|
|
mois35h: parseEuro("2 218,29 €"),
|
|
mois39h: parseEuro("2 535,18 €"),
|
|
},
|
|
cdi: parseEuro("1 959,62 €"),
|
|
},
|
|
{
|
|
nom: "Technicien vidéo web",
|
|
filiere: "I",
|
|
niveau: "V",
|
|
cddu: {
|
|
semaine35h: parseEuro("456,50 €"),
|
|
semaine39h: parseEuro("521,72 €"),
|
|
jour7h: parseEuro("101,45 €"),
|
|
jour8h: parseEuro("115,94 €"),
|
|
mois35h: parseEuro("1 976,67 €"),
|
|
mois39h: parseEuro("2 259,04 €"),
|
|
},
|
|
cdi: parseEuro("1 828,83 €"),
|
|
},
|
|
];
|
|
|
|
const filieres = [
|
|
{ code: 'G', nom: 'Réalisation', icon: Clapperboard, color: 'orange' },
|
|
{ code: 'H', nom: 'Son', icon: Volume2, color: 'red' },
|
|
{ code: 'I', nom: 'Web', icon: Globe, color: 'teal' },
|
|
];
|
|
|
|
const colorClasses = {
|
|
orange: {
|
|
bg: 'bg-orange-50',
|
|
border: 'border-orange-200',
|
|
text: 'text-orange-900',
|
|
hover: 'hover:bg-orange-100',
|
|
gradient: 'from-orange-500 to-amber-600',
|
|
ring: 'ring-orange-500',
|
|
},
|
|
red: {
|
|
bg: 'bg-red-50',
|
|
border: 'border-red-200',
|
|
text: 'text-red-900',
|
|
hover: 'hover:bg-red-100',
|
|
gradient: 'from-red-500 to-rose-600',
|
|
ring: 'ring-red-500',
|
|
},
|
|
teal: {
|
|
bg: 'bg-teal-50',
|
|
border: 'border-teal-200',
|
|
text: 'text-teal-900',
|
|
hover: 'hover:bg-teal-100',
|
|
gradient: 'from-teal-500 to-cyan-600',
|
|
ring: 'ring-teal-500',
|
|
},
|
|
};
|
|
|
|
interface EmploiCardProps {
|
|
emploi: Emploi;
|
|
color: keyof typeof colorClasses;
|
|
}
|
|
|
|
function EmploiCard({ emploi, color }: EmploiCardProps) {
|
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
const [activeTab, setActiveTab] = useState<'cddu' | 'cdi'>('cdi');
|
|
const colors = colorClasses[color];
|
|
|
|
return (
|
|
<div className={`rounded-xl border ${colors.border} bg-white overflow-hidden transition-all duration-200 hover:shadow-md`}>
|
|
{/* Header */}
|
|
<button
|
|
onClick={() => setIsExpanded(!isExpanded)}
|
|
className={`w-full px-4 py-3 flex items-center justify-between ${colors.hover} transition-colors`}
|
|
>
|
|
<div className="flex items-center gap-3">
|
|
<span className={`inline-flex items-center px-2 py-1 rounded-md text-xs font-semibold ${colors.bg} ${colors.text}`}>
|
|
Niveau {emploi.niveau}
|
|
</span>
|
|
<h3 className="text-sm font-semibold text-slate-900">{emploi.nom}</h3>
|
|
</div>
|
|
{isExpanded ? (
|
|
<ChevronUp className="w-4 h-4 text-slate-400" />
|
|
) : (
|
|
<ChevronDown className="w-4 h-4 text-slate-400" />
|
|
)}
|
|
</button>
|
|
|
|
{/* Content */}
|
|
{isExpanded && (
|
|
<div className="border-t border-slate-100 p-4 space-y-4">
|
|
{/* Tabs */}
|
|
<div className="flex gap-2">
|
|
<button
|
|
onClick={() => setActiveTab('cdi')}
|
|
className={`flex-1 px-4 py-2 rounded-lg text-xs font-semibold transition-all ${
|
|
activeTab === 'cdi'
|
|
? `bg-gradient-to-r ${colors.gradient} text-white shadow-sm`
|
|
: 'bg-slate-50 text-slate-600 hover:bg-slate-100'
|
|
}`}
|
|
>
|
|
CDI / CDD
|
|
</button>
|
|
<button
|
|
onClick={() => setActiveTab('cddu')}
|
|
className={`flex-1 px-4 py-2 rounded-lg text-xs font-semibold transition-all ${
|
|
activeTab === 'cddu'
|
|
? `bg-gradient-to-r ${colors.gradient} text-white shadow-sm`
|
|
: 'bg-slate-50 text-slate-600 hover:bg-slate-100'
|
|
}`}
|
|
>
|
|
CDDU
|
|
</button>
|
|
</div>
|
|
|
|
{/* Content based on tab */}
|
|
{activeTab === 'cdi' ? (
|
|
<div className={`rounded-lg ${colors.bg} border ${colors.border} p-4`}>
|
|
<p className="text-xs text-slate-600 mb-2">Salaire mensuel minimum</p>
|
|
<p className={`text-2xl font-bold ${colors.text}`}>{euro(emploi.cdi)}</p>
|
|
</div>
|
|
) : (
|
|
<div className="space-y-3">
|
|
{/* Par semaine */}
|
|
<div className={`rounded-lg ${colors.bg} border ${colors.border} p-3`}>
|
|
<p className="text-xs font-semibold text-slate-700 mb-2">Par semaine</p>
|
|
<div className="grid grid-cols-2 gap-3 text-xs">
|
|
<div>
|
|
<p className="text-slate-500">Base 35h</p>
|
|
<p className={`font-bold ${colors.text}`}>{euro(emploi.cddu.semaine35h)}</p>
|
|
</div>
|
|
<div>
|
|
<p className="text-slate-500">Base 39h</p>
|
|
<p className={`font-bold ${colors.text}`}>{euro(emploi.cddu.semaine39h)}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Par jour */}
|
|
<div className={`rounded-lg ${colors.bg} border ${colors.border} p-3`}>
|
|
<p className="text-xs font-semibold text-slate-700 mb-2">Par jour</p>
|
|
<div className="grid grid-cols-2 gap-3 text-xs">
|
|
<div>
|
|
<p className="text-slate-500">Base 7h</p>
|
|
<p className={`font-bold ${colors.text}`}>{euro(emploi.cddu.jour7h)}</p>
|
|
</div>
|
|
<div>
|
|
<p className="text-slate-500">Base 8h</p>
|
|
<p className={`font-bold ${colors.text}`}>{euro(emploi.cddu.jour8h)}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Par mois */}
|
|
<div className={`rounded-lg ${colors.bg} border ${colors.border} p-3`}>
|
|
<p className="text-xs font-semibold text-slate-700 mb-2">Par mois</p>
|
|
<div className="grid grid-cols-2 gap-3 text-xs">
|
|
<div>
|
|
<p className="text-slate-500">Base 35h</p>
|
|
<p className={`font-bold ${colors.text}`}>{euro(emploi.cddu.mois35h)}</p>
|
|
</div>
|
|
<div>
|
|
<p className="text-slate-500">Base 39h</p>
|
|
<p className={`font-bold ${colors.text}`}>{euro(emploi.cddu.mois39h)}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
)}
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
interface CategorieBFluxDataPart3Props {
|
|
activeFiliere: string;
|
|
}
|
|
|
|
export default function CategorieBFluxDataPart3({ activeFiliere }: CategorieBFluxDataPart3Props) {
|
|
const [searchTerm, setSearchTerm] = useState('');
|
|
|
|
const filteredEmplois = useMemo(() => {
|
|
// D'abord filtrer par la filière active
|
|
let result = emploisData.filter(e => e.filiere === activeFiliere);
|
|
|
|
// Puis appliquer le filtre de recherche
|
|
if (searchTerm) {
|
|
result = result.filter(e =>
|
|
e.nom.toLowerCase().includes(searchTerm.toLowerCase())
|
|
);
|
|
}
|
|
|
|
return result.sort((a, b) => a.nom.localeCompare(b.nom));
|
|
}, [activeFiliere, searchTerm]);
|
|
|
|
// Déterminer la couleur en fonction de la filière
|
|
const getColorForFiliere = (filiereCode: string): keyof typeof colorClasses => {
|
|
const filiere = filieres.find(f => f.code === filiereCode);
|
|
return (filiere?.color as keyof typeof colorClasses) || 'blue';
|
|
};
|
|
const activeFiliereInfo = filieres.find(f => f.code === activeFiliere);
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
{/* En-tête */}
|
|
<div className="rounded-xl border bg-gradient-to-br from-amber-50 to-orange-50 p-4">
|
|
<h2 className="text-lg font-semibold text-amber-900 mb-1">
|
|
Filière {activeFiliere} - {activeFiliereInfo?.nom || 'Filière'}
|
|
</h2>
|
|
<p className="text-xs text-amber-600 mt-2">
|
|
{emploisData.length} emplois - Grille de salaires CCNPA (IDCC 2642) - Valeurs 2025
|
|
</p>
|
|
</div>
|
|
|
|
{/* Recherche */}
|
|
<div className="space-y-4">
|
|
{/* Barre de recherche */}
|
|
<div className="relative">
|
|
<Search className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400" />
|
|
<input
|
|
type="text"
|
|
value={searchTerm}
|
|
onChange={(e) => setSearchTerm(e.target.value)}
|
|
placeholder={`Rechercher dans ${activeFiliereInfo?.nom || 'la filière'}...`}
|
|
className="w-full pl-10 pr-4 py-2.5 rounded-lg border border-slate-200 focus:ring-2 focus:ring-amber-500 focus:border-transparent text-sm"
|
|
/>
|
|
</div>
|
|
|
|
{/* Résultats */}
|
|
<div className="space-y-3">
|
|
<div className="flex items-center justify-between">
|
|
<h3 className="text-sm font-semibold text-slate-700">
|
|
{filteredEmplois.length} emploi{filteredEmplois.length > 1 ? 's' : ''} trouvé{filteredEmplois.length > 1 ? 's' : ''}
|
|
</h3>
|
|
{searchTerm && (
|
|
<button
|
|
onClick={() => setSearchTerm('')}
|
|
className="text-xs text-slate-500 hover:text-slate-700"
|
|
>
|
|
Effacer la recherche
|
|
</button>
|
|
)}
|
|
</div>
|
|
|
|
<div className="space-y-2">
|
|
{filteredEmplois.map((emploi, index) => (
|
|
<EmploiCard
|
|
key={index}
|
|
emploi={emploi}
|
|
color={getColorForFiliere(emploi.filiere)}
|
|
/>
|
|
))}
|
|
</div>
|
|
|
|
{filteredEmplois.length === 0 && (
|
|
<div className="text-center py-12">
|
|
<p className="text-sm text-slate-500">Aucun emploi trouvé pour cette recherche.</p>
|
|
</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|