Skip to content

Commit

Permalink
Revertir el Martes: Abrir registro para las que tienen cuenta (#95)
Browse files Browse the repository at this point in the history
* Revertir el Martes: Abrir registro para las que tienen cuenta

* Para cuentas creadas antes de convocatoria
  • Loading branch information
Juanito98 authored Oct 20, 2024
1 parent ec50632 commit 63be3a1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
6 changes: 0 additions & 6 deletions src/lib/validators/ofmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ export function validateOFMIOpenAndCloseTime(
role,
}: { registrationTime: Date; role: ParticipationRole },
): ValidationResult {
if (ofmi.registrationOpenTime.getTime() > registrationTime.getTime()) {
return {
ok: false,
message: `Las inscripciones para esta OFMI aun no han abierto.`,
};
}
if (role === "VOLUNTEER") {
// Vamos a darles todo el año para registrarse
if (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/ofmi/upsertParticipation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async function upsertParticipationHandler(
field: "Fechas de registro OFMI",
result: validateOFMIOpenAndCloseTime(ofmi, {
role,
registrationTime: requestStartTime,
registrationTime: authUser.createdAt,
}),
},
];
Expand Down
6 changes: 1 addition & 5 deletions src/pages/registro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ import { X_USER_AUTH_EMAIL_HEADER } from "@/lib/auth";
export default function RegistroPage({
ofmiEdition,
participationJSON,
registrationClosingTime,
role,
}: InferGetServerSidePropsType<typeof getServerSideProps>): JSX.Element {
if (
ofmiEdition == null ||
(registrationClosingTime && registrationClosingTime < Date.now())
) {
if (ofmiEdition == null) {
const errorMsg = ofmiEdition ? "El registro de la OFMI ha finalizado." : "";
return (
<div className="flex w-full items-center justify-center">
Expand Down
3 changes: 3 additions & 0 deletions src/pages/signup.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# La creación de cuentas estará fuera de servicio unos días

<div align="center">Vuelva pronto</div>
5 changes: 0 additions & 5 deletions src/pages/signup.tsx

This file was deleted.

0 comments on commit 63be3a1

Please sign in to comment.