From 90ec1beff8cae7627b0aa671ac7e186c432553cb Mon Sep 17 00:00:00 2001 From: Rik Smale <13023439+WikiRik@users.noreply.github.com> Date: Mon, 30 Dec 2024 08:53:45 +0100 Subject: [PATCH] fix(event): update for 2025 season (#824) Co-authored-by: Rik Smale --- lib/events.js | 4 ++-- lib/helpers.js | 4 ++-- models/Event.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/events.js b/lib/events.js index 00abc099..a8ddf3ce 100644 --- a/lib/events.js +++ b/lib/events.js @@ -169,7 +169,7 @@ exports.addEvent = async (req, res) => { data.status = 'first submission'; if (!data.season) { - data.season = 2024; + data.season = 2025; } const event = new Event(data); @@ -269,7 +269,7 @@ exports.editEvent = async (req, res) => { delete data.published; if (!data.season) { - data.season = 2024; + data.season = 2025; } if (Object.keys(data).length === 0) { diff --git a/lib/helpers.js b/lib/helpers.js index 8e26d3b9..da6ef297 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -232,13 +232,13 @@ exports.getEventPermissions = async ({ permissions, event, user }) => { permissions.delete_summeruniversity = permissions.manage_summeruniversity[event.type]; if (user) { - // TODO: this is a temporary solution so people that have applied in 2021, 2022 and/or 2023 can apply again + // TODO: this is a temporary solution so people that have applied in 2021, 2022, 2023 and/or 2024 can apply again const applicationCount = await Application.count({ where: { user_id: user.id, event_id: { [Sequelize.Op.ne]: event.id }, status: { [Sequelize.Op.ne]: 'rejected' }, cancelled: false, - '$event.season$': 2024 + '$event.season$': 2025 }, include: [{ model: Event, diff --git a/models/Event.js b/models/Event.js index 8599c2e4..66bed1dd 100644 --- a/models/Event.js +++ b/models/Event.js @@ -156,7 +156,7 @@ const Event = sequelize.define( } }, fee: { - // TODO: validate that it is max 14 euros per night for normal people but no max for SUCT/people with proper permission + // TODO: validate that it is max 19.23 euros per night for normal people but no max for SUCT/people with proper permission type: Sequelize.DECIMAL, allowNull: false, defaultValue: 0,