Skip to content
Snippets Groups Projects
Commit a43ea8cf authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

Merge branch 'fix/20572/21.03' into '21.03'

[20572] Contact de mail avec la valeur Null (21.03)

See merge request maarch/MaarchCourrier!673
parents e5d84bfc 76fbf55f
No related branches found
No related tags found
No related merge requests found
......@@ -636,8 +636,12 @@ export class MailEditorComponent implements OnInit, OnDestroy {
data = data.filter((contact: any) => !this.functions.empty(contact.email) || contact.type === 'contactGroup').map((contact: any) => {
let label: string;
if (contact.type === 'user' || contact.type === 'contact') {
if (!this.functions.empty(contact.firstname) || !this.functions.empty(contact.lastname)) {
label = contact.firstname + ' ' + contact.lastname;
if (!this.functions.empty(contact.firstname) && !this.functions.empty(contact.lastname)) {
label = `${contact.firstname} ${contact.lastname}`;
} else if (this.functions.empty(contact.firstname) && !this.functions.empty(contact.lastname)) {
label = contact.lastname;
} else if (!this.functions.empty(contact.firstname) && this.functions.empty(contact.lastname)) {
label = contact.firstname;
} else {
label = contact.company;
}
......
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