From d099bcb0351b3d3cdb58b724810568cee000d7af Mon Sep 17 00:00:00 2001 From: leejh Date: Wed, 30 Oct 2019 11:12:45 +0900 Subject: [PATCH] =?UTF-8?q?bug=20fix=201.=20=EB=8C=80=ED=99=94=EC=B0=BD=20?= =?UTF-8?q?>=20=EB=B9=88=EA=B0=92=EC=9C=BC=EB=A1=9C=20=EB=8C=80=ED=99=94?= =?UTF-8?q?=20=EC=9E=85=EB=A0=A5=EC=8B=9C=20alert=202.=20=EB=8C=80?= =?UTF-8?q?=ED=99=94=EB=B0=A9=20>=20=EB=8C=80=ED=99=94=20>=20=EB=8C=80?= =?UTF-8?q?=ED=99=94=EC=A0=84=EB=8B=AC=20=ED=8C=9D=EC=97=85=20::=20?= =?UTF-8?q?=EB=8C=80=ED=99=94=EB=B0=A9=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=95=88=EB=82=98=EC=98=A4=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/messages.component.ts | 22 ++++++++++++++-- .../chat/create-chat.dialog.component.html | 25 +++++++++++++++---- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index a32b3d69..0156c9c3 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -13,7 +13,10 @@ import { DialogService, ConfirmDialogComponent, ConfirmDialogData, - ConfirmDialogResult + ConfirmDialogResult, + AlertDialogComponent, + AlertDialogData, + AlertDialogResult } from '@ucap-webmessenger/ui'; import { Store, select } from '@ngrx/store'; import { NGXLogger } from 'ngx-logger'; @@ -198,7 +201,22 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewChecked { selectContact() {} - onSendMessage(message: string) { + async onSendMessage(message: string) { + if (!message || message.trim().length === 0) { + const result = await this.dialogService.open< + AlertDialogComponent, + AlertDialogData, + AlertDialogResult + >(AlertDialogComponent, { + width: '360px', + data: { + title: 'Alert', + message: `대화내용을 입력해주세요.` + } + }); + return; + } + if (message.trim().length > Maximum_Range.MassText) { // MASS TEXT this.store.dispatch( diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html index 9ecf1605..4460c97b 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/chat/create-chat.dialog.component.html @@ -5,7 +5,10 @@
- + chat
- + + +
-
+