mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Merge branch 'feature-54856/FHC4_Studierendenverwaltung_In_Out' into merge_FHC4_C4
This commit is contained in:
@@ -123,6 +123,11 @@ class Config extends FHCAPI_Controller
|
||||
'config' => $config['finalexam']
|
||||
];
|
||||
|
||||
$result['mobility'] = [
|
||||
'title' => $this->p->t('stv', 'tab_mobility'),
|
||||
'component' => './Stv/Studentenverwaltung/Details/Mobility.js'
|
||||
];
|
||||
|
||||
Events::trigger('stv_conf_student', function & () use (&$result) {
|
||||
return $result;
|
||||
});
|
||||
|
||||
@@ -0,0 +1,522 @@
|
||||
<?php
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
use \DateTime as DateTime;
|
||||
|
||||
class Mobility extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getMobilitaeten' => ['admin:r', 'assistenz:r'],
|
||||
'loadMobility' => ['admin:r', 'assistenz:r'],
|
||||
'insertMobility' => ['admin:rw', 'assistenz:rw'],
|
||||
'updateMobility' => ['admin:rw', 'assistenz:rw'],
|
||||
'deleteMobility' => ['admin:rw', 'assistenz:rw'],
|
||||
'getProgramsMobility' => ['admin:r', 'assistenz:r'],
|
||||
'getLVList' => ['admin:r', 'assistenz:r'],
|
||||
'getAllLehreinheiten' => ['admin:r', 'assistenz:r'],
|
||||
'getLvsandLesByStudent' => ['admin:r', 'assistenz:r'],
|
||||
'getPurposes' => ['admin:r', 'assistenz:r'],
|
||||
'getSupports' => ['admin:r', 'assistenz:r'],
|
||||
'getListPurposes' => ['admin:r', 'assistenz:r'],
|
||||
'getListSupports' => ['admin:r', 'assistenz:r'],
|
||||
'deleteMobilityPurpose' => ['admin:r', 'assistenz:r'],
|
||||
'addMobilityPurpose' => ['admin:r', 'assistenz:r'],
|
||||
'deleteMobilitySupport' => ['admin:r', 'assistenz:r'],
|
||||
'addMobilitySupport' => ['admin:r', 'assistenz:r'],
|
||||
]);
|
||||
|
||||
// Load Libraries
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$this->load->library('form_validation');
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'ui',
|
||||
'mobility'
|
||||
]);
|
||||
|
||||
// Load models
|
||||
$this->load->model('codex/Bisio_model', 'BisioModel');
|
||||
}
|
||||
|
||||
public function getMobilitaeten($student_uid)
|
||||
{
|
||||
$this->BisioModel->addSelect("*");
|
||||
$this->BisioModel->addSelect("TO_CHAR( tbl_bisio.von::timestamp, 'DD.MM.YYYY') AS format_von");
|
||||
$this->BisioModel->addSelect("TO_CHAR( tbl_bisio.bis::timestamp, 'DD.MM.YYYY') AS format_bis");
|
||||
$this->BisioModel->addJoin('bis.tbl_mobilitaetsprogramm mp', 'ON (mp.mobilitaetsprogramm_code = bis.tbl_bisio.mobilitaetsprogramm_code)', 'LEFT');
|
||||
|
||||
$result = $this->BisioModel->loadWhere(
|
||||
array('student_uid' => $student_uid)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getProgramsMobility()
|
||||
{
|
||||
$this->load->model('codex/Mobilitaetsprogramm_model', 'MobilitaetsprogrammModel');
|
||||
|
||||
$result = $this->MobilitaetsprogrammModel->load();
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function insertMobility()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
$authUID = getAuthUID();
|
||||
|
||||
$student_uid = $this->input->post('uid');
|
||||
|
||||
if(!$student_uid)
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Student UID']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$formData = $this->input->post('formData');
|
||||
|
||||
$_POST['von'] = (isset($formData['von']) && !empty($formData['von'])) ? $formData['von'] : null;
|
||||
$_POST['bis'] = (isset($formData['bis']) && !empty($formData['bis'])) ? $formData['bis'] : null;
|
||||
$_POST['nation_code'] = (isset($formData['nation_code']) && !empty($formData['nation_code'])) ? $formData['nation_code'] : 'A';
|
||||
$_POST['mobilitaetsprogramm_code'] = (isset($formData['mobilitaetsprogramm_code']) && !empty($formData['mobilitaetsprogramm_code'])) ? $formData['mobilitaetsprogramm_code'] : null;
|
||||
$_POST['herkunftsland_code'] = (isset($formData['herkunftsland_code']) && !empty($formData['herkunftsland_code'])) ? $formData['herkunftsland_code'] : 'A';
|
||||
$_POST['ects_erworben'] = (isset($formData['ects_erworben']) && !empty($formData['ects_erworben'])) ? $formData['ects_erworben'] : null;
|
||||
$_POST['ects_angerechnet'] = (isset($formData['ects_angerechnet']) && !empty($formData['ects_angerechnet'])) ? $formData['ects_angerechnet'] : null;
|
||||
$_POST['lehreinheit_id'] = (isset($formData['lehreinheit_id']) && !empty($formData['lehreinheit_id'])) ? $formData['lehreinheit_id'] : null;
|
||||
|
||||
$this->form_validation->set_rules('nation_code', 'Nation_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Nation_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('herkunftsland_code', 'Herkunftsland_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Herkunftsland_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('mobilitaetsprogramm_code', 'Mobilitaetsprogramm_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Mobilitaetsprogramm_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('von', 'VonDatum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'VonDatum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('bis', 'VBisDatum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'VBisDatum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('ects_erworben', 'Ects_erworben', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Ects_erworben'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('ects_angerechnet', 'Ects_angerechnet', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Ects_angerechnet'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('lehreinheit_id', 'Lehreinheit', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Lehreinheit'])
|
||||
]);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$ort = (isset($formData['ort']) && !empty($formData['ort'])) ? $formData['ort'] : null;
|
||||
$universitaet = (isset($formData['universitaet']) && !empty($formData['universitaet'])) ? $formData['universitaet'] : null;
|
||||
$localPurposes = (isset($formData['localPurposes']) && !empty($formData['localPurposes'])) ? $formData['localPurposes'] : null;
|
||||
$localSupports = (isset($formData['localSupports']) && !empty($formData['localSupports'])) ? $formData['localSupports'] : null;
|
||||
|
||||
$result = $this->BisioModel->insert([
|
||||
'student_uid' => $student_uid,
|
||||
'von' => $_POST['von'],
|
||||
'bis' => $_POST['bis'],
|
||||
'mobilitaetsprogramm_code' => $_POST['mobilitaetsprogramm_code'],
|
||||
'nation_code' => $_POST['nation_code'],
|
||||
'herkunftsland_code' => $_POST['herkunftsland_code'],
|
||||
'lehreinheit_id' => $_POST['lehreinheit_id'],
|
||||
'ort' => $ort,
|
||||
'universitaet' => $universitaet,
|
||||
'ects_erworben' => $_POST['ects_erworben'] ,
|
||||
'ects_angerechnet' => $_POST['ects_angerechnet'],
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID,
|
||||
]);
|
||||
|
||||
$bisio_id = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
//check if localData (purposes)
|
||||
if(count($localPurposes) > 0){
|
||||
foreach ($localPurposes as $zweck){
|
||||
$zweck = (int)$zweck;
|
||||
$this->addMobilityPurpose($bisio_id, $zweck);
|
||||
}
|
||||
}
|
||||
|
||||
//check if localData (supports)
|
||||
if(count($localSupports) > 0){
|
||||
foreach ($localSupports as $support){
|
||||
$this->addMobilitySupport($bisio_id, $support);
|
||||
}
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess();
|
||||
}
|
||||
|
||||
public function loadMobility($bisio_id)
|
||||
{
|
||||
$result = $this->BisioModel->load($bisio_id);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function updateMobility()
|
||||
{
|
||||
$this->load->library('form_validation');
|
||||
$authUID = getAuthUID();
|
||||
|
||||
$student_uid = $this->input->post('uid');
|
||||
|
||||
if(!$student_uid)
|
||||
{
|
||||
return $this->terminateWithError($this->p->t('ui', 'error_missingId', ['id'=> 'Student UID']), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
$formData = $this->input->post('formData');
|
||||
|
||||
$_POST['von'] = (isset($formData['von']) && !empty($formData['von'])) ? $formData['von'] : null;
|
||||
$_POST['bis'] = (isset($formData['bis']) && !empty($formData['bis'])) ? $formData['bis'] : null;
|
||||
$_POST['nation_code'] = (isset($formData['nation_code']) && !empty($formData['nation_code'])) ? $formData['nation_code'] : 'A';
|
||||
$_POST['mobilitaetsprogramm_code'] = (isset($formData['mobilitaetsprogramm_code']) && !empty($formData['mobilitaetsprogramm_code'])) ? $formData['mobilitaetsprogramm_code'] : null;
|
||||
$_POST['herkunftsland_code'] = (isset($formData['herkunftsland_code']) && !empty($formData['herkunftsland_code'])) ? $formData['herkunftsland_code'] : 'A';
|
||||
$_POST['ects_erworben'] = (isset($formData['ects_erworben']) && !empty($formData['ects_erworben'])) ? $formData['ects_erworben'] : null;
|
||||
$_POST['ects_angerechnet'] = (isset($formData['ects_angerechnet']) && !empty($formData['ects_angerechnet'])) ? $formData['ects_angerechnet'] : null;
|
||||
$_POST['lehreinheit_id'] = (isset($formData['lehreinheit_id']) && !empty($formData['lehreinheit_id'])) ? $formData['lehreinheit_id'] : null;
|
||||
|
||||
$this->form_validation->set_rules('nation_code', 'Nation_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Nation_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('herkunftsland_code', 'Herkunftsland_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Herkunftsland_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('mobilitaetsprogramm_code', 'Mobilitaetsprogramm_code', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Mobilitaetsprogramm_code'])
|
||||
]);
|
||||
$this->form_validation->set_rules('von', 'VonDatum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'VonDatum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('bis', 'VBisDatum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'VBisDatum'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('ects_erworben', 'Ects_erworben', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Ects_erworben'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('ects_angerechnet', 'Ects_angerechnet', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Ects_angerechnet'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('lehreinheit_id', 'Lehreinheit', 'numeric', [
|
||||
'numeric' => $this->p->t('ui', 'error_fieldNotNumeric', ['field' => 'Lehreinheit'])
|
||||
]);
|
||||
|
||||
if ($this->form_validation->run() == false)
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$result = $this->BisioModel->update(
|
||||
[
|
||||
'bisio_id' => $formData['bisio_id']
|
||||
],
|
||||
[
|
||||
'student_uid' => $student_uid,
|
||||
'von' => $_POST['von'],
|
||||
'bis' => $_POST['bis'],
|
||||
'mobilitaetsprogramm_code' => $_POST['mobilitaetsprogramm_code'],
|
||||
'nation_code' => $_POST['nation_code'],
|
||||
'herkunftsland_code' => $_POST['herkunftsland_code'],
|
||||
'lehreinheit_id' => $_POST['lehreinheit_id'],
|
||||
'ort' => $formData['ort'],
|
||||
'universitaet' => $formData['universitaet'],
|
||||
'ects_erworben' => $_POST['ects_erworben'] ,
|
||||
'ects_angerechnet' => $_POST['ects_angerechnet'],
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => $authUID,
|
||||
]
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function deleteMobility($bisio_id)
|
||||
{
|
||||
//check if extension table exists
|
||||
$result = $this->BisioModel->tableExists('extension', 'tbl_mo_bisioidzuordnung');
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
//if table exists check if existing entry
|
||||
if(!empty($data))
|
||||
{
|
||||
$this->BisioModel->addSelect("count(*)");
|
||||
$this->BisioModel->addJoin('extension.tbl_mo_bisioidzuordnung mo', 'ON (mo.bisio_id = bis.tbl_bisio.bisio_id)', 'LEFT');
|
||||
|
||||
$resultCheckMo = $this->BisioModel->loadWhere(
|
||||
array('mo.bisio_id' => $bisio_id)
|
||||
);
|
||||
|
||||
$resultCheckMo = $this->getDataOrTerminateWithError($resultCheckMo);
|
||||
$count = current($resultCheckMo)->count;
|
||||
|
||||
$existsInExtension = $count > 0 ? true : false;
|
||||
|
||||
if($existsInExtension)
|
||||
$this->terminateWithError($this->p->t('mobility', 'error_existingEntryInExtension'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
$result = $this->BisioModel->delete(
|
||||
array('bisio_id' => $bisio_id)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLVList($studiengang_kz)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudiengangkz($studiengang_kz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getAllLehreinheiten()
|
||||
{
|
||||
$lv_id = $this->input->post('lv_id');
|
||||
$studiensemester_kurzbz = $this->input->post('studiensemester_kurzbz');
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
$result = $this->LehreinheitModel->getLesFromLvIds($lv_id, $studiensemester_kurzbz);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getLvsandLesByStudent($student_uid)
|
||||
{
|
||||
$this->load->model('education/Lehrveranstaltung_model', 'LehrveranstaltungModel');
|
||||
|
||||
$result = $this->LehrveranstaltungModel->getLvsByStudent($student_uid);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$lv_ids = array();
|
||||
$allData = array();
|
||||
|
||||
foreach ($data as $lehrveranstaltung) {
|
||||
$lv_ids[] = $lehrveranstaltung->lehrveranstaltung_id;
|
||||
}
|
||||
|
||||
$this->load->model('education/Lehreinheit_model', 'LehreinheitModel');
|
||||
|
||||
foreach ($lv_ids as $id)
|
||||
{
|
||||
$result = $this->LehreinheitModel->getLesFromLvIds($id);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if (is_array($data)) {
|
||||
$allData = array_merge($allData, $data);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess($allData);
|
||||
}
|
||||
|
||||
public function getPurposes($bisio_id)
|
||||
{
|
||||
$bisio_id = (int)$bisio_id;
|
||||
|
||||
$this->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
|
||||
$this->BisiozweckModel->addSelect("*");
|
||||
$this->BisiozweckModel->addJoin('bis.tbl_zweck zw', 'ON (zw.zweck_code = bis.tbl_bisio_zweck.zweck_code)');
|
||||
|
||||
$result = $this->BisiozweckModel->loadWhere(
|
||||
array('bisio_id' => $bisio_id)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getSupports($bisio_id)
|
||||
{
|
||||
$bisio_id = (int)$bisio_id;
|
||||
|
||||
$this->load->model('codex/Bisioaufenthaltfoerderung_model', 'BisioaufenthaltfoerderungModel');
|
||||
|
||||
$this->BisioaufenthaltfoerderungModel->addSelect("*");
|
||||
$this->BisioaufenthaltfoerderungModel->addJoin('bis.tbl_aufenthaltfoerderung af', 'ON (af.aufenthaltfoerderung_code = bis.tbl_bisio_aufenthaltfoerderung.aufenthaltfoerderung_code)');
|
||||
|
||||
$result = $this->BisioaufenthaltfoerderungModel->loadWhere(
|
||||
array('bisio_id' => $bisio_id)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getListPurposes()
|
||||
{
|
||||
$this->load->model('codex/Zweck_model', 'ZweckModel');
|
||||
|
||||
$result = $this->ZweckModel->load();
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function getListSupports()
|
||||
{
|
||||
$this->load->model('codex/Aufenthaltfoerderung_model', 'AufenthaltfoerderungModel');
|
||||
|
||||
$result = $this->AufenthaltfoerderungModel->load();
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
public function addMobilityPurpose($bisio_id, $local_purpose = null)
|
||||
{
|
||||
$zweck_code = $this->input->post('zweck_code');
|
||||
|
||||
if($local_purpose){
|
||||
$zweck_code = $local_purpose;
|
||||
}
|
||||
|
||||
$this->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
if(!$local_purpose)
|
||||
{
|
||||
$check = $this->BisiozweckModel->loadWhere(
|
||||
[
|
||||
'bisio_id' => $bisio_id,
|
||||
'zweck_code' => $zweck_code,
|
||||
]
|
||||
);
|
||||
if (hasData($check))
|
||||
{
|
||||
$this->terminateWithError($this->p->t('ui', 'error_entryExisting'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->BisiozweckModel->insert(
|
||||
array(
|
||||
'bisio_id' => $bisio_id,
|
||||
'zweck_code' => $zweck_code
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if($local_purpose)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function deleteMobilityPurpose($bisio_id)
|
||||
{
|
||||
$zweck_code = $this->input->post('zweck_code');
|
||||
|
||||
$this->load->model('codex/Bisiozweck_model', 'BisiozweckModel');
|
||||
|
||||
|
||||
$result = $this->BisiozweckModel->delete(
|
||||
array(
|
||||
'bisio_id' => $bisio_id,
|
||||
'zweck_code' => $zweck_code
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function addMobilitySupport($bisio_id, $local_support = null)
|
||||
{
|
||||
$aufenthaltfoerderung_code = $this->input->post('aufenthaltfoerderung_code');
|
||||
|
||||
if($local_support){
|
||||
$aufenthaltfoerderung_code = $local_support;
|
||||
}
|
||||
|
||||
$this->load->model('codex/Bisioaufenthaltfoerderung_model', 'BisioaufenthaltfoerderungModel');
|
||||
|
||||
if(!$local_support)
|
||||
{
|
||||
$check = $this->BisioaufenthaltfoerderungModel->loadWhere(
|
||||
[
|
||||
'bisio_id' => $bisio_id,
|
||||
'aufenthaltfoerderung_code' => $aufenthaltfoerderung_code,
|
||||
]
|
||||
);
|
||||
if (hasData($check))
|
||||
{
|
||||
$this->terminateWithError($this->p->t('ui', 'error_entryExisting'), self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->BisioaufenthaltfoerderungModel->insert(
|
||||
array(
|
||||
'bisio_id' => $bisio_id,
|
||||
'aufenthaltfoerderung_code' => $aufenthaltfoerderung_code
|
||||
)
|
||||
);
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
if($local_support)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
|
||||
public function deleteMobilitySupport($bisio_id)
|
||||
{
|
||||
$aufenthaltfoerderung_code = $this->input->post('aufenthaltfoerderung_code');
|
||||
|
||||
$this->load->model('codex/Bisioaufenthaltfoerderung_model', 'BisioaufenthaltfoerderungModel');
|
||||
|
||||
$result = $this->BisioaufenthaltfoerderungModel->delete(
|
||||
array(
|
||||
'bisio_id' => $bisio_id,
|
||||
'aufenthaltfoerderung_code' => $aufenthaltfoerderung_code
|
||||
)
|
||||
);
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
return $this->terminateWithSuccess(current($data));
|
||||
}
|
||||
}
|
||||
@@ -44,4 +44,27 @@ class Bisio_model extends DB_Model
|
||||
else
|
||||
return success("Bisio not found");
|
||||
}
|
||||
|
||||
/**
|
||||
* checks, if an (extension) table exists to avoid later errors
|
||||
* @param String $schema like 'extension'
|
||||
* @param String $table like 'tbl_mo_bisiozuordnung'
|
||||
* @return boolean
|
||||
*/
|
||||
public function tableExists($schema, $table)
|
||||
{
|
||||
$params = array($schema, $table);
|
||||
|
||||
$qry = "SELECT
|
||||
1
|
||||
FROM
|
||||
information_schema.role_table_grants
|
||||
WHERE
|
||||
table_schema = ?
|
||||
AND table_name = ?";
|
||||
|
||||
$result = $this->execQuery($qry, $params);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,27 +260,27 @@ EOSQL;
|
||||
SELECT
|
||||
lv.lehrveranstaltung_id,
|
||||
le.lehreinheit_id,
|
||||
le.lehrform_kurzbz,
|
||||
lv.kurzbz,
|
||||
lv.bezeichnung,
|
||||
lv.semester,
|
||||
ma.mitarbeiter_uid,
|
||||
le.lehrform_kurzbz,
|
||||
lv.kurzbz,
|
||||
lv.bezeichnung,
|
||||
lv.semester,
|
||||
ma.mitarbeiter_uid,
|
||||
(
|
||||
SELECT
|
||||
STRING_AGG(CONCAT(leg.semester, leg.verband, leg.gruppe), ' ')
|
||||
FROM lehre.tbl_lehreinheitgruppe leg
|
||||
SELECT
|
||||
STRING_AGG(CONCAT(leg.semester, leg.verband, leg.gruppe), ' ')
|
||||
FROM lehre.tbl_lehreinheitgruppe leg
|
||||
WHERE leg.lehreinheit_id = le.lehreinheit_id
|
||||
) AS gruppe,
|
||||
tma.kurzbz as kuerzel
|
||||
FROM
|
||||
FROM
|
||||
lehre.tbl_lehreinheit le
|
||||
JOIN
|
||||
JOIN
|
||||
lehre.tbl_lehrveranstaltung lv ON lv.lehrveranstaltung_id = le.lehrveranstaltung_id
|
||||
JOIN
|
||||
JOIN
|
||||
lehre.tbl_lehreinheitmitarbeiter ma USING (lehreinheit_id)
|
||||
JOIN
|
||||
public.tbl_mitarbeiter tma USING (mitarbeiter_uid)
|
||||
WHERE
|
||||
WHERE
|
||||
lv.lehrveranstaltung_id = ?
|
||||
";
|
||||
|
||||
@@ -290,12 +290,11 @@ EOSQL;
|
||||
$params[] = $studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
$query .="
|
||||
ORDER BY
|
||||
$query .="
|
||||
ORDER BY
|
||||
le.lehreinheit_id;
|
||||
";
|
||||
|
||||
return $this->execQuery($query, $params);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1048,4 +1048,27 @@ class Lehrveranstaltung_model extends DB_Model
|
||||
$res = $this->execReadOnlyQuery($query);
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets lehrveranstaltungen of a studiengang
|
||||
* @param integer $studiengang_kz
|
||||
* @return array|null
|
||||
*/
|
||||
public function getLvsByStudiengangkz($studiengang_kz)
|
||||
{
|
||||
$params = array($studiengang_kz);
|
||||
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
WHERE lehrveranstaltung_id IN
|
||||
(SELECT lehrveranstaltung_id
|
||||
FROM campus.vw_student_lehrveranstaltung
|
||||
WHERE studiengang_kz = ?";
|
||||
|
||||
$qry .= ") ORDER BY semester, bezeichnung";
|
||||
|
||||
return $this->execQuery($qry, $params);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import details from './stv/details.js';
|
||||
import exam from './stv/exam.js';
|
||||
import abschlusspruefung from './stv/abschlusspruefung.js';
|
||||
import grades from './stv/grades.js';
|
||||
import mobility from './stv/mobility.js';
|
||||
|
||||
export default {
|
||||
verband,
|
||||
@@ -22,6 +23,7 @@ export default {
|
||||
exam,
|
||||
abschlusspruefung,
|
||||
grades,
|
||||
mobility,
|
||||
configStudent() {
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/config/student');
|
||||
},
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
export default {
|
||||
getMobilitaeten (url, config, params){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/mobility/getMobilitaeten/' + params.id);
|
||||
},
|
||||
getProgramsMobility(){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/mobility/getProgramsMobility/');
|
||||
},
|
||||
addNewMobility(data){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/mobility/insertMobility/', data);
|
||||
},
|
||||
loadMobility(bisio_id){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/mobility/loadMobility/' + bisio_id);
|
||||
},
|
||||
updateMobility(data){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/mobility/updateMobility/', data);
|
||||
},
|
||||
deleteMobility(bisio_id){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/mobility/deleteMobility/' + bisio_id);
|
||||
},
|
||||
getLVList(studiengang_kz){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/mobility/getLVList/' + studiengang_kz);
|
||||
},
|
||||
getAllLehreinheiten(data){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/mobility/getAllLehreinheiten/', data)
|
||||
},
|
||||
getLvsandLesByStudent(uid){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/mobility/getLvsandLesByStudent/' + uid);
|
||||
},
|
||||
getPurposes(url, config, params){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/mobility/getPurposes/' + params.id);
|
||||
},
|
||||
getSupports(url, config, params){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/mobility/getSupports/' + params.id);
|
||||
},
|
||||
getListPurposes() {
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/mobility/getListPurposes/');
|
||||
},
|
||||
getListSupports() {
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/mobility/getListSupports/');
|
||||
},
|
||||
deleteMobilityPurpose(params) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/mobility/deleteMobilityPurpose/' + params.bisio_id, params);
|
||||
},
|
||||
addMobilityPurpose(params) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/mobility/addMobilityPurpose/' + params.bisio_id, params);
|
||||
},
|
||||
deleteMobilitySupport(params) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/mobility/deleteMobilitySupport/' + params.bisio_id, params);
|
||||
},
|
||||
addMobilitySupport(params) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/mobility/addMobilitySupport/' + params.bisio_id, params);
|
||||
},
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import TableMobility from "./Mobility/Mobility.js";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
TableMobility
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
config: this.config
|
||||
};
|
||||
},
|
||||
props: {
|
||||
modelValue: Object,
|
||||
},
|
||||
data(){
|
||||
return {}
|
||||
},
|
||||
template: `
|
||||
<div class="stv-details-mobility h-100 d-flex flex-column">
|
||||
<table-mobility ref="tbl_mobility" :student="modelValue"></table-mobility>
|
||||
</div>`
|
||||
};
|
||||
@@ -0,0 +1,255 @@
|
||||
import {CoreFilterCmpt} from "../../../../../filter/Filter.js";
|
||||
|
||||
import BsModal from "../../../../../Bootstrap/Modal.js";
|
||||
import CoreForm from '../../../../../Form/Form.js';
|
||||
import FormInput from '../../../../../Form/Input.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreFilterCmpt,
|
||||
BsModal,
|
||||
CoreForm,
|
||||
FormInput
|
||||
},
|
||||
props: {
|
||||
bisio_id: {
|
||||
type: [Number],
|
||||
required: true
|
||||
},
|
||||
listPurposes: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: 'dummy',
|
||||
ajaxRequestFunc: (url, config, params) => {
|
||||
if (this.bisio_id) {
|
||||
//fake params for getting api call with tabulator to run
|
||||
const config = {
|
||||
method: "get",
|
||||
};
|
||||
const params = {
|
||||
id: this.bisio_id,
|
||||
};
|
||||
return this.$fhcApi.factory.stv.mobility.getPurposes('dummy', config, params)
|
||||
}
|
||||
else
|
||||
{
|
||||
// use local data
|
||||
return new Promise((resolve) => {
|
||||
const localData = this.localData;
|
||||
resolve(localData);
|
||||
});
|
||||
}
|
||||
},
|
||||
ajaxParams: () => {
|
||||
return {
|
||||
id: this.bisio_id || "local"
|
||||
};
|
||||
},
|
||||
ajaxResponse: (url, params, response) => response.data || this.localData,
|
||||
|
||||
|
||||
columns: [
|
||||
{title: "Zweck_code", field: "zweck_code", visible: false},
|
||||
{title: "Kurzbz", field: "kurzbz", visible: false},
|
||||
{title: "Bezeichnung", field: "bezeichnung"},
|
||||
{
|
||||
title: 'Aktionen', field: 'actions',
|
||||
minWidth: 50,
|
||||
formatter: (cell, formatterParams, onRendered) => {
|
||||
|
||||
let container = document.createElement('div');
|
||||
container.className = "d-flex gap-2";
|
||||
|
||||
let button = document.createElement('button');
|
||||
button.className = 'btn btn-outline-secondary btn-action';
|
||||
button.innerHTML = '<i class="fa fa-xmark"></i>';
|
||||
button.title = this.$p.t('global', 'loeschen');
|
||||
button.addEventListener(
|
||||
'click',
|
||||
() =>
|
||||
this.actionDeletePurpose(cell.getData().zweck_code)
|
||||
);
|
||||
container.append(button);
|
||||
|
||||
return container;
|
||||
},
|
||||
frozen: true
|
||||
},
|
||||
],
|
||||
layout: 'fitColumns',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: '250',
|
||||
selectableRangeMode: 'click',
|
||||
selectable: true,
|
||||
persistenceID: 'core-mobility-purpose'
|
||||
},
|
||||
tabulatorEvents: [
|
||||
{
|
||||
event: 'tableBuilt',
|
||||
handler: async() => {
|
||||
|
||||
await this.$p.loadCategory(['ui', 'global', 'mobility']);
|
||||
|
||||
let cm = this.$refs.table.tabulator.columnManager;
|
||||
|
||||
cm.getColumnByField('bezeichnung').component.updateDefinition({
|
||||
title: this.$p.t('ui', 'bezeichnung')
|
||||
});
|
||||
cm.getColumnByField('kurzbz').component.updateDefinition({
|
||||
title: this.$p.t('mobility', 'kurzbz')
|
||||
});
|
||||
/* cm.getColumnByField('actions').component.updateDefinition({
|
||||
title: this.$p.t('global', 'aktionen')
|
||||
});*/
|
||||
}
|
||||
}
|
||||
],
|
||||
clickedRows: [],
|
||||
formData: {
|
||||
zweck_code: ""
|
||||
},
|
||||
localData: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
bisio_id() {
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
actionNewPurpose() {
|
||||
this.resetModal();
|
||||
this.$refs.mobilityPurpose.show();
|
||||
},
|
||||
actionDeletePurpose(zweck_code) {
|
||||
if (this.bisio_id)
|
||||
{
|
||||
this.$emit('deleteMobilityPurpose', {
|
||||
bisio_id: this.bisio_id,
|
||||
zweck_code: zweck_code
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
const data = this.$refs.table.tabulator.getData();
|
||||
const rowExists = data.some(item => item.zweck_code === zweck_code);
|
||||
|
||||
if (rowExists) {
|
||||
this.$refs.table.tabulator.deleteRow(zweck_code);
|
||||
}
|
||||
}
|
||||
},
|
||||
handleSubmitAction() {
|
||||
if (this.bisio_id) {
|
||||
this.$emit('setMobilityPurpose', {
|
||||
zweck_code: this.formData.zweck_code,
|
||||
bisio_id: this.bisio_id
|
||||
});
|
||||
} else {
|
||||
const purpose = this.listPurposes.find(item => item.zweck_code === this.formData.zweck_code);
|
||||
const newEntry = {
|
||||
id: Number (this.formData.zweck_code), //id necessary due to tabulator deleteRow-Action
|
||||
zweck_code: Number (this.formData.zweck_code),
|
||||
kurzbz: purpose.kurzbz,
|
||||
bezeichnung: purpose.bezeichnung
|
||||
};
|
||||
|
||||
const data = this.$refs.table.tabulator.getData();
|
||||
const rowExists = data.some(item => item.zweck_code === Number (this.formData.zweck_code));
|
||||
|
||||
if(rowExists){
|
||||
this.$fhcAlert.alertError(this.$p.t('ui', 'error_entryExisting'));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.localData.push(newEntry);
|
||||
|
||||
this.$emit('setMobilityPurposeToNewMobility', {
|
||||
zweck_code: this.formData.zweck_code,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
this.closeModal();
|
||||
},
|
||||
|
||||
closeModal(){
|
||||
this.$refs.mobilityPurpose.hide();
|
||||
this.$emit('close-modal');
|
||||
},
|
||||
openModal(){
|
||||
this.$refs.mobilityPurpose.show();
|
||||
this.$emit('open-modal');
|
||||
},
|
||||
reload() {
|
||||
this.$refs.table.reloadTable();
|
||||
this.$emit('reload');
|
||||
},
|
||||
resetModal(){
|
||||
this.formData = {};
|
||||
this.formData.zweck_code = null;
|
||||
},
|
||||
resetLocalData() {
|
||||
this.$refs.table.tabulator.clearData();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="core-mobility-purpose h-50 d-flex flex-column w-100 mt-2">
|
||||
<br>
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
:tabulator-events="tabulatorEvents"
|
||||
table-only
|
||||
:side-menu="false"
|
||||
reload
|
||||
new-btn-show
|
||||
:new-btn-label="this.$p.t('mobility', 'zweck')"
|
||||
@click:new="actionNewPurpose"
|
||||
>
|
||||
</core-filter-cmpt>
|
||||
|
||||
<div >
|
||||
<bs-modal ref="mobilityPurpose">
|
||||
<template #title>
|
||||
<p class="fw-bold mt-3">{{$p.t('mobility', 'zweck_neu')}}</p>
|
||||
|
||||
</template>
|
||||
|
||||
<core-form ref="mobilityData">
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
type="select"
|
||||
:label="$p.t('mobility/zweck')"
|
||||
v-model="formData.zweck_code"
|
||||
name="zweck_code"
|
||||
>
|
||||
<option :value="null"> {{$p.t('ui', 'bitteWaehlen')}}</option>
|
||||
<option
|
||||
v-for="entry in listPurposes"
|
||||
:key="entry.zweck_code"
|
||||
:value="entry.zweck_code"
|
||||
>
|
||||
{{entry.bezeichnung}}
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</core-form>
|
||||
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-primary" @click="handleSubmitAction">{{$p.t('ui', 'speichern')}}</button>
|
||||
</template>
|
||||
|
||||
</bs-modal>
|
||||
</div>
|
||||
|
||||
</div>`
|
||||
}
|
||||
@@ -0,0 +1,247 @@
|
||||
import {CoreFilterCmpt} from "../../../../../filter/Filter.js";
|
||||
|
||||
import BsModal from "../../../../../Bootstrap/Modal.js";
|
||||
import CoreForm from '../../../../../Form/Form.js';
|
||||
import FormInput from '../../../../../Form/Input.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreFilterCmpt,
|
||||
BsModal,
|
||||
CoreForm,
|
||||
FormInput
|
||||
},
|
||||
props: {
|
||||
bisio_id: {
|
||||
type: [Number],
|
||||
required: true
|
||||
},
|
||||
listSupports: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: 'dummy',
|
||||
ajaxRequestFunc: (url, config, params) => {
|
||||
if (this.bisio_id) {
|
||||
//fake params for getting api call with tabulator to run
|
||||
const config = {
|
||||
method: "get",
|
||||
};
|
||||
const params = {
|
||||
id: this.bisio_id,
|
||||
};
|
||||
return this.$fhcApi.factory.stv.mobility.getSupports('dummy', config, params)
|
||||
}
|
||||
else
|
||||
{
|
||||
// use local data
|
||||
return new Promise((resolve) => {
|
||||
const localData = this.localData;
|
||||
resolve(localData);
|
||||
});
|
||||
}
|
||||
},
|
||||
ajaxParams: () => {
|
||||
return {
|
||||
id: this.bisio_id || "local"
|
||||
};
|
||||
},
|
||||
ajaxResponse: (url, params, response) => response.data || this.localData,
|
||||
|
||||
columns: [
|
||||
{title: "Aufenthaltsförderung_code", field: "aufenthaltfoerderung_code", visible: false},
|
||||
{title: "Bezeichnung", field: "bezeichnung"},
|
||||
{
|
||||
title: 'Aktionen', field: 'actions',
|
||||
minWidth: 50,
|
||||
formatter: (cell, formatterParams, onRendered) => {
|
||||
|
||||
let container = document.createElement('div');
|
||||
container.className = "d-flex gap-2";
|
||||
|
||||
let button = document.createElement('button');
|
||||
button.className = 'btn btn-outline-secondary btn-action';
|
||||
button.innerHTML = '<i class="fa fa-xmark"></i>';
|
||||
button.title = this.$p.t('global', 'loeschen');
|
||||
button.addEventListener(
|
||||
'click',
|
||||
() =>
|
||||
this.actionDeleteSupport(cell.getData().aufenthaltfoerderung_code)
|
||||
);
|
||||
container.append(button);
|
||||
|
||||
return container;
|
||||
},
|
||||
frozen: true
|
||||
},
|
||||
],
|
||||
layout: 'fitColumns',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: '250',
|
||||
selectableRangeMode: 'click',
|
||||
selectable: true,
|
||||
persistenceID: 'core-mobility-support'
|
||||
},
|
||||
tabulatorEvents: [
|
||||
{
|
||||
event: 'tableBuilt',
|
||||
handler: async() => {
|
||||
|
||||
await this.$p.loadCategory(['ui', 'global', 'mobility']);
|
||||
|
||||
let cm = this.$refs.table.tabulator.columnManager;
|
||||
|
||||
cm.getColumnByField('bezeichnung').component.updateDefinition({
|
||||
title: this.$p.t('ui', 'bezeichnung')
|
||||
});
|
||||
/* cm.getColumnByField('actions').component.updateDefinition({
|
||||
title: this.$p.t('global', 'aktionen')
|
||||
});*/
|
||||
}
|
||||
}
|
||||
],
|
||||
clickedRows: [],
|
||||
formData: {
|
||||
aufenthaltfoerderung_code: "",
|
||||
},
|
||||
localData: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
bisio_id() {
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
actionNewSupport() {
|
||||
this.resetModal();
|
||||
this.$refs.mobilitySupport.show();
|
||||
},
|
||||
actionDeleteSupport(aufenthaltfoerderung_code) {
|
||||
if (this.bisio_id)
|
||||
{
|
||||
this.$emit('deleteMobilitySupport', {
|
||||
bisio_id: this.bisio_id,
|
||||
aufenthaltfoerderung_code: aufenthaltfoerderung_code
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
const data = this.$refs.table.tabulator.getData();
|
||||
const rowExists = data.some(item => item.aufenthaltfoerderung_code === aufenthaltfoerderung_code);
|
||||
|
||||
if (rowExists) {
|
||||
this.$refs.table.tabulator.deleteRow(aufenthaltfoerderung_code);
|
||||
}
|
||||
}
|
||||
},
|
||||
handleSubmitAction() {
|
||||
if (this.bisio_id) {
|
||||
this.$emit('setMobilitySupport', {
|
||||
aufenthaltfoerderung_code: this.formData.aufenthaltfoerderung_code,
|
||||
bisio_id: this.bisio_id
|
||||
});
|
||||
} else {
|
||||
const support = this.listSupports.find(item => item.aufenthaltfoerderung_code === this.formData.aufenthaltfoerderung_code);
|
||||
const newEntry = {
|
||||
id: Number (this.formData.aufenthaltfoerderung_code), //id necessary due to tabulator deleteRow-Action
|
||||
aufenthaltfoerderung_code: this.formData.aufenthaltfoerderung_code,
|
||||
bezeichnung: support.bezeichnung
|
||||
};
|
||||
|
||||
const data = this.$refs.table.tabulator.getData();
|
||||
const rowExists = data.some(item => item.aufenthaltfoerderung_code === Number (this.formData.aufenthaltfoerderung_code));
|
||||
|
||||
if(rowExists){
|
||||
this.$fhcAlert.alertError(this.$p.t('ui', 'error_entryExisting'));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.localData.push(newEntry);
|
||||
|
||||
this.$emit('setMobilitySupportToNewMobility', {
|
||||
aufenthaltfoerderung_code: this.formData.aufenthaltfoerderung_code,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
this.closeModal();
|
||||
},
|
||||
closeModal(){
|
||||
this.$refs.mobilitySupport.hide();
|
||||
this.$emit('close-modal');
|
||||
},
|
||||
openModal(){
|
||||
this.$refs.mobilitySupport.show();
|
||||
this.$emit('open-modal');
|
||||
},
|
||||
reload() {
|
||||
this.$refs.table.reloadTable();
|
||||
this.$emit('reload');
|
||||
},
|
||||
resetModal(){
|
||||
this.formData = {};
|
||||
this.formData.aufenthaltfoerderung_code = null;
|
||||
},
|
||||
resetLocalData() {
|
||||
this.$refs.table.tabulator.clearData();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="core-mobility-support h-50 d-flex flex-column w-100 mt-2">
|
||||
<br>
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
:tabulator-events="tabulatorEvents"
|
||||
table-only
|
||||
:side-menu="false"
|
||||
reload
|
||||
new-btn-show
|
||||
:new-btn-label="this.$p.t('mobility', 'aufenthalt')"
|
||||
@click:new="actionNewSupport"
|
||||
>
|
||||
</core-filter-cmpt>
|
||||
|
||||
<div>
|
||||
<bs-modal ref="mobilitySupport">
|
||||
<template #title>
|
||||
<p class="fw-bold mt-3">{{$p.t('mobility', 'foerderung_neu')}}</p>
|
||||
</template>
|
||||
|
||||
<core-form ref="mobilityData">
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
type="select"
|
||||
:label="$p.t('mobility/aufenthalt')"
|
||||
v-model="formData.aufenthaltfoerderung_code"
|
||||
name="aufenthaltfoerderung_code"
|
||||
>
|
||||
<option :value="null"> {{$p.t('ui', 'bitteWaehlen')}}</option>
|
||||
<option
|
||||
v-for="entry in listSupports"
|
||||
:key="entry.aufenthaltfoerderung_code"
|
||||
:value="entry.aufenthaltfoerderung_code"
|
||||
>
|
||||
{{entry.bezeichnung}}
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
</core-form>
|
||||
|
||||
<template #footer>
|
||||
<button type="button" class="btn btn-primary" @click="handleSubmitAction">{{$p.t('ui', 'speichern')}}</button>
|
||||
</template>
|
||||
|
||||
</bs-modal>
|
||||
</div>
|
||||
|
||||
</div>`
|
||||
}
|
||||
@@ -0,0 +1,578 @@
|
||||
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 MobilityPurpose from './List/Purpose.js';
|
||||
import MobilitySupport from './List/Support.js';
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreFilterCmpt,
|
||||
BsModal,
|
||||
FormForm,
|
||||
FormInput,
|
||||
MobilityPurpose,
|
||||
MobilitySupport
|
||||
},
|
||||
inject: {
|
||||
$reloadList: {
|
||||
from: '$reloadList',
|
||||
required: true
|
||||
},
|
||||
lists: {
|
||||
from: 'lists'
|
||||
},
|
||||
currentSemester: {
|
||||
from: 'currentSemester',
|
||||
},
|
||||
},
|
||||
props: {
|
||||
student: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabulatorOptions: {
|
||||
ajaxURL: 'dummy',
|
||||
ajaxRequestFunc: this.$fhcApi.factory.stv.mobility.getMobilitaeten,
|
||||
ajaxParams: () => {
|
||||
return {
|
||||
id: this.student.uid
|
||||
};
|
||||
},
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
{title: "Kurzbz", field: "kurzbz"},
|
||||
{title: "Nation", field: "nation_code"},
|
||||
{title: "Von", field: "format_von"},
|
||||
{title: "Bis", field: "format_bis"},
|
||||
{title: "bisio_id", field: "bisio_id"},
|
||||
{
|
||||
title: 'Aktionen', field: 'actions',
|
||||
minWidth: 150, // Ensures Action-buttons will be always fully displayed
|
||||
formatter: (cell, formatterParams, onRendered) => {
|
||||
let container = document.createElement('div');
|
||||
container.className = "d-flex gap-2";
|
||||
|
||||
let button = document.createElement('button');
|
||||
button.className = 'btn btn-outline-secondary btn-action';
|
||||
button.innerHTML = '<i class="fa fa-edit"></i>';
|
||||
button.title = this.$p.t('ui', 'bearbeiten');
|
||||
button.addEventListener('click', (event) =>
|
||||
this.actionEditMobility(cell.getData().bisio_id)
|
||||
);
|
||||
container.append(button);
|
||||
|
||||
button = document.createElement('button');
|
||||
button.className = 'btn btn-outline-secondary btn-action';
|
||||
button.innerHTML = '<i class="fa fa-xmark"></i>';
|
||||
button.title = this.$p.t('ui', 'loeschen');
|
||||
button.addEventListener('click', () =>
|
||||
this.actionDeleteMobility(cell.getData().bisio_id)
|
||||
);
|
||||
container.append(button);
|
||||
|
||||
return container;
|
||||
},
|
||||
frozen: true
|
||||
},
|
||||
],
|
||||
layout: 'fitDataFill',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: 'auto',
|
||||
selectable: true,
|
||||
index: 'bisio_id',
|
||||
persistenceID: 'stv-details-table_mobiliy'
|
||||
},
|
||||
tabulatorEvents: [
|
||||
{
|
||||
event: 'dataLoaded',
|
||||
handler: data => this.tabulatorData = data.map(item => {
|
||||
// item.actionDiv = document.createElement('div');
|
||||
return item;
|
||||
}),
|
||||
},
|
||||
{
|
||||
event: 'tableBuilt',
|
||||
handler: async() => {
|
||||
await this.$p.loadCategory(['global', 'person', 'stv', 'mobility', 'ui']);
|
||||
|
||||
|
||||
let cm = this.$refs.table.tabulator.columnManager;
|
||||
|
||||
cm.getColumnByField('kurzbz').component.updateDefinition({
|
||||
title: this.$p.t('mobility', 'kurzbz_program')
|
||||
});
|
||||
cm.getColumnByField('nation_code').component.updateDefinition({
|
||||
title: this.$p.t('mobility', 'gastnation')
|
||||
});
|
||||
cm.getColumnByField('format_von').component.updateDefinition({
|
||||
title: this.$p.t('ui', 'von')
|
||||
});
|
||||
cm.getColumnByField('format_bis').component.updateDefinition({
|
||||
title: this.$p.t('global', 'bis')
|
||||
});
|
||||
cm.getColumnByField('bisio_id').component.updateDefinition({
|
||||
title: this.$p.t('mobility', 'bisio_id')
|
||||
});
|
||||
|
||||
/* cm.getColumnByField('actions').component.updateDefinition({
|
||||
title: this.$p.t('global', 'aktionen')
|
||||
});*/
|
||||
}
|
||||
}
|
||||
],
|
||||
formData: {
|
||||
von: new Date(),
|
||||
bis: new Date(),
|
||||
mobilitaetsprogramm_code: 7,
|
||||
nation_code: 'A',
|
||||
herkunftsland_code: 'A',
|
||||
bisio_id: null,
|
||||
localPurposes: [],
|
||||
localSupports: []
|
||||
},
|
||||
statusNew: true,
|
||||
programsMobility: [],
|
||||
listLvs: [],
|
||||
listLes: [],
|
||||
listLvsAndLes: [],
|
||||
listPurposes: [],
|
||||
listSupports: [],
|
||||
tabulatorData: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
student(){
|
||||
if (this.$refs.table) {
|
||||
this.$refs.table.reloadTable();
|
||||
}
|
||||
},
|
||||
/* formData.lehrveranstaltung_id(){
|
||||
|
||||
}*/
|
||||
},
|
||||
computed:{
|
||||
lv_teile(){
|
||||
return this.listLvsAndLes.filter(lv => lv.lehreinheit_id == this.formData.lehreinheit_id);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
actionNewMobility() {
|
||||
this.resetForm();
|
||||
this.statusNew = true;
|
||||
},
|
||||
actionEditMobility(bisio_id) {
|
||||
this.resetForm();
|
||||
this.statusNew = false;
|
||||
this.loadMobility(bisio_id);
|
||||
},
|
||||
actionDeleteMobility(bisio_id) {
|
||||
this.$fhcAlert
|
||||
.confirmDelete()
|
||||
.then(result => result
|
||||
? bisio_id
|
||||
: Promise.reject({handled: true}))
|
||||
.then(this.deleteMobility)
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
addNewMobility() {
|
||||
const dataToSend = {
|
||||
uid: this.student.uid,
|
||||
formData: this.formData
|
||||
};
|
||||
return this.$refs.formMobility.factory.stv.mobility.addNewMobility(dataToSend)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.resetForm();
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError)
|
||||
.finally(() => {
|
||||
this.reload();
|
||||
this.$refs.purposes.resetLocalData();
|
||||
this.$refs.supports.resetLocalData();
|
||||
});
|
||||
},
|
||||
loadItems(){
|
||||
if(this.formData.lehrveranstaltung) {
|
||||
this.getLehreinheiten(this.formData.lehrveranstaltung, this.currentSemester);
|
||||
}
|
||||
},
|
||||
getLehreinheiten(lv_id, studiensemester_kurzbz) {
|
||||
const data = {
|
||||
lv_id: lv_id,
|
||||
studiensemester_kurzbz: studiensemester_kurzbz
|
||||
};
|
||||
return this.$fhcApi.factory.stv.mobility.getAllLehreinheiten(data)
|
||||
.then(response => {
|
||||
this.listLes = response.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
reload() {
|
||||
this.$refs.table.reloadTable();
|
||||
},
|
||||
loadMobility(bisio_id) {
|
||||
return this.$fhcApi.factory.stv.mobility.loadMobility(bisio_id)
|
||||
.then(result => {
|
||||
this.formData = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
updateMobility(bisio_id) {
|
||||
const dataToSend = {
|
||||
formData: this.formData,
|
||||
uid: this.student.uid,
|
||||
};
|
||||
this.$refs.formMobility.factory.stv.mobility.updateMobility(dataToSend)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.resetForm();
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError)
|
||||
.finally(() => {
|
||||
this.reload();
|
||||
});
|
||||
},
|
||||
deleteMobility(bisio_id) {
|
||||
return this.$fhcApi.factory.stv.mobility.deleteMobility(bisio_id)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError)
|
||||
.finally(() => {
|
||||
this.reload();
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
this.formData = {};
|
||||
this.formData.von = new Date();
|
||||
this.formData.bis = new Date();
|
||||
this.formData.mobilitaetsprogramm_code = 7;
|
||||
this.formData.nation_code = 'A';
|
||||
this.formData.herkunftsland_code = 'A';
|
||||
this.formData.bisio_id = null;
|
||||
this.formData.localPurposes = [];
|
||||
this.formData.localSupports = [];
|
||||
},
|
||||
// ----------------------------------- methods purposes -----------------------------------
|
||||
addMobilityPurpose({zweck_code, bisio_id}){
|
||||
let params = {
|
||||
bisio_id : bisio_id,
|
||||
zweck_code: zweck_code
|
||||
};
|
||||
return this.$fhcApi.factory.stv.mobility.addMobilityPurpose(params)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
|
||||
this.$refs.purposes.reload();
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
deleteMobilityPurpose({zweck_code, bisio_id}){
|
||||
let params = {
|
||||
bisio_id : bisio_id,
|
||||
zweck_code: zweck_code
|
||||
};
|
||||
return this.$fhcApi.factory.stv.mobility.deleteMobilityPurpose(params)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
|
||||
|
||||
this.$refs.purposes.reload();
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
addPurposeToMobility({zweck_code}){
|
||||
this.formData.localPurposes.push(zweck_code);
|
||||
},
|
||||
// ----------------------------------- methods supports -----------------------------------
|
||||
addMobilitySupport({aufenthaltfoerderung_code, bisio_id}){
|
||||
let params = {
|
||||
bisio_id : bisio_id,
|
||||
aufenthaltfoerderung_code: aufenthaltfoerderung_code
|
||||
};
|
||||
return this.$fhcApi.factory.stv.mobility.addMobilitySupport(params)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
|
||||
this.$refs.supports.reload();
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
deleteMobilitySupport({aufenthaltfoerderung_code, bisio_id}){
|
||||
let params = {
|
||||
bisio_id : bisio_id,
|
||||
aufenthaltfoerderung_code: aufenthaltfoerderung_code
|
||||
};
|
||||
return this.$fhcApi.factory.stv.mobility.deleteMobilitySupport(params)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
|
||||
|
||||
this.$refs.supports.reload();
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
addSupportToMobility({aufenthaltfoerderung_code}){
|
||||
this.formData.localSupports.push(aufenthaltfoerderung_code);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$fhcApi.factory.stv.mobility.getProgramsMobility()
|
||||
.then(result => {
|
||||
this.programsMobility = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
this.$fhcApi.factory.stv.mobility.getLVList(this.student.studiengang_kz)
|
||||
.then(result => {
|
||||
this.listLvs = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
this.$fhcApi.factory.stv.mobility.getListPurposes()
|
||||
.then(result => {
|
||||
this.listPurposes = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
this.$fhcApi.factory.stv.mobility.getListSupports()
|
||||
.then(result => {
|
||||
this.listSupports = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
this.$fhcApi.factory.stv.mobility.getLvsandLesByStudent(this.student.uid)
|
||||
.then(result => {
|
||||
this.listLvsAndLes = result.data;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
template: `
|
||||
<div class="stv-details-mobility h-100 pb-3">
|
||||
<h4>In / Out</h4>
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
:tabulator-events="tabulatorEvents"
|
||||
table-only
|
||||
:side-menu="false"
|
||||
reload
|
||||
new-btn-show
|
||||
:new-btn-label="this.$p.t('stv', 'tab_mobility')"
|
||||
@click:new="actionNewMobility"
|
||||
>
|
||||
</core-filter-cmpt>
|
||||
|
||||
<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 mb-3">
|
||||
<form-input
|
||||
container-class="col-6 stv-details-mobility-von"
|
||||
:label="$p.t('ui', 'von')"
|
||||
type="DatePicker"
|
||||
v-model="formData.von"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
name="von"
|
||||
:teleport="true"
|
||||
>
|
||||
</form-input>
|
||||
|
||||
<form-input
|
||||
container-class="col-6 stv-details-mobility-typ"
|
||||
:label="$p.t('lehre', 'lehrveranstaltung')"
|
||||
type="select"
|
||||
v-model="formData.lehrveranstaltung"
|
||||
name="lehrveranstaltung_id"
|
||||
>
|
||||
<option
|
||||
v-for="lv in listLvs"
|
||||
:key="lv.lehrveranstaltung_id"
|
||||
:value="lv.lehrveranstaltung_id"
|
||||
>
|
||||
{{lv.bezeichnung}} - Semester {{lv.semester}}
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
container-class="col-6 stv-details-mobility-bis"
|
||||
:label="$p.t('global', 'bis')"
|
||||
type="DatePicker"
|
||||
v-model="formData.bis"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
name="bis"
|
||||
: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
|
||||
>
|
||||
<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 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>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
container-class="col-6 stv-details-mobility-mobilitaetsprogramm"
|
||||
:label="$p.t('mobility', 'mobilitaetsprogramm')"
|
||||
type="select"
|
||||
v-model="formData.mobilitaetsprogramm_code"
|
||||
name="mobilitaetsprogramm_code"
|
||||
>
|
||||
<option
|
||||
v-for="mob in programsMobility"
|
||||
:key="mob.mobilitaetsprogramm_code"
|
||||
:value="mob.mobilitaetsprogramm_code"
|
||||
>
|
||||
{{mob.kurzbz}} - {{mob.beschreibung}}
|
||||
</option>
|
||||
</form-input>
|
||||
<form-input
|
||||
container-class="col-6 stv-details-mobility-ort"
|
||||
:label="$p.t('person', 'ort')"
|
||||
type="text"
|
||||
v-model="formData.ort"
|
||||
name="ort"
|
||||
>
|
||||
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
container-class="col-6 stv-details-mobility-gastnation"
|
||||
:label="$p.t('mobility', 'gastnation')"
|
||||
type="select"
|
||||
v-model="formData.nation_code"
|
||||
name="nation_code"
|
||||
>
|
||||
<option
|
||||
v-for="nation in lists.nations"
|
||||
:key="nation.nation_code"
|
||||
:value="nation.nation_code"
|
||||
:disabled="nation.sperre"
|
||||
>
|
||||
{{nation.kurztext}}
|
||||
</option>
|
||||
</form-input>
|
||||
<form-input
|
||||
container-class="col-6 stv-details-mobility-universitaet"
|
||||
:label="$p.t('mobility', 'universitaet')"
|
||||
type="text"
|
||||
v-model="formData.universitaet"
|
||||
name="universitaet"
|
||||
>
|
||||
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
container-class="col-6 stv-details-mobility-herkunftsland"
|
||||
:label="$p.t('mobility', 'herkunftsland')"
|
||||
type="select"
|
||||
v-model="formData.herkunftsland_code"
|
||||
name="herkunftsland_code"
|
||||
>
|
||||
<option
|
||||
v-for="nation in lists.nations"
|
||||
:key="nation.nation_code"
|
||||
:value="nation.nation_code"
|
||||
:disabled="nation.sperre"
|
||||
>
|
||||
{{nation.kurztext}}
|
||||
</option>
|
||||
</form-input>
|
||||
<form-input
|
||||
container-class="col-3 stv-details-mobility-ects_erworben"
|
||||
:label="$p.t('mobility', 'ects_erworben')"
|
||||
type="text"
|
||||
v-model="formData.ects_erworben"
|
||||
name="ects_erworben"
|
||||
>
|
||||
</form-input>
|
||||
<form-input
|
||||
container-class="col-3 stv-details-mobility-ects_angerechnet"
|
||||
:label="$p.t('mobility', 'ects_angerechnet')"
|
||||
type="text"
|
||||
v-model="formData.ects_angerechnet"
|
||||
name="ects_angerechnet"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-6 stv-details-mobility-zweck">
|
||||
<MobilityPurpose
|
||||
:bisio_id="formData.bisio_id"
|
||||
:listPurposes="listPurposes"
|
||||
@deleteMobilityPurpose="deleteMobilityPurpose"
|
||||
@setMobilityPurpose="addMobilityPurpose"
|
||||
@setMobilityPurposeToNewMobility="addPurposeToMobility"
|
||||
ref="purposes"
|
||||
></MobilityPurpose>
|
||||
</div>
|
||||
|
||||
<div class="col-6 stv-details-mobility-aufenthaltfoerderung">
|
||||
<MobilitySupport
|
||||
:bisio_id="formData.bisio_id"
|
||||
:listSupports="listSupports"
|
||||
@deleteMobilitySupport="deleteMobilitySupport"
|
||||
@setMobilitySupport="addMobilitySupport"
|
||||
@setMobilitySupportToNewMobility="addSupportToMobility"
|
||||
ref="supports"
|
||||
></MobilitySupport>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-end mb-3">
|
||||
<button v-if="statusNew" class="btn btn-primary" @click="addNewMobility()"> {{$p.t('ui', 'speichern')}}</button>
|
||||
<button v-else class="btn btn-primary" @click="updateMobility(formData.bisio_id)"> {{$p.t('ui', 'speichern')}}</button>
|
||||
</div>
|
||||
|
||||
</form-form>
|
||||
|
||||
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
@@ -39750,6 +39750,328 @@ array(
|
||||
)
|
||||
),
|
||||
// FHC4 Phrases CleanUpTasks End
|
||||
// FHC4 Phrases Mobility Start
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'stv',
|
||||
'phrase' => 'tab_mobility',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Mobilität',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Mobility',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'mobilitaetsprogramm',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Mobilitätsprogramm',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Mobility program',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'gastnation',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Gastnation',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Host nation',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'herkunftsland',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Herkunftsland',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Country of origin',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'universitaet',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Universität',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'University',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'ects_erworben',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Erworbene ECTS',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'ECTS acquired',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'ects_angerechnet',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Angerechnete ECTS',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'ECTS credited',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'zweck',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Zweck',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Purpose',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'aufenthalt',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Aufenthalt Förderung',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Residency funding',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'zweck_neu',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Mobilitätszweck anlegen',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Create motivation for mobility',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'foerderung_neu',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Förderung für Aufenthalt anlegen',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Create funding for mobility',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'kurzbz_program',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Programmkurzbezeichnung',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Program short description',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'bisio_id',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Bisio ID',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Bisio ID',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'kurzbz',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Kurzbezeichnung',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Short Name',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'error_entryExisting',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Eintrag bereits vorhanden',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Entry already existing',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'mobility',
|
||||
'phrase' => 'error_existingEntryInExtension',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Dieser Datensatz wird von der Mobility Extension verwendet und muss zuerst dort gelöscht werden.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'This record is used by the Mobility Extension and must first be deleted there.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
// FHC4 Phrases Mobility End
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user