diff --git a/application/controllers/api/frontend/v1/stv/Prestudent.php b/application/controllers/api/frontend/v1/stv/Prestudent.php
index 93a6c381b..d0606a5bb 100644
--- a/application/controllers/api/frontend/v1/stv/Prestudent.php
+++ b/application/controllers/api/frontend/v1/stv/Prestudent.php
@@ -279,6 +279,7 @@ class Prestudent extends FHCAPI_Controller
return $this->terminateWithSuccess(getData($result) ?: []);
}
+ //TODO(manu) multi
public function getStudienplaene($prestudent_id)
{
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php
index 2f6f9aa6d..24986429d 100644
--- a/application/controllers/api/frontend/v1/stv/Status.php
+++ b/application/controllers/api/frontend/v1/stv/Status.php
@@ -365,12 +365,12 @@ class Status extends FHCAPI_Controller
//Handle Abbrecher and Unterbrecher
//TODO (manu) implement later with multiactions
// not active yet: works only for "status ändern" in FAS
- /* if($status_kurzbz == 'Abbrecher' || $status_kurzbz == 'Unterbrecher')
+ if($status_kurzbz == 'Abbrecher' || $status_kurzbz == 'Unterbrecher')
{
$ausbildungssemester = 0;
$gruppe = '';
$verband = $status_kurzbz == 'Abbrecher' ? 'A' : 'B';
- }*/
+ }
//process studentlehrverband
$this->load->model('education/Studentlehrverband_model', 'StudentlehrverbandModel');
@@ -394,7 +394,7 @@ class Status extends FHCAPI_Controller
//not active yet: works only for "status ändern" in FAS
//Todo(Manu) Later for multiactions
- /*
+
if($status_kurzbz == 'Abbrecher' || $status_kurzbz == 'Unterbrecher')
{
$result = $this->StudentModel->update(
@@ -416,12 +416,13 @@ class Status extends FHCAPI_Controller
return $this->outputJson($result->code);
}
}
- */
+
}
$this->db->trans_commit();
- return $this->outputJsonSuccess(true);
+ //return $this->outputJsonSuccess($prestudent_id);
+ $this->terminateWithSuccess($prestudent_id);
}
public function loadStatus()
diff --git a/application/controllers/components/stv/Config.php b/application/controllers/components/stv/Config.php
index 78089d519..46a7ec30a 100644
--- a/application/controllers/components/stv/Config.php
+++ b/application/controllers/components/stv/Config.php
@@ -41,6 +41,10 @@ class Config extends FHC_Controller
'title' => 'Status',
'component' => './Stv/Studentenverwaltung/Details/Status.js'
];
+ $result['multistatus'] = [
+ 'title' => 'MultiStatus',
+ 'component' => './Stv/Studentenverwaltung/Details/MultiStatus.js'
+ ];
$result['konto'] = [
'title' => 'Konto',
'component' => './Stv/Studentenverwaltung/Details/Konto.js',
@@ -83,6 +87,22 @@ class Config extends FHC_Controller
'additionalCols' => []
]
];
+ $result['multistatus'] = [
+ 'title' => 'MultiStatus',
+ 'component' => './Stv/Studentenverwaltung/Details/MultiStatus.js',
+ 'config' => [
+ 'abbrecherStgl' => $this->permissionlib->isBerechtigt('admin'),
+ 'abbrecherStud' => $this->permissionlib->isBerechtigt('admin')
+ ]
+ ];
+/* $result['status'] = [
+ 'title' => 'Status',
+ 'component' => './Stv/Studentenverwaltung/Details/Status.js',
+ 'config' => [
+ 'abbrecherStgl' => $this->permissionlib->isBerechtigt('admin'),
+ 'abbrecherStud' => $this->permissionlib->isBerechtigt('admin')
+ ]
+ ];*/
Events::trigger('stv_conf_students', function & () use (&$result) {
return $result;
diff --git a/public/js/components/Stv/Studentenverwaltung.js b/public/js/components/Stv/Studentenverwaltung.js
index 57cfe998a..affbe2984 100644
--- a/public/js/components/Stv/Studentenverwaltung.js
+++ b/public/js/components/Stv/Studentenverwaltung.js
@@ -56,7 +56,10 @@ export default {
hasAdminPermission: this.permissions['admin'],
hasPermissionToSkipStatusCheck: this.permissions['student/keine_studstatuspruefung'],
lists: this.lists,
- defaultSemester: this.defaultSemester
+ defaultSemester: this.defaultSemester,
+ $reloadList: () => {
+ this.$refs.stvList.reload();
+ }
}
},
data() {
@@ -111,6 +114,10 @@ export default {
this.studiensemesterKurzbz = v;
this.$refs.stvList.updateUrl();
this.$refs.details.reload();
+ },
+ reloadList() {
+ console.log('reloadList2');
+ this.$refs.stvList.reload();
}
},
created() {
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/MultiStatus.js b/public/js/components/Stv/Studentenverwaltung/Details/MultiStatus.js
new file mode 100644
index 000000000..2a4b8ebb0
--- /dev/null
+++ b/public/js/components/Stv/Studentenverwaltung/Details/MultiStatus.js
@@ -0,0 +1,19 @@
+import TblMultiStatus from "./Prestudent/MultiStatus.js";
+
+export default {
+ components: {
+ TblMultiStatus
+ },
+ props: {
+ modelValue: Object,
+ },
+ template: `
+
+
+ `
+}
\ No newline at end of file
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js
new file mode 100644
index 000000000..1b4a678f4
--- /dev/null
+++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js
@@ -0,0 +1,1425 @@
+import {CoreFilterCmpt} from "../../../../filter/Filter.js";
+import BsModal from "../../../../Bootstrap/Modal.js";
+import FormForm from '../../../../Form/Form.js';
+import FormInput from '../../../../Form/Input.js';
+import {CoreRESTClient} from "../../../../../RESTClient";
+
+export default{
+ components: {
+ CoreFilterCmpt,
+ BsModal,
+ FormForm,
+ FormInput,
+ },
+ inject: {
+ defaultSemester: {
+ from: 'defaultSemester',
+ },
+ hasPermissionToSkipStatusCheck: {
+ from: 'hasPermissionToSkipStatusCheck',
+ default: false
+ },
+ hasPrestudentPermission: {
+ from: 'hasPrestudentPermission',
+ default: false
+ },
+ hasAssistenzPermission: {
+ from: 'hasAssistenzPermission',
+ default: false
+ },
+ hasAdminPermission: {
+ from: 'hasAdminPermission',
+ default: false
+ },
+ hasAssistenzPermissionForStgs: {
+ from: 'hasAssistenzPermissionForStgs',
+ default: false
+ },
+ hasSchreibrechtAss: {
+ from: 'hasSchreibrechtAss',
+ default: false
+ },
+ $reloadList: {
+ from: '$reloadList',
+ required: true
+ }
+ },
+ computed: {
+/* personIds(){
+ if (this.modelValue.person_id)
+ return [this.modelValue.person_id];
+ return this.modelValue.map(e => e.person_id);
+ },*/
+ prestudentIds(){
+ if (this.modelValue.prestudent_id)
+ {
+ return [this.modelValue.prestudent_id];
+ }
+ return this.modelValue.map(e => e.prestudent_id);
+ },
+ updateData(){
+ const dataArray = [];
+ if (this.modelValue.prestudent_id) {
+ const newObj = {
+ prestudent_id : this.modelValue.prestudent_id,
+ studiensemester_kurzbz : this.defaultSemester,
+ ausbildungssemester : this.modelValue.semester
+ };
+ dataArray.push(newObj);
+ //console.log(dataArray);
+ return dataArray;
+ }
+ else
+ {
+ for (const item of this.modelValue) {
+ const newObj = {
+ prestudent_id: item.prestudent_id,
+ ausbildungssemester: item.semester,
+ studiensemester_kurzbz: this.defaultSemester
+ };
+ dataArray.push(newObj);
+ }
+
+ return dataArray;
+ }
+
+ },
+ gruende() {
+ return this.listStatusgruende.filter(grund => grund.status_kurzbz == this.statusData.status_kurzbz);
+ },
+ arrayStg(){
+ let stgInteger = this.hasAssistenzPermissionForStgs.map(item => {
+ return parseInt(item); // Wandelt jeden String in eine ganze Zahl um
+ });
+ return stgInteger;
+ },
+ hasPermissionCurrentStg(){
+ return this.arrayStg.includes(this.studiengang_kz);
+ }
+ },
+ props: {
+ modelValue: Object,
+ },
+ data() {
+
+ return {
+ tabulatorOptions: {
+ ajaxURL: 'api/frontend/v1/stv/Status/getHistoryPrestudent/' + this.modelValue.prestudent_id,
+ ajaxRequestFunc: this.$fhcApi.get,
+ ajaxResponse: (url, params, response) => response.data,
+ columns: [
+ {title: "Kurzbz", field: "status_kurzbz", tooltip: true},
+ {title: "StSem", field: "studiensemester_kurzbz"},
+ {title: "Sem", field: "ausbildungssemester"},
+ {title: "Lehrverband", field: "lehrverband", width: 72},
+ {title: "Datum", field: "format_datum"},
+ {title: "Studienplan", field: "bezeichnung"},
+ {title: "BestätigtAm", field: "format_bestaetigtam"},
+ {title: "AbgeschicktAm", field: "format_bewerbung_abgeschicktamum", visible:false},
+ {title: "Statusgrund", field: "statusgrund_kurzbz"},
+ {title: "Organisationsform", field: "orgform_kurzbz", visible: false},
+ {title: "PrestudentInId", field: "prestudent_id", visible: false},
+ {title: "StudienplanId", field: "studienplan_id", visible: false},
+ {title: "Anmerkung", field: "anmerkung", visible: false},
+ {title: "BestätigtVon", field: "bestaetigtvon", visible: false},
+ {title: "InsertAmUm", field: "format_insertamum", visible: false},
+ {title: "InsertVon", field: "insertvon", visible: false},
+ {title: "UpdateAmUm", field: "format_updateamum", visible: false},
+ {title: "UpdateVon", field: "updatevon", visible: false},
+ {
+ title: 'Aktionen', field: 'actions',
+ minWidth: 150, // Ensures Action-buttons will be always fully displayed
+ formatter: (cell, formatterParams, onRendered) => {
+
+
+ //let disableButton = false;
+ //const rowData = this.row.getData();
+
+
+ let container = document.createElement('div');
+ container.className = "d-flex gap-2";
+
+ let button = document.createElement('button');
+ if (this.dataMeldestichtag && this.dataMeldestichtag > cell.getData().datum && !this.hasPermissionToSkipStatusCheck)
+ button.className = 'btn btn-outline-secondary btn-action disabled';
+ else
+ button.className = 'btn btn-outline-secondary btn-action';
+ button.innerHTML = '';
+ button.title = 'Status vorrücken';
+ button.addEventListener(
+ 'click',
+ () =>
+ this.actionAdvanceStatus(cell.getData().status_kurzbz, cell.getData().studiensemester_kurzbz, cell.getData().ausbildungssemester)
+ );
+ container.append(button);
+
+ button = document.createElement('button');
+ if (this.dataMeldestichtag && this.dataMeldestichtag > cell.getData().datum && !this.hasPermissionToSkipStatusCheck)
+ button.className = 'btn btn-outline-secondary btn-action disabled';
+ else
+ button.className = 'btn btn-outline-secondary btn-action';
+ button.innerHTML = '';
+ button.title = 'Status bestätigen';
+ button.addEventListener('click', () =>
+ this.actionConfirmStatus(cell.getData().status_kurzbz, cell.getData().studiensemester_kurzbz, cell.getData().ausbildungssemester)
+ );
+ container.append(button);
+
+ button = document.createElement('button');
+ if (this.dataMeldestichtag && this.dataMeldestichtag > cell.getData().datum && !this.hasPermissionToSkipStatusCheck)
+ button.className = 'btn btn-outline-secondary btn-action disabled';
+ else
+ button.className = 'btn btn-outline-secondary btn-action';
+ button.innerHTML = '';
+ button.title = 'Status bearbeiten';
+ button.addEventListener('click', (event) =>
+ this.actionEditStatus(cell.getData().status_kurzbz, cell.getData().studiensemester_kurzbz, cell.getData().ausbildungssemester)
+ );
+ container.append(button);
+
+ button = document.createElement('button');
+ if (this.dataMeldestichtag && this.dataMeldestichtag > cell.getData().datum && !this.hasPermissionToSkipStatusCheck)
+ button.className = 'btn btn-outline-secondary btn-action disabled';
+ else
+ button.className = 'btn btn-outline-secondary btn-action';
+ button.innerHTML = '';
+ button.title = 'Status löschen';
+ button.addEventListener('click', () =>
+ this.actionDeleteStatus(cell.getData().status_kurzbz, cell.getData().studiensemester_kurzbz, cell.getData().ausbildungssemester)
+ );
+ container.append(button);
+
+ return container;
+ },
+ frozen: true
+ },
+ ],
+ rowFormatter: (row) => {
+ const rowData = row.getData();
+ if (this.dataMeldestichtag && this.dataMeldestichtag > rowData.datum)
+ {
+ row.getElement().classList.add('disabled');
+
+ }
+ },
+ layout: 'fitDataFill',
+ layoutColumnsOnNewData: false,
+ height: 'auto',
+ selectable: false,
+ },
+ tabulatorEvents: [
+ {
+ event: 'tableBuilt',
+ handler: async () => {
+ await this.$p.loadCategory(['lehre','global','person']);
+
+ let cm = this.$refs.table.tabulator.columnManager;
+
+ cm.getColumnByField('lehrverband').component.updateDefinition({
+ title: this.$p.t('lehre', 'lehrverband')
+ });
+
+ cm.getColumnByField('format_bestaetigtam').component.updateDefinition({
+ title: this.$p.t('lehre', 'bestaetigt_am')
+ });
+
+ cm.getColumnByField('format_bewerbung_abgeschicktamum').component.updateDefinition({
+ title: this.$p.t('lehre', 'bewerbung_abgeschickt_am')
+ });
+
+ cm.getColumnByField('bezeichnung').component.updateDefinition({
+ title: this.$p.t('lehre', 'studienplan')
+ });
+
+ cm.getColumnByField('actions').component.updateDefinition({
+ title: this.$p.t('global', 'aktionen')
+ });
+
+ cm.getColumnByField('format_datum').component.updateDefinition({
+ title: this.$p.t('global', 'datum')
+ });
+
+ cm.getColumnByField('anmerkung').component.updateDefinition({
+ title: this.$p.t('global', 'anmerkung')
+ });
+
+ cm.getColumnByField('bestaetigtvon').component.updateDefinition({
+ title: this.$p.t('lehre', 'bestaetigt_von')
+ });
+
+ cm.getColumnByField('format_insertamum').component.updateDefinition({
+ title: this.$p.t('lehre', 'insert_am')
+ });
+
+ cm.getColumnByField('insertvon').component.updateDefinition({
+ title: this.$p.t('lehre', 'insert_von')
+ });
+ }
+ }
+ ],
+// }
+
+ statusData: {},
+ listStudiensemester: [],
+ maxSem: Array.from({ length: 11 }, (_, index) => index),
+ listStudienplaene: [],
+ aufnahmestufen: {'': '-- keine Auswahl --', 1: 1, 2: 2, 3: 3},
+ listStatusgruende: [],
+ statusId: {},
+ gruendeLength: {},
+ dataMeldestichtag: null,
+ stichtag: {},
+ isLastStatus: {},
+ hasPermissionThisStg: {},
+ actionButton: {},
+ actionStatusText: {},
+ actionSem: null,
+ newArray: {}
+ }
+ },
+ watch: {
+ data: {
+ handler(n) {
+ const start = this.status_kurzbz;
+ },
+ deep: true
+ },
+ modelValue(){
+ this.$refs.table.tabulator.setData('api/frontend/v1/stv/Status/getHistoryPrestudent/' + this.modelValue.prestudent_id);
+ }
+ },
+ methods: {
+ actionNewStatus() {
+ this.statusData.status_kurzbz = 'Interessent';
+ this.statusData.studiensemester_kurzbz = this.defaultSemester;
+ this.statusData.ausbildungssemester = 1;
+ this.statusData.datum = this.getDefaultDate();
+ this.statusData.bestaetigtam = this.getDefaultDate();
+ this.$refs.newStatusModal.show();
+ },
+ actionEditStatus(status, stdsem, ausbildungssemester){
+ this.statusId = {
+ 'prestudent_id': this.modelValue.prestudent_id,
+ 'status_kurzbz': status,
+ 'studiensemester_kurzbz': stdsem,
+ 'ausbildungssemester': ausbildungssemester
+ };
+ this.loadStatus(this.statusId).then(() => {
+ if(this.statusData)
+ this.$refs.editStatusModal.show();
+ });
+ },
+ actionDeleteStatus(status, stdsem, ausbildungssemester){
+ this.statusId = {
+ 'prestudent_id': this.modelValue.prestudent_id,
+ 'status_kurzbz': status,
+ 'studiensemester_kurzbz': stdsem,
+ 'ausbildungssemester': ausbildungssemester
+ };
+
+ this.checkIfLastStatus();
+
+ this.loadStatus(this.statusId).then(() => {
+ if(this.statusData)
+ this.$refs.deleteStatusModal.show();
+ });
+ },
+ actionAdvanceStatus(status, stdsem, ausbildungssemester){
+ this.statusId = {
+ 'prestudent_id': this.modelValue.prestudent_id,
+ 'status_kurzbz': status,
+ 'studiensemester_kurzbz': stdsem,
+ 'ausbildungssemester': ausbildungssemester
+ };
+ this.loadStatus(this.statusId).then(() => {
+ if(this.statusData)
+ this.advanceStatus(this.statusId);
+ });
+ },
+ actionConfirmStatus(status, stdsem, ausbildungssemester){
+ this.statusId = {
+ 'prestudent_id': this.modelValue.prestudent_id,
+ 'status_kurzbz': status,
+ 'studiensemester_kurzbz': stdsem,
+ 'ausbildungssemester': ausbildungssemester
+ };
+ this.loadStatus(this.statusId).then(() => {
+ if(this.statusData)
+ this.confirmStatus(this.statusId);
+ });
+ },
+ actionConfirmDialogue(data, statusgrund, statusText){
+ //this.hideModal('addMultiStatus2');
+ this.actionButton = statusgrund;
+ this.actionStatusText = statusText;
+
+ console.log("statusgrund: " + this.actionButton + ' , statusText: ' + this.actionStatusText + ' sem: ' + this.actionSem);
+ if(this.actionStatusText != "Student" && this.actionStatusText != "Wiederholer")
+ this.$refs.confirmStatusAction.show();
+ else
+ this.$refs.askForAusbildungssemester.show();
+ },
+ changeStatusToAbbrecherStgl(prestudentIds){
+ this.hideModal('confirmStatusAction2');
+ let abbruchData =
+ {
+ status_kurzbz: 'Abbrecher',
+ datum: this.getDefaultDate(),
+ bestaetigtam: this.getDefaultDate(),
+ statusgrund_id: 17
+ };
+ console.log(this.updateData);
+ this.newArray = this.updateData.map(objekt => ({ ...objekt, ...abbruchData }));
+ console.log(this.newArray);
+
+ console.log("in changeStatusToAbbrecher" + prestudentIds);
+ this.addNewStatus(prestudentIds);
+ },
+ changeStatusToAbbrecherStud(prestudentIds){
+ this.hideModal('confirmStatusAction');
+ let deltaData =
+ {
+ status_kurzbz: 'Abbrecher',
+ datum: this.getDefaultDate(),
+ bestaetigtam: this.getDefaultDate(),
+ statusgrund_id: 18
+ };
+
+ this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData }));
+
+ console.log("in changeStatusToAbbrecher" + prestudentIds);
+ this.addNewStatus(prestudentIds);
+ },
+ changeStatusToUnterbrecher(prestudentIds){
+ this.hideModal('confirmStatusAction');
+ let deltaData =
+ {
+ status_kurzbz: 'Unterbrecher',
+ datum: this.getDefaultDate(),
+ bestaetigtam: this.getDefaultDate()
+ };
+
+ this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData }));
+
+ console.log("in changeStatusToUnterbrecher" + prestudentIds);
+ this.addNewStatus(prestudentIds);
+ },
+ changeStatusToStudent(prestudentIds){
+ this.hideModal('askForAusbildungssemester');
+ let deltaData =
+ {
+ status_kurzbz: 'Student',
+ datum: this.getDefaultDate(),
+ bestaetigtam: this.getDefaultDate()
+ };
+
+ this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData, ausbildungssemester: this.actionSem}));
+
+ console.log("in changeStatusToStudent" + prestudentIds);
+ this.addNewStatus(prestudentIds);
+ },
+ changeStatusToWiederholer(prestudentIds){
+ this.hideModal('askForAusbildungssemester');
+ let deltaData =
+ {
+ status_kurzbz: 'Student',
+ datum: this.getDefaultDate(),
+ bestaetigtam: this.getDefaultDate(),
+ statusgrund_id: 16
+ };
+
+ this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData, ausbildungssemester: this.actionSem}));
+
+ console.log("in changeStatusToWiederholer" + prestudentIds);
+ this.addNewStatus(prestudentIds);
+ },
+ changeStatusToDiplomand(prestudentIds){
+
+ let deltaData =
+ {
+ status_kurzbz: 'Diplomand',
+ datum: this.getDefaultDate(),
+ bestaetigtam: this.getDefaultDate(),
+ };
+
+ this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData}));
+
+ console.log("in changeStatusToDiplomand" + prestudentIds);
+ this.addNewStatus(prestudentIds);
+ },
+ changeStatusToAbsolvent(prestudentIds){
+
+ let deltaData =
+ {
+ status_kurzbz: 'Absolvent',
+ datum: this.getDefaultDate(),
+ bestaetigtam: this.getDefaultDate(),
+ };
+
+ this.newArray = this.updateData.map(objekt => ({ ...objekt, ...deltaData}));
+
+ console.log("in changeStatusToAbsolvent" + prestudentIds);
+ this.addNewStatus(prestudentIds);
+ },
+ addNewStatus(prestudentIds){
+ //Array.isArray(prestudentIds) ? this.modelValue.prestudent_id : [prestudentIds];
+ let changeData = {};
+
+ if(!prestudentIds)
+ prestudentIds = [this.modelValue.prestudent_id];
+
+ const promises = prestudentIds.map(prestudentId => {
+ //TODO(manu) besserer check
+ //if(!this.newArray)
+ if(this.statusData.status_kurzbz)
+ {
+ changeData = this.statusData; //this.statusData = this.updateData.find(item => item.prestudent_id === prestudentId);
+ }
+ else
+ {
+ changeData = this.newArray.find(item => item.prestudent_id === prestudentId);
+ }
+
+ console.log("---");
+ console.log(changeData);
+
+ return this.$fhcApi.post('api/frontend/v1/stv/status/addNewStatus/' + prestudentId,
+ //this.statusData
+ //this.updateData.find(item => item.prestudent_id == prestudentId)
+ changeData
+ ).then(response => {
+ this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
+ console.log(response);
+ return response;
+ }).catch(this.$fhcAlert.handleSystemError)
+ /*.finally(() => {
+ window.scrollTo(0, 0);
+ })*/;
+ });
+
+ Promise
+ .allSettled(promises)
+ .then(values => {
+ if (this.modelValue.prestudent_id) {
+ this.reload();
+ }
+ else {
+ this.$reloadList();
+ }
+ this.hideModal('newStatusModal');
+ this.resetModal();
+ });
+ },
+ advanceStatus(statusId){
+ return this.$fhcApi.post('api/frontend/v1/stv/status/advanceStatus/' +
+ this.statusId.prestudent_id + '/' +
+ this.statusId.status_kurzbz + '/' +
+ this.statusId.studiensemester_kurzbz + '/' +
+ this.statusId.ausbildungssemester)
+ .then(
+ result => {
+ this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successAdvance'));
+ })
+ .catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+ window.scrollTo(0, 0);
+ this.reload();
+ });
+ },
+ confirmStatus(statusId){
+ return this.$fhcApi.post('api/frontend/v1/stv/status/confirmStatus/' +
+ this.statusId.prestudent_id + '/' +
+ this.statusId.status_kurzbz + '/' +
+ this.statusId.studiensemester_kurzbz + '/' +
+ this.statusId.ausbildungssemester)
+ .then(
+ result => {
+ this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successConfirm'));
+ })
+ .catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+/* window.scrollTo(0, 0);*/
+ this.reload();
+ });
+ },
+ deleteStatus(status_id){
+ return this.$fhcApi.post('api/frontend/v1/stv/status/deleteStatus/',
+ status_id)
+ .then(
+ result => {
+ this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
+ this.hideModal('deleteStatusModal');
+ this.resetModal();
+ })
+ .catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+ window.scrollTo(0, 0);
+ this.reload();
+ });
+ },
+ editStatus(){
+ return this.$fhcApi.post('api/frontend/v1/stv/status/updateStatus/' +
+ this.statusId.prestudent_id + '/' +
+ this.statusId.status_kurzbz + '/' +
+ this.statusId.studiensemester_kurzbz + '/' +
+ this.statusId.ausbildungssemester,
+ this.statusData)
+ .then(
+ result => {
+ this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
+ this.hideModal('editStatusModal');
+ this.resetModal();
+ })
+ .catch(this.$fhcAlert.handleSystemError)
+ .finally(() => {
+ window.scrollTo(0, 0);
+ this.reload();
+ });
+ },
+ checkIfLastStatus(){
+ return this.$fhcApi
+ .get('api/frontend/v1/stv/status/isLastStatus/' + this.modelValue.prestudent_id)
+ .then(
+ result => {
+ if(result.data){
+ this.isLastStatus = result.data;
+ } else {
+ this.isLastStatus = {};
+ }
+ return result;
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+ },
+ loadStatus(status_id){
+ return this.$fhcApi.post('api/frontend/v1/stv/status/loadStatus/',
+ status_id)
+ .then(result => {
+ this.statusData = result.data;
+ return result;
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+ },
+ reload(){
+ this.$refs.table.reloadTable(); //bei multiactions not working
+ },
+ reloadLast(prestudent_id){
+ console.log("prestudent_id: " + prestudent_id);
+ // this.$refs.table.tabulator.setData('api/frontend/v1/stv/Status/getHistoryPrestudent/' + prestudent_id);
+
+ // window.location.href = "https://c3p0.ma0068.technikum-wien.at/fhcomplete/index.ci.php/studentenverwaltung/prestudent/" + prestudent_id + "/multistatus";
+ },
+ hideModal(modalRef){
+ this.$refs[modalRef].hide();
+ },
+ resetModal(){
+ this.statusData = {};
+ this.statusId = {};
+ this.actionButton = {};
+ this.actionStatusText = {};
+ this.actionSem = null;
+ },
+ getDefaultDate() {
+ const today = new Date();
+ return today;
+ }
+ },
+ created(){
+ this.$fhcApi
+ .get('api/frontend/v1/stv/prestudent/getStudiensemester')
+ .then(result => result.data)
+ .then(result => {
+ this.listStudiensemester = result;
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+/* this.$fhcApi
+ .get('api/frontend/v1/stv/prestudent/getStudienplaene/' + this.modelValue.prestudent_id)
+ .then(result => result.data)
+ .then(result => {
+ this.listStudienplaene = result;
+ })
+ .catch(this.$fhcAlert.handleSystemError);*/
+ this.$fhcApi
+ .get('api/frontend/v1/stv/status/getStatusgruende/')
+ .then(result => result.data)
+ .then(result => {
+ this.listStatusgruende = result;
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+ this.$fhcApi
+ .get('api/frontend/v1/stv/status/getLastBismeldestichtag/')
+ .then(result => result.data)
+ .then(result => {
+ this.dataMeldestichtag = result.retval[0].meldestichtag;
+ })
+ .catch(this.$fhcAlert.handleSystemError);
+ },
+ mounted(){},
+ template: `
+
+
+ PersonId(s): {{personIds}}
+ ||
+ PrestudentId(s): {{prestudentIds}}
+
+
+
+
+
+
+
+ {{$p.t('lehre', 'status_new')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{$p.t('lehre', 'status_edit')}}
+
+
+
+ {{$p.t('bismeldestichtag', 'meldestichtag_erreicht')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{$p.t('lehre', 'status_edit')}}
+
+
+
{{$p.t('lehre', 'last_status_confirm_delete')}}
+
+
+
{{$p.t('lehre', 'status_confirm_delete')}}
+
+
+
+
+
+
+
+
+
+
+ {{$p.t('lehre', 'status_edit')}}
+
+
+
Diese Person wirklich zum {{actionStatusText}} machen?
+
+
+
Diese {{prestudentIds.length}} Personen wirklich zum {{actionStatusText}} machen?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{$p.t('lehre', 'status_edit')}}
+
+
+
In welches Semester soll dieser {{actionStatusText}} verschoben werden?
+
+
+
In welches Semester sollen diese {{prestudentIds.length}} {{actionStatusText}}en verschoben werden?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`
+
+};
\ No newline at end of file
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/Status.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/Status.js
index 14ddf6866..6c2c45048 100644
--- a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/Status.js
+++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/Status.js
@@ -815,6 +815,42 @@ export default{
new-btn-label="Status"
@click:new="actionNewStatus"
>
+
+
+
+
+
+
`
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Status.js b/public/js/components/Stv/Studentenverwaltung/Details/Status.js
index 623fcb597..2d0ced38a 100644
--- a/public/js/components/Stv/Studentenverwaltung/Details/Status.js
+++ b/public/js/components/Stv/Studentenverwaltung/Details/Status.js
@@ -1,18 +1,25 @@
import TblStatus from "./Prestudent/Status.js";
+import TblMultiStatus from "./Prestudent/MultiStatus.js";
export default {
components: {
- TblStatus
+ TblStatus,
+ TblMultiStatus
},
props: {
modelValue: Object,
},
template: `
+
+
+
+
+
+
`
}
\ No newline at end of file
diff --git a/public/js/components/Stv/Studentenverwaltung/List.js b/public/js/components/Stv/Studentenverwaltung/List.js
index c9c5ecb26..866dd4d07 100644
--- a/public/js/components/Stv/Studentenverwaltung/List.js
+++ b/public/js/components/Stv/Studentenverwaltung/List.js
@@ -83,6 +83,9 @@ export default {
}
},
methods: {
+ reload() {
+ this.$refs.table.reloadTable();
+ },
actionNewPrestudent() {
this.$refs.new.open();
},