Skip to content

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 saveMission service: Add function to firestoreService.js to add a mission ID to a user's savedMissions array.
  • [ ] Implement applyForMission service: Add function to create an applications document in Firestore linking the club/member to the mission.
  • [ ] Connect MissionBoard.jsx: Update handleSave and handleApply to 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_members from Firestore (currently partially implemented).

3. Company Dashboard

The "Oppdrag" tab is placeholder.

Tasks

  • [ ] Fetch Posted Missions: Query missions where companyId matches 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 applications collection).

4. Member Profile

Ensure the mission history and stats are pulling from real data.

Tasks

  • [ ] Verify Stats: Ensure totalEarnings, missionsCompleted etc. 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.