- + - - - -

Slide 1

-
- -

Slide 2

-
- -

Slide 3

-
- -

Slide 4

-
- -

Slide 5

-
- -

Slide 6

-
- -

Slide 7

-
-
-
- -
+
-
-

{{ category.Name }}

- {{ category.Qtd }} -
+ + + +
+

{{ category.Name }}

+ {{ category.Qtd }} +
+
+
-
+ +
+
-
+
-

Palavras mais pesquisadas

@@ -122,7 +111,7 @@
    -
  • +
  • @@ -139,6 +128,4 @@
- - - + \ No newline at end of file diff --git a/src/app/pages/search/search.page.scss b/src/app/pages/search/search.page.scss index cc2f83341..8418b4a7e 100644 --- a/src/app/pages/search/search.page.scss +++ b/src/app/pages/search/search.page.scss @@ -39,6 +39,10 @@ } +ion-slide{ + padding-top: 5px +} + // search result type .options{ margin-top: 10px; @@ -55,14 +59,22 @@ margin: 0px 5px; margin-bottom: 10px; padding: 5px 20px; + height: 100%; + box-sizing: 100%; + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; p{ padding: 0px; margin: 0px; font-family: Roboto; color: #0d89d1; font-size: 15px; + width: 100%; } .label{ + width: 100%; font-family: Roboto; font-size: 13px; font-weight: 300; @@ -256,8 +268,7 @@ border: solid 1px #ebebeb; } .date-container{ - .icon{ - + .icon-mer{ margin-right: 10px; } } diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts index ba0916f9b..bf130bee2 100644 --- a/src/app/pages/search/search.page.ts +++ b/src/app/pages/search/search.page.ts @@ -7,7 +7,6 @@ import { SearchDocument } from "src/app/models/search-document"; import { formatDate } from '@angular/common'; import { CloudData, CloudOptions } from 'angular-tag-cloud-module'; import { SenderPage } from 'src/app/pages/search/sender/sender.page'; - @Component({ selector: 'app-search', templateUrl: './search.page.html', @@ -23,7 +22,10 @@ export class SearchPage implements OnInit { private searchDocTypeId: string; searchCategories: SearchCategory[]; + showSearchDocuments: SearchDocument[]; + showCategory: string; searchDocuments: SearchDocument[]; + showDocuments = false; showAdvanceSearch = false; @@ -46,9 +48,6 @@ export class SearchPage implements OnInit { slidesPerView: 3, initialSlide: 0, speed: 400, - autoHeight: true, - calculateHeight:true, - height: 50 } constructor(private modalController: ModalController, @@ -63,17 +62,26 @@ export class SearchPage implements OnInit { } + sortArrayISODate(myArray: any){ + return myArray.sort(function(a, b) { + return (a.Data < b.Data) ? -1 : ((a.Data > b.Data) ? 1 : 0); + }); + } + /** * @description Basic search */ basicSearch(){ + console.log(this.searchDocumentDate); + this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender ,this.searchOrganicEntiry, this.searchDocTypeId).subscribe(res=>{ // bind respose this.searchCategories = res.Categories; - this.searchDocuments = res.Documents; + this.searchDocuments = this.sortArrayISODate(res.Documents); + this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments); // hide show document if(this.searchDocuments.length >= 1){ @@ -82,7 +90,6 @@ export class SearchPage implements OnInit { this.showDocuments = false } - }); } @@ -103,12 +110,24 @@ export class SearchPage implements OnInit { return formatDate(date, 'dd/MM/yyyy', 'pt'); } + + clearInputRemetente(){ + this.searchSender = ""; + } + + clearInputDocumentDate(){ + this.searchDocumentDate = ""; + } + + clearInputOrganicEntity(){ + this.searchOrganicEntiry = ""; + } + /** * @description Clean inputs */ showHideAdvanceSearch(show:boolean) { this.showAdvanceSearch = show; - /* Clear inputs */ this.searchDocumentDate = ""; this.searchSender = ""; @@ -117,7 +136,6 @@ export class SearchPage implements OnInit { this.searchSubject = ""; } - async openAdvanceSearchSelection() { const modal = await this.modalController.create({ @@ -131,4 +149,17 @@ export class SearchPage implements OnInit { } -} + async filterDocList(categoryName:string){ + + // show all category + if(this. showCategory == categoryName ){ + + this.showSearchDocuments = this.searchDocuments; + + } else { // filter category + this.showSearchDocuments = this.searchDocuments.filter((e) => e.DocTypeDesc == categoryName); + } + + this.showCategory = categoryName; + } +} \ No newline at end of file