Merge branch 'feature-30660/FHC4_StudierendenGUI_Prototyp' of github.com:FH-Complete/FHC-Core into feature-30660/FHC4_StudierendenGUI_Prototyp

This commit is contained in:
ma0068
2024-07-12 09:23:00 +02:00
6 changed files with 146 additions and 142 deletions
@@ -39,21 +39,11 @@ class Status extends FHCAPI_Controller
public function getHistoryPrestudent($prestudent_id)
{
$this->load->model('system/Sprache_model', 'SpracheModel');
$this->SpracheModel->addSelect('index');
$result = $this->SpracheModel->loadWhere(array('sprache' => getUserLanguage()));
$result = $this->PrestudentstatusModel->getHistoryPrestudent($prestudent_id);
// Return language index
$lang = hasData($result) ? getData($result)[0]->index : 1;
$data = $this->getDataOrTerminateWithError($result);
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
$result = $this->PrestudentModel->getHistoryPrestudent($prestudent_id, $lang);
if (isError($result))
{
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
}
$this->terminateWithSuccess((getData($result) ?: []));
$this->terminateWithSuccess($data);
}
public function getStatusgruende()
@@ -72,10 +62,9 @@ class Status extends FHCAPI_Controller
$this->load->model('codex/Bismeldestichtag_model', 'BismeldestichtagModel');
$result = $this->BismeldestichtagModel->getLastReachedMeldestichtag();
if (isError($result)) {
$this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
}
return $this->terminateWithSuccess($result);
$data = $this->getDataOrTerminateWithError($result);
$this->terminateWithSuccess($data);
}
public function isLastStatus($prestudent_id)