merge
This commit is contained in:
commit
78b9fbdd4b
@ -36,11 +36,8 @@
|
|||||||
</mat-menu>
|
</mat-menu>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ucap-group-expansion-panel
|
<ucap-group-expansion-panel #groupExpansionPanel [groupBuddyList]="groupBuddyList$ | async"
|
||||||
#groupExpansionPanel
|
[favoritBuddyList]="favoritBuddyList$ | async" (selectBuddy)="onSelectBuddy($event)">
|
||||||
[groupBuddyList]="groupBuddyList$ | async"
|
|
||||||
(selectBuddy)="onSelectBuddy($event)"
|
|
||||||
>
|
|
||||||
</ucap-group-expansion-panel>
|
</ucap-group-expansion-panel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,6 +37,7 @@ export class GroupComponent implements OnInit {
|
|||||||
groupBuddyList$: Observable<
|
groupBuddyList$: Observable<
|
||||||
{ group: GroupDetailData; buddyList: UserInfo[] }[]
|
{ group: GroupDetailData; buddyList: UserInfo[] }[]
|
||||||
>;
|
>;
|
||||||
|
favoritBuddyList$: Observable<UserInfo[]>;
|
||||||
companyList$: Observable<Company[]>;
|
companyList$: Observable<Company[]>;
|
||||||
companyCode: string;
|
companyCode: string;
|
||||||
|
|
||||||
@ -92,6 +93,16 @@ export class GroupComponent implements OnInit {
|
|||||||
return groupBuddyList;
|
return groupBuddyList;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.favoritBuddyList$ = this.store
|
||||||
|
.pipe(select(AppStore.MessengerSelector.SyncSelector.selectAllBuddy2))
|
||||||
|
.pipe(
|
||||||
|
map(buddyInfoList => {
|
||||||
|
return buddyInfoList
|
||||||
|
.filter(buddy => buddy.isFavorit)
|
||||||
|
.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async onClickGroupMenu(menuType: string) {
|
async onClickGroupMenu(menuType: string) {
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
<div class="oraganization-tab" fxLayout="column">
|
<div class="oraganization-tab" fxLayout="column">
|
||||||
<div class="oraganization-tab-tree" fxFlex="50" style="overflow: scroll">
|
<div class="oraganization-tab-tree" fxFlex="50" style="overflow: scroll">
|
||||||
<ucap-organization-tree
|
<ucap-organization-tree [oraganizationList]="departmentInfoList$ | async"
|
||||||
[oraganizationList]="departmentInfoList$ | async"
|
(selected)="onSelectedOrganization($event)"></ucap-organization-tree>
|
||||||
(selected)="onSelectedOrganization($event)"
|
|
||||||
></ucap-organization-tree>
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="50" style="overflow: scroll">
|
<div fxFlex="50" style="overflow: scroll">
|
||||||
<div *ngFor="let userInfo of selectedDepartmentUserInfoList$ | async">
|
<div>
|
||||||
{{ userInfo.name }}
|
(선택된부서명)
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<ucap-profile-user-list-item *ngFor="let userInfo of selectedDepartmentUserInfoList$ | async"
|
||||||
|
[userInfo]="userInfo" [checkable]="true">
|
||||||
|
</ucap-profile-user-list-item>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
(하단버튼영역)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,6 +28,8 @@ export class OrganizationComponent implements OnInit {
|
|||||||
selectedDepartmentUserInfoList$: Observable<UserInfoSS[]>;
|
selectedDepartmentUserInfoList$: Observable<UserInfoSS[]>;
|
||||||
selectedDepartmentStatus$: Observable<DeptUserResponse>;
|
selectedDepartmentStatus$: Observable<DeptUserResponse>;
|
||||||
|
|
||||||
|
loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private queryProtocolService: QueryProtocolService,
|
private queryProtocolService: QueryProtocolService,
|
||||||
@ -47,10 +49,6 @@ export class OrganizationComponent implements OnInit {
|
|||||||
this.selectedDepartmentStatus$ = this.store.pipe(
|
this.selectedDepartmentStatus$ = this.store.pipe(
|
||||||
select(AppStore.MessengerSelector.QuerySelector.selectedDepartmentStatus)
|
select(AppStore.MessengerSelector.QuerySelector.selectedDepartmentStatus)
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
onSelectedOrganization(deptInfo: DeptInfo) {
|
|
||||||
const loginInfo = this.sessionStorageService.get<LoginInfo>(KEY_LOGIN_INFO);
|
|
||||||
|
|
||||||
this.store
|
this.store
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -60,11 +58,33 @@ export class OrganizationComponent implements OnInit {
|
|||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
QueryStore.deptUser({
|
QueryStore.deptUser({
|
||||||
divCd: 'ORG',
|
divCd: 'ORG',
|
||||||
companyCode: loginInfo.companyCode,
|
companyCode: this.loginInfo.companyCode,
|
||||||
|
seq: loginRes.departmentCode,
|
||||||
|
search: '',
|
||||||
|
searchRange: DeptSearchType.All,
|
||||||
|
senderCompanyCode: this.loginInfo.companyCode,
|
||||||
|
senderEmployeeType: loginRes.userInfo.employeeType
|
||||||
|
})
|
||||||
|
);
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.subscribe();
|
||||||
|
}
|
||||||
|
|
||||||
|
onSelectedOrganization(deptInfo: DeptInfo) {
|
||||||
|
this.store
|
||||||
|
.pipe(
|
||||||
|
take(1),
|
||||||
|
select(AppStore.AccountSelector.AuthenticationSelector.loginRes),
|
||||||
|
map(loginRes => {
|
||||||
|
this.store.dispatch(
|
||||||
|
QueryStore.deptUser({
|
||||||
|
divCd: 'ORG',
|
||||||
|
companyCode: this.loginInfo.companyCode,
|
||||||
seq: deptInfo.seq,
|
seq: deptInfo.seq,
|
||||||
search: '',
|
search: '',
|
||||||
searchRange: DeptSearchType.All,
|
searchRange: DeptSearchType.All,
|
||||||
senderCompanyCode: loginInfo.companyCode,
|
senderCompanyCode: this.loginInfo.companyCode,
|
||||||
senderEmployeeType: loginRes.userInfo.employeeType
|
senderEmployeeType: loginRes.userInfo.employeeType
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
@ -5,23 +5,14 @@
|
|||||||
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
|
||||||
<div fxLayout="row" fxLayoutAlign="start center">
|
<div fxLayout="row" fxLayoutAlign="start center">
|
||||||
<!-- RESPONSIVE CHATS BUTTON-->
|
<!-- RESPONSIVE CHATS BUTTON-->
|
||||||
<button
|
<button mat-icon-button aria-label="chats button" fxHide.gt-md class="responsive-chats-button">
|
||||||
mat-icon-button
|
|
||||||
aria-label="chats button"
|
|
||||||
fxHide.gt-md
|
|
||||||
class="responsive-chats-button"
|
|
||||||
>
|
|
||||||
<mat-icon>chat</mat-icon>
|
<mat-icon>chat</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<!-- / RESPONSIVE CHATS BUTTON-->
|
<!-- / RESPONSIVE CHATS BUTTON-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button mat-icon-button [matMenuTriggerFor]="contactMenu" aria-label="more">
|
||||||
mat-icon-button
|
|
||||||
[matMenuTriggerFor]="contactMenu"
|
|
||||||
aria-label="more"
|
|
||||||
>
|
|
||||||
<mat-icon>more_vert</mat-icon>
|
<mat-icon>more_vert</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -34,17 +25,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</mat-toolbar>
|
</mat-toolbar>
|
||||||
<!-- / CHAT TOOLBAR -->
|
<!-- / CHAT TOOLBAR -->
|
||||||
<mat-progress-bar
|
<mat-progress-bar *ngIf="eventListProcessing$ | async" mode="indeterminate"></mat-progress-bar>
|
||||||
*ngIf="eventListProcessing$ | async"
|
|
||||||
mode="indeterminate"
|
|
||||||
></mat-progress-bar>
|
|
||||||
<!-- CHAT CONTENT -->
|
<!-- CHAT CONTENT -->
|
||||||
<div fxFlex="1 1 auto" class="chat-content" #messageBoxContainer>
|
<div fxFlex="1 1 auto" class="chat-content" #messageBoxContainer>
|
||||||
<!-- CHAT MESSAGES -->
|
<!-- CHAT MESSAGES -->
|
||||||
<ucap-chat-messages
|
<ucap-chat-messages [messages]="eventList$ | async" [userInfos]="userInfoList$ | async" [loginRes]="loginRes">
|
||||||
[messages]="eventList$ | async"
|
</ucap-chat-messages>
|
||||||
[loginRes]="loginRes"
|
|
||||||
></ucap-chat-messages>
|
|
||||||
<!-- CHAT MESSAGES -->
|
<!-- CHAT MESSAGES -->
|
||||||
</div>
|
</div>
|
||||||
<!-- / CHAT CONTENT -->
|
<!-- / CHAT CONTENT -->
|
||||||
|
@ -17,7 +17,7 @@ import * as EventStore from '@app/store/messenger/event';
|
|||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { LoginInfo, KEY_LOGIN_INFO } from '@app/types';
|
import { LoginInfo, KEY_LOGIN_INFO } from '@app/types';
|
||||||
import { RoomInfo } from '@ucap-webmessenger/protocol-room';
|
import { RoomInfo, UserInfo } from '@ucap-webmessenger/protocol-room';
|
||||||
import { tap } from 'rxjs/operators';
|
import { tap } from 'rxjs/operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -35,6 +35,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewChecked {
|
|||||||
eventList$: Observable<Info[]>;
|
eventList$: Observable<Info[]>;
|
||||||
roomInfo: RoomInfo;
|
roomInfo: RoomInfo;
|
||||||
roomInfoSubscription: Subscription;
|
roomInfoSubscription: Subscription;
|
||||||
|
userInfoList$: Observable<UserInfo[]>;
|
||||||
eventListProcessing$: Observable<boolean>;
|
eventListProcessing$: Observable<boolean>;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@ -64,6 +65,10 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewChecked {
|
|||||||
)
|
)
|
||||||
.subscribe();
|
.subscribe();
|
||||||
|
|
||||||
|
this.userInfoList$ = this.store.pipe(
|
||||||
|
select(AppStore.MessengerSelector.RoomSelector.userInfoList)
|
||||||
|
);
|
||||||
|
|
||||||
this.eventListProcessing$ = this.store.pipe(
|
this.eventListProcessing$ = this.store.pipe(
|
||||||
select(AppStore.MessengerSelector.EventSelector.infoListProcessing)
|
select(AppStore.MessengerSelector.EventSelector.infoListProcessing)
|
||||||
);
|
);
|
||||||
|
@ -17,7 +17,7 @@ import { DragDropModule } from '@angular/cdk/drag-drop';
|
|||||||
import { UCapUiModule } from '@ucap-webmessenger/ui';
|
import { UCapUiModule } from '@ucap-webmessenger/ui';
|
||||||
import { UCapUiChatModule } from '@ucap-webmessenger/ui-chat';
|
import { UCapUiChatModule } from '@ucap-webmessenger/ui-chat';
|
||||||
import { UCapUiRoomModule } from '@ucap-webmessenger/ui-room';
|
import { UCapUiRoomModule } from '@ucap-webmessenger/ui-room';
|
||||||
|
import { UCapUiProfileModule } from '@ucap-webmessenger/ui-profile';
|
||||||
import { UCapUiGroupModule } from '@ucap-webmessenger/ui-group';
|
import { UCapUiGroupModule } from '@ucap-webmessenger/ui-group';
|
||||||
import { UCapUiOrganizationModule } from '@ucap-webmessenger/ui-organization';
|
import { UCapUiOrganizationModule } from '@ucap-webmessenger/ui-organization';
|
||||||
|
|
||||||
@ -40,6 +40,7 @@ import { DIALOGS } from './dialogs';
|
|||||||
UCapUiModule,
|
UCapUiModule,
|
||||||
UCapUiChatModule,
|
UCapUiChatModule,
|
||||||
UCapUiRoomModule,
|
UCapUiRoomModule,
|
||||||
|
UCapUiProfileModule,
|
||||||
UCapUiGroupModule,
|
UCapUiGroupModule,
|
||||||
UCapUiOrganizationModule
|
UCapUiOrganizationModule
|
||||||
],
|
],
|
||||||
|
@ -44,6 +44,7 @@ import * as VersionInfoStore from '@app/store/setting/version-info';
|
|||||||
import * as OptionStore from '@app/store/messenger/option';
|
import * as OptionStore from '@app/store/messenger/option';
|
||||||
import * as QueryStore from '@app/store/messenger/query';
|
import * as QueryStore from '@app/store/messenger/query';
|
||||||
import * as SyncStore from '@app/store/messenger/sync';
|
import * as SyncStore from '@app/store/messenger/sync';
|
||||||
|
import { VerInfo2, KEY_VER_INFO } from '@app/types/ver-info.type';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AppMessengerResolver implements Resolve<void> {
|
export class AppMessengerResolver implements Resolve<void> {
|
||||||
@ -83,6 +84,7 @@ export class AppMessengerResolver implements Resolve<void> {
|
|||||||
.pipe(
|
.pipe(
|
||||||
take(1),
|
take(1),
|
||||||
tap(res => {
|
tap(res => {
|
||||||
|
this.sessionStorageService.set<VerInfo2>(KEY_VER_INFO, res);
|
||||||
this.store.dispatch(VersionInfoStore.versionInfo2Success({ res }));
|
this.store.dispatch(VersionInfoStore.versionInfo2Success({ res }));
|
||||||
}),
|
}),
|
||||||
switchMap(res => {
|
switchMap(res => {
|
||||||
|
@ -0,0 +1,20 @@
|
|||||||
|
import { SyncMode } from '@ucap-webmessenger/api-public';
|
||||||
|
|
||||||
|
export const KEY_VER_INFO = 'ucap::VER_INFO';
|
||||||
|
|
||||||
|
export interface VerInfo2 {
|
||||||
|
protocolCode?: number;
|
||||||
|
syncMode?: SyncMode;
|
||||||
|
appVersion?: string;
|
||||||
|
installUrl?: string;
|
||||||
|
serverIp?: string;
|
||||||
|
uploadUrl?: string;
|
||||||
|
downloadUrl?: string;
|
||||||
|
profileUploadUrl?: string;
|
||||||
|
profileRoot?: string;
|
||||||
|
fileTerm?: number;
|
||||||
|
fileAllowSize?: number;
|
||||||
|
authIp?: boolean;
|
||||||
|
launcherAppVersion?: string;
|
||||||
|
launcherInstallUrl?: string;
|
||||||
|
}
|
@ -1,48 +1,48 @@
|
|||||||
export enum EventType {
|
export enum EventType {
|
||||||
// J: 대화참여
|
/** J: 대화참여 */
|
||||||
Join = 'J',
|
Join = 'J',
|
||||||
// C: 대화전송
|
/** C: 대화전송 */
|
||||||
Character = 'C',
|
Character = 'C',
|
||||||
// F: 파일전송
|
/** F: 파일전송 */
|
||||||
File = 'F',
|
File = 'F',
|
||||||
// S: 스티커
|
/** S: 스티커 */
|
||||||
Sticker = 'S',
|
Sticker = 'S',
|
||||||
// T: Mass Text
|
/** T: Mass Text */
|
||||||
MassText = 'T',
|
MassText = 'T',
|
||||||
// E: 대화퇴장
|
/** E: 대화퇴장 */
|
||||||
Exit = 'E',
|
Exit = 'E',
|
||||||
// P: 일정
|
/** P: 일정 */
|
||||||
Plan = 'P',
|
Plan = 'P',
|
||||||
// V: 화상회의
|
/** V: 화상회의 */
|
||||||
VideoConference = 'V',
|
VideoConference = 'V',
|
||||||
// L: 링크(Legacy)
|
/** L: 링크(Legacy) */
|
||||||
Link = 'L',
|
Link = 'L',
|
||||||
// R: 대화방명변경
|
/** R: 대화방명변경 */
|
||||||
RenameRoom = 'R',
|
RenameRoom = 'R',
|
||||||
// Y: 번역
|
/** Y: 번역 */
|
||||||
Translation = 'Y',
|
Translation = 'Y',
|
||||||
// Z: 대용량 번역
|
/** Z: 대용량 번역 */
|
||||||
MassTranslation = 'Z',
|
MassTranslation = 'Z',
|
||||||
// U: 회수된 메시지
|
/** U: 회수된 메시지 */
|
||||||
RecalledMessage = 'U',
|
RecalledMessage = 'U',
|
||||||
// N: 방Timer 변경 안내
|
/** N: 방Timer 변경 안내 */
|
||||||
GuideForRoomTimerChanged = 'N',
|
GuideForRoomTimerChanged = 'N',
|
||||||
// X: iOS캡쳐알림
|
/** X: iOS캡쳐알림 */
|
||||||
NotificationForiOSCapture = 'X',
|
NotificationForiOSCapture = 'X',
|
||||||
// B: 타이머대화방알림
|
/** B: 타이머대화방알림 */
|
||||||
NotificationForTimerRoom = 'B',
|
NotificationForTimerRoom = 'B',
|
||||||
// Q: 2개월전 메시지
|
/** Q: 2개월전 메시지 */
|
||||||
Before2MonthsAgo = 'Q',
|
Before2MonthsAgo = 'Q',
|
||||||
// G: 강제 퇴장
|
/** G: 강제 퇴장 */
|
||||||
ForcedExit = 'G',
|
ForcedExit = 'G',
|
||||||
// H: 챗봇대화 시작
|
/** H: 챗봇대화 시작 */
|
||||||
ChatbotStart = 'H',
|
ChatbotStart = 'H',
|
||||||
// K: 챗봇대화 종료
|
/** K: 챗봇대화 종료 */
|
||||||
ChatbotEnd = 'K',
|
ChatbotEnd = 'K',
|
||||||
// I: 챗봇대화 전송
|
/** I: 챗봇대화 전송 */
|
||||||
ChatbotSend = 'I',
|
ChatbotSend = 'I',
|
||||||
// A: 챗봇 대용량 대화 전송
|
/** A: 챗봇 대용량 대화 전송 */
|
||||||
ChatbotSendMass = 'A',
|
ChatbotSendMass = 'A',
|
||||||
// M: 동영상 스트리밍
|
/** M: 동영상 스트리밍 */
|
||||||
VideoStreamming = 'M'
|
VideoStreamming = 'M'
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
import { DeptType } from '../types/dept.type';
|
import { DeptType } from '../types/dept.type';
|
||||||
|
|
||||||
export interface DeptInfo {
|
export interface DeptInfo {
|
||||||
// 부서SEQ
|
/** 부서SEQ */
|
||||||
seq: number;
|
seq: number;
|
||||||
// 부서명
|
/** 부서명 */
|
||||||
name: string;
|
name: string;
|
||||||
// 기관코드
|
/** 기관코드 */
|
||||||
companyCode: string;
|
companyCode: string;
|
||||||
// 부서타입
|
/** 부서타입 */
|
||||||
type: DeptType;
|
type: DeptType;
|
||||||
// 본부SEQ
|
/** 본부SEQ */
|
||||||
rootSeq: number;
|
rootSeq: number;
|
||||||
// 상위부서SEQ
|
/** 상위부서SEQ */
|
||||||
parentSeq: number;
|
parentSeq: number;
|
||||||
// 조회순서
|
/** 조회순서 */
|
||||||
order: string;
|
order: string;
|
||||||
// 조회레벨
|
/** 조회레벨 */
|
||||||
depth: number;
|
depth: number;
|
||||||
// ActiveYN
|
/** ActiveYN */
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
// 부서명(영어)
|
/** 부서명(영어) */
|
||||||
nameEn: string;
|
nameEn: string;
|
||||||
// 부서명(중국어)
|
/** 부서명(중국어) */
|
||||||
nameCn: string;
|
nameCn: string;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
<p>
|
||||||
|
<span>
|
||||||
|
{{ message.sentMessage }}
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
{{ message.sendDate | date: 'short' }}
|
||||||
|
</span>
|
||||||
|
</p>
|
@ -1,4 +1,5 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
|
import { Info } from '@ucap-webmessenger/protocol-event';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ucap-chat-message-box-mass',
|
selector: 'ucap-chat-message-box-mass',
|
||||||
@ -6,6 +7,9 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
styleUrls: ['./mass.component.scss']
|
styleUrls: ['./mass.component.scss']
|
||||||
})
|
})
|
||||||
export class MassComponent implements OnInit {
|
export class MassComponent implements OnInit {
|
||||||
|
@Input()
|
||||||
|
message: Info;
|
||||||
|
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
<p>
|
||||||
|
<span>
|
||||||
|
{{ message.sentMessage }}
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
{{ message.sendDate | date: 'short' }}
|
||||||
|
</span>
|
||||||
|
</p>
|
@ -1,4 +1,5 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
|
import { Info } from '@ucap-webmessenger/protocol-event';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ucap-chat-message-box-text',
|
selector: 'ucap-chat-message-box-text',
|
||||||
@ -6,6 +7,9 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
styleUrls: ['./text.component.scss']
|
styleUrls: ['./text.component.scss']
|
||||||
})
|
})
|
||||||
export class TextComponent implements OnInit {
|
export class TextComponent implements OnInit {
|
||||||
|
@Input()
|
||||||
|
message: Info;
|
||||||
|
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
@ -1,27 +1,60 @@
|
|||||||
<div class="chat-messages">
|
<div class="chat-messages">
|
||||||
<!-- MESSAGE -->
|
<!-- MESSAGE -->
|
||||||
<div
|
<div *ngFor="let message of messages; let i = index" class="message-row" [ngClass]="{
|
||||||
*ngFor="let message of messages; let i = index"
|
|
||||||
class="message-row"
|
|
||||||
[ngClass]="{
|
|
||||||
me: message.senderSeq === loginRes.userSeq,
|
me: message.senderSeq === loginRes.userSeq,
|
||||||
contact: message.senderSeq !== loginRes.userSeq
|
contact: message.senderSeq !== loginRes.userSeq
|
||||||
}"
|
}">
|
||||||
>
|
<div>
|
||||||
|
<ul>
|
||||||
|
<li *ngIf="getUserProfile(message.senderSeq) != ''">
|
||||||
|
<img [src]="getUserProfile(message.senderSeq)" onerror="this.src='assets/images/img_nophoto_50.png'"
|
||||||
|
class="avatar" style="width: 50px; height: 50px;" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
{{ getUserName(message.senderSeq) }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<ng-container [ngSwitch]="message.type">
|
<ng-container [ngSwitch]="message.type">
|
||||||
<div *ngSwitchCase="EventType.Character">Character</div>
|
<ucap-chat-message-box-text *ngSwitchCase="EventType.Character" [message]="message"></ucap-chat-message-box-text>
|
||||||
|
<ucap-chat-message-box-mass *ngSwitchCase="EventType.MassText" [message]="message"></ucap-chat-message-box-mass>
|
||||||
<div *ngSwitchCase="EventType.Join">Join</div>
|
<div *ngSwitchCase="EventType.Join">Join</div>
|
||||||
|
<div *ngSwitchDefault>
|
||||||
|
date splitter
|
||||||
|
<ucap-chat-message-box-date-splitter></ucap-chat-message-box-date-splitter>
|
||||||
|
file
|
||||||
|
<ucap-chat-message-box-file></ucap-chat-message-box-file>
|
||||||
|
image
|
||||||
|
<ucap-chat-message-box-image></ucap-chat-message-box-image>
|
||||||
|
information
|
||||||
|
<ucap-chat-message-box-information></ucap-chat-message-box-information>
|
||||||
|
mass-translation
|
||||||
|
<ucap-chat-message-box-mass-translation></ucap-chat-message-box-mass-translation>
|
||||||
|
notice
|
||||||
|
<ucap-chat-message-box-notice></ucap-chat-message-box-notice>
|
||||||
|
recall
|
||||||
|
<ucap-chat-message-box-recall></ucap-chat-message-box-recall>
|
||||||
|
<ucap-chat-message-box-schedule></ucap-chat-message-box-schedule>
|
||||||
|
sticker
|
||||||
|
<ucap-chat-message-box-sticker></ucap-chat-message-box-sticker>
|
||||||
|
translation
|
||||||
|
<ucap-chat-message-box-translation></ucap-chat-message-box-translation>
|
||||||
|
video
|
||||||
|
<ucap-chat-message-box-video></ucap-chat-message-box-video>
|
||||||
|
video-conference
|
||||||
|
<ucap-chat-message-box-video-conference></ucap-chat-message-box-video-conference>
|
||||||
|
|
||||||
|
<div class="bubble">
|
||||||
|
<div class="message">
|
||||||
|
{{ message.sentMessage }}
|
||||||
|
</div>
|
||||||
|
<div class="time secondary-text">
|
||||||
|
{{ message.sendDate | date: 'short' }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<img *ngIf="" src="" class="avatar" />
|
|
||||||
|
|
||||||
<div class="bubble">
|
|
||||||
<div class="message">
|
|
||||||
{{ message.sentMessage }}
|
|
||||||
</div>
|
|
||||||
<div class="time secondary-text">
|
|
||||||
{{ message.sendDate | date: 'short' }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
import { Component, OnInit, Input } from '@angular/core';
|
import { Component, OnInit, Input } from '@angular/core';
|
||||||
|
|
||||||
import { Info, EventType } from '@ucap-webmessenger/protocol-event';
|
import { Info, EventType } from '@ucap-webmessenger/protocol-event';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import {
|
||||||
|
LoginResponse,
|
||||||
|
UserInfo
|
||||||
|
} from '@ucap-webmessenger/protocol-authentication';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
|
import { KEY_VER_INFO, VerInfo2 } from '@app/types/ver-info.type';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ucap-chat-messages',
|
selector: 'ucap-chat-messages',
|
||||||
@ -14,12 +19,38 @@ export class MessagesComponent implements OnInit {
|
|||||||
loginRes: LoginResponse;
|
loginRes: LoginResponse;
|
||||||
@Input()
|
@Input()
|
||||||
messages: Info[];
|
messages: Info[];
|
||||||
|
@Input()
|
||||||
|
userInfos?: UserInfo[];
|
||||||
|
|
||||||
EventType = EventType;
|
EventType = EventType;
|
||||||
|
profileImageRoot: string;
|
||||||
|
|
||||||
constructor(private logger: NGXLogger) {}
|
constructor(
|
||||||
|
private logger: NGXLogger,
|
||||||
|
private sessionStorageService: SessionStorageService
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.logger.debug('type of userSeq', typeof this.loginRes.userSeq);
|
const verInfo = this.sessionStorageService.get<VerInfo2>(KEY_VER_INFO);
|
||||||
|
this.profileImageRoot = this.profileImageRoot || verInfo.profileRoot;
|
||||||
|
}
|
||||||
|
|
||||||
|
getUserName(seq: number): string {
|
||||||
|
const userInfo: UserInfo[] = this.userInfos.filter(
|
||||||
|
user => user.seq === seq
|
||||||
|
);
|
||||||
|
if (!!userInfo && userInfo.length > 0) {
|
||||||
|
return userInfo[0].name;
|
||||||
|
}
|
||||||
|
return '(알수없는 사용자)';
|
||||||
|
}
|
||||||
|
getUserProfile(seq: number): string {
|
||||||
|
const userInfo: UserInfo[] = this.userInfos.filter(
|
||||||
|
user => user.seq === seq
|
||||||
|
);
|
||||||
|
if (!!userInfo && userInfo.length > 0) {
|
||||||
|
return this.profileImageRoot + userInfo[0].profileImageFile;
|
||||||
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
<mat-accordion #groupAccordion="matAccordion" [multi]="true">
|
<mat-accordion #groupAccordion="matAccordion" [multi]="true">
|
||||||
<mat-expansion-panel *ngIf="true">
|
<mat-expansion-panel *ngIf="favoritBuddyList.length > 0">
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title> 즐겨찾기 </mat-panel-title>
|
<mat-panel-title> 즐겨찾기 </mat-panel-title>
|
||||||
<mat-panel-description> </mat-panel-description>
|
<mat-panel-description> </mat-panel-description>
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
|
|
||||||
|
<ucap-profile-user-list-item *ngFor="let favUserList of favoritBuddyList" [userInfo]="favUserList"
|
||||||
|
(click)="onClickBuddy(favUserList)">
|
||||||
|
</ucap-profile-user-list-item>
|
||||||
</mat-expansion-panel>
|
</mat-expansion-panel>
|
||||||
|
|
||||||
<mat-expansion-panel *ngFor="let groupBuddy of groupBuddyList">
|
<mat-expansion-panel *ngFor="let groupBuddy of groupBuddyList">
|
||||||
|
@ -22,6 +22,9 @@ export class ExpansionPanelComponent implements OnInit {
|
|||||||
@Input()
|
@Input()
|
||||||
groupBuddyList: { group: GroupDetailData; buddyList: UserInfo[] }[];
|
groupBuddyList: { group: GroupDetailData; buddyList: UserInfo[] }[];
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
favoritBuddyList: UserInfo[];
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
selectBuddy = new EventEmitter<UserInfo>();
|
selectBuddy = new EventEmitter<UserInfo>();
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
{{ userInfo.deptName }}
|
{{ userInfo.deptName }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="msg-status">
|
<div class="msg-status" *ngIf="!checkable && userInfo.intro.trim() && !compactable">
|
||||||
{{ userInfo.intro }}
|
{{ userInfo.intro }}
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -11,6 +11,8 @@ import * as AppStore from '@app/store';
|
|||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
import { tap } from 'rxjs/operators';
|
import { tap } from 'rxjs/operators';
|
||||||
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
|
import { KEY_VER_INFO, VerInfo2 } from '@app/types/ver-info.type';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ucap-profile-user-list-item',
|
selector: 'ucap-profile-user-list-item',
|
||||||
@ -29,24 +31,31 @@ export class UserListItemComponent implements OnInit, OnDestroy {
|
|||||||
@Input()
|
@Input()
|
||||||
compactable = false;
|
compactable = false;
|
||||||
|
|
||||||
private profileImageRootSubscription: Subscription;
|
// private profileImageRootSubscription: Subscription;
|
||||||
|
|
||||||
constructor(private store: Store<any>, private logger: NGXLogger) {}
|
constructor(
|
||||||
|
private store: Store<any>,
|
||||||
|
private logger: NGXLogger,
|
||||||
|
private sessionStorageService: SessionStorageService
|
||||||
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.profileImageRootSubscription = this.store
|
// this.profileImageRootSubscription = this.store
|
||||||
.pipe(
|
// .pipe(
|
||||||
select(AppStore.SettingSelector.VersionInfoSelector.profileImageRoot),
|
// select(AppStore.SettingSelector.VersionInfoSelector.profileImageRoot),
|
||||||
tap(profileImageRoot => {
|
// tap(profileImageRoot => {
|
||||||
this.profileImageRoot = this.profileImageRoot || profileImageRoot;
|
// this.profileImageRoot = this.profileImageRoot || profileImageRoot;
|
||||||
})
|
// })
|
||||||
)
|
// )
|
||||||
.subscribe();
|
// .subscribe();
|
||||||
|
|
||||||
|
const verInfo = this.sessionStorageService.get<VerInfo2>(KEY_VER_INFO);
|
||||||
|
this.profileImageRoot = this.profileImageRoot || verInfo.profileRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
if (!!this.profileImageRootSubscription) {
|
// if (!!this.profileImageRootSubscription) {
|
||||||
this.profileImageRootSubscription.unsubscribe();
|
// this.profileImageRootSubscription.unsubscribe();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user