diff --git a/application/controllers/Cis/Profil.php b/application/controllers/Cis/Profil.php index ef15d830c..bd0970923 100644 --- a/application/controllers/Cis/Profil.php +++ b/application/controllers/Cis/Profil.php @@ -66,8 +66,12 @@ class Profil extends Auth_Controller // catch error } $mailverteiler_res = hasData($mailverteiler_res)? getData($mailverteiler_res) : null; + + $mailverteiler_res = array_map(function($element) { $element->mailto="mailto:".$element->gruppe_kurzbz."@".DOMAIN; return $element;},$mailverteiler_res); } + + if(isSuccess($this->KontaktModel->addSelect('DISTINCT ON (kontakttyp) kontakttyp, kontakt, tbl_kontakt.anmerkung, tbl_kontakt.zustellung')) && isSuccess($this->KontaktModel->addJoin('public.tbl_standort', 'standort_id', 'LEFT')) && isSuccess($this->KontaktModel->addJoin('public.tbl_firma', 'firma_id', 'LEFT'))&& @@ -90,7 +94,7 @@ class Profil extends Auth_Controller } if( - isSuccess($this->BetriebsmittelpersonModel->addSelect(["betriebsmitteltyp", "beschreibung","nummer","ausgegebenam"])) + isSuccess($this->BetriebsmittelpersonModel->addSelect(["CONCAT(betriebsmitteltyp, ' ' ,beschreibung) as Betriebsmittel","nummer as Nummer","ausgegebenam as Ausgegeben_am"])) ){ $betriebsmittelperson_res = $this->BetriebsmittelpersonModel->getBetriebsmittel(getAuthPersonId()); @@ -103,7 +107,7 @@ class Profil extends Auth_Controller if( //! Summe der Wochenstunden wird jetzt in der hr/tbl_dienstverhaeltnis gespeichert - isSuccess($this->BenutzerfunktionModel->addSelect(["tbl_benutzerfunktion.bezeichnung as bf_bezeichnung","tbl_organisationseinheit.bezeichnung as oe_bezeichnung","datum_von","datum_bis","wochenstunden"]))&& + isSuccess($this->BenutzerfunktionModel->addSelect(["tbl_benutzerfunktion.bezeichnung as Bezeichnung","tbl_organisationseinheit.bezeichnung as Organisationseinheit","datum_von as Gültig_von","datum_bis as Gültig_bis","wochenstunden as Wochenstunden"]))&& isSuccess($this->BenutzerfunktionModel->addJoin("tbl_organisationseinheit","oe_kurzbz")) ){ $benutzer_funktion_res = $this->BenutzerfunktionModel->loadWhere(array('uid'=>getAuthUID())); @@ -219,6 +223,7 @@ class Profil extends Auth_Controller } + diff --git a/application/views/Cis/Profil.php b/application/views/Cis/Profil.php index 4feb98ec4..8c930db09 100644 --- a/application/views/Cis/Profil.php +++ b/application/views/Cis/Profil.php @@ -2,6 +2,7 @@ $includesArray = array( 'title' => 'Stundenplan', 'customJSModules' => ['public/js/apps/Cis/ProfilApp.js'], + 'tabulator5' => true, 'customCSSs' => ['public/css/components/calendar.css'] ); @@ -12,7 +13,7 @@ $this->load->view('templates/CISHTML-Header', $includesArray);

Profil


-

+ diff --git a/public/js/apps/api/userdata.js b/public/js/apps/api/userdata.js index cd701a2d1..9550171c3 100644 --- a/public/js/apps/api/userdata.js +++ b/public/js/apps/api/userdata.js @@ -20,6 +20,12 @@ export default { + `cis.php/Cis/Profil/foto_sperre_function/${value}`; return axios.get(url); }, + getBenutzerFunktionen: function() { + const url = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router+ + "/Cis/Profil/getBenutzerFunktionen"; + + return axios.get(url); + }, }; \ No newline at end of file diff --git a/public/js/components/Cis/Profil/Profil.js b/public/js/components/Cis/Profil/Profil.js index 3b1ca8e03..e8970f3f5 100644 --- a/public/js/components/Cis/Profil/Profil.js +++ b/public/js/components/Cis/Profil/Profil.js @@ -1,17 +1,61 @@ import fhcapifactory from "../../../apps/api/fhcapifactory.js"; -//"" +import {CoreFilterCmpt} from "../../../components/filter/Filter.js" + + +/* [ + {title: 'Log ID', field: 'LogId', headerFilter: true}, + {title: 'Request ID', field: 'RequestId', headerFilter: true}, + {title: 'Execution time', field: 'ExecutionTime', headerFilter: true}, + {title: 'Executed by', field: 'ExecutedBy', headerFilter: true}, + {title: 'Description', field: 'Description', headerFilter: true}, + {title: 'Data', field: 'Data', headerFilter: true}, + {title: 'Web service type', field: 'WebserviceType', headerFilter: true} +] */ + +//? old data +/* ajaxUrl: FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router+ + "/Cis/Profil/getBenutzerFunktionen", */ export default { - + components:{ + CoreFilterCmpt, + }, data() { return { - + person_info: null, //? beinhaltet die Information ob der angefragte user ein Student oder Mitarbeiter ist role: null, + //"bf_bezeichnung", "oe_bezeichnung", "datum_von", "datum_bis", "wochenstunden" ] + + funktionen_table_options: { + height: 300, + layout: 'fitColumns', + //ajaxUrl: FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router+ + //"/Cis/Profil/getBenutzerFunktionen", + data:[{Bezeichnung:"test1",Organisationseinheit:"test2",Gültig_von:"test3",Gültig_bis:"test4",Wochenstunden:"test5"}], + + columns: [{title: 'Bezeichnung', field: 'Bezeichnung', headerFilter: true}, + {title: 'Organisationseinheit', field: 'Organisationseinheit', headerFilter: true}, + {title: 'Gültig_von', field: 'Gültig_von', headerFilter: true}, + {title: 'Gültig_bis', field: 'Gültig_bis', headerFilter: true}, + {title: 'Wochenstunden', field: 'Wochenstunden', headerFilter: true},] + + }, + betriebsmittel_table_options:{ + height: 300, + layout: 'fitColumns', + data:[{Bezeichnung:"test1",Organisationseinheit:"test2",Gültig_von:"test3",Gültig_bis:"test4",Wochenstunden:"test5"}], + + columns: [{title: 'Betriebsmittel', field: 'betriebsmittel', headerFilter: true}, + {title: 'Nummer', field: 'Nummer', headerFilter: true}, + {title: 'Ausgegeben_am', field: 'Ausgegeben_am', headerFilter: true},] + + }, } }, + //? this props were passed in the Profil.php view file props:['uid','pid'], methods: { @@ -35,23 +79,39 @@ export default { return result; }, sperre_foto_function(value){ + if(!this.person_info){ + return; + } fhcapifactory.UserData.sperre_foto_function(value).then(res => { - console.log(res.data); - if(res.data){ this.person_info.foto_sperre = res.data.foto_sperre; - } + }); }, + }, computed:{ - + test_computed(){ + return "test_computed"; + }, + get_Functions_Tabulator_Columns(){ + if(!this.person_info){ + return []; + } + return Object.keys(this.person_info.funktionen[0]).map(key => {return {title: key,field:key, headerFilter:true}}); + }, get_image_base64_src(){ - return "data:image/jpeg;base64,"+this.person_info.foto; + if(!this.person_info){ + return ""; + } + return "data:image/jpeg;base64,"+(this.person_info ? this.person_info.foto : ""); }, first_col(){ + if(!this.person_info){ + return {}; + } //! postnomen is still missing return { Username:this.uid, @@ -68,6 +128,9 @@ export default { }; }, second_col(){ + if(!this.person_info){ + return {}; + } //! postnomen is still missing return { Intern:this.person_info.email_intern, @@ -75,37 +138,55 @@ export default { Kontakte:this.person_info.kontakte, }; }, - - - }, - created(){ - //error //! fhcapifactory.UserData.getUser().then(res => this.person = res.data); - fhcapifactory.UserData.isMitarbeiterOrStudent(this.uid).then(res => {console.log(res.data);this.role = res.data;}); - fhcapifactory.UserData.getMitarbeiterAnsicht().then(res => {this.person_info = res.data;}); + created(){ + + //error //! fhcapifactory.UserData.getUser().then(res => this.person = res.data); + fhcapifactory.UserData.isMitarbeiterOrStudent(this.uid).then(res => {this.role = res.data;}); + + + //.tabulator.setData(this.person_info?.funktionen); + + }, + mounted(){ + fhcapifactory.UserData.getMitarbeiterAnsicht().then(res => { + this.person_info = res.data; + this.$refs.funktionenTable.tabulator.setData(res.data.funktionen); + this.$refs.betriebsmittelTable.tabulator.setData(res.data.mittel); + }); }, template: ` +
+
+
-

{{wert + ": " + bezeichnung}}

-

{{JSON.stringify(first_col)}}

-

{{"here is the uid "+uid}}

-

{{"here is the pid "+pid}}

-
-
-
- -
+
+
+ +
+
+
+ +
+ +
+ +
+
+ -
+
    @@ -117,7 +198,7 @@ export default {
-
+
  1. @@ -135,6 +216,41 @@ export default {
+
+
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+
+
+ +
+ +
+
Mailverteilers
+

Sie sind Mitgglied in folgenden Verteilern:

+
+ +
{{verteiler.beschreibung}}
+
+