Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2024 12 #229

Merged
merged 15 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 102 additions & 41 deletions assets/css/_fonts.css

Large diffs are not rendered by default.

Binary file added assets/fonts/k2d-v11-latin-300.ttf
Binary file not shown.
Binary file added assets/fonts/k2d-v11-latin-300.woff2
Binary file not shown.
Binary file added assets/fonts/k2d-v11-latin-500.ttf
Binary file not shown.
Binary file added assets/fonts/k2d-v11-latin-500.woff2
Binary file not shown.
Binary file added assets/fonts/k2d-v11-latin-700.ttf
Binary file not shown.
Binary file added assets/fonts/k2d-v11-latin-700.woff2
Binary file not shown.
Binary file added assets/fonts/k2d-v11-latin-regular.ttf
Binary file not shown.
Binary file added assets/fonts/k2d-v11-latin-regular.woff2
Binary file not shown.
5 changes: 5 additions & 0 deletions components/blocks/application-form/TheaterRefund.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ const handleSubmit = async () => {
value: trimmedFullName,
},
],
field_rfc_send_mail: [
{
value: true,
},
],
field_rfc_school: [
{
target_id: selectedSchool.value,
Expand Down
75 changes: 62 additions & 13 deletions components/blocks/application-form/TransportArrangement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ const handleTypeChange = async () => {
checkDistance.value = true;
validated.value = false;
validationMessage.value = '';
selectedInstitution.value = '';
selectedSchoolGrade.value = '';
if (selectedType.value === '') {
return;
} else if (selectedType.value === 'tpf_school') {
Expand Down Expand Up @@ -459,17 +461,37 @@ const handleValidation = async (event: any) => {
event.preventDefault();
validationMessage.value = '';

// console.log('courseWhoCanApply: ', courseWhoCanApply.value);
// console.log(
// 'institutionPrivateMunicipal: ',
// institutionPrivateMunicipal.value,
// );
// console.log('selectedSchoolGrade: ', selectedSchoolGrade.value);
// console.log('selectedType: ', selectedType.value);
// console.log('courseAddress: ', courseAddress.value);
// console.log('institutionAddress: ', institutionAddress.value);
// console.log('institutionDistrict: ', institutionDistrict.value);
// console.log('courseNotInList: ', courseNotInList.value);
// Validation for course address, postal code and city
if (courseAddress.value === '' || coursePostalCode.value === '' || courseCity.value === '') {
validated.value = false;
validationMessage.value = 'Vælg forløb eller indtast forløbsadresse';
checkDistance.value = false;
return;
}

// Validation for institution type
if (selectedType.value === '') {
validated.value = false;
validationMessage.value = 'Vælg institutionstype';
checkDistance.value = false;
return;
}

// Validation for institution type school
if (selectedType.value === 'tpf_school' && (selectedInstitution.value === '' || selectedSchoolGrade.value === '')) {
validated.value = false;
validationMessage.value = 'Vælg en skole og et klassetrin';
checkDistance.value = false;
return;
}

// Validation for institution type kindergarten, nursery or daycare
if ((selectedType.value === 'tpf_kindergarten' || selectedType.value === 'tpf_nursery' || selectedType.value === 'tpf_daycare') && selectedInstitution.value === '') {
validated.value = false;
validationMessage.value = 'Vælg institution';
checkDistance.value = false;
return;
}

// If private institution and municipal course, or private institution and course not in list
if (
Expand Down Expand Up @@ -503,8 +525,25 @@ const handleValidation = async (event: any) => {
checkDistance.value = false;
}
} else if (!courseWhoCanApply.value) {
validationMessage.value = formSettings.course_not_found.value;
validated.value = false;
if (courseNotInList.value) {
if (selectedType.value === 'tpf_school') {
if (schoolClassAllowed.value.includes(selectedSchoolGrade.value.trim())) {
validated.value = true;
checkDistance.value = false;
} else {
validated.value = false;
checkDistance.value = true;
}

// If institution
} else {
validated.value = true;
checkDistance.value = false;
}
} else {
validationMessage.value = formSettings.course_not_found.value;
validated.value = false;
}
}

// If distance check is enabled
Expand Down Expand Up @@ -762,6 +801,16 @@ const handleSubmit = async () => {
value: numberOfStudents.value,
},
],
field_tpf_course_not_found: [
{
value: courseNotInList.value,
},
],
field_rfc_send_mail: [
{
value: true,
},
],
};

// If course is selected add to payload
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading