From a4d0ccd497808871f356d4c9f52b8a30e5efd8c6 Mon Sep 17 00:00:00 2001 From: leejinho Date: Tue, 7 Jan 2020 17:46:06 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=BC=EC=A0=95=20=EC=9C=A0=EC=9E=85?= =?UTF-8?q?=EC=8B=9C=20=EB=8C=80=ED=99=94=EB=B0=A9=20=EB=A6=AC=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EC=99=80=20=EC=AA=BD=EC=A7=80=20=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=20=EC=95=88=EB=82=98=EC=98=A4=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../message-box/schedule.component.ts | 2 +- .../src/lib/utils/string.util.ts | 21 ++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.ts b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.ts index c16f1b4e..e163e7e5 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.ts +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.ts @@ -26,7 +26,7 @@ export class ScheduleComponent implements OnInit { if (!!this.message.sentMessageJson.date) { let str_date = this.message.sentMessageJson.date .replace(/ /g, '') - // .replace(/\n/g, '') + .replace(/\n/g, '') .replace(/(\([월,화,수,목,금,토,일]\))/g, ''); if (str_date.indexOf('오전') > -1) { str_date = str_date.replace('오전', ' '); diff --git a/projects/ucap-webmessenger-ui/src/lib/utils/string.util.ts b/projects/ucap-webmessenger-ui/src/lib/utils/string.util.ts index 90324351..68a5eec7 100644 --- a/projects/ucap-webmessenger-ui/src/lib/utils/string.util.ts +++ b/projects/ucap-webmessenger-ui/src/lib/utils/string.util.ts @@ -4,7 +4,9 @@ import { FileEventJson, MassTextEventJson, TranslationEventJson, - MassTranslationEventJson + MassTranslationEventJson, + PlanEventJson, + PlanContentType } from '@ucap-webmessenger/protocol-event'; import { FileType } from '@ucap-webmessenger/protocol-file'; @@ -206,6 +208,23 @@ export class StringUtil { eventMessage = m.original; } break; + case EventType.Plan: + const m = finalEventMessage as PlanEventJson; + switch (m.contents) { + case PlanContentType.New: + eventMessage = '새로운 일정이 등록되었습니다.'; + break; + case PlanContentType.Update: + eventMessage = '일정이 수정되었습니다.'; + break; + case PlanContentType.Delete: + eventMessage = '일정이 취소되었습니다.'; + break; + default: + eventMessage = '일정이 업데이트 되었습니다.'; + break; + } + break; default: {