16291 crm activity
This commit is contained in:
+40
-14
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user