Commit 96195e97 authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FIX #18927 TIME 0:35 send signed attachment after draft

parent ad03e55e
......@@ -921,7 +921,12 @@ export class MailEditorComponent implements OnInit, OnDestroy {
});
}
saveDraft() {
async saveDraft() {
for (let i = 0; i < this.emailAttach.attachments.length; i++) {
await this.getSignedAttachment(this.emailAttach.attachments[i].id);
this.emailAttach.attachments[i].id = this.signedAttachId !== null ? this.signedAttachId : this.emailAttach.attachments[i].id;
this.emailAttach.attachments[i].original = false;
}
return new Promise(async (resolve) => {
if (!this.readonly && !this.functions.empty(tinymce.get('emailSignature').getContent())) {
this.emailStatus = 'DRAFT';
......@@ -988,11 +993,6 @@ export class MailEditorComponent implements OnInit, OnDestroy {
}
}
});
objAttach.attachments.forEach(async (element: any, index: number) => {
await this.getSignedAttachment(element.id);
objAttach.attachments[index].id = this.signedAttachId !== null ? this.signedAttachId : element.id;
objAttach.attachments[index].original = false;
});
const formatSender = {
email: this.currentSender.email,
entityId: !this.functions.empty(this.currentSender.entityId) ? this.currentSender.entityId : null
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment