Skip to content

Feat/upload propagation

Shanmukha varma Lanke requested to merge feat/upload-propagation into main

Act as a Senior Frontend Engineer. Implement "Team Standup Propagation" logic across the following files: DashboardLayout.tsx, TeamList.tsx, and InternCard.tsx.

GOAL: If any one member of a team has a valid standup upload, mark all members of that same team as "Uploaded".

CONSTRAINTS:

  1. Do not overwrite existing styles or unrelated business logic.
  2. Use existing 'teamId' to group members.
  3. Ensure no unnecessary re-renders.

TASKS:

  1. In DashboardLayout.tsx:
    • Within 'handleVerifyTeam' or the status aggregation logic, create a mapping of teamId to upload status.
    • If (at least one member in team X has uploaded), then (all members with teamId X = uploaded).
  2. In TeamList.tsx:
    • Update the team-level completion counter so that if propagation is active, the count reflects 100% (e.g., 3/3) even if only one physical upload exists.
  3. In InternCard.tsx:
    • Update the UI badge logic. A member should show "Uploaded" if (individual.hasUploaded OR team.hasPropagatedUpload).

VALIDATION:

  • Ensure 'teamId' is checked for null/undefined to avoid global propagation to unassigned interns.
  • Maintain the original data structure; do not mutate the original 'intern' objects directly—use a derived state or a mapping.

Review the logic for potential infinite loops in useEffects before finalizing.

Merge request reports

Loading