Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

When a member votes on an application (accept/reject), that application should no longer appear in their applicant list.

Changes

  • firestoreVoteService.ts: Added getVotedApplicationRuts() using collection group query to fetch all RUTs a user has voted on
  • Home/index.tsx:
    • Filter applications on load to exclude already-voted items
    • handleVoteSubmitted callback removes application from list immediately and closes modal
  • ApplicationDetailsModal.tsx: Propagates onVoteSubmitted callback to VotingPanel

Example

// New service method using collectionGroup for cross-collection query
getVotedApplicationRuts: async (userId: string): Promise<Set<string>> => {
  const votesQuery = query(
    collectionGroup(firestore, "votes"),
    where("userId", "==", userId)
  );
  const votesSnapshot = await getDocs(votesQuery);
  const votedRuts = new Set<string>();
  votesSnapshot.forEach((doc) => {
    votedRuts.add((doc.data() as Vote).applicationRut);
  });
  return votedRuts;
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Filtro- Lista de postulantes</issue_title>
<issue_description>La idea del filtro consiste que en el momento de aceptar o rechazar una postulación esta no sea visible dentro de la lista visible para el miembro actual.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 28, 2025

Deploying tomas-exdev-cl with  Cloudflare Pages  Cloudflare Pages

Latest commit: 37caf75
Status: ✅  Deploy successful!
Preview URL: https://84f52644.tomas-exdev-cl.pages.dev
Branch Preview URL: https://copilot-update-applicant-lis.tomas-exdev-cl.pages.dev

View logs

Copilot AI changed the title [WIP] Add filter to hide accepted or rejected applications Filter applicant list to hide already-voted applications Nov 28, 2025
Copilot AI requested a review from Im-Fran November 28, 2025 22:44
Copilot finished work on behalf of Im-Fran November 28, 2025 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filtro- Lista de postulantes

2 participants