From 651452d821c30f408c8c9b900520e1db7fd0b20d Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 16 Sep 2025 08:40:40 +0200 Subject: [PATCH] bug beim laden des status tabs ohne meldestichtag --- application/controllers/api/frontend/v1/stv/Status.php | 3 +-- .../Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/application/controllers/api/frontend/v1/stv/Status.php b/application/controllers/api/frontend/v1/stv/Status.php index 665fb620f..308e5cf0d 100644 --- a/application/controllers/api/frontend/v1/stv/Status.php +++ b/application/controllers/api/frontend/v1/stv/Status.php @@ -114,9 +114,8 @@ class Status extends FHCAPI_Controller $this->load->model('codex/Bismeldestichtag_model', 'BismeldestichtagModel'); $result = $this->BismeldestichtagModel->getLastReachedMeldestichtag(); - $data = $this->getDataOrTerminateWithError($result); - $this->terminateWithSuccess($data); + $this->terminateWithSuccess(hasData($result) ? getData($result) : array()); } public function isLastStatus($prestudent_id) diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js index 593914916..9f55d26c2 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Prestudent/MultiStatus.js @@ -401,7 +401,7 @@ export default{ this.$api .call(ApiStvPrestudent.getLastBismeldestichtag()) .then(result => { - this.dataMeldestichtag = result.data[0].meldestichtag; + this.dataMeldestichtag = result.data[0]?.meldestichtag; if (this.$refs.table && this.$refs.table.tableBuilt) this.$refs.table.tabulator.redraw(true); })