diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts
index 5d374fde5..b9193d04f 100644
--- a/src/app/home/home.page.ts
+++ b/src/app/home/home.page.ts
@@ -124,12 +124,12 @@ export class HomePage implements OnInit {
}
- navigator.serviceWorker.ready.then((registration) => {
+ /* navigator.serviceWorker.ready.then((registration) => {
console.log('yes please')
registration.active.postMessage(
"Test message sent immediately after creation",
);
- });
+ }); */
}
diff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.html b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.html
index 999230d1d..9b2664e0a 100644
--- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.html
+++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.html
@@ -82,7 +82,7 @@
Detalhes
- {{loadedEvent.workflowInstanceDataFields.Body }}
+ {{loadedEvent.workflowInstanceDataFields.Body }}
diff --git a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.scss b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.scss
index 468f00472..46beee546 100644
--- a/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.scss
+++ b/src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.scss
@@ -41,6 +41,7 @@ ion-menu{
/* overflow: auto;
width: 100%; */
border-right: 1px solid #d8d8d8;
+ background: white;
.upper-content{
margin-left: 40px;
@@ -220,6 +221,11 @@ ion-menu{
}
}
+.scrollable-pre {
+ max-height: 300px;
+ overflow-y: auto; /* Add vertical scroll if content exceeds max height */
+}
+
@media only screen and (min-width: 1140px){
.content{
width: 75%;
diff --git a/src/app/pages/search/search.page.scss b/src/app/pages/search/search.page.scss
index 8aab16109..43f6fe558 100644
--- a/src/app/pages/search/search.page.scss
+++ b/src/app/pages/search/search.page.scss
@@ -230,6 +230,7 @@ ion-slide{
font-size: rem(20);
text-align: center;
color: black;
+ margin-bottom: 25px;
}
.most-searched-word-container{
diff --git a/src/app/pages/search/search.page.ts b/src/app/pages/search/search.page.ts
index 53c34045d..8599d71e3 100644
--- a/src/app/pages/search/search.page.ts
+++ b/src/app/pages/search/search.page.ts
@@ -1,10 +1,10 @@
import { Component, OnInit, ViewChild } from '@angular/core';
-import { ModalController, NavParams } from '@ionic/angular';
+import { ModalController, NavParams } from '@ionic/angular';
import { SearchService } from "../../services/search.service";
import { formatDate } from '@angular/common';
import { SenderPage } from 'src/app/pages/search/sender/sender.page';
import { OrganicEntityPage } from 'src/app/pages/search/organic-entity/organic-entity.page';
-import WordCloud from 'src/plugin/wordcloud2.js';
+import WordCloud from 'src/plugin/wordcloud2.js';
import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page';
import { PublicationDetailPage } from '../publications/view-publications/publication-detail/publication-detail.page';
import { DocumentDetailPage } from 'src/app/modals/document-detail/document-detail.page';
@@ -62,7 +62,7 @@ export class SearchPage implements OnInit {
searchCategories: SearchCategory[] = [];
showSearchDocuments: SearchList[] = [];
showCategory: string;
- searchDocuments: SearchList[] =[];
+ searchDocuments: SearchList[] = [];
showDocuments = false;
showAdvanceSearch = false;
@@ -74,18 +74,18 @@ export class SearchPage implements OnInit {
// See http://idangero.us/swiper/api/ for valid options.
slideOpts = {
- slidesPerView: parseInt(`${window.innerWidth/147}`, 10),
+ slidesPerView: parseInt(`${window.innerWidth / 147}`, 10),
initialSlide: 0,
speed: 400,
}
- loadedAttachments:any;
+ loadedAttachments: any;
list = []
windowWidth: number;
- type : "Agenda" | "Correspondencia" | "AccoesPresidenciais" | "ArquivoDespachoElect" | "AccoesPresidenciais & ArquivoDespachoElect" = "Agenda";
+ type: "Agenda" | "Correspondencia" | "AccoesPresidenciais" | "ArquivoDespachoElect" | "AccoesPresidenciais & ArquivoDespachoElect" = "Agenda";
select: boolean = false;
showSearchInput = false
@@ -99,35 +99,34 @@ export class SearchPage implements OnInit {
private navParams: NavParams,
public ThemeService: ThemeService,
private router: Router,
- private httpErrorhandle: HttpErrorHandle)
- {
- this.ordinance = "recent";
- this.currentPath= window.location.pathname;
+ private httpErrorhandle: HttpErrorHandle) {
+ this.ordinance = "recent";
+ this.currentPath = window.location.pathname;
- this.type = this.navParams.get('type');
+ this.type = this.navParams.get('type');
- this.type = this.navParams.get('type');
- this.select = this.navParams.get('select');
+ this.type = this.navParams.get('type');
+ this.select = this.navParams.get('select');
- this.showSearchInput = this.navParams.get('showSearchInput');
+ this.showSearchInput = this.navParams.get('showSearchInput');
- if(this.type == null || this.type == undefined) {
+ if (this.type == null || this.type == undefined) {
- if(this.currentPath.includes('/home/agenda')) {
- this.type = "Agenda"
- } else if (this.currentPath.includes('/home/gabinete-digital')) {
- this.type = "AccoesPresidenciais & ArquivoDespachoElect"
+ if (this.currentPath.includes('/home/agenda')) {
+ this.type = "Agenda"
+ } else if (this.currentPath.includes('/home/gabinete-digital')) {
+ this.type = "AccoesPresidenciais & ArquivoDespachoElect"
+
+ } else if (this.currentPath.includes('/home/publications')) {
+ this.type = "AccoesPresidenciais"
+ } else {
- } else if (this.currentPath.includes('/home/publications')) {
- this.type = "AccoesPresidenciais"
- } else {
-
- }
}
+ }
}
selectItem(item: SearchList) {
- if(this.select){
+ if (this.select) {
this.modalController.dismiss({
selected: item
});
@@ -139,8 +138,8 @@ export class SearchPage implements OnInit {
const ApplicationType = item.ApplicationType.toString()
const Id = item.Id
- if(ApplicationType == '8' ) {
-
+ if (ApplicationType == '8') {
+
// this.viewDocumentDetail(Id, ApplicationType);
const modal = await this.modalController.create({
@@ -176,8 +175,8 @@ export class SearchPage implements OnInit {
cssClass: 'modal-width-100-width-background modal'
});
await modal.present();
- }
-
+ }
+
}
ngOnInit() {
@@ -191,7 +190,7 @@ export class SearchPage implements OnInit {
this.windowWidth = window.innerWidth
- window['dynamicSearch'] = (search:string) => {
+ window['dynamicSearch'] = (search: string) => {
this.searchSubject = search;
}
@@ -203,11 +202,11 @@ export class SearchPage implements OnInit {
wordCloud() {
- this.search.mostSeachWord("15").subscribe( res => {
+ this.search.mostSeachWord("15").subscribe(res => {
- const highest= res[0].Hits;
- const lowest = res[res.length-1].Hits;
- const range = highest - lowest;
+ const highest = res[0].Hits;
+ const lowest = res[res.length - 1].Hits;
+ const range = highest - lowest;
const perPercent = range / 100;
let list = [];
@@ -219,9 +218,9 @@ export class SearchPage implements OnInit {
const maximum = 64;
res.forEach(e => {
- const array: any = Object.values(e);
+ const array: any = Object.values(e);
- array[1] = (((array[1] - lowest) / perPercent) * (maximum - minimumSize)/ 100 ) + minimumSize;
+ array[1] = (((array[1] - lowest) / perPercent) * (maximum - minimumSize) / 100) + minimumSize;
list.push(array)
});
@@ -250,8 +249,8 @@ export class SearchPage implements OnInit {
const minutes = date.getMinutes();
date.setSeconds(0);
- if(minutes % 15 != 0) {
-
+ if (minutes % 15 != 0) {
+
if (minutes > 45) {
date.setMinutes(60)
} else if (minutes > 30) {
@@ -262,13 +261,13 @@ export class SearchPage implements OnInit {
date.setMinutes(15)
}
- }
+ }
return date
}
clickDate() {
- if(!this.searchDocumentDate) {
+ if (!this.searchDocumentDate) {
this.searchDocumentDate = this.roundTimeQuarterHour()
}
}
@@ -304,7 +303,7 @@ export class SearchPage implements OnInit {
this.ordinance = orderBy;
- if(this.ordinance == 'recent'){
+ if (this.ordinance == 'recent') {
this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments).reverse();
} else {
this.showSearchDocuments = this.sortArrayISODate(this.searchDocuments)
@@ -312,7 +311,7 @@ export class SearchPage implements OnInit {
}
sortArrayISODate(myArray: any) {
- return myArray.sort(function(a, b) {
+ return myArray.sort(function (a, b) {
return (a.Data < b.Data) ? -1 : ((a.Data > b.Data) ? 1 : 0);
});
}
@@ -320,7 +319,7 @@ export class SearchPage implements OnInit {
/**
* @description Basic search
*/
- basicSearch() {
+ basicSearch() {
let searchDocumentDate
@@ -330,326 +329,388 @@ export class SearchPage implements OnInit {
searchDocumentDate;
- if(this.searchSubject == undefined || this.searchSubject == null) {
+ if (this.searchSubject == undefined || this.searchSubject == null) {
this.searchSubject = ""
}
-
- if(this.type == "Agenda" ) {
- this.showLoader = true;
+ if (this.type == "Agenda") {
- this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSenderId
- ,this.searchOrganicEntiryCode, this.searchDocTypeId, '0').subscribe(res=>{
- res.Categories.forEach( e => {
+
+ if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
+ this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
+ console.log('enter text');
+
+ } else {
+ this.showLoader = true;
+ this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSenderId
+ , this.searchOrganicEntiryCode, this.searchDocTypeId, '0').subscribe(res => {
+
+ if (!res.Categories.length) {
+ this.searchResult = "Não encontramos o que procura";
+ }
+
+ res.Categories.forEach(e => {
e['Active'] = false;
});
-
+
// bind respose
this.searchCategories = res.Categories;
-
+
this.searchDocuments = this.sortArrayISODate(res.Documents);
-
+
this.reorderList(this.ordinance);
-
+
// hide show document
- if(this.searchDocuments.length >= 1) {
+ if (this.searchDocuments.length >= 1) {
this.showDocuments = true;
} else {
this.showDocuments = false
}
-
+
this.showLoader = false;
this.loadWordCloud();
- },error => {
- this.showLoader = false;
- // this.searchResult = "Registo não encontrado"
- this.httpErrorhandle.httpStatusHandle(error)
- // console.log(error)
- });
+ }, error => {
+ this.showLoader = false;
+ // this.searchResult = "Registo não encontrado"
+ this.httpErrorhandle.httpStatusHandle(error)
+ // console.log(error)
+ });
+ }
}
- else if ( this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
-
- this.showLoader = true;
+ else if (this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
this.searchCategories = [];
this.searchDocuments = [];
this.showSearchDocuments = [];
- if(this.select) {
+ if (this.select) {
- let counter = 0;
+ let counter = 0;
+ if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
+ this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
+ console.log('enter text');
- this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
- ,this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
+ } else {
+
+ this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
+ , this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
+ this.showLoader = true;
+ if (!res.Categories.length) {
+ this.searchResult = "Não encontramos o que procura";
+ }
- res.Categories.forEach( e => {
- e['Active'] = false;
- this.searchCategories.push(e)
- });
+ res.Categories.forEach(e => {
+ e['Active'] = false;
+ this.searchCategories.push(e)
+ });
- // bind respose
+ // bind respose
- this.sortArrayISODate(res.Documents).forEach(e => {
- e['appName'] = 'Correspondencia'
- this.searchDocuments.push(e)
- });
+ this.sortArrayISODate(res.Documents).forEach(e => {
+ e['appName'] = 'Correspondencia'
+ this.searchDocuments.push(e)
+ });
- this.reorderList(this.ordinance);
+ this.reorderList(this.ordinance);
- // hide show document
- if(this.searchDocuments.length >= 1){
- this.showDocuments = true;
- } else {
- this.showDocuments = false
- }
- counter++;
+ // hide show document
+ if (this.searchDocuments.length >= 1) {
+ this.showDocuments = true;
+ } else {
+ this.showDocuments = false
+ }
+ counter++;
- if(counter ==2){
- this.showLoader = false;
- }
+ if (counter == 2) {
+ this.showLoader = false;
+ }
- this.loadWordCloud();
- },error => {
- this.searchResult = "Registo não encontrado"
- counter++;
- console.log('application 8 failed', error)
- if(counter ==2) {
- this.showLoader = false;
- }
- });
+ this.loadWordCloud();
+ }, error => {
+ this.searchResult = "Registo não encontrado"
+ counter++;
+ console.log('application 8 failed', error)
+ if (counter == 2) {
+ this.showLoader = false;
+ }
+ });
+ }
- this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
- ,this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res=>{
+ if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
+ this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
+ console.log('enter text');
- res.Categories.forEach( e => {
- e['Active'] = false;
- this.searchCategories.push(e)
- });
+ } else {
+ this.showLoader = true;
+ this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
+ , this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
+ if (!res.Categories.length) {
+ this.searchResult = "Não encontramos o que procura";
+ }
+
+ res.Categories.forEach(e => {
+ e['Active'] = false;
+ this.searchCategories.push(e)
+ });
- this.sortArrayISODate(res.Documents).forEach(e => {
- e['appName'] = 'ArquivoDespachoElect'
- this.searchDocuments.push(e)
- });
+ this.sortArrayISODate(res.Documents).forEach(e => {
+ e['appName'] = 'ArquivoDespachoElect'
+ this.searchDocuments.push(e)
+ });
- this.reorderList(this.ordinance);
+ this.reorderList(this.ordinance);
- // hide show document
- if(this.searchDocuments.length >= 1){
- this.showDocuments = true;
- } else {
- this.showDocuments = false
- }
+ // hide show document
+ if (this.searchDocuments.length >= 1) {
+ this.showDocuments = true;
+ } else {
+ this.showDocuments = false
+ }
- this.loadWordCloud();
- counter++;
+ this.loadWordCloud();
+ counter++;
- if(counter ==2){
- this.showLoader = false;
- }
- },error => {
- counter++;
+ if (counter == 2) {
+ this.showLoader = false;
+ }
+ }, error => {
+ counter++;
- if(counter ==2) {
- this.showLoader = false;
- }
- this.searchResult = "Registo não encontrado"
+ if (counter == 2) {
+ this.showLoader = false;
+ }
+ this.searchResult = "Registo não encontrado"
- console.log('application 361 failed', error);
- });
+ console.log('application 361 failed', error);
+ });
+ }
} else {
let counter = 0;
- this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSenderId
- ,this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
- res.Categories.forEach( e => {
- e['Active'] = false;
- this.searchCategories.push(e)
- });
+ if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
+ this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
+ console.log('enter text');
- // bind respose
+ } else {
+ this.showLoader = true;
+ this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSenderId
+ , this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
+ if (!res.Categories.length) {
+ this.searchResult = "Não encontramos o que procura";
+ }
+ res.Categories.forEach(e => {
+ e['Active'] = false;
+ this.searchCategories.push(e)
+ });
- this.sortArrayISODate(res.Documents).forEach(e => {
- e['appName'] = 'Correspondencia'
- this.searchDocuments.push(e)
- });
+ // bind respose
- this.reorderList(this.ordinance);
+ this.sortArrayISODate(res.Documents).forEach(e => {
+ e['appName'] = 'Correspondencia'
+ this.searchDocuments.push(e)
+ });
- // hide show document
- if(this.searchDocuments.length >= 1){
- this.showDocuments = true;
- } else {
- this.showDocuments = false
- }
+ this.reorderList(this.ordinance);
- counter++;
+ // hide show document
+ if (this.searchDocuments.length >= 1) {
+ this.showDocuments = true;
+ } else {
+ this.showDocuments = false
+ }
- if(counter ==2){
- this.showLoader = false;
- }
+ counter++;
- this.loadWordCloud();
- },error => {
- console.log('application 8 failed', error)
- this.searchResult = "Registo não encontrado"
- counter++;
+ if (counter == 2) {
+ this.showLoader = false;
+ }
- if(counter ==2){
- this.showLoader = false;
- }
- });
+ this.loadWordCloud();
+ }, error => {
+ console.log('application 8 failed', error)
+ this.searchResult = "Registo não encontrado"
+ counter++;
- this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
- ,this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
+ if (counter == 2) {
+ this.showLoader = false;
+ }
+ });
+ }
+ if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
+ this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
+ console.log('enter text');
- res.Categories.forEach( e => {
- e['Active'] = false;
- this.searchCategories.push(e)
- });
+ } else {
+ this.showLoader = true;
+ this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
+ , this.searchOrganicEntiryCode, this.searchDocTypeId, '361').subscribe(res => {
+ if (!res.Categories.length) {
+ this.searchResult = "Não encontramos o que procura";
+ }
+
+ res.Categories.forEach(e => {
+ e['Active'] = false;
+ this.searchCategories.push(e)
+ });
- this.sortArrayISODate(res.Documents).forEach(e => {
- e['appName'] = 'ArquivoDespachoElect'
- this.searchDocuments.push(e)
- });
+ this.sortArrayISODate(res.Documents).forEach(e => {
+ e['appName'] = 'ArquivoDespachoElect'
+ this.searchDocuments.push(e)
+ });
- this.reorderList(this.ordinance);
+ this.reorderList(this.ordinance);
- // hide show document
- if(this.searchDocuments.length >= 1) {
- this.showDocuments = true;
- } else {
- this.showDocuments = false
- }
+ // hide show document
+ if (this.searchDocuments.length >= 1) {
+ this.showDocuments = true;
+ } else {
+ this.showDocuments = false
+ }
- counter++;
+ counter++;
- if(counter ==2){
- this.showLoader = false;
- }
- this.loadWordCloud();
- },error => {
- this.searchResult = "Registo não encontrado"
- counter++;
+ if (counter == 2) {
+ this.showLoader = false;
+ }
+ this.loadWordCloud();
+ }, error => {
+ this.searchResult = "Registo não encontrado"
+ counter++;
- console.log('application 361 faield', error);
- if(counter ==2){
- this.showLoader = false;
- }
- });
+ console.log('application 361 faield', error);
+ if (counter == 2) {
+ this.showLoader = false;
+ }
+ });
+ }
}
}
- else if ( this.type == "Correspondencia"){
-
- this.showLoader = true;
+ else if (this.type == "Correspondencia") {
this.searchCategories = [];
this.searchDocuments = [];
this.showSearchDocuments = [];
- if(this.select) {
+ if (this.select) {
- let counter = 0;
+ let counter = 0;
+ if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
+ this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
+ console.log('enter text');
- this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
- ,this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res=>{
+ } else {
+ this.showLoader = true;
+ this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSenderId
+ , this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
+ if (!res.Categories.length) {
+ this.searchResult = "Não encontramos o que procura";
+ }
- res.Categories.forEach( e => {
- e['Active'] = false;
- this.searchCategories.push(e)
- });
+ res.Categories.forEach(e => {
+ e['Active'] = false;
+ this.searchCategories.push(e)
+ });
- // bind respose
+ // bind respose
- this.sortArrayISODate(res.Documents).forEach(e => {
- e['appName'] = 'Correspondencia'
- this.searchDocuments.push(e)
- });
+ this.sortArrayISODate(res.Documents).forEach(e => {
+ e['appName'] = 'Correspondencia'
+ this.searchDocuments.push(e)
+ });
- this.reorderList(this.ordinance);
+ this.reorderList(this.ordinance);
- // hide show document
- if(this.searchDocuments.length >= 1){
- this.showDocuments = true;
- } else {
- this.showDocuments = false
- }
- counter++;
+ // hide show document
+ if (this.searchDocuments.length >= 1) {
+ this.showDocuments = true;
+ } else {
+ this.showDocuments = false
+ }
+ counter++;
- if(counter ==2){
- this.showLoader = false;
- }
- this.showLoader = false;
- this.loadWordCloud();
- },error => {
- this.searchResult = "Registo não encontrado"
- console.log(error)
- });
+ if (counter == 2) {
+ this.showLoader = false;
+ }
+ this.showLoader = false;
+ this.loadWordCloud();
+ }, error => {
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
+ });
+ }
} else {
let counter = 0;
+ if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
+ this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
+ console.log('enter text');
- this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSenderId
- ,this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res=>{
+ } else {
+ this.showLoader = true;
+ this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSenderId
+ , this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
+ if (!res.Categories.length) {
+ this.searchResult = "Não encontramos o que procura";
+ }
- res.Categories.forEach( e => {
- e['Active'] = false;
- this.searchCategories.push(e)
- });
+ res.Categories.forEach(e => {
+ e['Active'] = false;
+ this.searchCategories.push(e)
+ });
- // bind respose
+ // bind respose
- this.sortArrayISODate(res.Documents).forEach(e => {
- e['appName'] = 'Correspondencia'
- this.searchDocuments.push(e)
- });
+ this.sortArrayISODate(res.Documents).forEach(e => {
+ e['appName'] = 'Correspondencia'
+ this.searchDocuments.push(e)
+ });
- this.reorderList(this.ordinance);
+ this.reorderList(this.ordinance);
- // hide show document
- if(this.searchDocuments.length >= 1){
- this.showDocuments = true;
- } else {
- this.showDocuments = false
- }
+ // hide show document
+ if (this.searchDocuments.length >= 1) {
+ this.showDocuments = true;
+ } else {
+ this.showDocuments = false
+ }
- counter++;
+ counter++;
- if(counter ==2) {
- this.showLoader = false;
- }
+ if (counter == 2) {
+ this.showLoader = false;
+ }
- this.loadWordCloud();
- },error => {
- counter++;
+ this.loadWordCloud();
+ }, error => {
+ counter++;
- if(counter ==2) {
- this.showLoader = false;
- }
- this.searchResult = "Registo não encontrado"
- console.log(error)
- });
+ if (counter == 2) {
+ this.showLoader = false;
+ }
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
+ });
+ }
}
}
else if (this.type == "AccoesPresidenciais") {
let counter = 0;
-
- this.showLoader = true;
this.searchCategories = []
this.searchDocuments = []
// this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, this.searchSender
// ,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res=>{
-
+
// res.Categories.forEach( e => {
// e['Active'] = false;
@@ -680,7 +741,7 @@ export class SearchPage implements OnInit {
// if(counter ==2){
// this.showLoader = false;
// }
-
+
// this.loadWordCloud();
// }, error => {
// counter++;
@@ -693,59 +754,68 @@ export class SearchPage implements OnInit {
// });
+ if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
+ this.searchResult = "Campo de pesquisa esta vazio, entre com assunto que deseja pesquisa";
+ console.log('enter text');
- this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, this.searchSenderId
- ,this.searchOrganicEntiryCode, this.searchDocTypeId, '386').subscribe(res => {
-
+ } else {
+ this.showLoader = true;
+ this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, this.searchSenderId
+ , this.searchOrganicEntiryCode, this.searchDocTypeId, '386').subscribe(res => {
+ if (!res.Categories.length) {
+ this.searchResult = "Não encontramos o que procura";
+ }
- res.Categories.forEach( e => {
- e['Active'] = false;
- e['Name'] = "Acções"
- });
- if(!environment.presidential) {
- // bind respose
- for ( const a of res.Categories) {
- this.searchCategories.push(a);
- }
- }
+ res.Categories.forEach(e => {
+ e['Active'] = false;
+ e['Name'] = "Acções"
+ });
-
+ if (!environment.presidential) {
+ // bind respose
+ for (const a of res.Categories) {
+ this.searchCategories.push(a);
+ }
+ }
- for ( const a of this.sortArrayISODate(res.Documents)) {
- a.DocTypeDesc = "Acções"
- this.searchDocuments.push(a);
- }
- this.reorderList(this.ordinance);
- // hide show document
- if(this.searchDocuments.length >= 1) {
- this.showDocuments = true;
- } else {
- this.showDocuments = false
- }
+ for (const a of this.sortArrayISODate(res.Documents)) {
+ a.DocTypeDesc = "Acções"
+ this.searchDocuments.push(a);
+ }
- counter++;
+ this.reorderList(this.ordinance);
- this.showLoader = false;
- this.loadWordCloud();
- }, error => {
- counter++;
+ // hide show document
+ if (this.searchDocuments.length >= 1) {
+ this.showDocuments = true;
+ } else {
+ this.showDocuments = false
+ }
- this.showLoader = false;
+ counter++;
- this.searchResult = "Registo não encontrado"
- console.log(error)
- });
+ this.showLoader = false;
+ this.loadWordCloud();
+ }, error => {
+ counter++;
+
+ this.showLoader = false;
+
+ this.searchResult = "Registo não encontrado"
+ console.log(error)
+ });
+ }
}
- }
+ }
- /**
- * @description set empty value to searchSubject
- */
+ /**
+ * @description set empty value to searchSubject
+ */
clearSearchInput() {
this.searchSubject = ""
@@ -761,20 +831,20 @@ export class SearchPage implements OnInit {
* @returns date in format dd/MM/yyyy
* @description convert Iso date to dd/MM/yyyy
*/
- formateIsoDate(isoDate:string): string{
+ formateIsoDate(isoDate: string): string {
const date = new Date(isoDate);
return formatDate(date, 'dd/MM/yyyy', 'pt');
}
- activeCategoty(i){
+ activeCategoty(i) {
this.searchCategories.forEach((e, j) => {
- if(i != j){
+ if (i != j) {
e['Active'] = false;
}
})
- if (this.searchCategories[i]['Active']){
+ if (this.searchCategories[i]['Active']) {
this.searchCategories[i]['Active'] = false;
} else {
this.searchCategories[i]['Active'] = true
@@ -788,7 +858,7 @@ export class SearchPage implements OnInit {
- clearInputOrganicEntity(){
+ clearInputOrganicEntity() {
this.searchOrganicEntiryDescription = "";
this.searchOrganicEntiryCode = null;
}
@@ -796,16 +866,16 @@ export class SearchPage implements OnInit {
/**
* @description Clean inputs
*/
- showHideAdvanceSearch(show:boolean) {
+ showHideAdvanceSearch(show: boolean) {
this.showAdvanceSearch = show;
}
async openAdvanceSearchSelection() {
let classs;
- if( window.innerWidth <= 1024){
+ if (window.innerWidth <= 1024) {
classs = 'modal modal-desktop'
- } else {
+ } else {
classs = 'search-desktop-modal search-submodal'
}
@@ -830,9 +900,9 @@ export class SearchPage implements OnInit {
async openOrganicEntitySelection() {
let classs;
- if( window.innerWidth <= 1024){
+ if (window.innerWidth <= 1024) {
classs = 'modal modal-desktop'
- } else {
+ } else {
classs = 'search-desktop-modal search-submodal'
}
@@ -843,9 +913,9 @@ export class SearchPage implements OnInit {
}
});
-
+
modal.onDidDismiss().then((data) => {
- console.log('SerachEntity',data.data )
+ console.log('SerachEntity', data.data)
this.searchOrganicEntiryDescription = data.data.Description;
this.searchOrganicEntiryCode = data.data.Code;
});
@@ -855,10 +925,10 @@ export class SearchPage implements OnInit {
}
TodosCategory = true
- async filterDocList(categoryName:string){
+ async filterDocList(categoryName: string) {
// show all category
- if(this. showCategory == categoryName ){
+ if (this.showCategory == categoryName) {
this.showSearchDocuments = this.searchDocuments;
@@ -868,22 +938,22 @@ export class SearchPage implements OnInit {
this.showCategory = categoryName;
- for(let category of this.searchCategories) {
- if(category['Active']) {
+ for (let category of this.searchCategories) {
+ if (category['Active']) {
this.TodosCategory = false
return false
}
}
this.TodosCategory = true
-
+
}
noFilter() {
this.TodosCategory = true
let n = 0
- for(let category of this.searchCategories) {
+ for (let category of this.searchCategories) {
this.searchCategories[n]['Active'] = false
n++
}
@@ -891,12 +961,12 @@ export class SearchPage implements OnInit {
}
- itemIcons(): string{
+ itemIcons(): string {
return this.type
}
- viewDocument(){
- const url: string = this.loadedAttachments.DocumentURL.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
+ viewDocument() {
+ const url: string = this.loadedAttachments.DocumentURL.replace("webTRIX.Viewer", "webTRIX.Viewer.Branch1");
// const browser = this.iab.create(url,"_blank");
// browser.show();
}
@@ -905,12 +975,12 @@ export class SearchPage implements OnInit {
async viewDetail(searchDocument: SearchList) {
const ApplicationType = searchDocument.ApplicationType.toString()
- const Id = searchDocument.Id
+ const Id = searchDocument.Id
const CalendarId = searchDocument.ApplicationName.split(':')[1]
const DocTypeDesc = searchDocument.DocTypeDesc
- if(this.select == false) {
- if(this.type == "Agenda") {
+ if (this.select == false) {
+ if (this.type == "Agenda") {
const modal = await this.modalCtrl.create({
component: ViewEventPage,
@@ -923,16 +993,16 @@ export class SearchPage implements OnInit {
cssClass: 'modal modal-desktop',
});
- modal.onDidDismiss().then((res)=>{});
+ modal.onDidDismiss().then((res) => { });
await modal.present();
- } else if(this.type == "AccoesPresidenciais") {
+ } else if (this.type == "AccoesPresidenciais") {
this.viewPublicationDetail(Id, DocTypeDesc);
}
- else if(this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
+ else if (this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
// 361
- if(ApplicationType == '8') {
+ if (ApplicationType == '8') {
this.viewDocumentDetail(Id, ApplicationType);
} else if (ApplicationType == '361') {
this.viewDocumentModal(searchDocument)
@@ -941,50 +1011,50 @@ export class SearchPage implements OnInit {
}
}
- async viewPublicationDetail(publicationId:string, DocTypeDesc) {
+ async viewPublicationDetail(publicationId: string, DocTypeDesc) {
// validation my friend
- if(DocTypeDesc == 'Acções') {
+ if (DocTypeDesc == 'Acções') {
this.router.navigate(['/home/publications', publicationId]);
- } else if( DocTypeDesc == 'Publicações') {
+ } else if (DocTypeDesc == 'Publicações') {
const modal = await this.modalController.create({
component: PublicationDetailPage,
- componentProps:{
+ componentProps: {
publicationId: publicationId,
isModal: true
},
cssClass: 'publication-detail modal modal-desktop ',
//backdropDismiss: false
});
-
- modal.onDidDismiss().then(()=>{});
+
+ modal.onDidDismiss().then(() => { });
await modal.present();
}
-
+
}
- async viewDocumentDetail(docId:string, applicationId:string) {
+ async viewDocumentDetail(docId: string, applicationId: string) {
let classs;
- if( window.innerWidth < 701) {
+ if (window.innerWidth < 701) {
classs = 'modal modal-desktop'
- } else {
+ } else {
classs = 'modal modal-desktop showAsideOptions'
}
const modal = await this.modalController.create({
component: DocumentDetailPage,
- componentProps:{
+ componentProps: {
docId: docId,
applicationId: applicationId,
},
cssClass: classs,
});
- modal.onDidDismiss().then((res)=>{});
+ modal.onDidDismiss().then((res) => { });
await modal.present();
@@ -1018,7 +1088,7 @@ export class SearchPage implements OnInit {
},
Document: LoadedDocument,
applicationId: task.workflowInstanceDataFields.SourceSecFsID,
- docId: task.workflowInstanceDataFields.SourceID ,
+ docId: task.workflowInstanceDataFields.SourceID,
folderId: '',
task: task
},
diff --git a/version/git-version.ts b/version/git-version.ts
index 82ec434fc..4a8908fe6 100644
--- a/version/git-version.ts
+++ b/version/git-version.ts
@@ -1,12 +1,12 @@
export let versionData = {
- "shortSHA": "833a4df72",
- "SHA": "833a4df72f624fbaa3368bf89a05351eb1859a70",
+ "shortSHA": "ae2701cbc",
+ "SHA": "ae2701cbcd02b0d0331f13927bc26d36d0752167",
"branch": "developer",
"lastCommitAuthor": "'Eudes Inácio'",
- "lastCommitTime": "'Tue Aug 15 12:42:40 2023 +0100'",
- "lastCommitMessage": "date format solved and intevinets text correted",
- "lastCommitNumber": "5157",
+ "lastCommitTime": "'Tue Aug 15 12:44:53 2023 +0100'",
+ "lastCommitMessage": "pull made",
+ "lastCommitNumber": "5160",
"change": "",
- "changeStatus": "On branch developer\nYour branch and 'origin/developer' have diverged,\nand have 2 and 2 different commits each, respectively.\n (use \"git pull\" to merge the remote branch into yours)\n\nAll conflicts fixed but you are still merging.\n (use \"git commit\" to conclude merge)\n\nChanges to be committed:\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/pages/chat/group-messages/group-contacts/group-contacts.page.ts\n\tmodified: src/app/pages/chat/messages/contacts/contacts.page.html\n\tmodified: src/app/pages/chat/messages/contacts/contacts.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/publications/new-publication/new-publication.page.html\n\tmodified: src/app/shared/gabinete-digital/all-processes/all-processes.page.ts\n\tmodified: src/app/shared/header/header.page.html\n\tmodified: src/app/shared/popover/event-details-documents-options/event-details-documents-options.page.html",
+ "changeStatus": "On branch developer\nYour branch is ahead of 'origin/developer' by 3 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/approve-event/approve-event.page.scss\n\tmodified: src/app/pages/search/search.page.scss\n\tmodified: src/app/pages/search/search.page.ts\n\tmodified: version/git-version.ts",
"changeAuthor": "eudes.inacio"
}
\ No newline at end of file