Commit b36cc68b authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

FEAT #15261 TIME 0:03 assign the existing sender to current Sender

parent 6498d2ed
......@@ -452,9 +452,8 @@ export class SentResourcePageComponent implements OnInit {
setDefaultInfo() {
this.emailsubject = `[${this.resourceData.chrono}] ${this.resourceData.subject}`;
this.emailsubject = this.emailsubject.substring(0, 70);
const withEmptyId = this.availableSenders.filter((element) => element.entityId === null);
if (this.headerService.user.entities.length === 0) {
this.currentSender = withEmptyId[0];
this.currentSender = this.availableSenders[0];
} else {
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];
}
......
Supports Markdown
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