diff --git a/public/css/Studentenverwaltung.css b/public/css/Studentenverwaltung.css index 1fa35623e..ff7fbb09f 100644 --- a/public/css/Studentenverwaltung.css +++ b/public/css/Studentenverwaltung.css @@ -47,6 +47,23 @@ html { color: var(--gray-500); } +/* Dropdown Toolbar Interessent, submenu */ +.dropdown-menu-right { + left: 100%; + top: 5; + margin-left: 0.1rem; + margin-top: -1rem; +} + +.dropdown-submenu:hover>.dropdown-menu-right { + display: block; +} + +.dropdown-submenu>.dropdown-menu-right { + display: none; + position: absolute; +} + @media (min-width: 768px) { #sidebarMenu { visibility: visible!important; diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js index bc192fc57..09a132809 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js @@ -107,6 +107,25 @@ export default{ isStatusBeforeStudent(){ let isStatusStudent = ['Student', 'Absolvent', 'Diplomand']; return !isStatusStudent.includes(this.statusData.status_kurzbz); + }, + showToolbarStudent() { + if (Array.isArray(this.modelValue)) { + if (!this.modelValue.length) + return false; + return this.modelValue.every(item => item.uid); + } + return !!this.modelValue.uid; + }, + showToolbar() { + return this.showToolbarStudent || this.showToolbarInteressent; + }, + showToolbarInteressent() { + if (Array.isArray(this.modelValue)) { + if (!this.modelValue.length) + return false; + return !this.modelValue.some(item => item.uid); + } + return !this.modelValue.uid; } }, props: { @@ -482,6 +501,68 @@ export default{ this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData})); this.addNewStatus(prestudentIds); }, + changeStatusToBewerber(prestudentIds){ + let def_date = this.getDefaultDate(); + let deltaData = + { + status_kurzbz: 'Bewerber', + datum: def_date, + bestaetigtam: def_date, + ausbildungssemester: 1 + }; + + this.newArray = this.updateData.map(objekt => ({ + ...objekt, + ...deltaData})); + this.addNewStatus(prestudentIds); + }, + changeStatusToAufgenommener(prestudentIds){ + this.hideModal('confirmStatusAction'); + let def_date = this.getDefaultDate(); + let deltaData = + { + status_kurzbz: 'Aufgenommener', + datum: def_date, + bestaetigtam: def_date + }; + + this.newArray = this.updateData.map(objekt => ({ + ...objekt, + ...deltaData, + })); + + //TODO(Manu) change studiensemester_kurzbz in backend + //studiensemester_kurzbz: this.getStudiensemesterOfBewerber(objekt.prestudent_id) + this.addNewStatus(prestudentIds); + + }, + changeInteressentToStudent(prestudentIds){ + + console.log("in function changeInteressentToStudent") + let def_date = this.getDefaultDate(); + let deltaData = + { + status_kurzbz: 'Student', + datum: def_date, + bestaetigtam: def_date + }; + + this.newArray = this.updateData.map(objekt => ({ + ...objekt, + ...deltaData, + })); + + //TODO(Manu) change studiensemester_kurzbz in backend + //studiensemester_kurzbz: this.getStudiensemesterOfBewerber(objekt.prestudent_id) + //this.addStudent(prestudentIds); + + }, + changeStatusToAbgewiesen(prestudentIds){ + console.log("in function changeStatusToAbgewiesen"); + }, + changeStatusToWartend(prestudentIds){ + console.log("in function changeStatusToWartend"); + }, addStudent(prestudentIds){ let changeData = {}; @@ -603,15 +684,15 @@ export default{ } //TODO(Manu) bei status Interessent, Bewerber, aufgenommener, reload nicht working - this.reload(); - this.reloadList(); + // this.reload(); + // this.reloadList(); - // if (this.modelValue.prestudent_id) { - // this.reload(); - // } - // else { - // this.$reloadList(); - // } + if (this.modelValue.prestudent_id) { + this.reload(); + } + else { + this.$reloadList(); + } this.hideModal('statusModal'); this.resetModal(); }); @@ -983,6 +1064,18 @@ export default{