From 1ae77ffc9579147a667e4b52a04f9abc2483ffc7 Mon Sep 17 00:00:00 2001 From: leejinho Date: Fri, 31 Jan 2020 17:16:50 +0900 Subject: [PATCH] =?UTF-8?q?=EC=AA=BD=EC=A7=80=201.=20empty=20=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20=EA=B5=AC=EC=84=B1.=202.=20=EB=B9=88=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=EC=97=B4=20=EA=B2=B8=EC=83=89=20=EC=95=88=EB=90=98?= =?UTF-8?q?=EA=B2=8C=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 사용자검색 1. top-bar 에서 빈문자열 검색 안되게 수정. 2. 팝업내 재검색시 1페이지 검색하도록 수정. --- .../left-sidenav/message.component.html | 60 +++++++++++++++++-- .../left-sidenav/message.component.scss | 5 ++ .../left-sidenav/message.component.ts | 4 ++ .../integrated-search.dialog.component.html | 2 +- .../integrated-search.dialog.component.ts | 6 ++ .../native/components/top-bar.component.ts | 4 ++ .../src/assets/i18n/en.json | 1 + .../src/assets/i18n/ko.json | 1 + .../integrated-search.component.html | 7 +++ 9 files changed, 85 insertions(+), 5 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.html index 4f968eb7..0f845061 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.html @@ -50,7 +50,10 @@ {{ 'message.messageTypeReceiving' | translate }} - + +
+ {{ 'common.noResult' | translate }} +
{{ 'message.messageTypeOutgoing' | translate }} - + +
+ {{ 'common.noResult' | translate }} +
{{ 'message.messageTypeReservation' | translate }} - + +
+ {{ 'common.noResult' | translate }} +
@@ -128,7 +167,10 @@
- + +
+ {{ 'common.noSearchResult' | translate }} +
diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.scss b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.scss index b0b1ee0c..eb2aefba 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.scss +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.scss @@ -30,5 +30,10 @@ position: relative; height: 100%; } + + .no-search-result { + padding-top: 10px; + padding-left: 10px; + } } } diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts index 82848c10..94923f26 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/left-sidenav/message.component.ts @@ -275,6 +275,10 @@ export class MessageBoxComponent event.preventDefault(); event.stopPropagation(); + if (!search || search.trim().length === 0) { + return; + } + this.getSearchMessage( MessageType.All, MessageSearchType.Name, diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.html b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.html index d73db39d..b3c51179 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.html +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.html @@ -20,7 +20,7 @@ [totalCount]="totalCount" [pageCurrent]="pageCurrent" [pageListCount]="pageListCount" - (search)="onSearch($event)" + (search)="onReSearch($event)" (changePage)="onChangePage($event)" (openProfile)="onClickOpenProfile($event)" > diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts index d96425c2..0368cc04 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/dialogs/search/integrated-search.dialog.component.ts @@ -92,6 +92,12 @@ export class IntegratedSearchDialogComponent implements OnInit, OnDestroy { ); } + onReSearch(searchWord: string) { + this.pageCurrent = 1; + + this.onSearch(searchWord); + } + onSearch(searchWord: string) { this.currentSearchWord = this.data.keyword; diff --git a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts index 6f037bc0..d53fe63f 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/native/components/top-bar.component.ts @@ -562,6 +562,10 @@ export class TopBarComponent implements OnInit, OnDestroy { } onIntegratedSearch(keyword: string) { + if (!keyword || keyword.trim().length === 0) { + return; + } + this.dialogService.open< IntegratedSearchDialogComponent, IntegratedSearchDialogData, diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/en.json b/projects/ucap-webmessenger-app/src/assets/i18n/en.json index b3d8fd79..756d7f4f 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/en.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/en.json @@ -372,6 +372,7 @@ "searchWord": "Search word", "searchResult": "Search result", "noSearchResult": "There is no search result", + "noResult": "There is no result", "useOnlyForSpecialCharacter": "Can only use Special characters: {{v}}", "units": { "date": "Date", diff --git a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json index 50a9fc26..0ac79cee 100644 --- a/projects/ucap-webmessenger-app/src/assets/i18n/ko.json +++ b/projects/ucap-webmessenger-app/src/assets/i18n/ko.json @@ -372,6 +372,7 @@ "searchWord": "검색어", "searchResult": "검색 결과", "noSearchResult": "검색 결과가 없습니다.", + "noResult": "조회된 내용이 없습니다.", "useOnlyForSpecialCharacter": "특수문자는 {{specialCharacter}}만 사용할 수 있습니다.", "units": { "date": "날짜", diff --git a/projects/ucap-webmessenger-ui/src/lib/components/integrated-search.component.html b/projects/ucap-webmessenger-ui/src/lib/components/integrated-search.component.html index 9fa79046..024f503b 100644 --- a/projects/ucap-webmessenger-ui/src/lib/components/integrated-search.component.html +++ b/projects/ucap-webmessenger-ui/src/lib/components/integrated-search.component.html @@ -196,6 +196,13 @@
+
+ {{ 'common.noSearchResult' | translate }} +