소속부서 기능 추가에 따른 프로필 유효성 체크부분 추가.
This commit is contained in:
parent
40e787ff1e
commit
5236f0e37b
|
@ -31,6 +31,7 @@ import {
|
||||||
} from '@ucap-webmessenger/protocol-query';
|
} from '@ucap-webmessenger/protocol-query';
|
||||||
import { MatTabChangeEvent } from '@angular/material';
|
import { MatTabChangeEvent } from '@angular/material';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
|
import { OpenProfileOptions } from '@ucap-webmessenger/protocol-buddy';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { MessageApiService, MessageType } from '@ucap-webmessenger/api-message';
|
import { MessageApiService, MessageType } from '@ucap-webmessenger/api-message';
|
||||||
|
@ -69,9 +70,10 @@ export enum MainMenu {
|
||||||
})
|
})
|
||||||
export class LeftSideComponent implements OnInit, OnDestroy {
|
export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
@Output()
|
@Output()
|
||||||
openProfile = new EventEmitter<
|
openProfile = new EventEmitter<{
|
||||||
UserInfo | UserInfoSS | UserInfoF | UserInfoDN
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
>();
|
openProfileOptions?: OpenProfileOptions;
|
||||||
|
}>();
|
||||||
@Output()
|
@Output()
|
||||||
sendCall = new EventEmitter<string>();
|
sendCall = new EventEmitter<string>();
|
||||||
@Output()
|
@Output()
|
||||||
|
@ -262,8 +264,14 @@ export class LeftSideComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickOpenProfile(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
onClickOpenProfile(params: {
|
||||||
this.openProfile.emit(userInfo);
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
|
openProfileOptions?: OpenProfileOptions;
|
||||||
|
}) {
|
||||||
|
this.openProfile.emit({
|
||||||
|
userInfo: params.userInfo,
|
||||||
|
openProfileOptions: params.openProfileOptions
|
||||||
|
});
|
||||||
}
|
}
|
||||||
onClickSendClickToCall(calleeNumber: string) {
|
onClickSendClickToCall(calleeNumber: string) {
|
||||||
this.sendCall.emit(calleeNumber);
|
this.sendCall.emit(calleeNumber);
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
[presence]="getStatusBulkInfo(userInfo) | async"
|
[presence]="getStatusBulkInfo(userInfo) | async"
|
||||||
[sessionVerinfo]="sessionVerinfo"
|
[sessionVerinfo]="sessionVerinfo"
|
||||||
(click)="onSelectBuddy(userInfo)"
|
(click)="onSelectBuddy(userInfo)"
|
||||||
(openProfile)="onClickOpenProfile($event)"
|
(openProfile)="onClickOpenProfile($event, group)"
|
||||||
(contextmenu)="onContextMenuProfile($event, userInfo, group, false)"
|
(contextmenu)="onContextMenuProfile($event, userInfo, group, false)"
|
||||||
class="list-item-frame ucap-clickable"
|
class="list-item-frame ucap-clickable"
|
||||||
>
|
>
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
mat-menu-item
|
mat-menu-item
|
||||||
(click)="onClickProfileContextMenu('VIEW_PROFILE', userInfo)"
|
(click)="onClickProfileContextMenu('VIEW_PROFILE', userInfo, group)"
|
||||||
>
|
>
|
||||||
프로필 보기
|
프로필 보기
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -44,6 +44,7 @@ import {
|
||||||
SSVC_TYPE_QUERY_DEPT_USER_RES,
|
SSVC_TYPE_QUERY_DEPT_USER_RES,
|
||||||
DeptUserData
|
DeptUserData
|
||||||
} from '@ucap-webmessenger/protocol-query';
|
} from '@ucap-webmessenger/protocol-query';
|
||||||
|
import { OpenProfileOptions } from '@ucap-webmessenger/protocol-buddy';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ucapAnimations,
|
ucapAnimations,
|
||||||
|
@ -84,9 +85,10 @@ export class GroupComponent implements OnInit, OnDestroy {
|
||||||
@Output()
|
@Output()
|
||||||
newGroupAndMember = new EventEmitter();
|
newGroupAndMember = new EventEmitter();
|
||||||
@Output()
|
@Output()
|
||||||
openProfile = new EventEmitter<
|
openProfile = new EventEmitter<{
|
||||||
UserInfo | UserInfoSS | UserInfoF | UserInfoDN
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
>();
|
openProfileOptions?: OpenProfileOptions;
|
||||||
|
}>();
|
||||||
|
|
||||||
@ViewChild('groupExpansionPanel', { static: false })
|
@ViewChild('groupExpansionPanel', { static: false })
|
||||||
groupExpansionPanel: GroupExpansionPanelComponent;
|
groupExpansionPanel: GroupExpansionPanelComponent;
|
||||||
|
@ -430,7 +432,18 @@ export class GroupComponent implements OnInit, OnDestroy {
|
||||||
);
|
);
|
||||||
switch (menuType) {
|
switch (menuType) {
|
||||||
case 'VIEW_PROFILE':
|
case 'VIEW_PROFILE':
|
||||||
this.openProfile.emit(userInfo);
|
this.openProfile.emit({
|
||||||
|
userInfo,
|
||||||
|
openProfileOptions: {
|
||||||
|
useDelBuddybutton:
|
||||||
|
!!group &&
|
||||||
|
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||||
|
environment.productConfig.CommonSetting.myDeptGroupSeq ===
|
||||||
|
group.seq
|
||||||
|
? false
|
||||||
|
: true
|
||||||
|
}
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'CHAT':
|
case 'CHAT':
|
||||||
this.onSelectBuddy(userInfo);
|
this.onSelectBuddy(userInfo);
|
||||||
|
@ -557,8 +570,21 @@ export class GroupComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickOpenProfile(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
onClickOpenProfile(
|
||||||
this.openProfile.emit(userInfo);
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN,
|
||||||
|
group: GroupDetailData
|
||||||
|
) {
|
||||||
|
this.openProfile.emit({
|
||||||
|
userInfo,
|
||||||
|
openProfileOptions: {
|
||||||
|
useDelBuddybutton:
|
||||||
|
!!group &&
|
||||||
|
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||||
|
environment.productConfig.CommonSetting.myDeptGroupSeq === group.seq
|
||||||
|
? false
|
||||||
|
: true
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onContextMenuProfile(
|
onContextMenuProfile(
|
||||||
|
|
|
@ -9,13 +9,10 @@ import {
|
||||||
AfterViewChecked
|
AfterViewChecked
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { Subscription, of } from 'rxjs';
|
import { Subscription, of } from 'rxjs';
|
||||||
import { Store, select } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { tap, map, catchError, take } from 'rxjs/operators';
|
import { map, catchError, take } from 'rxjs/operators';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
|
|
||||||
import * as AppStore from '@app/store';
|
|
||||||
|
|
||||||
import { UserInfo } from '@ucap-webmessenger/protocol-room';
|
|
||||||
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
import { VersionInfo2Response } from '@ucap-webmessenger/api-public';
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import { DialogService } from '@ucap-webmessenger/ui';
|
import { DialogService } from '@ucap-webmessenger/ui';
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
<ucap-profile-user-list-item
|
<ucap-profile-user-list-item
|
||||||
*cdkVirtualFor="let userInfo of searchUserInfos"
|
*cdkVirtualFor="let userInfo of searchUserInfos"
|
||||||
[userInfo]="userInfo"
|
[userInfo]="userInfo"
|
||||||
[checkable]="true"
|
[checkable]="userInfo.seq !== loginRes.userSeq"
|
||||||
[sessionVerinfo]="sessionVerinfo"
|
[sessionVerinfo]="sessionVerinfo"
|
||||||
[selectedUserList]="selectedUserList"
|
[selectedUserList]="selectedUserList"
|
||||||
[isChecked]="getCheckedUser(userInfo)"
|
[isChecked]="getCheckedUser(userInfo)"
|
||||||
|
|
|
@ -98,9 +98,9 @@ export class OrganizationComponent
|
||||||
userInfos: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[];
|
userInfos: (UserInfo | UserInfoSS | UserInfoF | UserInfoDN)[];
|
||||||
}>();
|
}>();
|
||||||
@Output()
|
@Output()
|
||||||
openProfile = new EventEmitter<
|
openProfile = new EventEmitter<{
|
||||||
UserInfo | UserInfoSS | UserInfoF | UserInfoDN
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
>();
|
}>();
|
||||||
@Output()
|
@Output()
|
||||||
sendCall = new EventEmitter<string>();
|
sendCall = new EventEmitter<string>();
|
||||||
@Output()
|
@Output()
|
||||||
|
@ -395,9 +395,10 @@ export class OrganizationComponent
|
||||||
onCheckAllUser(value: boolean) {
|
onCheckAllUser(value: boolean) {
|
||||||
this.checkAllUser.emit({
|
this.checkAllUser.emit({
|
||||||
isChecked: value,
|
isChecked: value,
|
||||||
userInfos: this.isShowSearch
|
userInfos: (this.isShowSearch
|
||||||
? this.searchUserInfos
|
? this.searchUserInfos
|
||||||
: this.selectedDepartmentUserInfoList
|
: this.selectedDepartmentUserInfoList
|
||||||
|
).filter(user => user.seq !== this.loginRes.userSeq)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -416,7 +417,7 @@ export class OrganizationComponent
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickOpenProfile(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
onClickOpenProfile(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
||||||
this.openProfile.emit(userInfo);
|
this.openProfile.emit({ userInfo });
|
||||||
}
|
}
|
||||||
onClickSendClickToCall(calleeNumber: string) {
|
onClickSendClickToCall(calleeNumber: string) {
|
||||||
this.sendCall.emit(calleeNumber);
|
this.sendCall.emit(calleeNumber);
|
||||||
|
|
|
@ -108,7 +108,7 @@ import { environment } from '../../../../environments/environment';
|
||||||
})
|
})
|
||||||
export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
@Output()
|
@Output()
|
||||||
openProfile = new EventEmitter<UserInfo>();
|
openProfile = new EventEmitter<{ userInfo: UserInfo }>();
|
||||||
|
|
||||||
@ViewChild('chatForm', { static: false })
|
@ViewChild('chatForm', { static: false })
|
||||||
private chatForm: UCapUiChatFormComponent;
|
private chatForm: UCapUiChatFormComponent;
|
||||||
|
@ -1192,7 +1192,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||||
this.roomInfo.roomType !== RoomType.Allim_Elephant &&
|
this.roomInfo.roomType !== RoomType.Allim_Elephant &&
|
||||||
this.roomInfo.roomType !== RoomType.Allim_TMS
|
this.roomInfo.roomType !== RoomType.Allim_TMS
|
||||||
) {
|
) {
|
||||||
this.openProfile.emit(userInfo);
|
this.openProfile.emit({ userInfo });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,22 +4,22 @@ import { UserInfo } from '@ucap-webmessenger/protocol-room';
|
||||||
import {
|
import {
|
||||||
UserInfoSS,
|
UserInfoSS,
|
||||||
UserInfoF,
|
UserInfoF,
|
||||||
UserInfoDN,
|
UserInfoDN
|
||||||
} from '@ucap-webmessenger/protocol-query';
|
} from '@ucap-webmessenger/protocol-query';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-layout-messenger-right-drawer',
|
selector: 'app-layout-messenger-right-drawer',
|
||||||
templateUrl: './right-drawer.component.html',
|
templateUrl: './right-drawer.component.html',
|
||||||
styleUrls: ['./right-drawer.component.scss'],
|
styleUrls: ['./right-drawer.component.scss']
|
||||||
})
|
})
|
||||||
export class RightDrawerComponent implements OnInit {
|
export class RightDrawerComponent implements OnInit {
|
||||||
@Input()
|
@Input()
|
||||||
selectedRightDrawer: RightDrawer;
|
selectedRightDrawer: RightDrawer;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
openProfile = new EventEmitter<
|
openProfile = new EventEmitter<{
|
||||||
UserInfo | UserInfoSS | UserInfoF | UserInfoDN
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
>();
|
}>();
|
||||||
@Output()
|
@Output()
|
||||||
closeRightDrawer = new EventEmitter();
|
closeRightDrawer = new EventEmitter();
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ export class RightDrawerComponent implements OnInit {
|
||||||
ngOnInit() {}
|
ngOnInit() {}
|
||||||
|
|
||||||
onClickOpenProfile(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
onClickOpenProfile(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
||||||
this.openProfile.emit(userInfo);
|
this.openProfile.emit({ userInfo });
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickClose() {
|
onClickClose() {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
[myMadn]="loginRes.madn"
|
[myMadn]="loginRes.madn"
|
||||||
[isBuddy]="isBuddy"
|
[isBuddy]="isBuddy"
|
||||||
[isFavorit]="isFavorit"
|
[isFavorit]="isFavorit"
|
||||||
|
[openProfileOptions]="data.openProfileOptions"
|
||||||
(openChat)="onClickChat($event)"
|
(openChat)="onClickChat($event)"
|
||||||
(sendMessage)="onClickSendMessage($event)"
|
(sendMessage)="onClickSendMessage($event)"
|
||||||
(sendCall)="onClickSendClickToCall($event)"
|
(sendCall)="onClickSendClickToCall($event)"
|
||||||
|
|
|
@ -36,6 +36,7 @@ import {
|
||||||
} from '../group/select-group.dialog.component';
|
} from '../group/select-group.dialog.component';
|
||||||
import { FileUploadItem } from '@ucap-webmessenger/api';
|
import { FileUploadItem } from '@ucap-webmessenger/api';
|
||||||
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
import { CommonApiService } from '@ucap-webmessenger/api-common';
|
||||||
|
import { OpenProfileOptions } from '@ucap-webmessenger/protocol-buddy';
|
||||||
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
|
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
|
||||||
import { StatusCode } from '@ucap-webmessenger/api';
|
import { StatusCode } from '@ucap-webmessenger/api';
|
||||||
import {
|
import {
|
||||||
|
@ -54,6 +55,7 @@ import { environment } from '../../../../../environments/environment';
|
||||||
|
|
||||||
export interface ProfileDialogData {
|
export interface ProfileDialogData {
|
||||||
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
|
openProfileOptions?: OpenProfileOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProfileDialogResult {}
|
export interface ProfileDialogResult {}
|
||||||
|
@ -102,6 +104,8 @@ export class ProfileDialogComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
this.editableProfileImage =
|
this.editableProfileImage =
|
||||||
environment.productConfig.CommonSetting.editableProfileImage;
|
environment.productConfig.CommonSetting.editableProfileImage;
|
||||||
|
|
||||||
|
console.log(data.openProfileOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
|
@ -42,13 +42,10 @@ import {
|
||||||
import { MatDrawer } from '@angular/material';
|
import { MatDrawer } from '@angular/material';
|
||||||
import { NGXLogger } from 'ngx-logger';
|
import { NGXLogger } from 'ngx-logger';
|
||||||
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
|
import { OpenProfileOptions } from '@ucap-webmessenger/protocol-buddy';
|
||||||
import { DaesangProtocolService, SmsUtils } from '@ucap-webmessenger/daesang';
|
import { DaesangProtocolService, SmsUtils } from '@ucap-webmessenger/daesang';
|
||||||
import { CallService } from '@ucap-webmessenger/api-prompt';
|
import { CallService } from '@ucap-webmessenger/api-prompt';
|
||||||
import {
|
import { EnvironmentsInfo, KEY_ENVIRONMENTS_INFO } from '@app/types';
|
||||||
EnvironmentsInfo,
|
|
||||||
KEY_ENVIRONMENTS_INFO,
|
|
||||||
KEY_URL_INFO
|
|
||||||
} from '@app/types';
|
|
||||||
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
import {
|
import {
|
||||||
MessageApiService,
|
MessageApiService,
|
||||||
|
@ -63,7 +60,6 @@ import {
|
||||||
MessageDetailDialogResult,
|
MessageDetailDialogResult,
|
||||||
MessageDetailDialogData
|
MessageDetailDialogData
|
||||||
} from '@app/layouts/messenger/dialogs/message/message-detail.dialog.component';
|
} from '@app/layouts/messenger/dialogs/message/message-detail.dialog.component';
|
||||||
import { DaesangUrlInfoResponse } from '@ucap-webmessenger/api-external';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-page-messenger-main',
|
selector: 'app-page-messenger-main',
|
||||||
|
@ -96,8 +92,7 @@ export class MainPageComponent implements OnInit, OnDestroy {
|
||||||
private callService: CallService,
|
private callService: CallService,
|
||||||
private sessionStorageService: SessionStorageService,
|
private sessionStorageService: SessionStorageService,
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private logger: NGXLogger,
|
private logger: NGXLogger
|
||||||
private changeDetectorRef: ChangeDetectorRef
|
|
||||||
) {
|
) {
|
||||||
this.environmentsInfo = this.sessionStorageService.get<EnvironmentsInfo>(
|
this.environmentsInfo = this.sessionStorageService.get<EnvironmentsInfo>(
|
||||||
KEY_ENVIRONMENTS_INFO
|
KEY_ENVIRONMENTS_INFO
|
||||||
|
@ -244,7 +239,10 @@ export class MainPageComponent implements OnInit, OnDestroy {
|
||||||
this.leftSideComponentWidth = this.defaultLeftSideComponentWidth;
|
this.leftSideComponentWidth = this.defaultLeftSideComponentWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickOpenProfile(userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN) {
|
onClickOpenProfile(params: {
|
||||||
|
userInfo: UserInfo | UserInfoSS | UserInfoF | UserInfoDN;
|
||||||
|
openProfileOptions?: OpenProfileOptions;
|
||||||
|
}) {
|
||||||
// [GROUP]
|
// [GROUP]
|
||||||
// this.queryProtocolService
|
// this.queryProtocolService
|
||||||
// .dataUser({
|
// .dataUser({
|
||||||
|
@ -275,7 +273,7 @@ export class MainPageComponent implements OnInit, OnDestroy {
|
||||||
this.daesangProtocolService
|
this.daesangProtocolService
|
||||||
.dataUserDaesang({
|
.dataUserDaesang({
|
||||||
divCd: 'OPENPROF',
|
divCd: 'OPENPROF',
|
||||||
seq: userInfo.seq,
|
seq: params.userInfo.seq,
|
||||||
senderCompanyCode: this.loginRes.userInfo.companyCode,
|
senderCompanyCode: this.loginRes.userInfo.companyCode,
|
||||||
senderEmployeeType: this.loginRes.userInfo.employeeType
|
senderEmployeeType: this.loginRes.userInfo.employeeType
|
||||||
})
|
})
|
||||||
|
@ -289,7 +287,8 @@ export class MainPageComponent implements OnInit, OnDestroy {
|
||||||
ProfileDialogResult
|
ProfileDialogResult
|
||||||
>(ProfileDialogComponent, {
|
>(ProfileDialogComponent, {
|
||||||
data: {
|
data: {
|
||||||
userInfo: res.userInfo
|
userInfo: res.userInfo,
|
||||||
|
openProfileOptions: params.openProfileOptions
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@ export const deptFailure = createAction(
|
||||||
'[Messenger::Query] Dept Failure',
|
'[Messenger::Query] Dept Failure',
|
||||||
props<{ error: any }>()
|
props<{ error: any }>()
|
||||||
);
|
);
|
||||||
|
|
||||||
export const deptUser = createAction(
|
export const deptUser = createAction(
|
||||||
'[Messenger::Query] Dept User',
|
'[Messenger::Query] Dept User',
|
||||||
props<DeptUserRequest>()
|
props<DeptUserRequest>()
|
||||||
|
@ -54,3 +53,8 @@ export const deptUserFailure = createAction(
|
||||||
'[Messenger::Query] Dept User Failure',
|
'[Messenger::Query] Dept User Failure',
|
||||||
props<{ error: any }>()
|
props<{ error: any }>()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const myDeptUserSuccess = createAction(
|
||||||
|
'[Messenger::Query] My Dept User Success',
|
||||||
|
props<{ userInfos: UserInfoSS[] }>()
|
||||||
|
);
|
||||||
|
|
|
@ -11,7 +11,8 @@ import {
|
||||||
deptFailure,
|
deptFailure,
|
||||||
deptUser,
|
deptUser,
|
||||||
deptUserSuccess,
|
deptUserSuccess,
|
||||||
deptUserFailure
|
deptUserFailure,
|
||||||
|
myDeptUserSuccess
|
||||||
} from './actions';
|
} from './actions';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
@ -28,6 +29,9 @@ import {
|
||||||
} from '@ucap-webmessenger/protocol-query';
|
} from '@ucap-webmessenger/protocol-query';
|
||||||
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
|
import { LoginResponse } from '@ucap-webmessenger/protocol-authentication';
|
||||||
|
import { KEY_LOGIN_RES_INFO } from '@app/types';
|
||||||
|
import { SessionStorageService } from '@ucap-webmessenger/web-storage';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Effects {
|
export class Effects {
|
||||||
|
@ -94,6 +98,18 @@ export class Effects {
|
||||||
res: res as DeptUserResponse
|
res: res as DeptUserResponse
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const loginResInfo: LoginResponse = this.sessionStorageService.get<
|
||||||
|
LoginResponse
|
||||||
|
>(KEY_LOGIN_RES_INFO);
|
||||||
|
|
||||||
|
if (req.seq === loginResInfo.departmentCode) {
|
||||||
|
this.store.dispatch(
|
||||||
|
myDeptUserSuccess({
|
||||||
|
userInfos
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
@ -108,6 +124,7 @@ export class Effects {
|
||||||
constructor(
|
constructor(
|
||||||
private actions$: Actions,
|
private actions$: Actions,
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
private queryProtocolService: QueryProtocolService
|
private queryProtocolService: QueryProtocolService,
|
||||||
|
private sessionStorageService: SessionStorageService
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@ import {
|
||||||
deptSuccess,
|
deptSuccess,
|
||||||
deptUserSuccess,
|
deptUserSuccess,
|
||||||
deptUser,
|
deptUser,
|
||||||
deptUserFailure
|
deptUserFailure,
|
||||||
|
myDeptUserSuccess
|
||||||
} from './actions';
|
} from './actions';
|
||||||
|
|
||||||
import * as AuthenticationStore from '@app/store/account/authentication';
|
import * as AuthenticationStore from '@app/store/account/authentication';
|
||||||
|
@ -49,6 +50,13 @@ export const reducer = createReducer(
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
on(myDeptUserSuccess, (state, action) => {
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
myDepartmentUserInfoList: action.userInfos
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
|
||||||
on(AuthenticationStore.logoutInitialize, (state, action) => {
|
on(AuthenticationStore.logoutInitialize, (state, action) => {
|
||||||
return {
|
return {
|
||||||
...initialState
|
...initialState
|
||||||
|
|
|
@ -14,6 +14,8 @@ export interface State {
|
||||||
selectedDepartmentUserInfoList: UserInfoSS[] | null;
|
selectedDepartmentUserInfoList: UserInfoSS[] | null;
|
||||||
selectedDepartmentStatus: DeptUserResponse | null;
|
selectedDepartmentStatus: DeptUserResponse | null;
|
||||||
selectedDepartmentProcessing: boolean;
|
selectedDepartmentProcessing: boolean;
|
||||||
|
|
||||||
|
myDepartmentUserInfoList: UserInfoSS[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const initialState: State = {
|
export const initialState: State = {
|
||||||
|
@ -21,15 +23,13 @@ export const initialState: State = {
|
||||||
departmentInfoList: null,
|
departmentInfoList: null,
|
||||||
selectedDepartmentUserInfoList: null,
|
selectedDepartmentUserInfoList: null,
|
||||||
selectedDepartmentStatus: null,
|
selectedDepartmentStatus: null,
|
||||||
selectedDepartmentProcessing: false
|
selectedDepartmentProcessing: false,
|
||||||
|
myDepartmentUserInfoList: null
|
||||||
};
|
};
|
||||||
|
|
||||||
export function selectors<S>(selector: Selector<any, State>) {
|
export function selectors<S>(selector: Selector<any, State>) {
|
||||||
return {
|
return {
|
||||||
auth: createSelector(
|
auth: createSelector(selector, (state: State) => state.auth),
|
||||||
selector,
|
|
||||||
(state: State) => state.auth
|
|
||||||
),
|
|
||||||
departmentInfoList: createSelector(
|
departmentInfoList: createSelector(
|
||||||
selector,
|
selector,
|
||||||
(state: State) => state.departmentInfoList
|
(state: State) => state.departmentInfoList
|
||||||
|
@ -45,6 +45,10 @@ export function selectors<S>(selector: Selector<any, State>) {
|
||||||
selectedDepartmentProcessing: createSelector(
|
selectedDepartmentProcessing: createSelector(
|
||||||
selector,
|
selector,
|
||||||
(state: State) => state.selectedDepartmentProcessing
|
(state: State) => state.selectedDepartmentProcessing
|
||||||
|
),
|
||||||
|
myDepartmentUserInfoList: createSelector(
|
||||||
|
selector,
|
||||||
|
(state: State) => state.myDepartmentUserInfoList
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,7 @@ import {
|
||||||
DialogService,
|
DialogService,
|
||||||
AlertDialogData
|
AlertDialogData
|
||||||
} from '@ucap-webmessenger/ui';
|
} from '@ucap-webmessenger/ui';
|
||||||
|
import { UserInfoSS } from '@ucap-webmessenger/protocol-query';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Effects {
|
export class Effects {
|
||||||
|
@ -719,9 +720,15 @@ export class Effects {
|
||||||
GroupDetailData
|
GroupDetailData
|
||||||
>
|
>
|
||||||
)
|
)
|
||||||
)
|
|
||||||
),
|
),
|
||||||
tap(([action, buddyList, groupList]) => {
|
this.store.pipe(
|
||||||
|
select(
|
||||||
|
(state: any) =>
|
||||||
|
state.messenger.query.myDepartmentUserInfoList as UserInfoSS[]
|
||||||
|
)
|
||||||
|
) // 내 부서원 비교.
|
||||||
|
),
|
||||||
|
tap(([action, buddyList, groupList, myDeptUserList]) => {
|
||||||
// Add Buddy
|
// Add Buddy
|
||||||
const addBuddyList: number[] = [];
|
const addBuddyList: number[] = [];
|
||||||
action.trgtUserSeq.forEach(item => {
|
action.trgtUserSeq.forEach(item => {
|
||||||
|
@ -734,15 +741,23 @@ export class Effects {
|
||||||
let delBuddyInGroup: number[] = action.oldGroup.userSeqs.filter(
|
let delBuddyInGroup: number[] = action.oldGroup.userSeqs.filter(
|
||||||
v => action.trgtUserSeq.indexOf(v) < 0
|
v => action.trgtUserSeq.indexOf(v) < 0
|
||||||
);
|
);
|
||||||
// tslint:disable-next-line: no-shadowed-variable
|
|
||||||
delBuddyInGroup = delBuddyInGroup.filter(delBuddy => {
|
// 소속부서(내부서) 고정그룹 사용시 소속부서원을 삭제하지 않는다.
|
||||||
|
if (environment.productConfig.CommonSetting.useMyDeptGroup) {
|
||||||
|
delBuddyInGroup = delBuddyInGroup.filter(
|
||||||
|
delbuddy =>
|
||||||
|
myDeptUserList.filter(deptUser => deptUser.seq === delbuddy)
|
||||||
|
.length === 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
delBuddyInGroup = delBuddyInGroup.filter(delbuddy => {
|
||||||
let exist = false;
|
let exist = false;
|
||||||
// tslint:disable-next-line: forin
|
// tslint:disable-next-line: forin
|
||||||
for (const key in groupList) {
|
for (const key in groupList) {
|
||||||
const group: GroupDetailData = groupList[key];
|
const group: GroupDetailData = groupList[key];
|
||||||
if (
|
if (
|
||||||
group.seq !== action.oldGroup.seq &&
|
group.seq !== action.oldGroup.seq &&
|
||||||
group.userSeqs.filter(v => v === delBuddy).length > 0
|
group.userSeqs.filter(v => v === delbuddy).length > 0
|
||||||
) {
|
) {
|
||||||
exist = true;
|
exist = true;
|
||||||
break;
|
break;
|
||||||
|
@ -856,20 +871,36 @@ export class Effects {
|
||||||
GroupDetailData
|
GroupDetailData
|
||||||
>
|
>
|
||||||
)
|
)
|
||||||
)
|
|
||||||
),
|
),
|
||||||
exhaustMap(([action, groupList]) => {
|
this.store.pipe(
|
||||||
|
select(
|
||||||
|
(state: any) =>
|
||||||
|
state.messenger.query.myDepartmentUserInfoList as UserInfoSS[]
|
||||||
|
)
|
||||||
|
) // 내 부서원 비교.
|
||||||
|
),
|
||||||
|
exhaustMap(([action, groupList, myDeptUserList]) => {
|
||||||
// Del Buddy
|
// Del Buddy
|
||||||
const trgtBuddys = action.group.userSeqs;
|
const trgtBuddys = action.group.userSeqs;
|
||||||
// tslint:disable-next-line: no-shadowed-variable
|
|
||||||
const delBuddyList = trgtBuddys.filter(delBuddy => {
|
let delBuddyList: number[] = [];
|
||||||
|
// 소속부서(내부서) 고정그룹 사용시 소속부서원을 삭제하지 않는다.
|
||||||
|
if (environment.productConfig.CommonSetting.useMyDeptGroup) {
|
||||||
|
delBuddyList = trgtBuddys.filter(
|
||||||
|
delbuddy =>
|
||||||
|
myDeptUserList.filter(deptUser => deptUser.seq === delbuddy)
|
||||||
|
.length === 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
delBuddyList = trgtBuddys.filter(delbuddy => {
|
||||||
let exist = false;
|
let exist = false;
|
||||||
// tslint:disable-next-line: forin
|
// tslint:disable-next-line: forin
|
||||||
for (const key in groupList) {
|
for (const key in groupList) {
|
||||||
const group: GroupDetailData = groupList[key];
|
const group: GroupDetailData = groupList[key];
|
||||||
if (
|
if (
|
||||||
group.seq !== action.group.seq &&
|
group.seq !== action.group.seq &&
|
||||||
group.userSeqs.filter(v => v === delBuddy).length > 0
|
group.userSeqs.filter(v => v === delbuddy).length > 0
|
||||||
) {
|
) {
|
||||||
exist = true;
|
exist = true;
|
||||||
break;
|
break;
|
||||||
|
@ -961,13 +992,27 @@ export class Effects {
|
||||||
GroupDetailData
|
GroupDetailData
|
||||||
>
|
>
|
||||||
)
|
)
|
||||||
)
|
|
||||||
),
|
),
|
||||||
tap(([req, groupList]) => {
|
this.store.pipe(
|
||||||
|
select(
|
||||||
|
(state: any) =>
|
||||||
|
state.messenger.query.myDepartmentUserInfoList as UserInfoSS[]
|
||||||
|
)
|
||||||
|
) // 내 부서원 비교.
|
||||||
|
),
|
||||||
|
tap(([req, groupList, myDeptUserList]) => {
|
||||||
// tslint:disable-next-line: forin
|
// tslint:disable-next-line: forin
|
||||||
for (const key in groupList) {
|
for (const key in groupList) {
|
||||||
const group: GroupDetailData = groupList[key];
|
const group: GroupDetailData = groupList[key];
|
||||||
if (group.userSeqs.indexOf(req.seq) > -1) {
|
if (group.userSeqs.indexOf(req.seq) > -1) {
|
||||||
|
// 소속부서(내부서) 고정그룹 사용시 소속부서원을 삭제하지 않는다.
|
||||||
|
if (
|
||||||
|
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||||
|
myDeptUserList.filter(deptUser => deptUser.seq === group.seq)
|
||||||
|
.length > 0
|
||||||
|
) {
|
||||||
|
// skip;;
|
||||||
|
} else {
|
||||||
// Group Clear..
|
// Group Clear..
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
updateGroup({
|
updateGroup({
|
||||||
|
@ -980,7 +1025,16 @@ export class Effects {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 소속부서(내부서) 고정그룹 사용시 소속부서원을 삭제하지 않는다.
|
||||||
|
if (
|
||||||
|
environment.productConfig.CommonSetting.useMyDeptGroup &&
|
||||||
|
myDeptUserList.filter(deptUser => deptUser.seq === req.seq).length >
|
||||||
|
0
|
||||||
|
) {
|
||||||
|
// skip;;
|
||||||
|
} else {
|
||||||
// Favorit Clear..
|
// Favorit Clear..
|
||||||
this.store.dispatch(
|
this.store.dispatch(
|
||||||
updateBuddy({
|
updateBuddy({
|
||||||
|
@ -991,6 +1045,7 @@ export class Effects {
|
||||||
|
|
||||||
// Buddy Clear..
|
// Buddy Clear..
|
||||||
this.store.dispatch(delBuddy({ userSeqs: [req.seq] }));
|
this.store.dispatch(delBuddy({ userSeqs: [req.seq] }));
|
||||||
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -606,7 +606,10 @@
|
||||||
"addNew": "Add new group",
|
"addNew": "Add new group",
|
||||||
"expandMore": "Expand all groups",
|
"expandMore": "Expand all groups",
|
||||||
"expandLess": "Collapse all groups",
|
"expandLess": "Collapse all groups",
|
||||||
"name": "Group name"
|
"name": "Group name",
|
||||||
|
"nameFavorit": "Favorit",
|
||||||
|
"nameMyDept": "My Dept",
|
||||||
|
"nameDefault": "Default"
|
||||||
},
|
},
|
||||||
"chat": {
|
"chat": {
|
||||||
"room": "Chat room",
|
"room": "Chat room",
|
||||||
|
|
|
@ -606,7 +606,10 @@
|
||||||
"addNew": "새 그룹 추가",
|
"addNew": "새 그룹 추가",
|
||||||
"expandMore": "그룹 전체 열기",
|
"expandMore": "그룹 전체 열기",
|
||||||
"expandLess": "그룹 전체 닫기",
|
"expandLess": "그룹 전체 닫기",
|
||||||
"name": "그룹 이름"
|
"name": "그룹 이름",
|
||||||
|
"nameFavorit": "즐겨찾기",
|
||||||
|
"nameMyDept": "소속부서",
|
||||||
|
"nameDefault": "기본"
|
||||||
},
|
},
|
||||||
"chat": {
|
"chat": {
|
||||||
"room": "대화방",
|
"room": "대화방",
|
||||||
|
|
|
@ -66,6 +66,9 @@ export const environment: Environment = {
|
||||||
CommonSetting: {
|
CommonSetting: {
|
||||||
editableProfileImage: false,
|
editableProfileImage: false,
|
||||||
|
|
||||||
|
useMyDeptGroup: true,
|
||||||
|
myDeptGroupSeq: -5,
|
||||||
|
|
||||||
useTimerRoom: false,
|
useTimerRoom: false,
|
||||||
timerRoomDefaultInterval: 24 * 60 * 60,
|
timerRoomDefaultInterval: 24 * 60 * 60,
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,9 @@ export const environment: Environment = {
|
||||||
CommonSetting: {
|
CommonSetting: {
|
||||||
editableProfileImage: false,
|
editableProfileImage: false,
|
||||||
|
|
||||||
|
useMyDeptGroup: true,
|
||||||
|
myDeptGroupSeq: -5,
|
||||||
|
|
||||||
useTimerRoom: false,
|
useTimerRoom: false,
|
||||||
timerRoomDefaultInterval: 24 * 60 * 60,
|
timerRoomDefaultInterval: 24 * 60 * 60,
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,9 @@ export const environment: Environment = {
|
||||||
CommonSetting: {
|
CommonSetting: {
|
||||||
editableProfileImage: true,
|
editableProfileImage: true,
|
||||||
|
|
||||||
|
useMyDeptGroup: false,
|
||||||
|
myDeptGroupSeq: -999,
|
||||||
|
|
||||||
useTimerRoom: true,
|
useTimerRoom: true,
|
||||||
timerRoomDefaultInterval: 24 * 60 * 60,
|
timerRoomDefaultInterval: 24 * 60 * 60,
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,9 @@ export const environment: Environment = {
|
||||||
CommonSetting: {
|
CommonSetting: {
|
||||||
editableProfileImage: true,
|
editableProfileImage: true,
|
||||||
|
|
||||||
|
useMyDeptGroup: false,
|
||||||
|
myDeptGroupSeq: -999,
|
||||||
|
|
||||||
useTimerRoom: true,
|
useTimerRoom: true,
|
||||||
timerRoomDefaultInterval: 24 * 60 * 60,
|
timerRoomDefaultInterval: 24 * 60 * 60,
|
||||||
|
|
||||||
|
|
|
@ -64,8 +64,14 @@ export interface Environment {
|
||||||
defaultSettings: Settings;
|
defaultSettings: Settings;
|
||||||
|
|
||||||
CommonSetting: {
|
CommonSetting: {
|
||||||
|
/** 내 프로필 이미지 수정 가능 여부 */
|
||||||
editableProfileImage: boolean;
|
editableProfileImage: boolean;
|
||||||
|
|
||||||
|
/** 소속부서(내부서) 그룹핑 사용여부 */
|
||||||
|
useMyDeptGroup: boolean;
|
||||||
|
/** 소속부서(내부서) 고정 그룹 SEQ */
|
||||||
|
myDeptGroupSeq: number;
|
||||||
|
|
||||||
/** 타이머대화방 사용유무 */
|
/** 타이머대화방 사용유무 */
|
||||||
useTimerRoom: boolean;
|
useTimerRoom: boolean;
|
||||||
/** 타이머대화방 기본 interval */
|
/** 타이머대화방 기본 interval */
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
export interface OpenProfileOptions {
|
||||||
|
useDelBuddybutton?: boolean;
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ export * from './lib/protocols/update';
|
||||||
|
|
||||||
export * from './lib/services/buddy-protocol.service';
|
export * from './lib/services/buddy-protocol.service';
|
||||||
|
|
||||||
|
export * from './lib/types/openProfileOptions';
|
||||||
export * from './lib/types/service';
|
export * from './lib/types/service';
|
||||||
|
|
||||||
export * from './lib/ucap-buddy-protocol.module';
|
export * from './lib/ucap-buddy-protocol.module';
|
||||||
|
|
|
@ -52,25 +52,37 @@
|
||||||
{{ treeControl.isExpanded(node) ? 'expand_less' : 'expand_more' }}
|
{{ treeControl.isExpanded(node) ? 'expand_less' : 'expand_more' }}
|
||||||
</mat-icon>
|
</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ng-container [ngSwitch]="node.nodeType">
|
<ng-container [ngSwitch]="node.nodeType">
|
||||||
<span *ngSwitchCase="NodeType.Profile">
|
<span *ngSwitchCase="NodeType.Profile">
|
||||||
<span class="title-name ellipsis">내 프로필</span>
|
<span class="title-name ellipsis">내 프로필</span>
|
||||||
</span>
|
</span>
|
||||||
<span *ngSwitchCase="NodeType.Favorit">
|
<span *ngSwitchCase="NodeType.Favorit">
|
||||||
<span class="title-name ellipsis">즐겨찾기</span>
|
<span class="title-name ellipsis">{{
|
||||||
<span class="text-accent-color number">
|
'group.nameFavorit' | translate
|
||||||
({{ node.countOfChildren }}명)</span
|
}}</span>
|
||||||
></span
|
</span>
|
||||||
>
|
<span *ngSwitchCase="NodeType.Default">
|
||||||
|
<span class="title-name ellipsis">{{
|
||||||
|
'group.nameDefault' | translate
|
||||||
|
}}</span>
|
||||||
|
</span>
|
||||||
|
<span *ngSwitchCase="NodeType.MyDept">
|
||||||
|
<span class="title-name ellipsis">{{
|
||||||
|
'group.nameMyDept' | translate
|
||||||
|
}}</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
<span *ngSwitchCase="NodeType.Buddy">
|
<span *ngSwitchCase="NodeType.Buddy">
|
||||||
<span class="title-name ellipsis">{{
|
<span class="title-name ellipsis">{{
|
||||||
node.groupDetail.name
|
node.groupDetail.name
|
||||||
}}</span>
|
}}</span>
|
||||||
|
</span>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<span class="text-accent-color number">
|
<span class="text-accent-color number">
|
||||||
({{ node.countOfChildren }}명)</span
|
({{ node.countOfChildren }}명)</span
|
||||||
>
|
>
|
||||||
</span>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<mat-checkbox
|
<mat-checkbox
|
||||||
*ngIf="checkable"
|
*ngIf="checkable"
|
||||||
|
|
|
@ -33,7 +33,9 @@ enum NodeType {
|
||||||
None = 'None',
|
None = 'None',
|
||||||
Favorit = 'Favorit',
|
Favorit = 'Favorit',
|
||||||
Profile = 'Profile',
|
Profile = 'Profile',
|
||||||
Buddy = 'Buddy'
|
Buddy = 'Buddy',
|
||||||
|
Default = 'Default',
|
||||||
|
MyDept = 'MyDept'
|
||||||
}
|
}
|
||||||
|
|
||||||
interface GroupNode {
|
interface GroupNode {
|
||||||
|
@ -111,8 +113,15 @@ export class ExpansionPanelComponent
|
||||||
this.buddyNodes = [];
|
this.buddyNodes = [];
|
||||||
|
|
||||||
for (const item of list) {
|
for (const item of list) {
|
||||||
|
let nodeType = NodeType.Buddy;
|
||||||
|
if (item.group.seq === 0) {
|
||||||
|
nodeType = NodeType.Default;
|
||||||
|
} else if (item.group.seq === -5) {
|
||||||
|
nodeType = NodeType.MyDept;
|
||||||
|
}
|
||||||
|
|
||||||
const groupNode: GroupNode = {
|
const groupNode: GroupNode = {
|
||||||
nodeType: NodeType.Buddy,
|
nodeType,
|
||||||
groupDetail: item.group,
|
groupDetail: item.group,
|
||||||
children: []
|
children: []
|
||||||
};
|
};
|
||||||
|
@ -123,7 +132,7 @@ export class ExpansionPanelComponent
|
||||||
|
|
||||||
item.buddyList.forEach(userInfo => {
|
item.buddyList.forEach(userInfo => {
|
||||||
groupNode.children.push({
|
groupNode.children.push({
|
||||||
nodeType: NodeType.Buddy,
|
nodeType,
|
||||||
groupDetail: item.group,
|
groupDetail: item.group,
|
||||||
userInfo
|
userInfo
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,6 +16,7 @@ import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
||||||
|
|
||||||
import { ExpansionPanelComponent } from './components/expansion-panel.component';
|
import { ExpansionPanelComponent } from './components/expansion-panel.component';
|
||||||
import { ExpansionPanelItemDirective } from './directives/expansion-panel-item.directive';
|
import { ExpansionPanelItemDirective } from './directives/expansion-panel-item.directive';
|
||||||
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
const COMPONENTS = [ExpansionPanelComponent];
|
const COMPONENTS = [ExpansionPanelComponent];
|
||||||
const DIALOGS = [];
|
const DIALOGS = [];
|
||||||
|
@ -30,6 +31,8 @@ const SERVICES = [];
|
||||||
|
|
||||||
ScrollingModule,
|
ScrollingModule,
|
||||||
|
|
||||||
|
TranslateModule,
|
||||||
|
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
MatExpansionModule,
|
MatExpansionModule,
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
</span>
|
</span>
|
||||||
<span class="dept">
|
<span class="dept">
|
||||||
{{ message.regDate | ucapDate: 'MM:DD' }}
|
{{ message.regDate | ucapDate: 'MM:DD' }}
|
||||||
|
<div *ngIf="message.type === MessageType.Receive && !message.readYn">
|
||||||
|
New
|
||||||
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
|
@ -86,7 +86,6 @@
|
||||||
</svg>
|
</svg>
|
||||||
</span>
|
</span>
|
||||||
<span class="btn-groupadd">
|
<span class="btn-groupadd">
|
||||||
<ng-container [ngSwitch]="isBuddy">
|
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
width="20"
|
width="20"
|
||||||
|
@ -98,7 +97,7 @@
|
||||||
stroke-linecap="butt"
|
stroke-linecap="butt"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
class="on"
|
class="on"
|
||||||
*ngSwitchCase="false"
|
*ngIf="!isBuddy"
|
||||||
(click)="onClickAddBuddy()"
|
(click)="onClickAddBuddy()"
|
||||||
matTooltip="동료추가"
|
matTooltip="동료추가"
|
||||||
>
|
>
|
||||||
|
@ -120,7 +119,7 @@
|
||||||
stroke-linecap="butt"
|
stroke-linecap="butt"
|
||||||
stroke-linejoin="round"
|
stroke-linejoin="round"
|
||||||
class="on"
|
class="on"
|
||||||
*ngSwitchCase="true"
|
*ngIf="getShowBuddyDelBtn()"
|
||||||
(click)="onClickDelBuddy()"
|
(click)="onClickDelBuddy()"
|
||||||
matTooltip="동료삭제"
|
matTooltip="동료삭제"
|
||||||
>
|
>
|
||||||
|
@ -129,7 +128,6 @@
|
||||||
<circle cx="8.5" cy="7" r="4"></circle>
|
<circle cx="8.5" cy="7" r="4"></circle>
|
||||||
<line x1="23" y1="11" x2="17" y2="11"></line>
|
<line x1="23" y1="11" x2="17" y2="11"></line>
|
||||||
</svg>
|
</svg>
|
||||||
</ng-container>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div *ngIf="isMe" class="profile-edit">
|
<!-- <div *ngIf="isMe" class="profile-edit">
|
||||||
|
|
|
@ -9,8 +9,8 @@ import {
|
||||||
Inject
|
Inject
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { UserInfo } from '@ucap-webmessenger/protocol-sync';
|
import { UserInfoSS } from '@ucap-webmessenger/protocol-query';
|
||||||
import { UserInfoF, UserInfoSS } from '@ucap-webmessenger/protocol-query';
|
import { OpenProfileOptions } from '@ucap-webmessenger/protocol-buddy';
|
||||||
import { FileUploadItem } from '@ucap-webmessenger/api';
|
import { FileUploadItem } from '@ucap-webmessenger/api';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { SmsUtils } from '@ucap-webmessenger/daesang';
|
import { SmsUtils } from '@ucap-webmessenger/daesang';
|
||||||
|
@ -37,6 +37,8 @@ export class ProfileComponent implements OnInit {
|
||||||
userInfo: UserInfoSS;
|
userInfo: UserInfoSS;
|
||||||
@Input()
|
@Input()
|
||||||
myMadn?: string;
|
myMadn?: string;
|
||||||
|
@Input()
|
||||||
|
openProfileOptions?: OpenProfileOptions;
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
openChat = new EventEmitter<UserInfoSS>();
|
openChat = new EventEmitter<UserInfoSS>();
|
||||||
|
@ -194,4 +196,19 @@ export class ProfileComponent implements OnInit {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getShowBuddyDelBtn(): boolean {
|
||||||
|
if (!!this.isBuddy) {
|
||||||
|
if (
|
||||||
|
!!this.openProfileOptions &&
|
||||||
|
!this.openProfileOptions.useDelBuddybutton
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user