Add HouseManagement integration to AdminPanel and implement removeMemberAsAdmin feature in HouseService: Enhance admin capabilities with new section for house management and functionality to remove members from houses by admins, including points deduction logic.
This commit is contained in:
@@ -5,6 +5,7 @@ import UserManagement from "@/components/admin/UserManagement";
|
||||
import EventManagement from "@/components/admin/EventManagement";
|
||||
import FeedbackManagement from "@/components/admin/FeedbackManagement";
|
||||
import ChallengeManagement from "@/components/admin/ChallengeManagement";
|
||||
import HouseManagement from "@/components/admin/HouseManagement";
|
||||
import BackgroundPreferences from "@/components/admin/BackgroundPreferences";
|
||||
import EventPointsPreferences from "@/components/admin/EventPointsPreferences";
|
||||
import EventFeedbackPointsPreferences from "@/components/admin/EventFeedbackPointsPreferences";
|
||||
@@ -33,7 +34,8 @@ type AdminSection =
|
||||
| "users"
|
||||
| "events"
|
||||
| "feedbacks"
|
||||
| "challenges";
|
||||
| "challenges"
|
||||
| "houses";
|
||||
|
||||
export default function AdminPanel({ initialPreferences }: AdminPanelProps) {
|
||||
const [activeSection, setActiveSection] =
|
||||
@@ -90,6 +92,14 @@ export default function AdminPanel({ initialPreferences }: AdminPanelProps) {
|
||||
>
|
||||
Défis
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => setActiveSection("houses")}
|
||||
variant={activeSection === "houses" ? "primary" : "secondary"}
|
||||
size="md"
|
||||
className={activeSection === "houses" ? "bg-pixel-gold/10" : ""}
|
||||
>
|
||||
Maisons
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{activeSection === "preferences" && (
|
||||
@@ -143,6 +153,15 @@ export default function AdminPanel({ initialPreferences }: AdminPanelProps) {
|
||||
<ChallengeManagement />
|
||||
</Card>
|
||||
)}
|
||||
|
||||
{activeSection === "houses" && (
|
||||
<Card variant="dark" className="p-6">
|
||||
<h2 className="text-2xl font-gaming font-bold mb-6 text-pixel-gold">
|
||||
Gestion des Maisons
|
||||
</h2>
|
||||
<HouseManagement />
|
||||
</Card>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user