From beadbfb3c33acff48c5eea69c71c97a9139e524a Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Wed, 21 Oct 2020 10:01:27 +0000 Subject: [PATCH] FEAT #15145 TIME 0:20 add note field (cherry picked from commit b22147765baa96dbb8b650597db7996c4eaba337) --- .../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 d0cf4757061..e3c67d12f20 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 @@ -161,6 +161,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 ba3150c0b37..ce41c893c12 100644 --- 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]="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 be6bcab5851..f4e0c0a9981 100644 --- a/src/frontend/app/contact/contact-detail/contact-detail.component.ts +++ b/src/frontend/app/contact/contact-detail/contact-detail.component.ts @@ -150,7 +150,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