고정그룹에 대한 핸들링 처리

This commit is contained in:
leejinho 2019-12-18 08:40:45 +09:00
parent 900e9b57ea
commit 2a992606b2
2 changed files with 33 additions and 0 deletions

View File

@ -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(

View File

@ -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 => {