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) => { const getParticipationLabel = (participation: string) => {
switch(participation) { switch(participation) {
case 'volontaire': return 'Volontaire'; case 'ouvert': return 'Ouvert';
case 'volontaire': return 'Ouvert'; // Legacy support
case 'cooptation': return 'Cooptation'; case 'cooptation': return 'Cooptation';
default: return participation; default: return participation;
} }

View File

@ -144,7 +144,8 @@ export default function MissionsPage() {
console.log("Participation value:", participation); // Debug log console.log("Participation value:", participation); // Debug log
if (!participation) return 'Non spécifié'; if (!participation) return 'Non spécifié';
switch(participation) { switch(participation) {
case 'volontaire': return 'Volontaire'; case 'ouvert': return 'Ouvert';
case 'volontaire': return 'Ouvert'; // Legacy support
case 'cooptation': return 'Cooptation'; case 'cooptation': return 'Cooptation';
default: return participation; 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> <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)}> <Select onValueChange={(value) => handleInputChange('projection', value)}>
<SelectTrigger className="bg-white border-gray-300"> <SelectTrigger className="bg-white border-gray-300">
<SelectValue placeholder="Select duration" /> <SelectValue placeholder="Sélectionner" />
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
<SelectItem value="short">Short Term (&lt; 1 month)</SelectItem> <SelectItem value="short">Court Terme</SelectItem>
<SelectItem value="medium">Medium Term (1-3 months)</SelectItem> <SelectItem value="medium">Moyen Terme</SelectItem>
<SelectItem value="long">Long Term (&gt; 3 months)</SelectItem> <SelectItem value="long">Long Terme</SelectItem>
</SelectContent> </SelectContent>
</Select> </Select>
</div> </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> <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)}> <Select onValueChange={(value) => handleInputChange('participation', value)}>
<SelectTrigger className="bg-white border-gray-300"> <SelectTrigger className="bg-white border-gray-300">
<SelectValue placeholder="Select participation" /> <SelectValue placeholder="Sélectionner" />
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
<SelectItem value="volontaire">Volontaire</SelectItem> <SelectItem value="ouvert">Ouvert</SelectItem>
<SelectItem value="cooptation">Cooptation</SelectItem> <SelectItem value="cooptation">Cooptation</SelectItem>
</SelectContent> </SelectContent>
</Select> </Select>
@ -867,93 +867,123 @@ export function MissionsAdminPanel() {
</div> </div>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Checkbox <Checkbox
id="dataintelligence" id="fullstack"
checked={selectedProfils.includes('DataIntelligence')} checked={selectedProfils.includes('Developper FullStack')}
onCheckedChange={(checked) => { onCheckedChange={(checked) => {
if (checked) { if (checked) {
setSelectedProfils([...selectedProfils, 'DataIntelligence']); setSelectedProfils([...selectedProfils, 'Developper FullStack']);
} else { } else {
setSelectedProfils(selectedProfils.filter(p => p !== 'DataIntelligence')); setSelectedProfils(selectedProfils.filter(p => p !== 'Developper FullStack'));
} }
}} }}
className="border-gray-300" 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>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Checkbox <Checkbox
id="expression" id="devops"
checked={selectedProfils.includes('Expression')} checked={selectedProfils.includes('DevOps')}
onCheckedChange={(checked) => { onCheckedChange={(checked) => {
if (checked) { if (checked) {
setSelectedProfils([...selectedProfils, 'Expression']); setSelectedProfils([...selectedProfils, 'DevOps']);
} else { } else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Expression')); setSelectedProfils(selectedProfils.filter(p => p !== 'DevOps'));
} }
}} }}
className="border-gray-300" 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>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Checkbox <Checkbox
id="mediation" id="design"
checked={selectedProfils.includes('Mediation')} checked={selectedProfils.includes('Design')}
onCheckedChange={(checked) => { onCheckedChange={(checked) => {
if (checked) { if (checked) {
setSelectedProfils([...selectedProfils, 'Mediation']); setSelectedProfils([...selectedProfils, 'Design']);
} else { } else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Mediation')); setSelectedProfils(selectedProfils.filter(p => p !== 'Design'));
} }
}} }}
className="border-gray-300" 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>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Checkbox <Checkbox
id="investigation" id="investigation-doc"
checked={selectedProfils.includes('Investigation')} checked={selectedProfils.includes('Investigation&Documentation')}
onCheckedChange={(checked) => { onCheckedChange={(checked) => {
if (checked) { if (checked) {
setSelectedProfils([...selectedProfils, 'Investigation']); setSelectedProfils([...selectedProfils, 'Investigation&Documentation']);
} else { } else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Investigation')); setSelectedProfils(selectedProfils.filter(p => p !== 'Investigation&Documentation'));
} }
}} }}
className="border-gray-300" 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>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Checkbox <Checkbox
id="coding" id="ml-ai"
checked={selectedProfils.includes('Coding')} checked={selectedProfils.includes('MachineLearning&AI')}
onCheckedChange={(checked) => { onCheckedChange={(checked) => {
if (checked) { if (checked) {
setSelectedProfils([...selectedProfils, 'Coding']); setSelectedProfils([...selectedProfils, 'MachineLearning&AI']);
} else { } else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Coding')); setSelectedProfils(selectedProfils.filter(p => p !== 'MachineLearning&AI'));
} }
}} }}
className="border-gray-300" 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>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Checkbox <Checkbox
id="lean" id="communication"
checked={selectedProfils.includes('Lean')} checked={selectedProfils.includes('Communication')}
onCheckedChange={(checked) => { onCheckedChange={(checked) => {
if (checked) { if (checked) {
setSelectedProfils([...selectedProfils, 'Lean']); setSelectedProfils([...selectedProfils, 'Communication']);
} else { } else {
setSelectedProfils(selectedProfils.filter(p => p !== 'Lean')); setSelectedProfils(selectedProfils.filter(p => p !== 'Communication'));
} }
}} }}
className="border-gray-300" 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> </div>
</div> </div>