Enrolment issue

This commit is contained in:
nmemmert
2026-06-08 14:45:04 -04:00
parent 95b7a3f211
commit 3e1b1e0fae
3 changed files with 2 additions and 3 deletions
-1
View File
@@ -31,7 +31,6 @@ export function register(app) {
res.json({
enrolledStudySlugs: Array.isArray(user.enrolledStudySlugs) ? user.enrolledStudySlugs : [],
availableStudies: getStudyCatalog()
.filter(study => study.status !== 'planned')
.map(study => ({ slug: study.slug, title: study.title })),
})
})
+1 -1
View File
@@ -84,7 +84,7 @@ export function getStudyCatalog() {
export function isEnrollableStudySlug(studySlug) {
const normalized = normalizeStudySlug(studySlug)
if (!normalized) return false
return getStudyCatalog().some(study => study.slug === normalized && study.status !== 'planned')
return getStudyCatalog().some(study => study.slug === normalized)
}
export function getStudyTitleBySlug(studySlug) {