diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/main-contents/organization.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/main-contents/organization.component.html index 00112814..4635478e 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/main-contents/organization.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/main-contents/organization.component.html @@ -30,6 +30,7 @@ {{ 'search.fieldCompany' | translate }} {{ 'search.fieldGrade' | translate }} {{ 'search.fieldWorkPlace' | translate }} {{ 'presence.label' | translate }} 0) { - isMulti = true; - const data = !!isMulti + const data = !isMulti ? this.originDepartmentUserInfoList : this.departmentUserInfoList; + isMulti = true; this.departmentUserInfoList = data.filter(userInfo => { if ( @@ -658,10 +658,10 @@ export class OrganizationComponent implements OnInit, OnDestroy { }); } if (!!grades && grades.length > 0) { - isMulti = true; - const data = !!isMulti + const data = !isMulti ? this.originDepartmentUserInfoList : this.departmentUserInfoList; + isMulti = true; this.departmentUserInfoList = data.filter(userInfo => { if ( @@ -685,10 +685,10 @@ export class OrganizationComponent implements OnInit, OnDestroy { }); } if (!!workplaces && workplaces.length > 0) { - isMulti = true; - const data = !!isMulti + const data = !isMulti ? this.originDepartmentUserInfoList : this.departmentUserInfoList; + isMulti = true; this.departmentUserInfoList = data.filter(userInfo => { if ( @@ -702,10 +702,10 @@ export class OrganizationComponent implements OnInit, OnDestroy { }); } if (!!presences && presences.length > 0) { - isMulti = true; - const data = !!isMulti + const data = !isMulti ? this.originDepartmentUserInfoList : this.departmentUserInfoList; + isMulti = true; this.departmentUserInfoList = data.filter(userInfo => { const userPresences = this.presenceSubject.value.filter( diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.html index 6111ac70..64f375ac 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.html @@ -50,6 +50,7 @@ {{ 'search.fieldCompany' | translate }} {{ 'search.fieldGrade' | translate }} {{ 'search.fieldWorkPlace' | translate }} {{ 'presence.label' | translate }} 0) { - isMulti = true; - const data = !!isMulti + const data = !isMulti ? this.originDepartmentUserInfoList : this.departmentUserInfoList; + isMulti = true; this.departmentUserInfoList = data.filter(userInfo => { if ( @@ -660,10 +660,10 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy { }); } if (!!grades && grades.length > 0) { - isMulti = true; - const data = !!isMulti + const data = !isMulti ? this.originDepartmentUserInfoList : this.departmentUserInfoList; + isMulti = true; this.departmentUserInfoList = data.filter(userInfo => { if ( @@ -687,10 +687,10 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy { }); } if (!!workplaces && workplaces.length > 0) { - isMulti = true; - const data = !!isMulti + const data = !isMulti ? this.originDepartmentUserInfoList : this.departmentUserInfoList; + isMulti = true; this.departmentUserInfoList = data.filter(userInfo => { if ( @@ -704,10 +704,10 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy { }); } if (!!presences && presences.length > 0) { - isMulti = true; - const data = !!isMulti + const data = !isMulti ? this.originDepartmentUserInfoList : this.departmentUserInfoList; + isMulti = true; this.departmentUserInfoList = data.filter(userInfo => { const userPresences = this.presenceSubject.value.filter(