edit signatory modal added

This commit was merged in pull request #35.
This commit is contained in:
victorAnumudu
2024-06-19 20:34:49 +01:00
parent c1c24db83d
commit 368ca22e62
26 changed files with 1309 additions and 37 deletions
@@ -47,6 +47,53 @@ export function postAuxEnd(uri:string, reqData:any):Promise<any> {
});
}
export function patchAuxEnd(uri:string, reqData:any):Promise<any> {
const endPoint = import.meta.env.VITE_APP_USER_ENDPOINT + uri;
const formData = new FormData();
for (let value in reqData) {
formData.append(value, reqData[value]);
}
return axios.patch(endPoint, formData)
.then((response) => {
console.log(response);
// if (response.data.internal_return == "-9999") {
// localStorage.clear();
// window.location.href = `/login?sessionExpired=true`;
// }
return response;
})
.catch((error) => {
if (error.response) {
//response status is an error code
console.log(
"ERROR-------------------------------------------------------"
);
console.log(error.response.status);
console.log(
"ERROR-------------------------------------------------------"
);
} else if (error.request) {
//response not received though the request was sent
console.log(
"ERROR2-------------------------------------------------------"
);
console.log(error?.request);
console.log(
"ERROR2-------------------------------------------------------"
);
} else {
//an error occurred when setting up the request
console.log(
"ERROR3-------------------------------------------------------"
);
console.log(error);
console.log(
"ERROR3-------------------------------------------------------"
);
}
});
}
export function getAuxEnd(uri: string, reqData?: any): Promise<any> {
const endPoint = import.meta.env.VITE_APP_USER_ENDPOINT + uri;