From ce4d94957ba1dd97eb59210ded3e33e6876f523a Mon Sep 17 00:00:00 2001 From: leejinho Date: Wed, 8 Jan 2020 08:19:57 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=ED=99=94=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/messages.component.html | 17 ++++++--- .../message-box/schedule.component.ts | 36 +++++++++---------- .../src/lib/components/search.component.html | 1 + 3 files changed, 32 insertions(+), 22 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html index 9db6baab..4e3619a9 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.html @@ -186,13 +186,22 @@
-
+
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 e163e7e5..0e93c281 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 @@ -24,39 +24,39 @@ export class ScheduleComponent implements OnInit { ngOnInit() { if (!!this.message && !!this.message.sentMessageJson) { if (!!this.message.sentMessageJson.date) { - let str_date = this.message.sentMessageJson.date + let strDate = this.message.sentMessageJson.date .replace(/ /g, '') .replace(/\n/g, '') .replace(/(\([월,화,수,목,금,토,일]\))/g, ''); - if (str_date.indexOf('오전') > -1) { - str_date = str_date.replace('오전', ' '); - } else if (str_date.indexOf('오후') > -1) { - str_date = str_date.replace('오후', ' '); - const arr = str_date.split(' '); - let h = Number(arr[1].split(':')[0]) + 12; - str_date = arr[0] + ' ' + h + ':' + arr[1].split(':')[1]; + if (strDate.indexOf('오전') > -1) { + strDate = strDate.replace('오전', ' '); + } else if (strDate.indexOf('오후') > -1) { + strDate = strDate.replace('오후', ' '); + const arr = strDate.split(' '); + const h = Number(arr[1].split(':')[0]) + 12; + strDate = arr[0] + ' ' + h + ':' + arr[1].split(':')[1]; } - this.date = moment(str_date).toDate(); + this.date = moment(strDate).toDate(); if (this.date === 'Invalid Date') { this.date = this.message.sentMessageJson.date.replace(/\n/g, ''); } } // if (!!this.message.sentMessageJson.endDate) { - // let str_endDate = this.message.sentMessageJson.endDate + // let strEndDate = this.message.sentMessageJson.endDate // .replace(/ /g, '') // .replace(/\n/g, '') // .replace(/(\([월,화,수,목,금,토,일]\))/g, ''); - // if (str_endDate.indexOf('오전') > -1) { - // str_endDate = str_endDate.replace('오전', ' '); - // } else if (str_endDate.indexOf('오후') > -1) { - // str_endDate = str_endDate.replace('오후', ' '); - // const arr = str_endDate.split(' '); - // let h = Number(arr[1].split(':')[0]) + 12; - // str_endDate = arr[0] + ' ' + h + ':' + arr[1].split(':')[1]; + // if (strEndDate.indexOf('오전') > -1) { + // strEndDate = strEndDate.replace('오전', ' '); + // } else if (strEndDate.indexOf('오후') > -1) { + // strEndDate = strEndDate.replace('오후', ' '); + // const arr = strEndDate.split(' '); + // const h = Number(arr[1].split(':')[0]) + 12; + // strEndDate = arr[0] + ' ' + h + ':' + arr[1].split(':')[1]; // } - // this.endDate = moment(str_endDate).toDate(); + // this.endDate = moment(strEndDate).toDate(); // if (this.endDate === 'Invalid Date') { // this.endDate = this.message.sentMessageJson.endDate.replace( // /\n/g, diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.html index e002647f..571633fb 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/search.component.html @@ -37,6 +37,7 @@