mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-12 15:04:04 +00:00
bug beim laden des messages tab ohne oe zuordnung
This commit is contained in:
@@ -52,11 +52,14 @@ class Messages extends FHCAPI_Controller
|
|||||||
|
|
||||||
$result = $this->MessageModel->getMessagesForTable($id, $offset, $limit);
|
$result = $this->MessageModel->getMessagesForTable($id, $offset, $limit);
|
||||||
|
|
||||||
$data = $this->getDataOrTerminateWithError($result);
|
if (hasData($result))
|
||||||
|
{
|
||||||
|
$data = getData($result);
|
||||||
|
$this->addMeta('count', $data['count']);
|
||||||
|
$this->terminateWithSuccess($data['data']);
|
||||||
|
}
|
||||||
|
|
||||||
$this->addMeta('count', $data['count']);
|
$this->terminateWithSuccess(array());
|
||||||
|
|
||||||
$this->terminateWithSuccess($data['data']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getVorlagen()
|
public function getVorlagen()
|
||||||
@@ -66,32 +69,23 @@ class Messages extends FHCAPI_Controller
|
|||||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||||
$result = $this->BenutzerfunktionModel->getBenutzerfunktionByUid($uid, 'oezuordnung');
|
$result = $this->BenutzerfunktionModel->getBenutzerfunktionByUid($uid, 'oezuordnung');
|
||||||
|
|
||||||
$data = $this->getDataOrTerminateWithError($result);
|
if (hasData($result))
|
||||||
$oe_kurzbz = current($data);
|
{
|
||||||
|
$this->load->model('system/Vorlage_model', 'VorlageModel');
|
||||||
|
|
||||||
$this->load->model('system/Vorlage_model', 'VorlageModel');
|
$data = getData($result);
|
||||||
|
|
||||||
$result = $this->VorlageModel->getAllVorlagenByOe($oe_kurzbz->oe_kurzbz);
|
$oe_kurzbz = array_column($data, 'oe_kurzbz');
|
||||||
$data = $this->getDataOrTerminateWithError($result);
|
$result = $this->VorlageModel->getAllVorlagenByOe($oe_kurzbz);
|
||||||
|
|
||||||
$this->terminateWithSuccess($data);
|
$this->terminateWithSuccess(hasData($result) ? getData($result) : array());
|
||||||
|
}
|
||||||
|
|
||||||
//If admin
|
$this->terminateWithSuccess(array());
|
||||||
$this->VorlageModel->addOrder('vorlage_kurzbz', 'ASC');
|
|
||||||
$result = $this->VorlageModel->loadWhere(
|
|
||||||
array(
|
|
||||||
'mimetype' => 'text/html'
|
|
||||||
));
|
|
||||||
|
|
||||||
|
|
||||||
$data = $this->getDataOrTerminateWithError($result);
|
|
||||||
|
|
||||||
$this->terminateWithSuccess($data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getVorlagentext($vorlage_kurzbz)
|
public function getVorlagentext($vorlage_kurzbz)
|
||||||
{
|
{
|
||||||
//$this->terminateWithError("vor " . $vorlage_kurzbz, self::ERROR_TYPE_GENERAL);
|
|
||||||
//$studiengang_kz = 227; //TODO(Manu) dynamisieren NULL
|
//$studiengang_kz = 227; //TODO(Manu) dynamisieren NULL
|
||||||
$studiengang_kz = 0;
|
$studiengang_kz = 0;
|
||||||
$this->load->model('system/Vorlagestudiengang_model', 'VorlagestudiengangModel');
|
$this->load->model('system/Vorlagestudiengang_model', 'VorlagestudiengangModel');
|
||||||
@@ -108,7 +102,6 @@ class Messages extends FHCAPI_Controller
|
|||||||
//not correct with Vorlage
|
//not correct with Vorlage
|
||||||
$vorlage = current($data);
|
$vorlage = current($data);
|
||||||
|
|
||||||
//$this->terminateWithSuccess($data);
|
|
||||||
$this->terminateWithSuccess($vorlage->text);
|
$this->terminateWithSuccess($vorlage->text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,8 +216,6 @@ class Messages extends FHCAPI_Controller
|
|||||||
}
|
}
|
||||||
elseif($typeId == 'prestudent_id')
|
elseif($typeId == 'prestudent_id')
|
||||||
{
|
{
|
||||||
// $this->terminateWithError("prestudent_id ", self::ERROR_TYPE_GENERAL);
|
|
||||||
|
|
||||||
$result = $this->MessagesModel->parseMessageTextPrestudent($id, $body);
|
$result = $this->MessagesModel->parseMessageTextPrestudent($id, $body);
|
||||||
$bodyParsed = $this->getDataOrTerminateWithError($result);
|
$bodyParsed = $this->getDataOrTerminateWithError($result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,13 +51,17 @@ class Vorlagen extends FHCAPI_Controller
|
|||||||
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
$this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel');
|
||||||
$result = $this->BenutzerfunktionModel->getBenutzerfunktionByUid($uid, 'oezuordnung');
|
$result = $this->BenutzerfunktionModel->getBenutzerfunktionByUid($uid, 'oezuordnung');
|
||||||
|
|
||||||
$data = $this->getDataOrTerminateWithError($result);
|
if (hasData($result))
|
||||||
$oe_kurzbz = current($data);
|
{
|
||||||
|
$data = getData($result);
|
||||||
|
|
||||||
$result = $this->VorlageModel->getAllVorlagenByOe($oe_kurzbz->oe_kurzbz);
|
$oe_kurzbz = array_column($data, 'oe_kurzbz');
|
||||||
$data = $this->getDataOrTerminateWithError($result);
|
$result = $this->VorlageModel->getAllVorlagenByOe($oe_kurzbz);
|
||||||
|
|
||||||
|
$this->terminateWithSuccess(hasData($result) ? getData($result) : array());
|
||||||
|
}
|
||||||
|
$this->terminateWithSuccess(array());
|
||||||
|
|
||||||
$this->terminateWithSuccess($data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -274,6 +274,11 @@ export default {
|
|||||||
this.$refs.table.reloadTable();
|
this.$refs.table.reloadTable();
|
||||||
},
|
},
|
||||||
buildTreemap(messages) {
|
buildTreemap(messages) {
|
||||||
|
if (!messages || !messages.data || messages.data.length === 0)
|
||||||
|
{
|
||||||
|
return {data: [], last_page: 0};
|
||||||
|
}
|
||||||
|
|
||||||
const last_page = messages.meta.count;
|
const last_page = messages.meta.count;
|
||||||
messages = messages.data;
|
messages = messages.data;
|
||||||
const messageMap = new Map();
|
const messageMap = new Map();
|
||||||
|
|||||||
Reference in New Issue
Block a user