diff --git a/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js b/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js index facf8848f..81c1a6860 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js @@ -15,11 +15,10 @@ export default { } }, computed: { - personIds(){ - if (this.modelValue.person_id) { - return [this.modelValue.person_id]; - } - return this.modelValue.map(e => e.person_id); + personIds() { + return Array.isArray(this.modelValue) + ? this.modelValue.map(e => e.person_id) + : [this.modelValue.person_id]; }, detailStringPerson1(){ let person1 = this.modelValue[0]; @@ -38,15 +37,10 @@ export default { let person2_id = this.personIds[1]; if(person1_id == person2_id) { - //TODO(Manu) Phrase - return this.$fhcAlert.alertError("gleiche Person, keine Zusammenlegung möglich"); + return this.$fhcAlert.alertError(this.$p.t('stv', 'error_combinePeople_samePerson')); } - // let linkCombinePeople = this.cisRoot + 'vilesci/stammdaten/personen_wartung.php?person_id_1=' + person1_id + '&person_id_2='+ person2_id; - let linkCombinePeople = 'https://c3p0.ma0068.technikum-wien.at/fhcomplete/vilesci/stammdaten/personen_wartung.php?person_id_1=' + person1_id + '&person_id_2='+ person2_id; - - console.log(linkCombinePeople); - //window.open(linkCombinePeople, '_blank'); + let linkCombinePeople = this.cisRoot + 'vilesci/stammdaten/personen_wartung.php?person_id_1=' + person1_id + '&person_id_2='+ person2_id; this.openLink(linkCombinePeople); }, openLink(url) { @@ -64,8 +58,7 @@ export default {

Personen zusammenlegen

- -

Die Personen {{detailStringPerson1}} und {{detailStringPerson2}} zusammenlegen?

+

{{$p.t('stv', 'question_combine_people', { person1: detailStringPerson1, person2: detailStringPerson2 })}}

diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index d931f85c2..879ca6cc2 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -50003,6 +50003,46 @@ I have been informed that I am under no obligation to consent to the transmissio ) ) ), + array( + 'app' => 'core', + 'category' => 'stv', + 'phrase' => 'question_combine_people', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Die Personen {person1} und {person2} zusammenlegen?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Merge the persons {person1} and {person2}?', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'stv', + 'phrase' => 'error_combinePeople_samePerson', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Zusammenlegung möglich bei identischer Person ID!', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No merging possible with identical person ID"', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), );