This commit is contained in:
Viet An
2026-06-04 13:57:27 +07:00
parent 2981d9790a
commit 2a1f85c2af
44 changed files with 99 additions and 102 deletions

View File

@@ -176,7 +176,7 @@ const handleSave = async () => {
...props.data,
name: templateName.value,
};
response = await $insertapi("Email_Template", insertData);
response = await $insertapi("Email_Template", { data: insertData });
}
if (response && response !== "error") {

View File

@@ -533,16 +533,14 @@ const handleSendEmail = async () => {
});
}
const response = await nuxtApp.$insertapi(
"sendemail",
{
const response = await nuxtApp.$insertapi("sendemail", {
data: {
to: formData.value.content.receiver,
content: finalEmailHtml,
subject: formData.value.content.subject || "Thông báo từ BigDataTech",
},
undefined,
false,
);
notify: false,
});
if (response !== null) {
$snackbar(`Email sent successfully! Sent to ${formData.value.content.receiver.split(";").length} recipient(s)`);

View File

@@ -173,16 +173,14 @@ const handleSendEmail = async () => {
});
}
const response = await $insertapi(
"sendemail",
{
const response = await $insertapi("sendemail", {
data: {
to: paymentScheduleItem.value?.txn_detail__transaction__customer__email,
content: finalEmailHtml,
subject: replaceTemplateVars(templateProps.value.content.subject) || "Thông báo từ Utopia Villas & Resort",
},
undefined,
false,
);
notify: false,
});
if (response !== null) {
isLoading.value = false;
$snackbar(