removes old api files and removes the use(fhcApi) because it is already imported in the Phrasen plugin

This commit is contained in:
SimonGschnell
2024-07-22 11:36:12 +02:00
parent a0871657ca
commit 82417a7f6f
5 changed files with 1 additions and 198 deletions
-14
View File
@@ -30,20 +30,6 @@ export default {
"/api/frontend/v1/ProfilUpdate/denyProfilRequest",{profil_update_id,uid,topic,status_message});
},
//TODO post request
replaceProfilUpdateAttachment: function (dms) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/replaceProfilUpdateAttachment`;
return axios.post(url, dms, {
headers: { "Content-Type": "multipart/form-data" },
});
},
//TODO post request
//? new requests
insertFile: function (dms, replace = null) {
return this.$fhcApi.post(
+1 -4
View File
@@ -2,12 +2,10 @@ 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";
import Loading from "../../components/Loader.js";
import Phrasen from "../../plugin/Phrasen.js";
import fhcapi from "../../plugin/FhcApi.js";
Vue.$fhcapi = fhcapifactory;
Vue.$collapseFormatter = function (data) {
//data - an array of objects containing the column title and value for each cell
var container = document.createElement("div");
@@ -405,5 +403,4 @@ const profilApp = Vue.createApp({
profilApp
.use(primevue.config.default, { zIndex: { overlay: 9999 } })
.use(Phrasen)
.use(fhcapi)
.mount("#content");
@@ -1,7 +1,5 @@
import fhcapifactory from "../api/fhcapifactory.js";
import ProfilUpdateView from "../../components/Cis/ProfilUpdate/ProfilUpdateView.js";
import Phrasen from "../../plugin/Phrasen.js";
Vue.$fhcapi = fhcapifactory;
const app = Vue.createApp({
components: {
-120
View File
@@ -1,120 +0,0 @@
export default {
//! API calls for profil update requests
getStatus: function () {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
"/Cis/ProfilUpdate/getStatus";
return axios.get(url);
},
getTopic: function () {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
"/Cis/ProfilUpdate/getTopic";
return axios.get(url);
},
getProfilUpdateRequest: function () {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
"/Cis/ProfilUpdate/getAllRequests";
return axios.get(url);
},
acceptProfilRequest: function (payload) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
"/Cis/ProfilUpdate/acceptProfilRequest";
return axios.post(url, payload);
},
denyProfilRequest: function (payload) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
"/Cis/ProfilUpdate/denyProfilRequest";
return axios.post(url, payload);
},
replaceProfilUpdateAttachment: function (dms) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/replaceProfilUpdateAttachment`;
return axios.post(url, dms, {
headers: { "Content-Type": "multipart/form-data" },
});
},
//? new reuquests
insertFile: function (dms, replace = null) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/insertFile/${replace}`;
return axios.post(url, dms, {
headers: { "Content-Type": "multipart/form-data" },
});
},
getProfilRequestFiles: function (requestID) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/getProfilRequestFiles`;
return axios.post(url, requestID);
},
selectProfilRequest: function (uid = null, id = null) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/selectProfilRequest`;
return axios.get(url, { uid: uid, id: id });
},
insertProfilRequest: function (topic, payload, fileID = null) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/insertProfilRequest`;
return axios.post(url, {
topic,
payload,
...(fileID ? { fileID: fileID } : {}),
});
},
updateProfilRequest: function (topic, payload, ID, fileID = null) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/updateProfilRequest`;
return axios.post(url, {
topic,
payload,
ID,
...(fileID ? { fileID: fileID } : {}),
});
},
deleteProfilRequest: function (requestID) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
`/Cis/ProfilUpdate/deleteProfilRequest`;
return axios.post(url, requestID);
},
};
-58
View File
@@ -1,58 +0,0 @@
export default {
//! API Calls for Profil Views
getGemeinden: function(nation,zip=null){
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
`cis.php/Cis/Profil/getGemeinden`;
return axios.get(url,{params:{nation:nation,zip:zip}});
},
getAllNationen:function(){
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
`cis.php/Cis/Profil/getAllNationen`;
return axios.get(url);
},
getView: function (uid) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root + `cis.php/Cis/Profil/getView/${uid}`;
return axios.get(url);
},
sperre_foto_function: function (value) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
`cis.php/Cis/Profil/foto_sperre_function/${value}`;
return axios.get(url);
},
isStudent: function (uid) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
`cis.php/Cis/Profil/isStudent/${uid}`;
return axios.get(url);
},
isMitarbeiter: function (uid) {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
`cis.php/Cis/Profil/isMitarbeiter/${uid}`;
return axios.get(url);
},
getZustellAdresse: function () {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
`cis.php/Cis/Profil/getZustellAdresse`;
return axios.get(url);
},
getZustellKontakt: function () {
const url =
FHC_JS_DATA_STORAGE_OBJECT.app_root +
`cis.php/Cis/Profil/getZustellKontakt`;
return axios.get(url);
},
};