missions button
This commit is contained in:
parent
feea7c444f
commit
36160df93c
@ -296,11 +296,26 @@ export function MissionsAdminPanel() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Function to navigate to the previous tab
|
||||||
|
const goToPreviousTab = () => {
|
||||||
|
const tabOrder = ["general", "details", "attachments", "skills", "membres"];
|
||||||
|
const currentIndex = tabOrder.indexOf(activeTab);
|
||||||
|
if (currentIndex > 0) {
|
||||||
|
const prevTab = tabOrder[currentIndex - 1];
|
||||||
|
setActiveTab(prevTab);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Check if we're on the last tab
|
// Check if we're on the last tab
|
||||||
const isLastTab = () => {
|
const isLastTab = () => {
|
||||||
return activeTab === "membres";
|
return activeTab === "membres";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Check if we're on the first tab
|
||||||
|
const isFirstTab = () => {
|
||||||
|
return activeTab === "general";
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<Card className="border shadow-sm bg-white">
|
<Card className="border shadow-sm bg-white">
|
||||||
@ -1144,7 +1159,21 @@ export function MissionsAdminPanel() {
|
|||||||
</TabsContent>
|
</TabsContent>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
<div className="mt-8 flex justify-end">
|
<div className="mt-8 flex justify-between">
|
||||||
|
{!isFirstTab() && (
|
||||||
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
className="text-gray-700 bg-white hover:bg-gray-50 border border-gray-300"
|
||||||
|
onClick={goToPreviousTab}
|
||||||
|
>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="mr-2">
|
||||||
|
<polyline points="19 12 5 12"></polyline>
|
||||||
|
<polyline points="12 19 5 12 12 5"></polyline>
|
||||||
|
</svg>
|
||||||
|
Retour
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
{isFirstTab() && <div></div>}
|
||||||
<Button
|
<Button
|
||||||
className="bg-blue-600 hover:bg-blue-700 text-white"
|
className="bg-blue-600 hover:bg-blue-700 text-white"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user