Bugfixes: Eventobject as parameter

This commit is contained in:
cgfhtw
2024-08-07 09:53:40 +02:00
parent 911eb66c4a
commit 4b7e445a25
@@ -58,12 +58,12 @@ export default {
const defaultObject = { const defaultObject = {
status_kurzbz: status, status_kurzbz: status,
statusgrund_id: null, statusgrund_id: null,
link: this['changeStatusTo' + status], link: () => this['changeStatusTo' + status](),
children: [] children: []
}; };
if (status === "Student") { if (status === "Student") {
defaultObject.link = 'changeInteressentToStudent'; defaultObject.link = () => this.changeInteressentToStudent();
} }
result.push(defaultObject); result.push(defaultObject);
@@ -89,7 +89,7 @@ export default {
status_kurzbz: 'Student', status_kurzbz: 'Student',
statusgrund_id: null, statusgrund_id: null,
beschreibung: 'Student', beschreibung: 'Student',
link: this.changeInteressentToStudent link: () => this.changeInteressentToStudent()
}); });
} }
} }
@@ -102,7 +102,7 @@ export default {
const defaultObject = { const defaultObject = {
status_kurzbz: status, status_kurzbz: status,
statusgrund_id: null, statusgrund_id: null,
link: this['changeStatusTo' + status], link: () => this['changeStatusTo' + status](),
children: [] children: []
}; };
result.push(defaultObject); result.push(defaultObject);
@@ -125,7 +125,7 @@ export default {
status_kurzbz: 'Student', status_kurzbz: 'Student',
statusgrund_id: null, statusgrund_id: null,
beschreibung: 'Student', beschreibung: 'Student',
link: this.changeStatusToStudent link: () => this.changeStatusToStudent()
}); });
} }
}); });
@@ -136,7 +136,7 @@ export default {
changeInteressentToStudent(statusgrund_id) { changeInteressentToStudent(statusgrund_id) {
this.addStudent({status_kurzbz: 'student', statusgrund_id}); this.addStudent({status_kurzbz: 'student', statusgrund_id});
}, },
addStudent() { addStudent(data) {
Promise Promise
.allSettled( .allSettled(
this.prestudentIds.map(prestudent_id => this.$fhcApi.post( this.prestudentIds.map(prestudent_id => this.$fhcApi.post(
@@ -160,7 +160,7 @@ export default {
}, },
changeStatusToStudent(statusgrund_id) { changeStatusToStudent(statusgrund_id) {
this this
.promtAusbildungssemester('Student') .promtAusbildungssemester('Student', statusgrund_id)
.then(this.changeStatus) .then(this.changeStatus)
.catch(this.$fhcAlert.handleSystemError); .catch(this.$fhcAlert.handleSystemError);
}, },