-
Notifications
You must be signed in to change notification settings - Fork 3
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
base: main
Are you sure you want to change the base?
Conversation
email: string, | ||
ofmiName: string, | ||
preferredName: string, | ||
shortReason: string, |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatted = false, | |
humanReadable = false, |
user User @relation(fields: [userId], references: [id]) | ||
userId String | ||
ofmi Ofmi @relation(fields: [ofmiId], references: [id]) | ||
ofmiId String |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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)
#93
Aun me falta agregar la columna al excel
Edit: Listo