mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-21 14:09:27 +00:00
new Multitab CombinePeople, start Function
This commit is contained in:
@@ -111,5 +111,6 @@ $config['students_tab_order'] = [
|
||||
'status',
|
||||
'groups',
|
||||
'finalexam',
|
||||
'combinePeople',
|
||||
'archive',
|
||||
];
|
||||
|
||||
@@ -228,6 +228,10 @@ class Config extends FHCAPI_Controller
|
||||
'showEdit' => $this->permissionlib->isBerechtigt('admin')
|
||||
]
|
||||
];
|
||||
$result['combinePeople'] = [
|
||||
'title' => $this->p->t('stv', 'tab_combine_people'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/CombinePeople.js',
|
||||
];
|
||||
|
||||
Events::trigger('stv_conf_students', function & () use (&$result) {
|
||||
return $result;
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
export default {
|
||||
name: "TabCombinePeople",
|
||||
inject: {
|
||||
cisRoot: {
|
||||
from: 'cisRoot'
|
||||
},
|
||||
},
|
||||
props: {
|
||||
modelValue: Object,
|
||||
},
|
||||
computed: {
|
||||
personIds(){
|
||||
if (this.modelValue.person_id) {
|
||||
return [this.modelValue.person_id];
|
||||
}
|
||||
return this.modelValue.map(e => e.person_id);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
combinePeople(){
|
||||
|
||||
let person1_id = this.personIds[0];
|
||||
let person2_id = this.personIds[1];
|
||||
|
||||
if(person1_id == person2_id) {
|
||||
return this.$fhcAlert.alertError("gleiche Person, keine Zusammenlegeung möglich");
|
||||
}
|
||||
|
||||
let linkCombinePeople = this.cisRoot + 'vilesci/stammdaten/personen_wartung.php?person_id_1=' + person1_id + '&person_id_2='+ person2_id;
|
||||
|
||||
console.log(linkCombinePeople);
|
||||
window.open(linkCombinePeople, '_blank');
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {}
|
||||
},
|
||||
template: /*html*/ `
|
||||
<div class="stv-details-combine-people h-100 pb-3">
|
||||
<h4>Personen zusammenlegen</h4>
|
||||
|
||||
{{personIds}}
|
||||
|
||||
<div v-if="this.modelValue.length">
|
||||
|
||||
<p v-if="this.modelValue.length == 2">
|
||||
<button class="btn btn-primary" @click="combinePeople"> Zusammenlegen</button>
|
||||
</p>
|
||||
<p v-else">
|
||||
ungültige Anzahl: {{this.modelValue.length}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
};
|
||||
@@ -49982,7 +49982,27 @@ I have been informed that I am under no obligation to consent to the transmissio
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'stv',
|
||||
'phrase' => 'tab_combine_people',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Personen zusammenlegen',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Combine People',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user