bugfix :: 이벤트 타입(P:일정) 에 'XX 전 알림' 문구 처리.
This commit is contained in:
parent
953d813a95
commit
370fa44579
|
@ -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<span class=\"text-warn-color\">({{countOfUnread}})</span>"
|
||||
},
|
||||
|
|
|
@ -253,6 +253,8 @@
|
|||
"scheduleTypeUpdate": "[이벤트] 수정",
|
||||
"scheduleTypeDelete": "[이벤트] 삭제",
|
||||
"scheduleTypeDefault": "[이벤트] 조회중..",
|
||||
"scheduleTypePrefix": "[이벤트] ",
|
||||
"scheduleTypeSurfixLeft": " 전 알림",
|
||||
"showPreviousEvents": "이전 대화 보기",
|
||||
"moreUnreadEventsWith": "안읽은 메시지가 <span class=\"text-warn-color\">({{countOfUnread}})</span>개 더 있습니다."
|
||||
},
|
||||
|
|
|
@ -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<PlanEventJson> = (
|
|||
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
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
{{ 'chat.event.scheduleTypeDelete' | translate }}
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchDefault>
|
||||
{{ 'chat.event.scheduleTypeDefault' | translate }}
|
||||
<!-- {{ 'chat.event.scheduleTypeDefault' | translate }} -->
|
||||
{{ getAlertLeftTime() }}
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user