# 이슈처리 234
This commit is contained in:
parent
6e78aa3115
commit
7d86529796
|
@ -483,7 +483,7 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
|
||||
return true;
|
||||
}
|
||||
async onClickProfileContextMenu(
|
||||
onClickProfileContextMenu(
|
||||
menuType: string,
|
||||
userInfo: UserInfo | UserInfoF,
|
||||
group?: GroupDetailData
|
||||
|
@ -497,142 +497,144 @@ export class GroupComponent implements OnInit, OnDestroy {
|
|||
'group',
|
||||
group
|
||||
);
|
||||
switch (menuType) {
|
||||
case 'VIEW_PROFILE':
|
||||
this.onClickOpenProfile(userInfo.seq, group);
|
||||
break;
|
||||
case 'CHAT':
|
||||
this.onSelectBuddy(userInfo);
|
||||
break;
|
||||
case 'REMOVE_FROM_GROUP':
|
||||
{
|
||||
const result = await this.dialogService.open<
|
||||
ConfirmDialogComponent,
|
||||
ConfirmDialogData,
|
||||
ConfirmDialogResult
|
||||
>(ConfirmDialogComponent, {
|
||||
width: '360px',
|
||||
data: {
|
||||
title: this.translateService.instant(
|
||||
'group.removeBuddyFromGroup'
|
||||
),
|
||||
html: this.translateService.instant(
|
||||
'group.confirmRemoveBuddyFromGroupInContextMenu',
|
||||
{
|
||||
target: `${userInfo.name} ${userInfo.grade}`,
|
||||
targetGroup: `${group.name}`
|
||||
}
|
||||
)
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
const trgtUserSeq = group.userSeqs.filter(
|
||||
user => user !== userInfo.seq
|
||||
);
|
||||
this.store.dispatch(
|
||||
SyncStore.updateGroupMember({
|
||||
oldGroup: group,
|
||||
trgtUserSeq
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'COPY_BUDDY':
|
||||
{
|
||||
const result = await this.dialogService.open<
|
||||
SelectGroupDialogComponent,
|
||||
SelectGroupDialogData,
|
||||
SelectGroupDialogResult
|
||||
>(SelectGroupDialogComponent, {
|
||||
width: '600px',
|
||||
data: {
|
||||
title: this.translateService.instant('group.selectTargetGroup')
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
if (!!result.group) {
|
||||
const oldGroup: GroupDetailData = result.group;
|
||||
const trgtUserSeq: number[] = [];
|
||||
let exist = false;
|
||||
result.group.userSeqs.map(seq => {
|
||||
trgtUserSeq.push(seq);
|
||||
if (seq === userInfo.seq) {
|
||||
exist = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (!exist) {
|
||||
trgtUserSeq.push(userInfo.seq);
|
||||
this.ngZone.run(async () => {
|
||||
switch (menuType) {
|
||||
case 'VIEW_PROFILE':
|
||||
this.onClickOpenProfile(userInfo.seq, group);
|
||||
break;
|
||||
case 'CHAT':
|
||||
this.onSelectBuddy(userInfo);
|
||||
break;
|
||||
case 'REMOVE_FROM_GROUP':
|
||||
{
|
||||
const result = await this.dialogService.open<
|
||||
ConfirmDialogComponent,
|
||||
ConfirmDialogData,
|
||||
ConfirmDialogResult
|
||||
>(ConfirmDialogComponent, {
|
||||
width: '360px',
|
||||
data: {
|
||||
title: this.translateService.instant(
|
||||
'group.removeBuddyFromGroup'
|
||||
),
|
||||
html: this.translateService.instant(
|
||||
'group.confirmRemoveBuddyFromGroupInContextMenu',
|
||||
{
|
||||
target: `${userInfo.name} ${userInfo.grade}`,
|
||||
targetGroup: `${group.name}`
|
||||
}
|
||||
)
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
const trgtUserSeq = group.userSeqs.filter(
|
||||
user => user !== userInfo.seq
|
||||
);
|
||||
this.store.dispatch(
|
||||
SyncStore.updateGroupMember({
|
||||
oldGroup,
|
||||
oldGroup: group,
|
||||
trgtUserSeq
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'MOVE_BUDDY':
|
||||
{
|
||||
const result = await this.dialogService.open<
|
||||
SelectGroupDialogComponent,
|
||||
SelectGroupDialogData,
|
||||
SelectGroupDialogResult
|
||||
>(SelectGroupDialogComponent, {
|
||||
width: '600px',
|
||||
data: {
|
||||
title: this.translateService.instant('group.selectTargetGroup'),
|
||||
ignoreGroup: [group]
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'COPY_BUDDY':
|
||||
{
|
||||
const result = await this.dialogService.open<
|
||||
SelectGroupDialogComponent,
|
||||
SelectGroupDialogData,
|
||||
SelectGroupDialogResult
|
||||
>(SelectGroupDialogComponent, {
|
||||
width: '600px',
|
||||
data: {
|
||||
title: this.translateService.instant('group.selectTargetGroup')
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
if (!!result.group) {
|
||||
this.store.dispatch(
|
||||
SyncStore.moveGroupMember({
|
||||
fromGroup: group,
|
||||
toGroup: result.group,
|
||||
trgtUserSeq: [userInfo.seq]
|
||||
})
|
||||
);
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
if (!!result.group) {
|
||||
const oldGroup: GroupDetailData = result.group;
|
||||
const trgtUserSeq: number[] = [];
|
||||
let exist = false;
|
||||
result.group.userSeqs.map(seq => {
|
||||
trgtUserSeq.push(seq);
|
||||
if (seq === userInfo.seq) {
|
||||
exist = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (!exist) {
|
||||
trgtUserSeq.push(userInfo.seq);
|
||||
}
|
||||
|
||||
this.store.dispatch(
|
||||
SyncStore.updateGroupMember({
|
||||
oldGroup,
|
||||
trgtUserSeq
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'REGISTER_FAVORITE':
|
||||
this.store.dispatch(
|
||||
SyncStore.updateBuddy({
|
||||
seq: userInfo.seq,
|
||||
isFavorit: !userInfo.isFavorit
|
||||
})
|
||||
);
|
||||
break;
|
||||
case 'SEND_MESSAGE':
|
||||
{
|
||||
this.dialogService.open<
|
||||
MessageWriteDialogComponent,
|
||||
MessageWriteDialogData,
|
||||
MessageWriteDialogResult
|
||||
>(MessageWriteDialogComponent, {
|
||||
width: '600px',
|
||||
height: '600px',
|
||||
disableClose: true,
|
||||
hasBackdrop: false,
|
||||
data: {
|
||||
loginRes: this.loginRes,
|
||||
environmentsInfo: this.environmentsInfo,
|
||||
receiverList: [userInfo]
|
||||
break;
|
||||
case 'MOVE_BUDDY':
|
||||
{
|
||||
const result = await this.dialogService.open<
|
||||
SelectGroupDialogComponent,
|
||||
SelectGroupDialogData,
|
||||
SelectGroupDialogResult
|
||||
>(SelectGroupDialogComponent, {
|
||||
width: '600px',
|
||||
data: {
|
||||
title: this.translateService.instant('group.selectTargetGroup'),
|
||||
ignoreGroup: [group]
|
||||
}
|
||||
});
|
||||
|
||||
if (!!result && !!result.choice && result.choice) {
|
||||
if (!!result.group) {
|
||||
this.store.dispatch(
|
||||
SyncStore.moveGroupMember({
|
||||
fromGroup: group,
|
||||
toGroup: result.group,
|
||||
trgtUserSeq: [userInfo.seq]
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'REGISTER_FAVORITE':
|
||||
this.store.dispatch(
|
||||
SyncStore.updateBuddy({
|
||||
seq: userInfo.seq,
|
||||
isFavorit: !userInfo.isFavorit
|
||||
})
|
||||
);
|
||||
break;
|
||||
case 'SEND_MESSAGE':
|
||||
{
|
||||
this.dialogService.open<
|
||||
MessageWriteDialogComponent,
|
||||
MessageWriteDialogData,
|
||||
MessageWriteDialogResult
|
||||
>(MessageWriteDialogComponent, {
|
||||
width: '600px',
|
||||
height: '600px',
|
||||
disableClose: true,
|
||||
hasBackdrop: false,
|
||||
data: {
|
||||
loginRes: this.loginRes,
|
||||
environmentsInfo: this.environmentsInfo,
|
||||
receiverList: [userInfo]
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onClickOpenProfile(userSeq: number, group: GroupDetailData) {
|
||||
|
|
|
@ -81,7 +81,7 @@ export const environment: Environment = {
|
|||
maxChatRoomUser: 300,
|
||||
masstextLength: 800,
|
||||
|
||||
eventRequestInitCount: 15,
|
||||
eventRequestInitCount: 30,
|
||||
eventRequestDefaultCount: 50,
|
||||
|
||||
readHereShowMinimumEventCount: 10,
|
||||
|
|
Loading…
Reference in New Issue
Block a user