mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 07:22:17 +00:00
Merge branch 'merge_FHC4_C4'
This commit is contained in:
@@ -46,7 +46,10 @@ class Mobility extends FHCAPI_Controller
|
||||
{
|
||||
$this->BisioModel->addSelect("*");
|
||||
$this->BisioModel->addJoin('bis.tbl_mobilitaetsprogramm mp', 'ON (mp.mobilitaetsprogramm_code = bis.tbl_bisio.mobilitaetsprogramm_code)', 'LEFT');
|
||||
|
||||
$this->BisioModel->addJoin('lehre.tbl_lehreinheit le', 'ON (le.lehreinheit_id = bis.tbl_bisio.lehreinheit_id)','LEFT');
|
||||
$this->BisioModel->addOrder('von', 'DESC');
|
||||
$this->BisioModel->addOrder('bis', 'DESC');
|
||||
$this->BisioModel->addOrder('bisio_id', 'DESC');
|
||||
$result = $this->BisioModel->loadWhere(
|
||||
array('student_uid' => $student_uid)
|
||||
);
|
||||
@@ -161,13 +164,17 @@ class Mobility extends FHCAPI_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess();
|
||||
$this->terminateWithSuccess($bisio_id);
|
||||
}
|
||||
|
||||
public function loadMobility($bisio_id)
|
||||
{
|
||||
$result = $this->BisioModel->load($bisio_id);
|
||||
|
||||
$this->BisioModel->addSelect("*");
|
||||
$this->BisioModel->addJoin('bis.tbl_mobilitaetsprogramm mp', 'ON (mp.mobilitaetsprogramm_code = bis.tbl_bisio.mobilitaetsprogramm_code)', 'LEFT');
|
||||
$this->BisioModel->addJoin('lehre.tbl_lehreinheit le', 'ON (le.lehreinheit_id = bis.tbl_bisio.lehreinheit_id)','LEFT');
|
||||
$result = $this->BisioModel->loadWhere(
|
||||
array('bisio_id' => $bisio_id)
|
||||
);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(current($data));
|
||||
@@ -175,6 +182,7 @@ class Mobility extends FHCAPI_Controller
|
||||
|
||||
public function updateMobility()
|
||||
{
|
||||
|
||||
$this->load->library('form_validation');
|
||||
$authUID = getAuthUID();
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ export default {
|
||||
],
|
||||
layout: 'fitColumns',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: '250',
|
||||
height: 200,
|
||||
persistenceID: 'core-mobility-purpose'
|
||||
},
|
||||
tabulatorEvents: [
|
||||
@@ -117,6 +117,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
bisio_id() {
|
||||
this.resetFormData();
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
@@ -152,6 +153,9 @@ export default {
|
||||
}
|
||||
},
|
||||
handleSubmitAction() {
|
||||
if( this.formData.zweck_code === "" ) {
|
||||
return; //TODO form validation
|
||||
}
|
||||
if (this.bisio_id) {
|
||||
this.$emit('setMobilityPurpose', {
|
||||
zweck_code: this.formData.zweck_code,
|
||||
@@ -181,6 +185,12 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
this.resetFormData();
|
||||
},
|
||||
resetFormData: function() {
|
||||
this.formData = {
|
||||
zweck_code: ''
|
||||
};
|
||||
},
|
||||
reload() {
|
||||
this.$refs.table.reloadTable();
|
||||
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
],
|
||||
layout: 'fitColumns',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: '250',
|
||||
height: 200,
|
||||
persistenceID: 'core-mobility-support'
|
||||
},
|
||||
tabulatorEvents: [
|
||||
@@ -112,6 +112,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
bisio_id() {
|
||||
this.resetFormData();
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
@@ -141,6 +142,9 @@ export default {
|
||||
}
|
||||
},
|
||||
handleSubmitAction() {
|
||||
if( this.formData.aufenthaltfoerderung_code === "" ) {
|
||||
return; //TODO form validation
|
||||
}
|
||||
if (this.bisio_id) {
|
||||
this.$emit('setMobilitySupport', {
|
||||
aufenthaltfoerderung_code: this.formData.aufenthaltfoerderung_code,
|
||||
@@ -170,6 +174,12 @@ export default {
|
||||
}
|
||||
|
||||
}
|
||||
this.resetFormData();
|
||||
},
|
||||
resetFormData: function() {
|
||||
this.formData = {
|
||||
aufenthaltfoerderung_code: ""
|
||||
};
|
||||
},
|
||||
reload() {
|
||||
this.$refs.table.reloadTable();
|
||||
|
||||
@@ -75,6 +75,8 @@ export default {
|
||||
}
|
||||
},
|
||||
{title: "bisio_id", field: "bisio_id"},
|
||||
{title: "lehrveranstaltung_id", field: "lehrveranstaltung_id"},
|
||||
{title: "lehreinheit_id", field: "lehreinheit_id"},
|
||||
{
|
||||
title: 'Aktionen', field: 'actions',
|
||||
minWidth: 150, // Ensures Action-buttons will be always fully displayed
|
||||
@@ -108,6 +110,7 @@ export default {
|
||||
layout: 'fitDataFill',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: 'auto',
|
||||
minHeight: 200,
|
||||
selectable: true,
|
||||
index: 'bisio_id',
|
||||
persistenceID: 'stv-details-table_mobiliy'
|
||||
@@ -158,7 +161,9 @@ export default {
|
||||
herkunftsland_code: 'A',
|
||||
bisio_id: null,
|
||||
localPurposes: [],
|
||||
localSupports: []
|
||||
localSupports: [],
|
||||
lehrveranstaltung_id: '',
|
||||
lehreinheit_id: ''
|
||||
},
|
||||
statusNew: true,
|
||||
programsMobility: [],
|
||||
@@ -221,11 +226,22 @@ export default {
|
||||
this.$refs.supports.resetLocalData();
|
||||
});
|
||||
},
|
||||
handleLVchanged: function() {
|
||||
this.loadItems();
|
||||
this.resetLehreinheit();
|
||||
},
|
||||
loadItems(){
|
||||
if(this.formData.lehrveranstaltung) {
|
||||
this.getLehreinheiten(this.formData.lehrveranstaltung, this.currentSemester);
|
||||
if(this.formData.lehrveranstaltung_id) {
|
||||
this.getLehreinheiten(this.formData.lehrveranstaltung_id, this.currentSemester);
|
||||
}
|
||||
},
|
||||
changeItems(){
|
||||
this.resetLehreinheit();
|
||||
this.loadItems();
|
||||
},
|
||||
resetLehreinheit(){
|
||||
this.formData.lehreinheit_id = '';
|
||||
},
|
||||
getLehreinheiten(lv_id, studiensemester_kurzbz) {
|
||||
const data = {
|
||||
lv_id: lv_id,
|
||||
@@ -247,6 +263,15 @@ export default {
|
||||
return this.$fhcApi.factory.stv.mobility.loadMobility(bisio_id)
|
||||
.then(result => {
|
||||
this.formData = result.data;
|
||||
if(this.formData.lehrveranstaltung_id === null) {
|
||||
this.formData.lehrveranstaltung_id = '';
|
||||
}
|
||||
if(this.formData.lehreinheit_id === null) {
|
||||
this.formData.lehreinheit_id = '';
|
||||
}
|
||||
if(this.formData.lehrveranstaltung_id > 0 ) {
|
||||
this.loadItems();
|
||||
}
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
@@ -286,7 +311,10 @@ export default {
|
||||
this.formData.bisio_id = null;
|
||||
this.formData.localPurposes = [];
|
||||
this.formData.localSupports = [];
|
||||
this.formData.lehrveranstaltung_id = '',
|
||||
this.formData.lehreinheit_id = '',
|
||||
this.statusNew = true;
|
||||
this.listLes = [];
|
||||
},
|
||||
// ----------------------------------- methods purposes -----------------------------------
|
||||
addMobilityPurpose({zweck_code, bisio_id}){
|
||||
@@ -394,7 +422,7 @@ export default {
|
||||
</core-filter-cmpt>
|
||||
|
||||
<!--Modal: mobilityModal-->
|
||||
<bs-modal ref="mobilityModal" dialog-class="modal-xl">
|
||||
<bs-modal ref="mobilityModal" dialog-class="modal-xl modal-dialog-scrollable">
|
||||
<template #title>
|
||||
<p v-if="statusNew" class="fw-bold mt-3">{{$p.t('mobility', 'mobility_anlegen')}}</p>
|
||||
<p v-else class="fw-bold mt-3">{{$p.t('mobility', 'mobility_bearbeiten')}}</p>
|
||||
@@ -403,10 +431,10 @@ export default {
|
||||
|
||||
<form-form v-if="!this.student.length" ref="formMobility" @submit.prevent>
|
||||
|
||||
<div class="row my-3">
|
||||
<legend class="col-6">BIS</legend>
|
||||
<legend class="col-6">Outgoing</legend>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
<legend class="col-6">BIS</legend>
|
||||
<legend class="col-6">Outgoing</legend>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
@@ -426,9 +454,11 @@ export default {
|
||||
container-class="col-6 stv-details-mobility-typ"
|
||||
:label="$p.t('lehre', 'lehrveranstaltung')"
|
||||
type="select"
|
||||
v-model="formData.lehrveranstaltung"
|
||||
v-model="formData.lehrveranstaltung_id"
|
||||
name="lehrveranstaltung_id"
|
||||
@change="handleLVchanged"
|
||||
>
|
||||
<option value=""> -- {{ $p.t('fehlermonitoring', 'keineAuswahl') }} --</option>
|
||||
<option
|
||||
v-for="lv in listLvs"
|
||||
:key="lv.lehrveranstaltung_id"
|
||||
@@ -452,43 +482,25 @@ export default {
|
||||
:teleport="true"
|
||||
>
|
||||
</form-input>
|
||||
<template v-if="formData.lehreinheit_id && !formData.lehrveranstaltung">
|
||||
<form-input v-if="formData.lehreinheit_id"
|
||||
container-class="col-6 stv-details-mobility-typ"
|
||||
:label="$p.t('lehre', 'lehreinheit')"
|
||||
type="select"
|
||||
v-model="formData.lehreinheit_id"
|
||||
name="lehreinheit_id"
|
||||
disabled
|
||||
|
||||
<form-input
|
||||
type="select"
|
||||
container-class="col-6 stv-details-mobility-typ"
|
||||
:label="$p.t('lehre', 'lehreinheit')"
|
||||
type="select"
|
||||
v-model="formData.lehreinheit_id"
|
||||
name="lehreinheit_id"
|
||||
:disabled="listLes.length > 0 ? false : true"
|
||||
>
|
||||
<option
|
||||
v-for="le in lv_teile"
|
||||
:key="le.lehreinheit_id"
|
||||
:value="le.lehreinheit_id"
|
||||
>
|
||||
{{ le.kurzbz }}-{{ le.lehrform_kurzbz }} {{ le.bezeichnung }} {{ le.gruppe }} ({{ le.kuerzel }})
|
||||
</option>
|
||||
</form-input>
|
||||
</template>
|
||||
<template v-else>
|
||||
<form-input
|
||||
container-class="col-6 stv-details-mobility-typ"
|
||||
:label="$p.t('lehre', 'lehreinheit')"
|
||||
type="select"
|
||||
v-model="formData.lehreinheit_id"
|
||||
name="lehreinheit_id"
|
||||
@focus="loadItems"
|
||||
<option value=""> -- {{ $p.t('fehlermonitoring', 'keineAuswahl') }} --</option>
|
||||
<option
|
||||
v-for="le in listLes"
|
||||
:key="le.lehreinheit_id"
|
||||
:value="le.lehreinheit_id"
|
||||
>
|
||||
<option v-if="!listLes.length" disabled> -- {{ $p.t('exam', 'bitteLvteilWaehlen') }} --</option>
|
||||
<option
|
||||
v-for="le in listLes"
|
||||
:key="le.lehreinheit_id"
|
||||
:value="le.lehreinheit_id"
|
||||
>
|
||||
{{ le.kurzbz }}-{{ le.lehrform_kurzbz }} {{ le.bezeichnung }} {{ le.gruppe }} ({{ le.kuerzel }})
|
||||
</option>
|
||||
</form-input>
|
||||
</template>
|
||||
{{ le.kurzbz }}-{{ le.lehrform_kurzbz }} {{ le.bezeichnung }} {{ le.gruppe }} ({{ le.kuerzel }})
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
|
||||
Reference in New Issue
Block a user