mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 10:22:18 +00:00
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:
@@ -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]);
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user