From 2a992606b2464e39301a64ef96d598eff88fb91a Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 18 Dec 2019 08:40:45 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=A0=EC=A0=95=EA=B7=B8=EB=A3=B9=EC=97=90?= =?UTF-8?q?=20=EB=8C=80=ED=95=9C=20=ED=95=B8=EB=93=A4=EB=A7=81=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/left-sidenav/group.component.ts | 16 ++++++++++++++++ .../group/select-group.dialog.component.ts | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts index 7cc0f1ec..dea79d60 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/group.component.ts @@ -381,6 +381,22 @@ export class GroupComponent implements OnInit, OnDestroy { } } + /** 수정불가 그룹 핸들링. */ + if ( + !!group && + !!environment.customConfig && + !!environment.customConfig.fixedGroupSeqs + ) { + const fixedGroupSeqs: number[] = environment.customConfig.fixedGroupSeqs; + if (!!fixedGroupSeqs && fixedGroupSeqs.length > 0) { + if (fixedGroupSeqs.indexOf(group.seq) > -1) { + if (menuType === 'REMOVE_FROM_GROUP' || menuType === 'MOVE_BUDDY') { + return false; + } + } + } + } + return true; } async onClickProfileContextMenu( diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/select-group.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/select-group.dialog.component.ts index a92a2d71..e50d998a 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/select-group.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/select-group.dialog.component.ts @@ -19,6 +19,7 @@ import { ConfirmDialogResult } from '@ucap-webmessenger/ui'; import { GroupDetailData, UserInfo } from '@ucap-webmessenger/protocol-sync'; +import { environment } from '../../../../../environments/environment'; export interface SelectGroupDialogData { title: string; @@ -68,11 +69,27 @@ export class SelectGroupDialogComponent implements OnInit { ) ]).pipe( map(([buddyList, groupList]) => { + /** 수정불가 그룹 */ + let fixedGroupSeqs: number[]; + if ( + !!environment.customConfig && + !!environment.customConfig.fixedGroupSeqs + ) { + fixedGroupSeqs = environment.customConfig.fixedGroupSeqs; + } + const groupBuddyList: { group: GroupDetailData; buddyList: UserInfo[]; }[] = []; for (const group of groupList) { + /** 수정불가 그룹 필터링. */ + if (!!fixedGroupSeqs && fixedGroupSeqs.length > 0) { + if (fixedGroupSeqs.indexOf(group.seq) > -1) { + continue; + } + } + groupBuddyList.push({ group, buddyList: buddyList.filter(buddy => {