Mission Refactor Big champs

This commit is contained in:
alma 2026-01-09 16:03:48 +01:00
parent 42e710dcfa
commit 544fa1ce8c
3 changed files with 70 additions and 38 deletions

View File

@ -165,7 +165,8 @@ export default function MissionDetailPage() {
const getParticipationLabel = (participation: string) => {
switch(participation) {
case 'volontaire': return 'Volontaire';
case 'ouvert': return 'Ouvert';
case 'volontaire': return 'Ouvert'; // Legacy support
case 'cooptation': return 'Cooptation';
default: return participation;
}

View File

@ -144,7 +144,8 @@ export default function MissionsPage() {
console.log("Participation value:", participation); // Debug log
if (!participation) return 'Non spécifié';
switch(participation) {
case 'volontaire': return 'Volontaire';
case 'ouvert': return 'Ouvert';
case 'volontaire': return 'Ouvert'; // Legacy support
case 'cooptation': return 'Cooptation';
default: return participation;
}

View File

@ -746,12 +746,12 @@ export function MissionsAdminPanel() {
<label className="block text-sm font-medium mb-1 text-gray-700">Projection<span className="text-red-500">*</span></label>
<Select onValueChange={(value) => handleInputChange('projection', value)}>
<SelectTrigger className="bg-white border-gray-300">
<SelectValue placeholder="Select duration" />
<SelectValue placeholder="Sélectionner" />
</SelectTrigger>
<SelectContent>
<SelectItem value="short">Short Term (&lt; 1 month)</SelectItem>
<SelectItem value="medium">Medium Term (1-3 months)</SelectItem>
<SelectItem value="long">Long Term (&gt; 3 months)</SelectItem>
<SelectItem value="short">Court Terme</SelectItem>
<SelectItem value="medium">Moyen Terme</SelectItem>
<SelectItem value="long">Long Terme</SelectItem>
</SelectContent>
</Select>
</div>
@ -827,10 +827,10 @@ export function MissionsAdminPanel() {
<label className="block text-sm font-medium mb-1 text-gray-700">Participation<span className="text-red-500">*</span></label>
<Select onValueChange={(value) => handleInputChange('participation', value)}>
<SelectTrigger className="bg-white border-gray-300">
<SelectValue placeholder="Select participation" />
<SelectValue placeholder="Sélectionner" />
</SelectTrigger>
<SelectContent>
<SelectItem value="volontaire">Volontaire</SelectItem>
<SelectItem value="ouvert">Ouvert</SelectItem>
<SelectItem value="cooptation">Cooptation</SelectItem>
</SelectContent>
</Select>
@ -867,93 +867,123 @@ export function MissionsAdminPanel() {
</div>
<div className="flex items-center space-x-2">
<Checkbox
id="dataintelligence"
checked={selectedProfils.includes('DataIntelligence')}
id="fullstack"
checked={selectedProfils.includes('Developper FullStack')}
onCheckedChange={(checked) => {
if (checked) {
setSelectedProfils([...selectedProfils, 'DataIntelligence']);
setSelectedProfils([...selectedProfils, 'Developper FullStack']);
} else {
setSelectedProfils(selectedProfils.filter(p => p !== 'DataIntelligence'));
setSelectedProfils(selectedProfils.filter(p => p !== 'Developper FullStack'));
}
}}
className="border-gray-300"
/>
<label htmlFor="dataintelligence" className="text-sm text-gray-700">DataIntelligence</label>
<label htmlFor="fullstack" className="text-sm text-gray-700">Developper FullStack</label>
</div>
<div className="flex items-center space-x-2">
<Checkbox
id="expression"
checked={selectedProfils.includes('Expression')}
id="devops"
checked={selectedProfils.includes('DevOps')}
onCheckedChange={(checked) => {
if (checked) {
setSelectedProfils([...selectedProfils, 'Expression']);
setSelectedProfils([...selectedProfils, 'DevOps']);
} else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Expression'));
setSelectedProfils(selectedProfils.filter(p => p !== 'DevOps'));
}
}}
className="border-gray-300"
/>
<label htmlFor="expression" className="text-sm text-gray-700">Expression</label>
<label htmlFor="devops" className="text-sm text-gray-700">DevOps</label>
</div>
<div className="flex items-center space-x-2">
<Checkbox
id="mediation"
checked={selectedProfils.includes('Mediation')}
id="design"
checked={selectedProfils.includes('Design')}
onCheckedChange={(checked) => {
if (checked) {
setSelectedProfils([...selectedProfils, 'Mediation']);
setSelectedProfils([...selectedProfils, 'Design']);
} else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Mediation'));
setSelectedProfils(selectedProfils.filter(p => p !== 'Design'));
}
}}
className="border-gray-300"
/>
<label htmlFor="mediation" className="text-sm text-gray-700">Mediation</label>
<label htmlFor="design" className="text-sm text-gray-700">Design</label>
</div>
<div className="flex items-center space-x-2">
<Checkbox
id="investigation"
checked={selectedProfils.includes('Investigation')}
id="investigation-doc"
checked={selectedProfils.includes('Investigation&Documentation')}
onCheckedChange={(checked) => {
if (checked) {
setSelectedProfils([...selectedProfils, 'Investigation']);
setSelectedProfils([...selectedProfils, 'Investigation&Documentation']);
} else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Investigation'));
setSelectedProfils(selectedProfils.filter(p => p !== 'Investigation&Documentation'));
}
}}
className="border-gray-300"
/>
<label htmlFor="investigation" className="text-sm text-gray-700">Investigation</label>
<label htmlFor="investigation-doc" className="text-sm text-gray-700">Investigation & Documentation</label>
</div>
<div className="flex items-center space-x-2">
<Checkbox
id="coding"
checked={selectedProfils.includes('Coding')}
id="ml-ai"
checked={selectedProfils.includes('MachineLearning&AI')}
onCheckedChange={(checked) => {
if (checked) {
setSelectedProfils([...selectedProfils, 'Coding']);
setSelectedProfils([...selectedProfils, 'MachineLearning&AI']);
} else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Coding'));
setSelectedProfils(selectedProfils.filter(p => p !== 'MachineLearning&AI'));
}
}}
className="border-gray-300"
/>
<label htmlFor="coding" className="text-sm text-gray-700">Coding</label>
<label htmlFor="ml-ai" className="text-sm text-gray-700">Machine Learning & AI</label>
</div>
<div className="flex items-center space-x-2">
<Checkbox
id="lean"
checked={selectedProfils.includes('Lean')}
id="communication"
checked={selectedProfils.includes('Communication')}
onCheckedChange={(checked) => {
if (checked) {
setSelectedProfils([...selectedProfils, 'Lean']);
setSelectedProfils([...selectedProfils, 'Communication']);
} else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Lean'));
setSelectedProfils(selectedProfils.filter(p => p !== 'Communication'));
}
}}
className="border-gray-300"
/>
<label htmlFor="lean" className="text-sm text-gray-700">Lean</label>
<label htmlFor="communication" className="text-sm text-gray-700">Communication</label>
</div>
<div className="flex items-center space-x-2">
<Checkbox
id="organisation"
checked={selectedProfils.includes('Organisation')}
onCheckedChange={(checked) => {
if (checked) {
setSelectedProfils([...selectedProfils, 'Organisation']);
} else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Organisation'));
}
}}
className="border-gray-300"
/>
<label htmlFor="organisation" className="text-sm text-gray-700">Organisation</label>
</div>
<div className="flex items-center space-x-2">
<Checkbox
id="support"
checked={selectedProfils.includes('Support')}
onCheckedChange={(checked) => {
if (checked) {
setSelectedProfils([...selectedProfils, 'Support']);
} else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Support'));
}
}}
className="border-gray-300"
/>
<label htmlFor="support" className="text-sm text-gray-700">Support</label>
</div>
</div>
</div>