diff --git a/package-lock.json b/package-lock.json
index 0457eeada..45f2fbd6a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3328,6 +3328,21 @@
"semver": "^5.4.1"
}
},
+ "angular-tag-cloud-module": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/angular-tag-cloud-module/-/angular-tag-cloud-module-5.2.0.tgz",
+ "integrity": "sha512-F89pvDWmpy4VHMhw1CN5kSwiGjGhBIXS4ektJZraJTBwjxCf9GsTNiw0mjcMWpuqEIxccxcaN3kIx+Z+wvoV3Q==",
+ "requires": {
+ "tslib": "^2.0.0"
+ },
+ "dependencies": {
+ "tslib": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+ "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
+ }
+ }
+ },
"ansi": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/ansi/-/ansi-0.3.1.tgz",
diff --git a/package.json b/package.json
index d9347c770..76eb547b7 100644
--- a/package.json
+++ b/package.json
@@ -36,6 +36,7 @@
"@ionic/pwa-elements": "^3.0.1",
"@ionic/storage": "^2.3.1",
"@logisticinfotech/ionic4-datepicker": "^1.4.4",
+ "angular-tag-cloud-module": "^5.2.0",
"axios": "^0.19.2",
"cordova-ios": "6.1.0",
"cordova-plugin-camera": "^5.0.1",
diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts
index 002c690a9..0385279ad 100644
--- a/src/app/pages/events/events.page.ts
+++ b/src/app/pages/events/events.page.ts
@@ -131,6 +131,8 @@ export class EventsPage implements OnInit {
if(this.profile == "mdgpr"){
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss', 'pt') /* + ' 00:00:00' */, formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
this.eventsList = res;
+ console.log(res)
+ console.log(res[0])
this.currentEvent = res[0].Subject;
this.totalEvent = this.eventsList.length;
this.showLoader = false;
@@ -139,6 +141,8 @@ export class EventsPage implements OnInit {
this.eventService.getAllPrEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
this.eventsList = res;
console.log(this.eventsList);
+ console.log(res)
+ console.log(res[0])
this.currentEvent = res[0].Subject;
this.totalEvent = this.eventsList.length;
this.showLoader = false;
diff --git a/src/app/pages/search/search.module.ts b/src/app/pages/search/search.module.ts
index aee85ee54..186391f01 100644
--- a/src/app/pages/search/search.module.ts
+++ b/src/app/pages/search/search.module.ts
@@ -8,12 +8,14 @@ import { SearchPageRoutingModule } from './search-routing.module';
import { SearchPage } from './search.page';
/* import { ComponentsModule } from 'src/app/components/components.module'; */
+import { TagCloudModule } from 'angular-tag-cloud-module';
@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
+ TagCloudModule,
/* ComponentsModule, */
SearchPageRoutingModule
],
diff --git a/src/app/pages/search/search.page.html b/src/app/pages/search/search.page.html
index 957e14236..65d9a07d8 100644
--- a/src/app/pages/search/search.page.html
+++ b/src/app/pages/search/search.page.html
@@ -14,15 +14,20 @@
-
+
+
+
+
+
+
-
+
@@ -45,6 +50,7 @@
Palavras mais pesquisadas
+
@@ -78,3 +84,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 377beb5f0..6b30cf9ce 100644
--- a/src/app/pages/search/search.page.scss
+++ b/src/app/pages/search/search.page.scss
@@ -227,3 +227,47 @@
}
+
+
+/* Advance search */
+.advance-search{
+ padding: 20px 20px;
+ padding-bottom: 10px;
+ width: 368px;
+ background-color: white;
+ position: absolute;
+ top: 100px;
+ left: 22px;
+ border-radius: 10px;
+ box-shadow: 0 4px 9px 0 rgba(0, 0, 0, 0.3);
+ margin-top: 20px;
+ .icon{
+ color: #797979;
+ width: 45px;
+ height: 45px;
+ display: flex;
+ justify-content: center;
+ font-size: 25px;
+ align-items: center;
+ }
+ .input-container{
+ margin-bottom: 15px;
+ width: 100%;
+ border-radius: 5px;
+ border: solid 1px #ebebeb;
+ }
+ .date-container{
+ .icon{
+
+ margin-right: 10px;
+ }
+ }
+
+ ion-datetime{
+ width: 100%;
+ }
+
+ .subject-container{
+
+ }
+}
diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts
index b9544efee..5a6b7dbb6 100644
--- a/src/app/pages/search/search.page.ts
+++ b/src/app/pages/search/search.page.ts
@@ -5,6 +5,8 @@ import { SearchService } from "../../services/search.service";
import { SearchCategory } from "src/app/models/search-category";
import { SearchDocument } from "src/app/models/search-document";
import { formatDate } from '@angular/common';
+import { CloudData, CloudOptions } from 'angular-tag-cloud-module';
+
@Component({
selector: 'app-search',
templateUrl: './search.page.html',
@@ -14,18 +16,36 @@ export class SearchPage implements OnInit {
// https params
private searchSubject: string;
- private searchDate: string;
+ private advanceSearchSubject: string;
+ private searchDocumentDate: string;
private searchSender: string;
private searchOrganicEntiry: string;
private searchDocTypeId: string;
searchCategories: SearchCategory[];
searchDocuments: SearchDocument[];
- showDocuments: boolean;
+ showDocuments = false;
+ showAdvanceSearch = false;
+
+
+
+ options: CloudOptions = {
+ // if width is between 0 and 1 it will be set to the width of the upper element multiplied by the value
+ width: 1000,
+ // if height is between 0 and 1 it will be set to the height of the upper element multiplied by the value
+ height: 400,
+ overflow: false,
+ };
+
+ data: CloudData[] = [
+ {text: 'Weight-8-link-color', weight: 8, link: 'https://google.com', color: '#ffaaee'},
+ {text: 'Weight-10-link', weight: 10, link: 'https://google.com', tooltip: 'display a tooltip'},
+ // ...
+ ];
constructor(private modalController: ModalController,
private search: SearchService) {
- this.showDocuments = false;
+
}
ngOnInit() {
@@ -35,12 +55,30 @@ export class SearchPage implements OnInit {
}
/**
- * @description get respose from the server
+ * @description Basic search
*/
basicSearch(){
// search in API
- this.search.basicSearch(this.searchSubject, this.searchDate, this.searchSender
+ this.search.basicSearch(this.searchSubject, "", "", "", "").subscribe(res=>{
+
+ // bind respose
+ this.searchCategories = res.Categories;
+ this.searchDocuments = res.Documents;
+
+ // hide show document
+ if(this.searchDocuments.length >= 1){
+ this.showDocuments = true;
+ } else {
+ this.showDocuments = false
+ }
+
+ });
+ }
+
+ advanceSearch(){
+
+ this.search.basicSearch(this.advanceSearchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId).subscribe(res=>{
// bind respose
@@ -75,4 +113,19 @@ export class SearchPage implements OnInit {
return formatDate(date, 'dd/MM/yyyy', 'pt');
}
+ /**
+ * @description Clean inputs
+ */
+ showHideAdvanceSearch(show:boolean) {
+ this.showAdvanceSearch = show;
+
+ /* Clear inputs */
+ this.searchDocumentDate = "";
+ this.searchSender = "";
+ this.searchOrganicEntiry = "";
+ this.searchDocTypeId = "";
+ this.advanceSearchSubject = "";
+ }
+
+
}
diff --git a/src/assets/images/advance-search-show-modal.svg b/src/assets/images/advance-search-show-modal.svg
new file mode 100644
index 000000000..3a60de7ff
--- /dev/null
+++ b/src/assets/images/advance-search-show-modal.svg
@@ -0,0 +1,19 @@
+
diff --git a/src/assets/images/icons-advance-search-document.svg b/src/assets/images/icons-advance-search-document.svg
new file mode 100644
index 000000000..820bc7412
--- /dev/null
+++ b/src/assets/images/icons-advance-search-document.svg
@@ -0,0 +1,21 @@
+
diff --git a/src/assets/images/icons-advance-search-sender.svg b/src/assets/images/icons-advance-search-sender.svg
new file mode 100644
index 000000000..f3ae89ced
--- /dev/null
+++ b/src/assets/images/icons-advance-search-sender.svg
@@ -0,0 +1,18 @@
+
diff --git a/src/assets/images/icons-arrow-arrow-down-25-copy.svg b/src/assets/images/icons-arrow-arrow-down-25-copy.svg
new file mode 100644
index 000000000..ce99378c5
--- /dev/null
+++ b/src/assets/images/icons-arrow-arrow-down-25-copy.svg
@@ -0,0 +1,19 @@
+