diff --git a/apps/maarch_entreprise/Views/contacts-group-administration.component.html b/apps/maarch_entreprise/Views/contacts-group-administration.component.html index 1317e677a33adae54cd5f75f1995078a8daa18f3..b419358ea92b858da4b3c647f1b0ca6a7d3b566b 100755 --- a/apps/maarch_entreprise/Views/contacts-group-administration.component.html +++ b/apps/maarch_entreprise/Views/contacts-group-administration.component.html @@ -123,7 +123,7 @@ <mat-sidenav *ngIf="!creationMode" #snav2 [mode]="mobileQuery.matches ? 'over' : 'side'" [fixedInViewport]="mobileQuery.matches" fixedTopGap="56" position='end' [opened]="mobileQuery.matches ? false : true" style="overflow-x:hidden;width:40%;"> <mat-list> - <h3 mat-subheader>{{contactsGroup.nbContacts}} {{lang.relatedContacts}} : </h3> + <h3 mat-subheader>{{nbContact}} {{lang.relatedContacts}} : </h3> </mat-list> <div class="row" style="margin:0px;"> <div class="col-md-6 col-xs-6"> diff --git a/apps/maarch_entreprise/js/angular/app/administration/contacts-group-administration.component.ts b/apps/maarch_entreprise/js/angular/app/administration/contacts-group-administration.component.ts index 76dcd37e934cdb9f050b94f9e74db7735ac20026..18fb93c242300f33bf7dcde2e91971bfca02f8bc 100755 --- a/apps/maarch_entreprise/js/angular/app/administration/contacts-group-administration.component.ts +++ b/apps/maarch_entreprise/js/angular/app/administration/contacts-group-administration.component.ts @@ -132,6 +132,7 @@ export class ContactsGroupAdministrationComponent implements OnInit { this.http.post(this.coreUrl + 'rest/contactsGroups/' + this.contactsGroup.id + '/contacts', { 'contacts': this.selection.selected }) .subscribe((data: any) => { this.notify.success(this.lang.contactAdded); + this.nbContact = this.nbContact + this.selection.selected.length; this.selection.clear(); elem.textContent = this.lang.add; this.contactsGroup = data.contactsGroup; @@ -181,7 +182,7 @@ export class ContactsGroupAdministrationComponent implements OnInit { this.contactsGroup.contacts[row] = this.contactsGroup.contacts[lastElement]; this.contactsGroup.contacts[row].position = row; this.contactsGroup.contacts.splice(lastElement, 1); - + this.nbContact = this.nbContact - 1; this.dataSourceAdded = new MatTableDataSource(this.contactsGroup.contacts); this.dataSourceAdded.paginator = this.paginatorAdded; this.dataSourceAdded.sort = this.sortAdded;