diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php index bfac248d1..ef0806c4d 100644 --- a/application/controllers/api/frontend/v1/stv/Status.php +++ b/application/controllers/api/frontend/v1/stv/Status.php @@ -399,7 +399,7 @@ class Status extends FHCAPI_Controller $this->terminateWithSuccess($prestudent_id); } break; - case Prestudentstatus_model::STATUS_STUDENT: +/* case Prestudentstatus_model::STATUS_STUDENT: { $this->load->library('PrestudentLib'); $result = $this->prestudentlib->setStudent($prestudent_id, $studiensemester_kurzbz, $ausbildungssemester, $statusgrund_id, $bestaetigtam, $bestaetigtvon); @@ -412,7 +412,7 @@ class Status extends FHCAPI_Controller $this->terminateWithSuccess($prestudent_id); } - break; + break;*/ case Prestudentstatus_model::STATUS_DIPLOMAND: { $this->load->library('PrestudentLib'); diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js index 6cb9714ec..915594473 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js @@ -152,7 +152,6 @@ export default{ status_kurzbz: status, statusgrund_id: null, link: `changeStatusTo${status}`, - // dropEntry: null, children: [] }; @@ -168,7 +167,6 @@ export default{ statusgrund_id: item.statusgrund_id, beschreibung: item.beschreibung, link: `changeStatusTo${item.status_kurzbz}(${item.statusgrund_id})`, - //dropEntry: `[${item.beschreibung}]` }; if (item.status_kurzbz === "Student") { @@ -505,22 +503,10 @@ export default{ actionConfirmDialogue(data, statusgrund, statusText){ this.actionButton = statusgrund; this.actionStatusText = statusText; - - if(this.actionStatusText != "Student" && this.actionStatusText != "Wiederholer") - this.$refs.confirmStatusAction.show(); - else { - //haut einzeln hin -/* console.log("check if Bewerberstatus"); - this.checkIfBewerber(this.prestudentIds); - console.log(this.isBewerber);*/ - - this.$refs.askForAusbildungssemester.show(); - } + this.$refs.confirmStatusAction.show(); }, changeStatusToAbbrecher(statusgrund_id){ - this.hideModal('confirmStatusAction'); - this.hideModal('askForAusbildungssemester'); - console.log("in function changeStatusToAbbrecher: ", statusgrund_id); + this.resetChangeModals(); let def_date = this.getDefaultDate(); let abbruchData = { @@ -535,8 +521,7 @@ export default{ //this.changeStatus(prestudentIds); }, changeStatusToUnterbrecher(){ - this.hideModal('confirmStatusAction'); - this.hideModal('askForAusbildungssemester'); + this.resetChangeModals(); let def_date = this.getDefaultDate(); let deltaData = { @@ -549,8 +534,7 @@ export default{ this.actionConfirmDialogue(this.updateData, 'studenten','Unterbrecher'); }, changeStatusToStudent(statusgrund_id){ - this.hideModal('confirmStatusAction'); - this.hideModal('askForAusbildungssemester'); + this.resetChangeModals(); console.log("in function changeStatusToStudent: ", statusgrund_id); let def_date = this.getDefaultDate(); //TODO Manu validation if Bewerber already before asking for ausbildungssemester @@ -561,7 +545,7 @@ export default{ if(statusgrund_id == 19){ this.actionStatusText = 'Pre-Abbrecher'; } - if(statusgrund_id == 11){ + if(statusgrund_id == 15){ this.actionStatusText = 'Pre-Wiederholer'; } if(statusgrund_id == 16){ @@ -570,8 +554,6 @@ export default{ if(!statusgrund_id){ this.actionStatusText = 'Student'; } - - let deltaData = { status_kurzbz: 'Student', @@ -579,15 +561,17 @@ export default{ bestaetigtam: def_date, statusgrund_id: statusgrund_id }; - - // this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData, ausbildungssemester: this.actionSem})); - - //now actionSem is asked later this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData})); - this.actionConfirmDialogue(this.updateData, this.actionButton, this.actionStatusText); + if(statusgrund_id == 16 || !statusgrund_id){ + this.$refs.askForAusbildungssemester.show(); + } + else + { + this.actionConfirmDialogue(this.updateData, this.actionButton, this.actionStatusText); + } }, - changeStatusToDiplomand(prestudentIds){ + changeStatusToDiplomand(){ let def_date = this.getDefaultDate(); let deltaData = { @@ -597,9 +581,9 @@ export default{ }; this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData})); - this.changeStatus(prestudentIds); + this.changeStatus(this.prestudentIds); }, - changeStatusToAbsolvent(prestudentIds){ + changeStatusToAbsolvent(){ let def_date = this.getDefaultDate(); let deltaData = { @@ -609,11 +593,14 @@ export default{ }; this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData})); - this.changeStatus(prestudentIds); + this.changeStatus(this.prestudentIds); + }, + saveNewAusbildungssemester(){ + this.newArray = this.newArray.map(objekt => ({ ...objekt, ausbildungssemester: this.actionSem})); + this.changeStatus(this.prestudentIds); }, changeStatusToBewerber(){ - this.hideModal('confirmStatusAction'); - this.hideModal('askForAusbildungssemester'); + this.resetChangeModals(); let def_date = this.getDefaultDate(); let deltaData = { @@ -629,8 +616,7 @@ export default{ this.changeStatus(this.prestudentIds); }, changeStatusToAufgenommener(){ - this.hideModal('confirmStatusAction'); - this.hideModal('askForAusbildungssemester'); + this.resetChangeModals(); let def_date = this.getDefaultDate(); let deltaData = { @@ -648,8 +634,7 @@ export default{ }, changeInteressentToStudent(statusgrund_id){ - this.hideModal('confirmStatusAction'); - this.hideModal('askForAusbildungssemester'); + this.resetChangeModals(); //TODO(Manu) test statusgrund_id console.log("in function changeInteressentToStudent mit statusgrund_id", statusgrund_id); let def_date = this.getDefaultDate(); @@ -670,8 +655,7 @@ export default{ }, changeStatusToAbgewiesener(statusgrund_id){ - this.hideModal('confirmStatusAction'); - this.hideModal('askForAusbildungssemester'); + this.resetChangeModals(); let def_date = this.getDefaultDate(); let deltaData = { @@ -689,8 +673,7 @@ export default{ this.actionConfirmDialogue(this.updateData, 'abgewiesener','Abgewiesenen'); }, changeStatusToWartender(){ - this.hideModal('confirmStatusAction'); - this.hideModal('askForAusbildungssemester'); + this.resetChangeModals(); let def_date = this.getDefaultDate(); let deltaData = { @@ -774,8 +757,7 @@ export default{ .catch(this.$fhcAlert.handleSystemError); }, changeStatus(prestudentIds){ - this.hideModal('confirmStatusAction'); - this.hideModal('askForAusbildungssemester'); + this.resetChangeModals(); //Array.isArray(prestudentIds) ? this.modelValue.prestudent_id : [prestudentIds]; let changeData = {}; @@ -796,8 +778,6 @@ export default{ this.newArray.push({ ausbildungssemester: this.actionSem }); } - console.log(this.actionSem + ' ' + this.newArray['ausbildungssemester']); - const promises = prestudentIds.map(prestudentId => { //TODO(manu) besserer check changeData = this.statusData.status_kurzbz ? this.statusData : this.newArray.find(item => item.prestudent_id === prestudentId); @@ -1016,6 +996,10 @@ export default{ this.actionStatusText = {}; this.actionSem = null; }, + resetChangeModals(){ + this.hideModal('confirmStatusAction'); + this.hideModal('askForAusbildungssemester'); + }, getDefaultDate() { const today = new Date(); return today; @@ -1066,72 +1050,7 @@ export default{ }, template: `
- - - - - - - - - - - - - - - - - - - - - - - - -
Status KurzbezBezeichnungStatus Grund IDLinkLink statusgrund_id
{{item.status_kurzbz}} -
- {{child.beschreibung}} -
-
{{ item.beschreibung }}{{ item.children[0] }}{{ item.link }} -
- {{child.link}} -
-
- - @@ -1420,50 +1330,36 @@ export default{ - - -
- - -
- + +
@@ -1510,44 +1406,36 @@ export default{ - - - - -
- -
+ + ` }; \ No newline at end of file