Skip to content
Snippets Groups Projects
Commit bf5aa128 authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FEAT #15261 TIME 1:05 Send an email with a user without entities

parent 77b140a8
No related branches found
No related tags found
No related merge requests found
...@@ -452,11 +452,14 @@ export class SentResourcePageComponent implements OnInit { ...@@ -452,11 +452,14 @@ export class SentResourcePageComponent implements OnInit {
setDefaultInfo() { setDefaultInfo() {
this.emailsubject = `[${this.resourceData.chrono}] ${this.resourceData.subject}`; this.emailsubject = `[${this.resourceData.chrono}] ${this.resourceData.subject}`;
this.emailsubject = this.emailsubject.substring(0, 70); this.emailsubject = this.emailsubject.substring(0, 70);
this.currentSender = this.availableSenders.filter(sender => sender.entityId === this.headerService.user.entities[0].id).length > 0 ? this.availableSenders.filter(sender => sender.entityId === this.headerService.user.entities[0].id)[0] : this.availableSenders[0]; const withEmptyId = this.availableSenders.filter((element) => element.entityId === null);
if (!this.functions.empty(this.resourceData.senders)) { if (withEmptyId.length === 0) {
this.resourceData.senders.forEach((sender: any) => { this.currentSender = this.availableSenders.filter(sender => sender.entityId === this.headerService.user.entities[0].id).length > 0 ? this.availableSenders.filter(sender => sender.entityId === this.headerService.user.entities[0].id)[0] : this.availableSenders[0];
this.setSender(sender.id); if (!this.functions.empty(this.resourceData.senders)) {
}); this.resourceData.senders.forEach((sender: any) => {
this.setSender(sender.id);
});
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment