Skip to content

Commit

Permalink
Merge pull request #229 from os2ulf/release/2024-12
Browse files Browse the repository at this point in the history
Release/2024 12
  • Loading branch information
SorenBonde authored Dec 20, 2024
2 parents 3793899 + 0ad1f89 commit 39b0bb1
Show file tree
Hide file tree
Showing 12 changed files with 170 additions and 55 deletions.
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.

0 comments on commit 39b0bb1

Please sign in to comment.