diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html
index 0b8a1051..79f9b241 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html
+++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.html
@@ -67,6 +67,7 @@
(checkUser)="onCheckUser($event)"
(openProfile)="onClickOpenProfile($event)"
(click)="onToggleUser(userInfo)"
+ (contextmenu)="onContextMenuOrgUser($event, userInfo)"
>
@@ -88,6 +89,7 @@
(checkUser)="onCheckUser($event)"
(openProfile)="onClickOpenProfile($event)"
(click)="onToggleUser(userInfo)"
+ (contextmenu)="onContextMenuOrgUser($event, userInfo)"
>
@@ -138,3 +140,34 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts
index d149dbdf..ad5f6e68 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts
+++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/organization.component.ts
@@ -32,7 +32,13 @@ import * as SyncStore from '@app/store/messenger/sync';
import * as ChatStore from '@app/store/messenger/chat';
import * as StatusStore from '@app/store/messenger/status';
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
-import { LoginInfo, KEY_LOGIN_INFO, KEY_VER_INFO } from '@app/types';
+import {
+ LoginInfo,
+ KEY_LOGIN_INFO,
+ KEY_VER_INFO,
+ EnvironmentsInfo,
+ KEY_ENVIRONMENTS_INFO
+} from '@app/types';
import { take, map, tap, delay, catchError } from 'rxjs/operators';
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
import {
@@ -44,6 +50,12 @@ import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
import { Company } from '@ucap-webmessenger/api-external';
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
+import { MatMenuTrigger } from '@angular/material';
+import {
+ MessageWriteDialogComponent,
+ MessageWriteDialogResult,
+ MessageWriteDialogData
+} from '../../dialogs/message/message-write.dialog.component';
@Component({
selector: 'app-layout-chat-left-sidenav-organization',
@@ -53,6 +65,10 @@ import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
})
export class OrganizationComponent
implements OnInit, OnDestroy, AfterViewChecked {
+ @ViewChild('orgUserContextMenuTrigger', { static: true })
+ orgUserContextMenuTrigger: MatMenuTrigger;
+ orgUserContextMenuPosition = { x: '0px', y: '0px' };
+
@Input()
showTitle = true;
@Input()
@@ -106,6 +122,7 @@ export class OrganizationComponent
loginInfo: LoginInfo;
loginRes: LoginResponse;
sessionVerinfo: VersionInfo2Response;
+ environmentsInfo: EnvironmentsInfo;
isShowSearch = false;
searchUserInfos: UserInfoSS[] = [];
@@ -124,6 +141,9 @@ export class OrganizationComponent
this.sessionVerinfo = this.sessionStorageService.get(
KEY_VER_INFO
);
+ this.environmentsInfo = this.sessionStorageService.get(
+ KEY_ENVIRONMENTS_INFO
+ );
}
ngOnInit() {
@@ -440,4 +460,55 @@ export class OrganizationComponent
onClickConference() {
this.logger.debug('onClickConference', this.selectedUserList);
}
+
+ onContextMenuOrgUser(
+ event: MouseEvent,
+ userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN
+ ) {
+ event.preventDefault();
+ event.stopPropagation();
+
+ this.orgUserContextMenuPosition.x = event.clientX + 'px';
+ this.orgUserContextMenuPosition.y = event.clientY + 'px';
+ this.orgUserContextMenuTrigger.menu.focusFirstItem('mouse');
+ this.orgUserContextMenuTrigger.menuData = { userInfo };
+ this.orgUserContextMenuTrigger.openMenu();
+ }
+
+ async onClickContextMenu(type: string, userInfo: UserInfo) {
+ console.log(userInfo);
+ switch (type) {
+ case 'CALL_LINE':
+ {
+ }
+ break;
+ case 'CALL_MOBILE':
+ {
+ }
+ break;
+ case 'SEND_MESSAGE':
+ {
+ this.dialogService.open<
+ MessageWriteDialogComponent,
+ MessageWriteDialogData,
+ MessageWriteDialogResult
+ >(MessageWriteDialogComponent, {
+ width: '600px',
+ height: '600px',
+ disableClose: true,
+ hasBackdrop: false,
+ data: {
+ loginRes: this.loginRes,
+ environmentsInfo: this.environmentsInfo,
+ receiverList: [userInfo]
+ }
+ });
+ }
+ break;
+ case 'SEND_SMS':
+ {
+ }
+ break;
+ }
+ }
}
diff --git a/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts b/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts
index 65b68e40..2feb3a2c 100644
--- a/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts
+++ b/projects/ucap-webmessenger-app/src/app/resolvers/messenger.resolver.ts
@@ -119,7 +119,6 @@ export class AppMessengerResolver implements Resolve {
})
.pipe(
map(response => {
- console.log(response);
if (response.statusCode === StatusCode.Success) {
this.sessionStorageService.set<
UrlInfoResponse | DaesangUrlInfoResponse