diff --git a/application/controllers/Cis4.php b/application/controllers/Cis4.php index 84aedc5f2..9197fd388 100644 --- a/application/controllers/Cis4.php +++ b/application/controllers/Cis4.php @@ -28,14 +28,12 @@ class Cis4 extends Auth_Controller public function index() { $this->load->model('person/Person_model','PersonModel'); - $begruesung = $this->PersonModel->getFirstName(getAuthUID()); - if(isError($begruesung)) - { - show_error("name couldn't be loaded for username ".getAuthUID()); - } - $begruesung = getData($begruesung); + $personData = getData($this->PersonModel->getByUid(getAuthUID()))[0]; + $viewData = array( - 'name' => $begruesung + 'uid' => getAuthUID(), + 'name' => $personData->vorname, + 'person_id' => $personData->person_id ); $this->load->view('CisVue/Dashboard.php',['viewData' => $viewData]); diff --git a/public/css/components/dashboard/news.css b/public/css/components/dashboard/news.css index 366542969..d0c68ae87 100644 --- a/public/css/components/dashboard/news.css +++ b/public/css/components/dashboard/news.css @@ -20,8 +20,4 @@ .widgets-news img { max-width: 100%; -} - -.widgets-news .card-body{ - overflow: hidden; } \ No newline at end of file diff --git a/public/js/components/Dashboard/Dashboard.js b/public/js/components/Dashboard/Dashboard.js index d96b20e16..b96c0f20c 100644 --- a/public/js/components/Dashboard/Dashboard.js +++ b/public/js/components/Dashboard/Dashboard.js @@ -22,6 +22,7 @@ export default { provide() { return { editMode: Vue.computed(()=>this.editMode), + viewData: Vue.computed(()=>Vue.reactive(this.viewData)), } }, computed: { diff --git a/public/js/plugin/FhcApi.js b/public/js/plugin/FhcApi.js index 0c51de53b..8c35da1df 100644 --- a/public/js/plugin/FhcApi.js +++ b/public/js/plugin/FhcApi.js @@ -136,7 +136,7 @@ export default { return Promise.reject(error); }); - app.config.globalProperties.$fhcApi = { + app.config.globalProperties.$fhcApi = Vue.reactive({ getUri(url) { return fhcApiAxios.getUri({url}); }, @@ -289,7 +289,7 @@ export default { $fhcAlert.alertDefault('error', error.message, message); } } - }; + }); class FhcApiFactoryWrapper { constructor(factorypart, root) { @@ -301,6 +301,11 @@ export default { return (root || this).$fhcApi; } }) + + this.bindKeys(factorypart) + } + + bindKeys(factorypart, root) { Object.keys(factorypart).forEach(key => { Object.defineProperty(this, key, { get() {