refactor fhcApi

This commit is contained in:
cgfhtw
2025-03-24 13:38:49 +01:00
parent f6352211f2
commit 9f06fbcf93
142 changed files with 4713 additions and 785 deletions
@@ -3,6 +3,8 @@ import AcceptDenyUpdate from "./AcceptDenyUpdate.js";
import Alert from "../../../components/Bootstrap/Alert.js";
import Loading from "../../../components/Loader.js";
import ApiProfilUpdate from '../../../api/factory/profilUpdate.js';
const sortProfilUpdates = (ele1, ele2, thisPointer) => {
let result = 0;
if (ele1.status === thisPointer.profilUpdateStates["Pending"]) {
@@ -127,7 +129,8 @@ export default {
"acceptUpdate"
)}`,
action: (e, column) => {
this.$fhcApi.factory.profilUpdate.acceptProfilRequest(column.getData())
this.$api
.call(ApiProfilUpdate.acceptProfilRequest(column.getData()))
.then((res) => {
this.$refs.UpdatesTable.tabulator.setData();
})
@@ -143,7 +146,8 @@ export default {
"denyUpdate"
)}`,
action: (e, column) => {
this.$fhcApi.factory.profilUpdate.denyProfilRequest(column.getData())
this.$api
.call(ApiProfilUpdate.denyProfilRequest(column.getData()))
.then((res) => {
this.$refs.UpdatesTable.tabulator.setData();
})
@@ -296,7 +300,8 @@ export default {
},
methods: {
denyProfilUpdate: function (data) {
this.$fhcApi.factory.profilUpdate.denyProfilRequest(data)
this.$api
.call(ApiProfilUpdate.denyProfilRequest(data))
.then((res) => {
// block when the request was successful
})
@@ -306,7 +311,8 @@ export default {
});
},
acceptProfilUpdate: function (data) {
this.$fhcApi.factory.profilUpdate.acceptProfilRequest(data)
this.$api
.call(ApiProfilUpdate.acceptProfilRequest(data))
.then((res) => {
// block when the request was successful
})