mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
mailverteiler und deren mailto href
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
<h2>Profil</h2>
|
||||
|
||||
<hr>
|
||||
<p><?php echo $uid; ?></p>
|
||||
|
||||
<!-- we can pass information from the php view file to the public js file through interpolating data from php into vue props -->
|
||||
<Profil uid="<?php echo $uid ?>" pid="<?php echo $pid ?>"></Profil>
|
||||
</div>
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
@@ -1,17 +1,61 @@
|
||||
|
||||
import fhcapifactory from "../../../apps/api/fhcapifactory.js";
|
||||
//"<ul><li v-for='element in wert'>{{element}}</li></ul>"
|
||||
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: `
|
||||
<div :class="{'container':true}">
|
||||
<div :class="{'row':true}">
|
||||
<div :class="{'col':true}">
|
||||
|
||||
<p v-for="element in person_info.funktionen"><span v-for="(wert,bezeichnung) in element">{{wert + ": " + bezeichnung}}</span></p>
|
||||
<p>{{JSON.stringify(first_col)}}</p>
|
||||
<p>{{"here is the uid "+uid}} </p>
|
||||
<p>{{"here is the pid "+pid}} </p>
|
||||
<div :class={'container':true}>
|
||||
<div :class={'row':true}>
|
||||
<div :class={'col':true}>
|
||||
<img :src="get_image_base64_src"></img>
|
||||
<div v-if="person_info.foto_sperre">
|
||||
</div>
|
||||
<div :class="{'col':true}">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div :class="{'container':true}">
|
||||
<!-- here starts the row of the whole window -->
|
||||
<div :class="{'row':true}">
|
||||
<!-- this is the left column of the window -->
|
||||
<div :class="{'col-9':true}">
|
||||
<div :class="{'row':true}">
|
||||
<div :class="{'col':true}">
|
||||
<img :class="{'img-thumbnail':true}" :src="get_image_base64_src"></img>
|
||||
<div v-if="person_info?.foto_sperre">
|
||||
<p style="margin:0">Profilfoto gesperrt</p>
|
||||
<a href="#" @click.prevent="sperre_foto_function(false)">Sperre des Profilfotos aufheben</a>
|
||||
<a href="#" @click.prevent="sperre_foto_function(false)" style="text-decoration:none">Sperre des Profilfotos aufheben</a>
|
||||
</div>
|
||||
<a href="#" @click.prevent="sperre_foto_function(true)" style="display:block" v-else>Profilfoto sperren</a>
|
||||
<a href="#" @click.prevent="sperre_foto_function(true)" style="display:block; text-decoration:none" v-else>Profilfoto sperren</a>
|
||||
|
||||
|
||||
</div>
|
||||
<div :class={'col':true}>
|
||||
<div :class="{'col':true}">
|
||||
|
||||
|
||||
<ol style="list-style:none">
|
||||
@@ -117,7 +198,7 @@ export default {
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div :class={'col':true}>
|
||||
<div :class="{'col':true}">
|
||||
<ol style="list-style:none">
|
||||
<!--render_unterelement(wert,bezeichnung)-->
|
||||
<li v-for="(wert,bezeichnung) in second_col">
|
||||
@@ -135,6 +216,41 @@ export default {
|
||||
</ol>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div :class="{'row':true}">
|
||||
|
||||
<div :class="{'col':true}">
|
||||
<core-filter-cmpt title="Funktionen" ref="funktionenTable" :tabulator-options="funktionen_table_options" :tableOnly />
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div :class="{'row':true}">
|
||||
|
||||
<div :class="{'col':true}">
|
||||
<core-filter-cmpt title="Entlehnte Betriebsmittel" ref="betriebsmittelTable" :tabulator-options="betriebsmittel_table_options" :tableOnly />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div :class="{'col-3':true}">
|
||||
<div style="background-color:#EEEEEE" :class="{'row':true, 'py-4':true}">
|
||||
<a style="text-decoration:none" :class="{'my-1':true}" href="#">Zeitwuensche</a>
|
||||
<a style="text-decoration:none" :class="{'my-1':true}" href="#">Lehrveranstaltungen</a>
|
||||
<a style="text-decoration:none" :class="{'my-1':true}" href="#">Zeitsperren von Gschnell</a>
|
||||
</div>
|
||||
<div :class="{'row':true}">
|
||||
<h5 :class="{'fs-3':true}" style="margin-top:1em">Mailverteilers</h5>
|
||||
<p :class="{'fs-6':true}">Sie sind Mitgglied in folgenden Verteilern:</p>
|
||||
<div :class="{'row':true, 'text-break':true}" v-for="verteiler in person_info?.mailverteiler">
|
||||
<div :class="{'col-6':true}"><a :href="verteiler.mailto"><b>{{verteiler.gruppe_kurzbz}}</b></a></div>
|
||||
<div :class="{'col-6':true}">{{verteiler.beschreibung}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user