16291 crm activity

This commit is contained in:
2025-05-27 18:05:54 +01:00
parent 7aa7e2819a
commit 87812a6bf2
2 changed files with 228 additions and 14 deletions
+40 -14
View File
@@ -1896,22 +1896,30 @@ export const sendEmail = async (
// personalisation,
// reference
// );
var queryUrl = "/api/email/notify";
// var queryUrl = "/api/email/notify";
var config = {
method: "post",
url: queryUrl,
data: mailData,
};
// var config = {
// method: "post",
// url: queryUrl,
// data: mailData,
// };
return axios(config)
.then((res) => {
//console.log("posted ", res.data);
return res.data;
})
.catch((error) => {
consoleLogger(error);
});
// return axios(config)
// .then((res) => {
// //console.log("posted ", res.data);
// return res.data;
// })
// .catch((error) => {
// consoleLogger(error);
// });
try {
const response = await axios.post("/api/email/notify", mailData);
return response.data;
} catch (error) {
consoleLogger(error); // Optional custom logging
throw error; // ✅ Ensure the calling function sees the error
}
};
export const getNotice = () => {
@@ -2117,3 +2125,21 @@ export const getAddressSearch = async (searchString) => {
return ErrResponse;
});
};
export const createCRMTask = async (formValues) => {
var queryUrl = "/api/endpoint/createcrmtask_api";
var data = formValues;
var config = {
method: "post",
url: queryUrl,
data: data,
};
try {
const res = await axios(config);
return res.data;
} catch (error) {
consoleLogger(error);
}
};