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 6e8ca823..8f477c8c 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
@@ -11,7 +11,13 @@ import { map, tap } from 'rxjs/operators';
import { Store, select } from '@ngrx/store';
-import { ucapAnimations, DialogService } from '@ucap-webmessenger/ui';
+import {
+ ucapAnimations,
+ DialogService,
+ ConfirmDialogData,
+ ConfirmDialogComponent,
+ ConfirmDialogResult
+} from '@ucap-webmessenger/ui';
import { UserInfo, GroupDetailData } from '@ucap-webmessenger/protocol-sync';
import * as AppStore from '@app/store';
@@ -295,12 +301,25 @@ export class GroupComponent implements OnInit, OnDestroy {
EditGroupDialogData,
EditGroupDialogResult
>(EditGroupDialogComponent, {
- width: '220px',
+ width: '600px',
+ height: '500px',
data: {
- title: 'Logout',
- message: 'Logout ?'
+ title: 'Group Name Edit',
+ group
}
});
+
+ if (!!result && !!result.choice && result.choice) {
+ if (!!result.groupName && result.groupName.trim().length > 0) {
+ this.store.dispatch(
+ SyncStore.updateGroup({
+ groupSeq: result.group.seq,
+ groupName: result.groupName,
+ userSeqs: result.group.userSeqs
+ })
+ );
+ }
+ }
}
break;
case 'EDIT_MEMBER':
@@ -337,31 +356,21 @@ export class GroupComponent implements OnInit, OnDestroy {
case 'DELETE':
{
const result = await this.dialogService.open<
- DeleteGroupDialogComponent,
- DeleteGroupDialogData,
- DeleteGroupDialogResult
- >(DeleteGroupDialogComponent, {
+ ConfirmDialogComponent,
+ ConfirmDialogData,
+ ConfirmDialogResult
+ >(ConfirmDialogComponent, {
width: '220px',
data: {
- title: 'Logout',
- message: 'Logout ?'
- }
- });
- }
- break;
- case 'EDIT_MEMBER':
- {
- const result = await this.dialogService.open<
- EditGroupMemberDialogComponent,
- EditGroupMemberDialogData,
- EditGroupMemberDialogResult
- >(EditGroupMemberDialogComponent, {
- width: '220px',
- data: {
- title: 'Logout',
- message: 'Logout ?'
+ title: 'Delete group',
+ html: `그룹(${group.name})을 삭제하시겠습니까?
그룹 멤버는 해당 그룹에서만 삭제됩니다.`
}
});
+
+ if (!!result && !!result.choice && result.choice) {
+ this.logger.debug('delete group', group);
+ this.store.dispatch(SyncStore.delGroup({ group }));
+ }
}
break;
default:
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.html
index 7e2dcc5e..cd8e6a7f 100644
--- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.html
+++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/group/edit-group.dialog.component.html
@@ -1,8 +1,21 @@
-
- 그룹 이름 수정
+
+ {{ data.title }}
-
+
+
+