part-a fixes
This commit is contained in:
parent
c948502c26
commit
48a01ac744
|
|
@ -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 = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue