From 651452d821c30f408c8c9b900520e1db7fd0b20d Mon Sep 17 00:00:00 2001 From: ma0048 Date: Tue, 16 Sep 2025 08:40:40 +0200 Subject: [PATCH 1/2] 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); }) From 9e40c6b21ffc2a4d7fe36231fe0962527bb1527a Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Wed, 5 Nov 2025 15:41:17 +0100 Subject: [PATCH 2/2] declaration, import & binding of capitalize function from StringHelpers.js; --- public/js/apps/Dashboard/Fhc.js | 3 ++- public/js/helpers/StringHelpers.js | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 public/js/helpers/StringHelpers.js diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index 093ad815b..190ed1a93 100644 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -19,6 +19,7 @@ import Studium from "../../components/Cis/Studium/Studium.js"; import ApiRenderers from '../../api/factory/renderers.js'; import ApiRouteInfo from '../../api/factory/routeinfo.js'; +import {capitalize} from "../../helpers/StringHelpers.js"; const ciPath = FHC_JS_DATA_STORAGE_OBJECT.app_root.replace(/(https:|)(^|\/\/)(.*?\/)/g, '') + FHC_JS_DATA_STORAGE_OBJECT.ci_router; @@ -320,7 +321,7 @@ const app = Vue.createApp({ // kind of a bandaid for bad css on some pages to avoid horizontal scroll setScrollbarWidth(); - +app.config.globalProperties.$capitalize = capitalize; app.use(router); app.use(primevue.config.default, { zIndex: { diff --git a/public/js/helpers/StringHelpers.js b/public/js/helpers/StringHelpers.js new file mode 100644 index 000000000..a67d0138f --- /dev/null +++ b/public/js/helpers/StringHelpers.js @@ -0,0 +1,4 @@ +export function capitalize(string) { + if (!string) return ''; + return string[0].toUpperCase() + string.slice(1); +} \ No newline at end of file