From b22147765baa96dbb8b650597db7996c4eaba337 Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Wed, 21 Oct 2020 12:01:27 +0200 Subject: [PATCH] FEAT #15145 TIME 0:20 add note field --- .../contact/page/form/contacts-form.component.ts | 11 +++++++++++ .../contact-detail/contact-detail.component.html | 6 ++++++ .../contact-detail/contact-detail.component.ts | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/frontend/app/administration/contact/page/form/contacts-form.component.ts b/src/frontend/app/administration/contact/page/form/contacts-form.component.ts index 3e6a01993af..d2f59882d85 100644 --- a/src/frontend/app/administration/contact/page/form/contacts-form.component.ts +++ b/src/frontend/app/administration/contact/page/form/contacts-form.component.ts @@ -164,6 +164,17 @@ export class ContactsFormComponent implements OnInit { filling: false, values: [] }, + { + id: 'notes', + unit: 'mainInfo', + label: this.translate.instant('lang.note'), + type: 'string', + control: new FormControl(), + required: false, + display: false, + filling: false, + values: [] + }, { id: 'addressAdditional1', unit: 'address', diff --git a/src/frontend/app/contact/contact-detail/contact-detail.component.html b/src/frontend/app/contact/contact-detail/contact-detail.component.html index 2c01df78199..b785a2968f5 100755 --- a/src/frontend/app/contact/contact-detail/contact-detail.component.html +++ b/src/frontend/app/contact/contact-detail/contact-detail.component.html @@ -84,6 +84,12 @@ </mat-panel-title> </mat-expansion-panel-header> <mat-list> + <mat-list-item class="contact-item" *ngIf="!functionsService.empty(contact.notes)" + [title]="this.translate.instant('lang.note')"> + <mat-icon mat-list-icon class="contact-group far fa-sticky-note"></mat-icon> + <p mat-line class="contact-content" [class.newData]="isNewValue('notes')" [title]="contact.notes"> + {{contact.notes}} </p> + </mat-list-item> <mat-list-item class="contact-item" *ngIf="!functionsService.empty(contact.communicationMeans)" [title]="this.translate.instant('lang.communicationMean')"> <mat-icon mat-list-icon class="contact-group fas fa-hashtag"></mat-icon> diff --git a/src/frontend/app/contact/contact-detail/contact-detail.component.ts b/src/frontend/app/contact/contact-detail/contact-detail.component.ts index 3a351c90b47..29712f1810c 100644 --- a/src/frontend/app/contact/contact-detail/contact-detail.component.ts +++ b/src/frontend/app/contact/contact-detail/contact-detail.component.ts @@ -151,7 +151,7 @@ export class ContactDetailComponent implements OnInit { emptyOtherInfo(contact: any) { - if (contact.type === 'contact' && (!this.functionsService.empty(contact.communicationMeans) || !this.functionsService.empty(contact.customFields))) { + if (contact.type === 'contact' && (!this.functionsService.empty(contact.notes) || !this.functionsService.empty(contact.communicationMeans) || !this.functionsService.empty(contact.customFields))) { return false; } else { return true; -- GitLab