diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts index 7895153b..9c9a168f 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-side.component.ts @@ -17,7 +17,7 @@ import { CreateChatDialogData, CreateChatDialogResult } from '@app/layouts/messenger/dialogs/chat/create-chat.dialog.component'; -import { Subscription, of, Observable } from 'rxjs'; +import { Subscription, Observable } from 'rxjs'; import { Store, select } from '@ngrx/store'; import * as AppStore from '@app/store'; @@ -35,9 +35,8 @@ import { LoginResponse } from '@ucap-webmessenger/protocol-authentication'; import { OpenProfileOptions } from '@ucap-webmessenger/protocol-buddy'; import { SessionStorageService } from '@ucap-webmessenger/web-storage'; import { VersionInfo2Response } from '@ucap-webmessenger/api-public'; -import { MessageApiService, MessageType } from '@ucap-webmessenger/api-message'; -import { DeviceType } from '@ucap-webmessenger/core'; -import { map, catchError, tap } from 'rxjs/operators'; +import { MessageType } from '@ucap-webmessenger/api-message'; +import { tap } from 'rxjs/operators'; import { MessageWriteDialogComponent, MessageWriteDialogResult, @@ -46,8 +45,7 @@ import { import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO, - KEY_VER_INFO, - KEY_LOGIN_RES_INFO + KEY_VER_INFO } from '@app/types'; import { MessageBoxComponent } from './left-sidenav/message.component'; import { environment } from '../../../../environments/environment'; @@ -70,7 +68,7 @@ export enum MainMenu { export class LeftSideComponent implements OnInit, OnDestroy { @Output() openProfile = new EventEmitter<{ - userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; + userSeq: number; openProfileOptions?: OpenProfileOptions; }>(); @Output() @@ -264,11 +262,11 @@ export class LeftSideComponent implements OnInit, OnDestroy { } onClickOpenProfile(params: { - userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; + userSeq: number; openProfileOptions?: OpenProfileOptions; }) { this.openProfile.emit({ - userInfo: params.userInfo, + userSeq: params.userSeq, openProfileOptions: params.openProfileOptions }); } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts index 0650f8c1..44d7729e 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts @@ -86,7 +86,7 @@ export class GroupComponent implements OnInit, OnDestroy { newGroupAndMember = new EventEmitter(); @Output() openProfile = new EventEmitter<{ - userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; + userSeq: number; openProfileOptions?: OpenProfileOptions; }>(); @@ -432,7 +432,7 @@ export class GroupComponent implements OnInit, OnDestroy { switch (menuType) { case 'VIEW_PROFILE': this.openProfile.emit({ - userInfo, + userSeq: userInfo.seq, openProfileOptions: { useDelBuddybutton: !!group && @@ -570,11 +570,11 @@ export class GroupComponent implements OnInit, OnDestroy { } onClickOpenProfile( - userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN, + userSeq: number, group: GroupDetailData ) { this.openProfile.emit({ - userInfo, + userSeq, openProfileOptions: { useDelBuddybutton: !!group && diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index 371591f9..a6ce6951 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -75,7 +75,6 @@ import { CommonApiService, FileTalkSaveRequest, FileTalkSaveResponse, - TranslationReqRequest, TranslationSaveRequest, TranslationSaveResponse } from '@ucap-webmessenger/api-common'; @@ -117,7 +116,9 @@ import { }) export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { @Output() - openProfile = new EventEmitter<{ userInfo: UserInfo }>(); + openProfile = new EventEmitter<{ + userSeq: number; + }>(); @ViewChild('chatForm', { static: false }) private chatForm: UCapUiChatFormComponent; @@ -1322,7 +1323,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { } } - onClickOpenProfile(userInfo: UserInfo) { + onClickOpenProfile(userSeq: number) { if ( this.roomInfo.roomType !== RoomType.Allim && this.roomInfo.roomType !== RoomType.Bot && @@ -1330,7 +1331,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { this.roomInfo.roomType !== RoomType.Allim_Elephant && this.roomInfo.roomType !== RoomType.Allim_TMS ) { - this.openProfile.emit({ userInfo }); + this.openProfile.emit({ userSeq }); } } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.ts index 9372c82d..26f9915b 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer.component.ts @@ -1,11 +1,5 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { RightDrawer } from '@app/types'; -import { UserInfo } from '@ucap-webmessenger/protocol-room'; -import { - UserInfoSS, - UserInfoF, - UserInfoDN -} from '@ucap-webmessenger/protocol-query'; @Component({ selector: 'app-layout-messenger-right-drawer', @@ -18,7 +12,7 @@ export class RightDrawerComponent implements OnInit { @Output() openProfile = new EventEmitter<{ - userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; + userSeq: number; }>(); @Output() closeRightDrawer = new EventEmitter(); @@ -29,8 +23,8 @@ export class RightDrawerComponent implements OnInit { ngOnInit() {} - onClickOpenProfile(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) { - this.openProfile.emit({ userInfo }); + onClickOpenProfile(userSeq: number) { + this.openProfile.emit({ userSeq }); } onClickClose() { diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.html index f658a053..9850525d 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.html @@ -6,7 +6,7 @@ [presence]="getStatusBulkInfo(userInfo) | async" [sessionVerinfo]="sessionVerinfo" (contextmenu)="onContextMenuRoomUser($event, userInfo)" - (openProfile)="onClickOpenProfile($event)" + (openProfile)="onClickOpenProfile(userInfo.seq)" > diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.ts index 48f23e86..8703df65 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/right-drawer/room-user-list.component.ts @@ -49,7 +49,7 @@ import { MatMenuTrigger, MatDialog } from '@angular/material'; }) export class RoomUserListComponent implements OnInit, OnDestroy { @Output() - openProfile = new EventEmitter(); + openProfile = new EventEmitter(); @ViewChild('roomUserContextMenuTrigger', { static: true }) roomUserContextMenuTrigger: MatMenuTrigger; @@ -131,8 +131,8 @@ export class RoomUserListComponent implements OnInit, OnDestroy { ); } - onClickOpenProfile(userInfo: UserInfo) { - this.openProfile.emit(userInfo); + onClickOpenProfile(userSeq: number) { + this.openProfile.emit(userSeq); } async onClickAddMember() { diff --git a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts index 738aa42b..59fe0492 100644 --- a/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts +++ b/projects/ucap-webmessenger-app/src/app/pages/messenger/components/main.page.component.ts @@ -16,12 +16,6 @@ import * as MessageStore from '@app/store/messenger/message'; import { Observable, Subscription, of } from 'rxjs'; import { UCAP_NATIVE_SERVICE, NativeService } from '@ucap-webmessenger/native'; -import { UserInfo } from '@ucap-webmessenger/protocol-sync'; -import { - UserInfoSS, - UserInfoF, - UserInfoDN -} from '@ucap-webmessenger/protocol-query'; import { StatusProtocolService } from '@ucap-webmessenger/protocol-status'; import { StatusType, StatusCode } from '@ucap-webmessenger/core'; import { @@ -211,14 +205,17 @@ export class MainPageComponent implements OnInit, OnDestroy { } onClickOpenProfile(params: { - userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN; + userSeq: number; openProfileOptions?: OpenProfileOptions; }) { + if (!params.userSeq || params.userSeq < 0) { + return; + } // [GROUP] // this.queryProtocolService // .dataUser({ // divCd: 'OPENPROF', - // seq: userInfo.seq, + // seq: params.userSeq, // senderCompanyCode: this.loginRes.userInfo.companyCode, // senderEmployeeType: this.loginRes.userInfo.employeeType // }) @@ -244,7 +241,7 @@ export class MainPageComponent implements OnInit, OnDestroy { this.daesangProtocolService .dataUserDaesang({ divCd: 'OPENPROF', - seq: params.userInfo.seq, + seq: params.userSeq, senderCompanyCode: this.loginRes.userInfo.companyCode, senderEmployeeType: this.loginRes.userInfo.employeeType }) diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html index faf8c637..1fdd8af4 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/messages.component.html @@ -120,7 +120,7 @@ [base]="profileImageRoot" [path]="getUserProfile(message.senderSeq)" [default]="'assets/images/img_nophoto_50.png'" - (click)="onClickOpenProfile($event, getUerInfo(message.senderSeq))" + (click)="onClickOpenProfile($event, message.senderSeq)" />