Interface SAV
This commit is contained in:
@@ -45,7 +45,7 @@ export default {
|
||||
|
||||
return response.json();
|
||||
},
|
||||
async saveMessage(id, quill, replyOption) {
|
||||
async saveMessage(id, quill, attachedDoc, replyOption) {
|
||||
const apiUrl = '/App/api.php?prj=pharmamp&controller=TicketingController&method=saveMessage'
|
||||
if (import.meta.env.DEV) {
|
||||
console.log(apiUrl)
|
||||
@@ -54,6 +54,13 @@ export default {
|
||||
const postData = new FormData();
|
||||
postData.append("id_business", id);
|
||||
postData.append("quill", quill);
|
||||
|
||||
if (attachedDoc !== null) {
|
||||
for (const file of attachedDoc.files) {
|
||||
postData.append('attached_doc', file, file.name)
|
||||
}
|
||||
}
|
||||
|
||||
postData.append("data", JSON.stringify(replyOption));
|
||||
|
||||
const response = await fetch(apiUrl, {
|
||||
|
||||
Reference in New Issue
Block a user