part-a fixes

This commit is contained in:
yokesh22 2024-07-16 18:26:22 +05:30
parent c948502c26
commit 48a01ac744
1 changed files with 33 additions and 0 deletions

View File

@ -94,6 +94,39 @@ const CustomQueryExecutorCard = ({
} }
}; };
const markAsPartc = async () => {
console.log("update markAsPartc");
const payload = {
data,
};
try {
setIsLoading(true);
const response = await fetch(
`${import.meta.env.VITE_REACT_APP_BACKEND_URL}/markAsPartc`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(payload),
}
);
setIsLoading(false);
const responseData = await response.json();
if (responseData.status === "success") {
console.log("Updation successfull ....");
const updatedData = { ...dataValue, is_backpage: 1 };
// console.log("Data ===== ", updatedData);
setDataValue(updatedData);
// toast.success("Record Marked as Backpage ! ....");
} else {
throw new Error(responseData?.message);
}
} catch (error) {
throw new Error(error);
}
};
const updatePartAFront = async () => { const updatePartAFront = async () => {
console.log("update front"); console.log("update front");
const payload = { const payload = {