From 921876b49f512bc660acc387c939601b3bde1cbc Mon Sep 17 00:00:00 2001 From: Airah Yusuff Date: Sun, 1 Mar 2026 11:03:10 +0000 Subject: [PATCH] fix adhoc js script --- assets/js/registration.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/js/registration.js b/assets/js/registration.js index 77eda67b..d29559d6 100644 --- a/assets/js/registration.js +++ b/assets/js/registration.js @@ -1,7 +1,7 @@ const registrationController = (function(jQuery) { const CLASS_HIDDEN = 'd-none'; - const MENTORSHIP_OPEN_MONTH = 3; //March - const MENTORSHIP_CLOSE_MONTH = 11; //November + const MENTORSHIP_ADHOC_OPEN_MONTH = 5; //May + const MENTORSHIP_ADHOC_CLOSE_MONTH = 11; //November const checkAdHocSessions = function() { jQuery('.card-mentor').each(function() { @@ -17,12 +17,12 @@ const registrationController = (function(jQuery) { const currentDay = currentDate.getDate(); const currentMonth = currentDate.getMonth() + 1; - const isMentorshipCycle = ( - currentMonth >= MENTORSHIP_OPEN_MONTH && - currentMonth <= MENTORSHIP_CLOSE_MONTH + const isAdhocMentorshipCycle = ( + currentMonth >= MENTORSHIP_ADHOC_OPEN_MONTH && + currentMonth <= MENTORSHIP_ADHOC_CLOSE_MONTH ); - if (currentDay <= daysOpen && isMentorshipCycle) { + if (currentDay <= daysOpen && isAdhocMentorshipCycle) { if (mentorType !== 'long-term') { if (mentorAvailability.includes(currentMonth.toString())) { jQuery(`#registration-link-${mentorIndex}`).removeClass(CLASS_HIDDEN);