mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
restructuring controller
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
//import ProfilView from "../../components/Cis/Profil/Profil.js";
|
||||
import StudentProfil from "../../components/Cis/Profil/StudentProfil.js";
|
||||
import MitarbeiterProfil from "../../components/Cis/Profil/MitarbeiterProfil.js";
|
||||
import ViewStudentProfil from "../../components/Cis/Profil/StudentViewProfil.js";
|
||||
import ViewMitarbeiterProfil from "../../components/Cis/Profil/MitarbeiterViewProfil.js";
|
||||
import fhcapifactory from "../api/fhcapifactory.js";
|
||||
|
||||
Vue.$fhcapi = fhcapifactory;
|
||||
|
||||
|
||||
const app = Vue.createApp({
|
||||
|
||||
components: {
|
||||
|
||||
StudentProfil,
|
||||
MitarbeiterProfil,
|
||||
ViewStudentProfil,
|
||||
ViewMitarbeiterProfil,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
view:null,
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
created(){
|
||||
|
||||
let path = location.pathname;
|
||||
console.log(path);
|
||||
console.log(path.lastIndexOf('/'));
|
||||
let uid = path.substring(path.lastIndexOf('/')).replace("/","");
|
||||
console.log("i am passing this uid: ", uid);
|
||||
const payload = {
|
||||
...(uid != "Profil" ? {uid} : {})
|
||||
};
|
||||
|
||||
Vue.$fhcapi.UserData.getView(payload).then((res)=>{
|
||||
//this.view = res.data.view;
|
||||
//this.data = res.data.data;
|
||||
console.log(res.data);
|
||||
});
|
||||
},
|
||||
template:`
|
||||
<div>
|
||||
<p>test element</p>
|
||||
<!--<StudentProfil></StudentProfil>-->
|
||||
<component :is="view"></component>
|
||||
</div>`
|
||||
|
||||
|
||||
});
|
||||
app.mount("#content");
|
||||
@@ -1,19 +0,0 @@
|
||||
import Profil from "../../components/Cis/Profil/Profil.js";
|
||||
|
||||
|
||||
const app = Vue.createApp({
|
||||
|
||||
components: {
|
||||
Profil,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
|
||||
});
|
||||
app.mount("#content");
|
||||
@@ -7,6 +7,12 @@ export default {
|
||||
+ `cis.php/Cis/Profil/isMitarbeiterOrStudent/${uid}`;
|
||||
return axios.get(url);
|
||||
},
|
||||
|
||||
getView: function(payload) {
|
||||
const url = FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
+ `cis.php/Cis/Profil/getView`;
|
||||
return axios.post(url,payload);
|
||||
},
|
||||
|
||||
sperre_foto_function: function(value) {
|
||||
const url = FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
@@ -21,9 +27,9 @@ export default {
|
||||
|
||||
return axios.get(url);
|
||||
},
|
||||
mitarbeiterProfil: function(uid) {
|
||||
mitarbeiterProfil: function() {
|
||||
const url = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router+
|
||||
`/Cis/Profil/mitarbeiterProfil/${uid}`;
|
||||
`/Cis/Profil/mitarbeiterProfil/`;
|
||||
|
||||
return axios.get(url);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user