mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 09:04:28 +00:00
new data collection
This commit is contained in:
@@ -2,6 +2,7 @@ import Profil from "../../components/Cis/Profil/Profil.js";
|
||||
|
||||
|
||||
const app = Vue.createApp({
|
||||
|
||||
components: {
|
||||
Profil,
|
||||
},
|
||||
@@ -15,4 +16,4 @@ const app = Vue.createApp({
|
||||
},
|
||||
|
||||
});
|
||||
app.mount('#content');
|
||||
app.mount("#content");
|
||||
@@ -10,9 +10,9 @@ export default {
|
||||
+ `Cis/Profil/isMitarbeiterOrStudent/${uid}`;
|
||||
return axios.get(url);
|
||||
},
|
||||
getPersonInformation: function(uid) {
|
||||
getMitarbeiterAnsicht: function() {
|
||||
const url = FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
+ `Cis/Profil/getPersonInformation/${uid}`;
|
||||
+ `Cis/Profil/getMitarbeiterAnsicht`;
|
||||
return axios.get(url);
|
||||
},
|
||||
|
||||
|
||||
@@ -1,45 +1,34 @@
|
||||
|
||||
import fhcapifactory from "../../../apps/api/fhcapifactory.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
data: function() {
|
||||
|
||||
data() {
|
||||
return {
|
||||
person: null,
|
||||
|
||||
person_info: null,
|
||||
//? beinhaltet die Information ob der angefragte user ein Student oder Mitarbeiter ist
|
||||
role: null,
|
||||
}
|
||||
},
|
||||
//? this prop was passed in the Profil.php view file
|
||||
//? this props were passed in the Profil.php view file
|
||||
props:['uid','pid'],
|
||||
methods: {
|
||||
|
||||
},
|
||||
computed:{
|
||||
cis_profil_info(){
|
||||
computed_placeholder(){
|
||||
return {
|
||||
anrede:this.person_info.anrede,
|
||||
titelpre:this.person_info.titelpre,
|
||||
titelpost:this.person_info.titelpost,
|
||||
vorname:this.person_info.vorname,
|
||||
nachname:this.person_info.nachname,
|
||||
gebdatum:this.person_info.gebdatum,
|
||||
gebort:this.person_info.gebort,
|
||||
adresse:this.person_info.adressen[0].strasse + " " + this.person_info.adressen[0].plz,
|
||||
|
||||
//
|
||||
};
|
||||
},
|
||||
cis_profil_info_no_foto(){
|
||||
return {
|
||||
...this.person_info,
|
||||
foto:null,
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
},
|
||||
created(){
|
||||
fhcapifactory.UserData.getUser().then(res => this.person = res.data);
|
||||
//error //! fhcapifactory.UserData.getUser().then(res => this.person = res.data);
|
||||
fhcapifactory.UserData.isMitarbeiterOrStudent(this.uid).then(res => this.role = res.data);
|
||||
fhcapifactory.UserData.getPersonInformation(this.pid).then(res => this.person_info = res.data);
|
||||
fhcapifactory.UserData.getMitarbeiterAnsicht().then(res => {this.person_info = res.data;});
|
||||
|
||||
},
|
||||
|
||||
@@ -52,14 +41,16 @@ export default {
|
||||
//! printing 2 computed functions
|
||||
//* one to output the collected need information for the cis page
|
||||
//* and the other returns all the information retrieved from the model without the foto data
|
||||
-->
|
||||
|
||||
<pre style="color:blue">{{JSON.stringify(cis_profil_info,null,2)}}</pre>
|
||||
<pre style="color:purple">{{JSON.stringify(cis_profil_info_no_foto,null,2)}}</pre>
|
||||
|
||||
<br/>
|
||||
<pre style="color:red">{{JSON.stringify(person)}}</pre>
|
||||
<br/>
|
||||
<pre>{{JSON.stringify(role)}}</pre>
|
||||
-->
|
||||
|
||||
|
||||
<p>test</p>
|
||||
</div>
|
||||
`,
|
||||
};
|
||||
Reference in New Issue
Block a user