Skip to content

Commit

Permalink
Campos mentores a exportar
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanito98 committed Sep 20, 2024
1 parent 60e5e77 commit 2774764
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/lib/gcloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ export async function exportParticipants({
const json = participants
.filter((v) => v.userParticipation.role === role)
.map((participation) => {
const optInToString = (f: boolean): string => {
return f ? "Sí" : "No";
};
let data: Record<string, string> = {
"Nombre completo": `${participation.user.firstName.trim()} ${participation.user.lastName.trim()}`,
Email: participation.user.email.trim(),
Expand All @@ -273,6 +276,20 @@ export async function exportParticipants({
Estado: userParticipation.schoolState,
Escuela: userParticipation.schoolName.trim(),
};
} else if (userParticipation.role === "VOLUNTEER") {
data = {
...data,
"Comunidad / Redes": optInToString(
userParticipation.communityOptIn,
),
"Vinculación educativa": optInToString(
userParticipation.educationalLinkageOptIn,
),
Fundraising: optInToString(userParticipation.fundraisingOptIn),
Entrenamientos: optInToString(userParticipation.trainerOptIn),
Problemsetter: optInToString(userParticipation.problemSetterOptIn),
Mentorías: optInToString(userParticipation.mentorOptIn),
};
}
return data;
});
Expand Down

0 comments on commit 2774764

Please sign in to comment.