Restoration & Implementation Plan
Overview
This plan addresses the "missing functions" by replacing current placeholders with real Firestore integrations. The goal is to make the Mission Board fully functional and ensure Dashboards display real mission data.
1. Mission Board (Dugnadsbørsen)
Currently, the "Save" and "Apply" buttons only show alerts. We will connect them to Firestore.
Tasks
- [ ] Implement
saveMissionservice: Add function tofirestoreService.jsto add a mission ID to a user'ssavedMissionsarray. - [ ] Implement
applyForMissionservice: Add function to create anapplicationsdocument in Firestore linking the club/member to the mission. - [ ] Connect
MissionBoard.jsx: UpdatehandleSaveandhandleApplyto call these services. - [ ] Visual Feedback: Replace alerts with proper toast notifications or UI updates.
2. Club Dashboard
The "Oppdrag" (Missions) tab is currently empty ("Kommer snart...").
Tasks
- [ ] Fetch Applied Missions: Create a query to get missions the club has applied to.
- [ ] Fetch Saved Missions: Create a query to get missions the club has saved.
- [ ] Implement Missions Tab: Display these lists in the
ClubDashboard.jsx"Oppdrag" tab. - [ ] Real Member List: Ensure the "Medlemmer" tab fetches real
club_membersfrom Firestore (currently partially implemented).
3. Company Dashboard
The "Oppdrag" tab is placeholder.
Tasks
- [ ] Fetch Posted Missions: Query missions where
companyIdmatches the current user. - [ ] Implement Missions Tab: Show list of active and completed missions.
- [ ] View Applicants: Add a modal or view to see who has applied to a mission (using the
applicationscollection).
4. Member Profile
Ensure the mission history and stats are pulling from real data.
Tasks
- [ ] Verify Stats: Ensure
totalEarnings,missionsCompletedetc. are calculated from real completed missions. - [ ] Mission History: List actual past missions instead of mock data.
5. Navigation & Polish
- [ ] Settings Buttons: Make "Innstillinger" buttons functional (or hide them if out of scope).
- [ ] Empty States: Add nice empty states for when there are no missions/members.
AI Agent Mode Explanation
You asked about "AI Agent Mode". I am currently in AI Agent Mode.
- This means I can take high-level instructions (like "Fix the mission board") and break them down into steps, execute code changes, verify them, and report back.
- You don't need to install anything. Just give me the plan approval, and I will execute this list step-by-step.