Skip to content

Commit

Permalink
habilitar registro para voluntaries (#99)
Browse files Browse the repository at this point in the history
* habilitar registro para voluntaries

* npm run format

* add linter to readme

* diciembre no noviembre

* Update README.md

Co-authored-by: Juan Carlos Sigler Priego <[email protected]>

---------

Co-authored-by: Juan Carlos Sigler Priego <[email protected]>
  • Loading branch information
andreasantillana and Juanito98 authored Oct 29, 2024
1 parent e077079 commit fc6902f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ Contributions are welcome! If you have suggestions, bug reports, or want to cont

Happy coding with Next-Prisma-Starter! 🚀

Before creating the commit make sure you run `docker compose exec app npm run format`.

## StandardJS

Install the [StandardJS](https://marketplace.visualstudio.com/items?itemName=standard.vscode-standard) extension.
Expand Down
11 changes: 10 additions & 1 deletion src/pages/registro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,20 @@ export const getServerSideProps: GetServerSideProps<{
const role =
roleRequested || participation?.userParticipation.role || "CONTESTANT";

const volunteerClosingTime = ofmi?.registrationCloseTime
? new Date(ofmi?.registrationCloseTime.getFullYear(), 12, 31).getTime()
: null;

const closingTime =
role === "VOLUNTEER"
? volunteerClosingTime
: (ofmi?.registrationCloseTime.getTime() ?? null);

return {
props: {
participationJSON: JSON.stringify(participation),
ofmiEdition: ofmi?.edition ?? null,
registrationClosingTime: ofmi?.registrationCloseTime.getTime() ?? null,
registrationClosingTime: closingTime,
role,
},
};
Expand Down

0 comments on commit fc6902f

Please sign in to comment.