Mission Refactor Big champs
This commit is contained in:
parent
544fa1ce8c
commit
4b27ca592d
@ -165,8 +165,8 @@ export default function MissionDetailPage() {
|
||||
|
||||
const getParticipationLabel = (participation: string) => {
|
||||
switch(participation) {
|
||||
case 'ouvert': return 'Ouvert';
|
||||
case 'volontaire': return 'Ouvert'; // Legacy support
|
||||
case 'ouvert': return 'Ouverte';
|
||||
case 'volontaire': return 'Ouverte'; // Legacy support
|
||||
case 'cooptation': return 'Cooptation';
|
||||
default: return participation;
|
||||
}
|
||||
|
||||
@ -144,8 +144,8 @@ export default function MissionsPage() {
|
||||
console.log("Participation value:", participation); // Debug log
|
||||
if (!participation) return 'Non spécifié';
|
||||
switch(participation) {
|
||||
case 'ouvert': return 'Ouvert';
|
||||
case 'volontaire': return 'Ouvert'; // Legacy support
|
||||
case 'ouvert': return 'Ouverte';
|
||||
case 'volontaire': return 'Ouverte'; // Legacy support
|
||||
case 'cooptation': return 'Cooptation';
|
||||
default: return participation;
|
||||
}
|
||||
|
||||
@ -610,8 +610,8 @@ export function MissionsAdminPanel() {
|
||||
<TabsList className="mb-4 bg-gray-100">
|
||||
<TabsTrigger value="general" className="data-[state=active]:bg-blue-600 data-[state=active]:text-white">General</TabsTrigger>
|
||||
<TabsTrigger value="details" className="data-[state=active]:bg-blue-600 data-[state=active]:text-white">Details</TabsTrigger>
|
||||
<TabsTrigger value="attachments" className="data-[state=active]:bg-blue-600 data-[state=active]:text-white">Attachments</TabsTrigger>
|
||||
<TabsTrigger value="skills" className="data-[state=active]:bg-blue-600 data-[state=active]:text-white">Skills</TabsTrigger>
|
||||
<TabsTrigger value="attachments" className="data-[state=active]:bg-blue-600 data-[state=active]:text-white">Documents</TabsTrigger>
|
||||
<TabsTrigger value="skills" className="data-[state=active]:bg-blue-600 data-[state=active]:text-white">Compétences</TabsTrigger>
|
||||
<TabsTrigger value="membres" className="data-[state=active]:bg-blue-600 data-[state=active]:text-white">Membres</TabsTrigger>
|
||||
</TabsList>
|
||||
|
||||
@ -830,7 +830,7 @@ export function MissionsAdminPanel() {
|
||||
<SelectValue placeholder="Sélectionner" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="ouvert">Ouvert</SelectItem>
|
||||
<SelectItem value="ouvert">Ouverte</SelectItem>
|
||||
<SelectItem value="cooptation">Cooptation</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
@ -867,123 +867,93 @@ export function MissionsAdminPanel() {
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox
|
||||
id="fullstack"
|
||||
checked={selectedProfils.includes('Developper FullStack')}
|
||||
id="dataintelligence"
|
||||
checked={selectedProfils.includes('DataIntelligence')}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
setSelectedProfils([...selectedProfils, 'Developper FullStack']);
|
||||
setSelectedProfils([...selectedProfils, 'DataIntelligence']);
|
||||
} else {
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'Developper FullStack'));
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'DataIntelligence'));
|
||||
}
|
||||
}}
|
||||
className="border-gray-300"
|
||||
/>
|
||||
<label htmlFor="fullstack" className="text-sm text-gray-700">Developper FullStack</label>
|
||||
<label htmlFor="dataintelligence" className="text-sm text-gray-700">DataIntelligence</label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox
|
||||
id="devops"
|
||||
checked={selectedProfils.includes('DevOps')}
|
||||
id="expression"
|
||||
checked={selectedProfils.includes('Expression')}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
setSelectedProfils([...selectedProfils, 'DevOps']);
|
||||
setSelectedProfils([...selectedProfils, 'Expression']);
|
||||
} else {
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'DevOps'));
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'Expression'));
|
||||
}
|
||||
}}
|
||||
className="border-gray-300"
|
||||
/>
|
||||
<label htmlFor="devops" className="text-sm text-gray-700">DevOps</label>
|
||||
<label htmlFor="expression" className="text-sm text-gray-700">Expression</label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox
|
||||
id="design"
|
||||
checked={selectedProfils.includes('Design')}
|
||||
id="mediation"
|
||||
checked={selectedProfils.includes('Mediation')}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
setSelectedProfils([...selectedProfils, 'Design']);
|
||||
setSelectedProfils([...selectedProfils, 'Mediation']);
|
||||
} else {
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'Design'));
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'Mediation'));
|
||||
}
|
||||
}}
|
||||
className="border-gray-300"
|
||||
/>
|
||||
<label htmlFor="design" className="text-sm text-gray-700">Design</label>
|
||||
<label htmlFor="mediation" className="text-sm text-gray-700">Mediation</label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox
|
||||
id="investigation-doc"
|
||||
checked={selectedProfils.includes('Investigation&Documentation')}
|
||||
id="investigation"
|
||||
checked={selectedProfils.includes('Investigation')}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
setSelectedProfils([...selectedProfils, 'Investigation&Documentation']);
|
||||
setSelectedProfils([...selectedProfils, 'Investigation']);
|
||||
} else {
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'Investigation&Documentation'));
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'Investigation'));
|
||||
}
|
||||
}}
|
||||
className="border-gray-300"
|
||||
/>
|
||||
<label htmlFor="investigation-doc" className="text-sm text-gray-700">Investigation & Documentation</label>
|
||||
<label htmlFor="investigation" className="text-sm text-gray-700">Investigation</label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox
|
||||
id="ml-ai"
|
||||
checked={selectedProfils.includes('MachineLearning&AI')}
|
||||
id="coding"
|
||||
checked={selectedProfils.includes('Coding')}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
setSelectedProfils([...selectedProfils, 'MachineLearning&AI']);
|
||||
setSelectedProfils([...selectedProfils, 'Coding']);
|
||||
} else {
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'MachineLearning&AI'));
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'Coding'));
|
||||
}
|
||||
}}
|
||||
className="border-gray-300"
|
||||
/>
|
||||
<label htmlFor="ml-ai" className="text-sm text-gray-700">Machine Learning & AI</label>
|
||||
<label htmlFor="coding" className="text-sm text-gray-700">Coding</label>
|
||||
</div>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox
|
||||
id="communication"
|
||||
checked={selectedProfils.includes('Communication')}
|
||||
id="lean"
|
||||
checked={selectedProfils.includes('Lean')}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
setSelectedProfils([...selectedProfils, 'Communication']);
|
||||
setSelectedProfils([...selectedProfils, 'Lean']);
|
||||
} else {
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'Communication'));
|
||||
setSelectedProfils(selectedProfils.filter(p => p !== 'Lean'));
|
||||
}
|
||||
}}
|
||||
className="border-gray-300"
|
||||
/>
|
||||
<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>
|
||||
<label htmlFor="lean" className="text-sm text-gray-700">Lean</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -993,13 +963,13 @@ export function MissionsAdminPanel() {
|
||||
|
||||
<TabsContent value="attachments" className="space-y-6">
|
||||
<div>
|
||||
<label className="block text-sm font-medium mb-1 text-gray-700">Attachements</label>
|
||||
<label className="block text-sm font-medium mb-1 text-gray-700">Documents</label>
|
||||
{/* For new missions */}
|
||||
{!missionId ? (
|
||||
<div className="space-y-4">
|
||||
<div className="border rounded-md p-4 bg-white">
|
||||
<h4 className="text-sm font-medium mb-3 text-gray-700">Add Attachments</h4>
|
||||
<p className="text-xs text-gray-500 mb-3">Attachments will be uploaded when you save the mission.</p>
|
||||
<h4 className="text-sm font-medium mb-3 text-gray-700">Ajouter des documents</h4>
|
||||
<p className="text-xs text-gray-500 mb-3">Les documents seront téléchargés lors de la sauvegarde de la mission.</p>
|
||||
|
||||
{selectedAttachments.length > 0 && (
|
||||
<div className="mb-4 border rounded-md p-3 bg-gray-50">
|
||||
@ -1068,59 +1038,48 @@ export function MissionsAdminPanel() {
|
||||
<TabsContent value="skills" className="space-y-6">
|
||||
<div>
|
||||
<div className="flex justify-between mb-4">
|
||||
<h3 className="text-lg font-medium text-gray-700">Skills</h3>
|
||||
<Button variant="outline" size="sm" className="bg-white text-gray-700 border-gray-300 hover:bg-gray-50">Select / Deselect All</Button>
|
||||
<h3 className="text-lg font-medium text-gray-700">Compétences</h3>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="photoshop" className="border-gray-300" />
|
||||
<label htmlFor="photoshop" className="text-sm text-gray-700">Adobe Photoshop</label>
|
||||
<Checkbox id="skill-fullstack" className="border-gray-300" />
|
||||
<label htmlFor="skill-fullstack" className="text-sm text-gray-700">Developper FullStack</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="xd" className="border-gray-300" />
|
||||
<label htmlFor="xd" className="text-sm text-gray-700">Adobe XD</label>
|
||||
<Checkbox id="skill-devops" className="border-gray-300" />
|
||||
<label htmlFor="skill-devops" className="text-sm text-gray-700">DevOps</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="android" className="border-gray-300" />
|
||||
<label htmlFor="android" className="text-sm text-gray-700">Android Developer</label>
|
||||
<Checkbox id="skill-design" className="border-gray-300" />
|
||||
<label htmlFor="skill-design" className="text-sm text-gray-700">Design</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="artist" className="border-gray-300" />
|
||||
<label htmlFor="artist" className="text-sm text-gray-700">Artist</label>
|
||||
<Checkbox id="skill-investigation" className="border-gray-300" />
|
||||
<label htmlFor="skill-investigation" className="text-sm text-gray-700">Investigation & Documentation</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="computer" className="border-gray-300" />
|
||||
<label htmlFor="computer" className="text-sm text-gray-700">Computer</label>
|
||||
<Checkbox id="skill-ml-ai" className="border-gray-300" />
|
||||
<label htmlFor="skill-ml-ai" className="text-sm text-gray-700">Machine Learning & AI</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="developer" className="border-gray-300" />
|
||||
<label htmlFor="developer" className="text-sm text-gray-700">Developer</label>
|
||||
<Checkbox id="skill-communication" className="border-gray-300" />
|
||||
<label htmlFor="skill-communication" className="text-sm text-gray-700">Communication</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="frontend" className="border-gray-300" />
|
||||
<label htmlFor="frontend" className="text-sm text-gray-700">Front end Developer</label>
|
||||
<Checkbox id="skill-organisation" className="border-gray-300" />
|
||||
<label htmlFor="skill-organisation" className="text-sm text-gray-700">Organisation</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="ios" className="border-gray-300" />
|
||||
<label htmlFor="ios" className="text-sm text-gray-700">iOS Developer</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="support" className="border-gray-300" />
|
||||
<label htmlFor="support" className="text-sm text-gray-700">Support Agent</label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-2">
|
||||
<Checkbox id="writer" className="border-gray-300" />
|
||||
<label htmlFor="writer" className="text-sm text-gray-700">Writer</label>
|
||||
<Checkbox id="skill-support" className="border-gray-300" />
|
||||
<label htmlFor="skill-support" className="text-sm text-gray-700">Support</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user