diff --git a/src/components/auth/RegisterStudent.vue b/src/components/auth/RegisterStudent.vue index fe44dda9a..b54d48983 100644 --- a/src/components/auth/RegisterStudent.vue +++ b/src/components/auth/RegisterStudent.vue @@ -2,7 +2,8 @@
- +
@@ -41,7 +42,7 @@ {{ error.$message.replace('Value', 'Activation Code') }} -
--> +
@@ -317,14 +318,14 @@ const closeErrorDialog = () => { isDialogVisible.value = false; }; -// const noActivationCodeRef = ref(false); +const noActivationCodeRef = ref(false); const yearOnlyCheckRef = ref(false); const emit = defineEmits(['submit']); const state = reactive({ students: [ { - // activationCode: '', + activationCode: '', studentUsername: '', password: '', confirmPassword: '', @@ -340,7 +341,7 @@ const state = reactive({ race: [], hispanicEthnicity: '', homeLanguage: [], - // noActivationCode: noActivationCodeRef.value, + noActivationCode: noActivationCodeRef.value, yearOnlyCheck: yearOnlyCheckRef.value, }, ], @@ -349,7 +350,7 @@ const state = reactive({ const rules = { students: { $each: helpers.forEach({ - // activationCode: { required }, + activationCode: { required }, studentUsername: { required }, password: { required, minLength: minLength(6) }, confirmPassword: { required }, @@ -365,7 +366,7 @@ const rules = { race: {}, hispanicEthnicity: {}, homeLanguage: {}, - // noActivationCode: {}, + noActivationCode: {}, yearOnlyCheck: {}, }), }, @@ -373,7 +374,7 @@ const rules = { function addStudent() { state.students.push({ - // activationCode: '', + activationCode: '', studentUsername: '', password: '', confirmPassword: '', @@ -389,20 +390,20 @@ function addStudent() { race: [], hispanicEthnicity: '', homeLanguage: [], - // noActivationCode: noActivationCodeRef.value, + noActivationCode: noActivationCodeRef.value, yearOnlyCheck: yearOnlyCheckRef.value, }); } -// function updateActivationCode() { -// state.students.forEach((student) => { -// if (student.noActivationCode) { -// student.activationCode = 'noActivationCode'; -// } else { -// student.activationCode = ''; -// } -// }); -// } +function updateActivationCode() { + state.students.forEach((student) => { + if (student.noActivationCode) { + student.activationCode = 'noActivationCode'; + } else { + student.activationCode = ''; + } + }); +} function deleteStudentForm(student) { if (state.students.length > 1) {