changes
This commit is contained in:
@@ -198,15 +198,17 @@ const handleSave = async () => {
|
||||
};
|
||||
|
||||
const handleCreateNew = async () => {
|
||||
const postTemplateUrl = `${apiUrl}/Email_Template/`;
|
||||
try {
|
||||
loadingCreate.value = true;
|
||||
const newTemplateData = {
|
||||
...props.data,
|
||||
name: templateName.value,
|
||||
};
|
||||
const response = await axios.post(postTemplateUrl, newTemplateData);
|
||||
if (response.status === 201 || response.status === 200) {
|
||||
const res = await $insertapi("Email_Template", {
|
||||
data: newTemplateData,
|
||||
notify: false,
|
||||
});
|
||||
if (res !== "error") {
|
||||
$snackbar("Template created successfully");
|
||||
if (props.onClose) props.onClose();
|
||||
emit("close");
|
||||
|
||||
Reference in New Issue
Block a user