From e64b6c2eca600fc7f1f3f97d49f85f813526146c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Veronika=20Feh=C3=A9rv=C3=ADziov=C3=A1?= <128744051+VeronikaFeherviziova@users.noreply.github.com> Date: Tue, 2 Dec 2025 20:32:31 +0100 Subject: [PATCH] feat: add dynamic max year of study based on selected program in registration form --- frontend/app/pages/register/student.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/app/pages/register/student.vue b/frontend/app/pages/register/student.vue index 2ff381a..2c67b46 100644 --- a/frontend/app/pages/register/student.vue +++ b/frontend/app/pages/register/student.vue @@ -45,6 +45,7 @@ const form = ref({ year_of_study: 1, consent: false, }); +const maxYearOfStudy = ref(0); const loading = ref(false); const error = ref(null as null | string); @@ -83,6 +84,10 @@ async function handleRegistration() { loading.value = false; } } + +watch(form, (newForm) => { + maxYearOfStudy.value = newForm.studyProgram.slice(-1) === 'b' ? 3 : 2; +}, { deep: true, immediate: true });