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