cleanUp Tasks Tab PrestudentIn

This commit is contained in:
ma0068
2024-10-22 15:58:02 +02:00
parent b9911e69c5
commit 8787558fef
8 changed files with 198 additions and 77 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
$config['tabs'] =
[
'prestudent' => [
//all fields can be configured to be hidden, see class attribute stv-prestudent-prestudent-name for name
'hiddenFields' => [
//corresponding to config-entry 'ZGV_DOKTOR_ANZEIGEN' in global.config
'zgvdoktor_code', 'zgvdoktorort', 'zgvdoktordatum', 'zgvdoktornation', 'zgvdoktor_erfuellt',
//corresponding to config-entry 'ZGV_ERFUELLT_ANZEIGEN' in global.config
'zgv_erfuellt', 'zgvmas_erfuellt','zgvdoktor_erfuellt',
//propably used by FH-Communities
'aufnahmeschluessel', 'standort_code', 'facheinschlaegigBerufstaetig'
],
'hideUDFs' => false
]
];
@@ -46,11 +46,16 @@ class Config extends FHCAPI_Controller
'stv',
'konto'
]);
// Load Config
$this->load->config('stv');
}
public function student()
{
$result = [];
$config = $this->config->item('tabs');
$result['details'] = [
'title' => $this->p->t('stv', 'tab_details'),
'component' => './Stv/Studentenverwaltung/Details/Details.js'
@@ -69,7 +74,8 @@ class Config extends FHCAPI_Controller
];
$result['prestudent'] = [
'title' => $this->p->t('stv', 'tab_prestudent'),
'component' => './Stv/Studentenverwaltung/Details/Prestudent.js'
'component' => './Stv/Studentenverwaltung/Details/Prestudent.js',
'config' => $config['prestudent']
];
$result['status'] = [
'title' => 'Status',
@@ -19,6 +19,7 @@ class Prestudent extends FHCAPI_Controller
'getAufmerksamdurch' => ['admin:r', 'assistenz:r'],
'getBerufstaetigkeit' => ['admin:r', 'assistenz:r'],
'getTypenStg' => ['admin:r', 'assistenz:r'],
'getBisstandort' => ['admin:r', 'assistenz:r'],
'getStudienplaene' => ['admin:r', 'assistenz:r'],
'getStudiengang' => ['admin:r', 'assistenz:r']
]);
@@ -265,6 +266,17 @@ class Prestudent extends FHCAPI_Controller
return $this->terminateWithSuccess(getData($result) ?: []);
}
public function getBisstandort()
{
$this->load->model('codex/Bisstandort_model', 'BisstandortModel');
$result = $this->BisstandortModel->load();
if (isError($result)) {
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
}
return $this->terminateWithSuccess(getData($result) ?: []);
}
public function getStudienplaene($prestudent_id)
{
$this->load->model('organisation/Studienplan_model', 'StudienplanModel');
@@ -0,0 +1,14 @@
<?php
class Bisstandort_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'bis.tbl_bisstandort';
$this->pk = 'standort_code';
}
}
+4 -2
View File
@@ -34,8 +34,10 @@
<?php
$configArray = [
'generateAlias' => !defined('GENERATE_ALIAS_STUDENT') ? true : GENERATE_ALIAS_STUDENT,
'showZgvDoktor' => !defined('ZGV_DOKTOR_ANZEIGEN') ? false : ZGV_DOKTOR_ANZEIGEN,
'showZgvErfuellt' => !defined('ZGV_ERFUELLT_ANZEIGEN') ? false : ZGV_ERFUELLT_ANZEIGEN
//replaced by possibility to hide each formular field via config stv.php
#'showZgvDoktor' => !defined('ZGV_DOKTOR_ANZEIGEN') ? false : ZGV_DOKTOR_ANZEIGEN,
#'showZgvErfuellt' => !defined('ZGV_ERFUELLT_ANZEIGEN') ? false : ZGV_ERFUELLT_ANZEIGEN
];
?>