Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Added buttons with links to lists of univerisities, high schools and …
Browse files Browse the repository at this point in the history
…kindergartens
  • Loading branch information
mvdegtyar committed Aug 26, 2022
1 parent 3319a84 commit e3743ed
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
38 changes: 37 additions & 1 deletion frontend/components/FindAppropriateSchool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,21 @@
</button>
</div>

<Button :disabled="appropriateSchool === null" @click="showSchool()">
<Button :disabled="showSchoolBtnDisabled" @click="showSchool()">
{{ $t("components.FindAppropriateSchool.search_button") }}
</Button>

<Button v-if="openHightSchoolsBtnVisible" @click="openHighSchools()">
{{ $t("components.FindAppropriateSchool.show_high_school_button") }}
</Button>

<Button v-if="openUniversitiesBtnVisible" @click="openUniversities()">
{{ $t("components.FindAppropriateSchool.show_university_button") }}
</Button>

<Button v-if="openKindergartensBtnVisible" @click="openKindergartens()">
{{ $t("components.FindAppropriateSchool.show_kindergarten_button") }}
</Button>
</div>
</template>

Expand Down Expand Up @@ -106,6 +118,18 @@ export default {
studentAge() {
return CURRENT_YEAR - this.selectedYear - this.isNextYear;
},
showSchoolBtnDisabled() {
return (this.appropriateSchool === null || this.studentAge < 3 || this.studentAge >= 15);
},
openHightSchoolsBtnVisible() {
return this.selectedYear && this.studentAge >= 15;
},
openUniversitiesBtnVisible() {
return this.selectedYear && this.studentAge >= 17;
},
openKindergartensBtnVisible() {
return this.selectedYear && this.studentAge < 3;
},
appropriateSchool() {
const messages = this.$t('components.FindAppropriateSchool.appropriate_school_for_age_message');
Expand All @@ -130,6 +154,18 @@ export default {
this.mapSetAppropriateSchool(this.appropriateSchool);
this.$store.dispatch('map/show');
},
openHighSchools() {
this.openLink('https://www.uradprace.cz/hledani-skol-a-oboru');
},
openUniversities() {
this.openLink('https://www.studyin.cz/ukraine/');
},
openKindergartens() {
this.openLink('http://www.dsmpsv.cz/cs/najdete-si-svou-ds');
},
openLink(url) {
window.open(url, '_blank').focus();
},
},
};
</script>
Expand Down
3 changes: 3 additions & 0 deletions frontend/locales/cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"faq_tooltip": "Vzdělávací systém v ČR funguje trochu jinak, než ukrajinský. Jednoduše řečeno, děti by měly chodit do školy se stejně starými dětmi. Díky tomuto údaji vám rovnou ukážeme školy, které mají kapacitu přijmout takto staré dítě.",
"age_corresponds": "Věk odpovídá",
"information": "Informace",
"show_high_school_button": "Otevřít seznam vysokých škol",
"show_university_button": "Otevřít seznam univerzit",
"show_kindergarten_button": "Otevřít seznam mateřských škol",
"appropriate_school_for_age_message": {
"0": "Dětská skupina (od 6 měsíců věku)",
"1": "Dětská skupina",
Expand Down
3 changes: 3 additions & 0 deletions frontend/locales/ua.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"faq_tooltip": "Система освіти в Чехії дещо інакша, ніж в Україні. Простіше кажучи, діти б мали ходити до школи з дітьми того ж віку. Завдяки цій інформації вам відразу покажемо школи, які мають можливість прийняти дитину цього віку.",
"age_corresponds": "Вік відповідає",
"information": "Інформація",
"show_high_school_button": "Відкрити список вищих шкіл",
"show_university_button": "Відкрити список університетів",
"show_kindergarten_button": "Відкрити список дитячих садків",
"appropriate_school_for_age_message": {
"0": "Дитяча група (з 6-місячного віку)",
"1": "Дитяча група",
Expand Down

0 comments on commit e3743ed

Please sign in to comment.