This commit is contained in:
tiago.kayaya
2021-09-15 13:38:14 +01:00
parent f0e6a8a32d
commit db851e95dd
5 changed files with 128 additions and 80 deletions
@@ -469,7 +469,7 @@ export class ExpedienteDetailPage implements OnInit {
console.log(task);
let classs;
if( window.innerWidth <= 800){
if( window.innerWidth < 701){
classs = 'book-meeting-modal modal modal-desktop'
} else {
classs = 'modal modal-desktop showAsideOptions'
+59 -59
View File
@@ -68,9 +68,9 @@ export class SearchPage implements OnInit {
this.select = this.navParams.get('select');
this.showSearchInput = this.navParams.get('showSearchInput');
if(this.type == null || this.type == undefined) {
if(this.currentPath == '/home/agenda') {
this.type = "Agenda"
} else if (this.currentPath =='/home/gabinete-digital') {
@@ -138,7 +138,7 @@ export class SearchPage implements OnInit {
res.forEach(e => {
const array: any = Object.values(e);
array[1] = (((array[1] - lowest) / perPercent) * (maximum - minimumSize)/ 100 ) + minimumSize;
list.push(array)
});
@@ -152,7 +152,7 @@ export class SearchPage implements OnInit {
setTimeout(()=>{
WordCloud(
elem,
{
{
list: this.list,
Family: 'Times, serif',
gridSize: 15
@@ -171,7 +171,7 @@ export class SearchPage implements OnInit {
WordCloud(
elem,
{
{
list: this.list,
Family: 'Times, serif',
gridSize: 15
@@ -188,7 +188,7 @@ export class SearchPage implements OnInit {
reorderList(orderBy: string) {
this.ordinance = orderBy;
if(this.ordinance == 'recent'){
@@ -210,18 +210,18 @@ export class SearchPage implements OnInit {
basicSearch() {
if(this.type == "Agenda" ){
this.showLoader = true;
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{
console.log(res);
res.Categories.forEach( e => {
e['Active'] = false;
});
// bind respose
this.searchCategories = res.Categories;
@@ -231,11 +231,11 @@ export class SearchPage implements OnInit {
// hide show document
if(this.searchDocuments.length >= 1){
this.showDocuments = true;
this.showDocuments = true;
} else {
this.showDocuments = false
}
this.showLoader = false;
this.loadWordCloud();
@@ -254,24 +254,24 @@ export class SearchPage implements OnInit {
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
res.Categories.forEach( e => {
e['Active'] = false;
this.searchCategories.push(e)
});
// bind respose
this.sortArrayISODate(res.Documents).forEach(e => {
e['appName'] = 'Correspondencia'
this.searchDocuments.push(e)
});
this.reorderList(this.ordinance);
// hide show document
if(this.searchDocuments.length >= 1){
this.showDocuments = true;
this.showDocuments = true;
} else {
this.showDocuments = false
}
@@ -280,33 +280,33 @@ export class SearchPage implements OnInit {
if(counter ==2){
this.showLoader = false;
}
this.loadWordCloud();
});
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{
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.reorderList(this.ordinance);
// hide show document
if(this.searchDocuments.length >= 1){
this.showDocuments = true;
this.showDocuments = true;
} else {
this.showDocuments = false
}
this.loadWordCloud();
counter++;
@@ -314,34 +314,34 @@ export class SearchPage implements OnInit {
this.showLoader = false;
}
});
} else {
let counter = 0;
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
res.Categories.forEach( e => {
e['Active'] = false;
this.searchCategories.push(e)
});
// bind respose
this.sortArrayISODate(res.Documents).forEach(e => {
e['appName'] = 'Correspondencia'
this.searchDocuments.push(e)
});
this.reorderList(this.ordinance);
// hide show document
if(this.searchDocuments.length >= 1){
this.showDocuments = true;
this.showDocuments = true;
} else {
this.showDocuments = false
}
counter++;
if(counter ==2){
@@ -350,31 +350,31 @@ export class SearchPage implements OnInit {
this.loadWordCloud();
});
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{
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.reorderList(this.ordinance);
// hide show document
if(this.searchDocuments.length >= 1){
this.showDocuments = true;
this.showDocuments = true;
} else {
this.showDocuments = false
}
counter++;
if(counter ==2){
@@ -382,22 +382,22 @@ export class SearchPage implements OnInit {
}
this.loadWordCloud();
});
}
} else if (this.type == "AccoesPresidenciais"){
this.showLoader = true;
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res=>{
console.log(res);
res.Categories.forEach( e => {
e['Active'] = false;
});
// bind respose
this.searchCategories = res.Categories;
@@ -407,11 +407,11 @@ export class SearchPage implements OnInit {
// hide show document
if(this.searchDocuments.length >= 1){
this.showDocuments = true;
this.showDocuments = true;
} else {
this.showDocuments = false
}
this.showLoader = false;
this.loadWordCloud();
});
@@ -447,7 +447,7 @@ export class SearchPage implements OnInit {
this.searchCategories.forEach((e, j) => {
if(i != j){
e['Active'] = false;
}
}
})
if (this.searchCategories[i]['Active']){
@@ -526,10 +526,10 @@ export class SearchPage implements OnInit {
}
async filterDocList(categoryName:string){
// show all category
if(this. showCategory == categoryName ){
this.showSearchDocuments = this.searchDocuments;
} else { // filter category
@@ -569,13 +569,13 @@ export class SearchPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then((res)=>{});
} else if(this.type == "AccoesPresidenciais"){
this.viewPublicationDetail(Id);
}
else if(this.type == "AccoesPresidenciais & ArquivoDespachoElect"){
if(ApplicationType == '8' || ApplicationType == '361') {
this.viewDocumentDetail(Id, ApplicationType);
// this.openExpedientActionsModal(searchDocument)
@@ -594,7 +594,7 @@ export class SearchPage implements OnInit {
cssClass: 'publication-detail modal modal-desktop ',
//backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(()=>{});
@@ -603,12 +603,12 @@ export class SearchPage implements OnInit {
async viewDocumentDetail(docId:string, applicationId:string) {
let classs;
if( window.innerWidth <= 800) {
if( window.innerWidth < 701) {
classs = 'modal modal-desktop'
} else {
classs = 'modal modal-desktop showAsideOptions'
}
const modal = await this.modalController.create({
component: DocumentDetailPage,
componentProps:{
@@ -622,5 +622,5 @@ export class SearchPage implements OnInit {
}
}