Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Descalificar participantes #98

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

aaron-diaz
Copy link
Contributor

@aaron-diaz aaron-diaz commented Oct 23, 2024

#93

Aun me falta agregar la columna al excel

Edit: Listo

@aaron-diaz aaron-diaz marked this pull request as draft October 23, 2024 07:37
@aaron-diaz aaron-diaz self-assigned this Oct 26, 2024
@aaron-diaz aaron-diaz marked this pull request as ready for review October 26, 2024 08:12
email: string,
ofmiName: string,
preferredName: string,
shortReason: string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Podemos hacer el shortReason un enum en types/participation.ts para poder tener type checking de estas razones?

shortReason: string,
): MailOptions => {
let longReason = shortReason;
switch (shortReason) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esto también podríamos tenerlo en types/participation.ts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puedes exponer esta API en la consola de /admin?
Es simplemente agregándolo a APIS en /src/components/admin/client

message: `${firstError ? parseValueError(firstError) : "Invalid request body."}`,
});
}
const { email, ofmiEdition, sendEmail, ...others } = Value.Cast(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si haces Value.Check me parece que no tienes que usar
Borremoslo aquí

message: `${firstError ? parseValueError(firstError) : "Invalid request body."}`,
});
}
const { email, ofmiEdition, sendEmail, ...others } = Value.Cast(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si haces Value.Check me parece que no tienes que usar
Borremoslo aquí

...others,
},
});
if (sendEmail) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mejor siempre enviemos correo :)

return `${ofmiEdition}a-ofmi`;
export function friendlyOfmiName(
ofmiEdition: number,
formatted = false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
formatted = false,
humanReadable = false,

Comment on lines +224 to +227
user User @relation(fields: [userId], references: [id])
userId String
ofmi Ofmi @relation(fields: [ofmiId], references: [id])
ofmiId String
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En lugar de usar esto qué te parece si usamos ContestantParticipationId?
En realidad estamos descalificando su participación.
Esto haría más fácil por ejemplo findContestantByOfmiAndEmail

}
}

async function updateParticipantDisqualification(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esta solo nos sirve para los appealing verdad?
Si es así, podemos mejor separarlos en dos endpoints?
disqualifyParticipant.ts y setAppealResult (o algo parecido)

@aaron-diaz aaron-diaz marked this pull request as draft November 5, 2024 18:12
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.

2 participants