diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/en.json b/projects/ucap-webmessenger-app/src/assets/i18n/en.json
index 57c687db..476cf86f 100644
--- a/projects/ucap-webmessenger-app/src/assets/i18n/en.json
+++ b/projects/ucap-webmessenger-app/src/assets/i18n/en.json
@@ -253,6 +253,8 @@
"scheduleTypeUpdate": "[Event] Modified",
"scheduleTypeDelete": "[Event] Deleted",
"scheduleTypeDefault": "[Event] Processing..",
+ "scheduleTypePrefix": "[Event] ",
+ "scheduleTypeSurfixLeft": " left",
"showPreviousEvents": "Show previous",
"moreUnreadEventsWith": "There is unread messages({{countOfUnread}})"
},
diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json
index 7eeab21d..0fd8399b 100644
--- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json
+++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json
@@ -253,6 +253,8 @@
"scheduleTypeUpdate": "[이벤트] 수정",
"scheduleTypeDelete": "[이벤트] 삭제",
"scheduleTypeDefault": "[이벤트] 조회중..",
+ "scheduleTypePrefix": "[이벤트] ",
+ "scheduleTypeSurfixLeft": " 전 알림",
"showPreviousEvents": "이전 대화 보기",
"moreUnreadEventsWith": "안읽은 메시지가 ({{countOfUnread}})개 더 있습니다."
},
diff --git a/projects/ucap-webmessenger-protocol-event/src/lib/protocols/event-json/plan.event-json.ts b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/event-json/plan.event-json.ts
index 194e7aa8..dc496388 100644
--- a/projects/ucap-webmessenger-protocol-event/src/lib/protocols/event-json/plan.event-json.ts
+++ b/projects/ucap-webmessenger-protocol-event/src/lib/protocols/event-json/plan.event-json.ts
@@ -4,7 +4,7 @@ import { JsonAnalization } from '@ucap-webmessenger/api';
export interface PlanEventJson {
planSeq?: number;
title?: string;
- contents?: PlanContentType;
+ contents?: PlanContentType | string;
date?: string;
endDate?: string;
active?: boolean;
@@ -23,7 +23,7 @@ export const decodePlanEventJson: EventJsonDecoder = (
return {
planSeq: json.planSeq,
title: json.title,
- contents: json.contents as PlanContentType,
+ contents: json.contents,
date: json.date,
endDate: json.endDate,
active: !!json.activeYn && 'Y' === json.activeYn ? true : false
diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.html
index 079e7dcd..30a7a8d6 100644
--- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.html
+++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/schedule.component.html
@@ -14,7 +14,8 @@
{{ 'chat.event.scheduleTypeDelete' | translate }}
- {{ 'chat.event.scheduleTypeDefault' | translate }}
+
+ {{ getAlertLeftTime() }}
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 0e93c281..b476f2c8 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
@@ -5,6 +5,7 @@ import {
PlanContentType
} from '@ucap-webmessenger/protocol-event';
import moment from 'moment';
+import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'ucap-chat-message-box-schedule',
@@ -19,7 +20,7 @@ export class ScheduleComponent implements OnInit {
date: any;
endDate: any;
- constructor() {}
+ constructor(private translateService: TranslateService) {}
ngOnInit() {
if (!!this.message && !!this.message.sentMessageJson) {
@@ -68,4 +69,31 @@ export class ScheduleComponent implements OnInit {
}
onClickSave(): void {}
+
+ getAlertLeftTime(): string {
+ let content = this.message.sentMessageJson.contents;
+ if (content.indexOf('PLAN_CONTENTS_MINUTE') > -1) {
+ content = content.replace(
+ 'PLAN_CONTENTS_MINUTE',
+ this.translateService.instant('common.units.minute')
+ );
+ } else if (content.indexOf('PLAN_CONTENTS_HOUR') > -1) {
+ content = content.replace(
+ 'PLAN_CONTENTS_HOUR',
+ this.translateService.instant('common.units.hour')
+ );
+ }
+
+ if (content.indexOf('PLAN_CONTENTS_AFTER') > -1) {
+ content = content.replace(
+ 'PLAN_CONTENTS_AFTER',
+ this.translateService.instant('chat.event.scheduleTypeSurfixLeft')
+ );
+ }
+
+ content =
+ this.translateService.instant('chat.event.scheduleTypePrefix') + content;
+
+ return content;
+ }
}