fhcApi extendable & reactive; provide reactive viewdata from dashboard to widgets by inject/provide reworked news xslt in db; css change since overflow-auto is in xslt now; WIP anw widget;

This commit is contained in:
Johann Hoffmann
2024-11-27 16:30:54 +01:00
parent 290da9f2c0
commit 39f1f825a5
4 changed files with 13 additions and 13 deletions
+5 -7
View File
@@ -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]);
-4
View File
@@ -20,8 +20,4 @@
.widgets-news img
{
max-width: 100%;
}
.widgets-news .card-body{
overflow: hidden;
}
@@ -22,6 +22,7 @@ export default {
provide() {
return {
editMode: Vue.computed(()=>this.editMode),
viewData: Vue.computed(()=>Vue.reactive(this.viewData)),
}
},
computed: {
+7 -2
View File
@@ -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() {