mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
lot of changes
This commit is contained in:
@@ -52,6 +52,7 @@ export class SearchPage implements OnInit {
|
||||
// https params
|
||||
searchSubject: string;
|
||||
searchDocumentDate: string;
|
||||
searchDocumentDateEnd: string;
|
||||
searchSenderdescription: string;
|
||||
searchSenderId: number;
|
||||
searchOrganicEntiryDescription: string;
|
||||
@@ -90,9 +91,12 @@ export class SearchPage implements OnInit {
|
||||
|
||||
showSearchInput = false
|
||||
checkRoutPublication: boolean;
|
||||
checkDateEnd: boolean;
|
||||
datePickerPlaceholder: string;
|
||||
|
||||
|
||||
@ViewChild('picker1') picker1: any;
|
||||
checkAgenda: boolean;
|
||||
|
||||
constructor(private modalController: ModalController,
|
||||
private search: SearchService,
|
||||
@@ -199,9 +203,13 @@ export class SearchPage implements OnInit {
|
||||
|
||||
if(this.currentPath.includes('/home/publications')) {
|
||||
this.checkRoutPublication = false;
|
||||
this.checkDateEnd = true;
|
||||
this.datePickerPlaceholder = 'Data Inicio*'
|
||||
console.log(this.checkRoutPublication)
|
||||
} else {
|
||||
this.checkRoutPublication = true;
|
||||
this.checkDateEnd = false;
|
||||
this.datePickerPlaceholder = 'Data*'
|
||||
console.log(this.checkRoutPublication)
|
||||
}
|
||||
|
||||
@@ -346,10 +354,14 @@ export class SearchPage implements OnInit {
|
||||
basicSearch() {
|
||||
|
||||
let searchDocumentDate
|
||||
let searchDocumentDateEnd;
|
||||
|
||||
if (this.searchDocumentDate) {
|
||||
searchDocumentDate = momentG(new Date(this.searchDocumentDate), 'yyyy-MM-dd')
|
||||
}
|
||||
if (this.searchDocumentDateEnd) {
|
||||
searchDocumentDateEnd = momentG(new Date(this.searchDocumentDate), 'yyyy-MM-dd')
|
||||
}
|
||||
|
||||
searchDocumentDate;
|
||||
|
||||
@@ -361,13 +373,13 @@ export class SearchPage implements OnInit {
|
||||
|
||||
|
||||
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == 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.search.basicSearch(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '0').subscribe(res => {
|
||||
|
||||
if (!res.Categories.length) {
|
||||
@@ -412,7 +424,7 @@ export class SearchPage implements OnInit {
|
||||
if (this.select) {
|
||||
|
||||
let counter = 0;
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == 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');
|
||||
|
||||
@@ -462,7 +474,7 @@ export class SearchPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == 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');
|
||||
|
||||
@@ -515,13 +527,13 @@ export class SearchPage implements OnInit {
|
||||
} else {
|
||||
let counter = 0;
|
||||
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == 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.search.basicSearch(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
@@ -564,7 +576,7 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null&& searchDocumentDateEnd == 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');
|
||||
|
||||
@@ -626,7 +638,7 @@ export class SearchPage implements OnInit {
|
||||
if (this.select) {
|
||||
|
||||
let counter = 0;
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == 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');
|
||||
|
||||
@@ -673,13 +685,13 @@ export class SearchPage implements OnInit {
|
||||
|
||||
} else {
|
||||
let counter = 0;
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == 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.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '8').subscribe(res => {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
@@ -778,13 +790,13 @@ export class SearchPage implements OnInit {
|
||||
// });
|
||||
|
||||
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && this.searchSenderId == null && this.searchOrganicEntiryCode == null && this.searchDocTypeId == null) {
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == 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.basicSearchPublication(this.searchSubject, searchDocumentDate, this.searchSenderId
|
||||
this.search.basicSearchPublication(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '386').subscribe(res => {
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
|
||||
Reference in New Issue
Block a user