mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
lot of changes
This commit is contained in:
@@ -369,13 +369,13 @@
|
||||
<ion-item>
|
||||
<ion-label>
|
||||
<p class="d-flex ion-justify-content-between">
|
||||
<span class="attach-title-item">{{document.Assunto}}</span>
|
||||
<span class="attach-title-item">{{document.subject}}</span>
|
||||
<span class="app-name">{{document.appName}}</span>
|
||||
<span class="close-button text-black cursor-pointer" (click)="removeAttachment(i)" >
|
||||
<ion-icon class="font-20" src="assets/images/icons-delete-25.svg"></ion-icon>
|
||||
</span>
|
||||
</p>
|
||||
<p><span class="span-left">{{(document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.Data || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
|
||||
<p><span class="span-left">{{(document.EntidadeOrganicaNome || document.Sender)}}</span><span class="span-right"> {{(document.dateEntry || document.DocDate) | date: 'dd-MM-yyyy HH:mm'}} </span></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
@@ -680,6 +680,7 @@ export class NewEventPage implements OnInit {
|
||||
componentProps: {
|
||||
type: 'AccoesPresidenciais & ArquivoDespachoElect',
|
||||
showSearchInput: true,
|
||||
eventAgenda: true,
|
||||
select: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<!-- Search drop down -->
|
||||
<div class="advance-search pa-0 pt-10 pr-10 flex-md-grow-1">
|
||||
<ion-form >
|
||||
<ion-form>
|
||||
<div class="searchParent">
|
||||
|
||||
<div class="d-flex search-input-container ion-justify-content-between searchChild">
|
||||
@@ -54,8 +54,8 @@
|
||||
</button>
|
||||
</div> -->
|
||||
<div class="input-text d-flex ion-align-items-center pm-10 pl-10">
|
||||
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject' class="search-input {{Cy.p.search.input.subject}}" type="search"
|
||||
placeholder="Assunto"></ion-input>
|
||||
<ion-input (keyup.enter)="basicSearch()" [(ngModel)]='searchSubject'
|
||||
class="search-input {{Cy.p.search.input.subject}}" type="search" placeholder="Assunto"></ion-input>
|
||||
</div>
|
||||
<!-- <div (click)="clearSearchInput()" class="d-flex align-center icon">
|
||||
|
||||
@@ -71,13 +71,20 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open pl-10 cursor-pointer" (click)="showHideAdvanceSearch(true)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda'" src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme != 'default'&& type!='Agenda' " src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
|
||||
<div *ngIf="!showAdvanceSearch" class="icon-z icon-most-searched-word-open pl-10 cursor-pointer"
|
||||
(click)="showHideAdvanceSearch(true)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda'"
|
||||
src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme != 'default'&& type!='Agenda' "
|
||||
src="assets/images/theme/gov/filter_icon_grey.svg" class="icon" slot="end"></ion-icon>
|
||||
</div>
|
||||
<div *ngIf="showAdvanceSearch " class="icon-z icon-most-searched-word-open align-md-baseline pl-10 cursor-pointer" (click)="showHideAdvanceSearch(false)" >
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda' "src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && type!='Agenda'" src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
|
||||
<div *ngIf="showAdvanceSearch "
|
||||
class="icon-z icon-most-searched-word-open align-md-baseline pl-10 cursor-pointer"
|
||||
(click)="showHideAdvanceSearch(false)">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' && type!='Agenda' "
|
||||
src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' && type!='Agenda'"
|
||||
src="assets/images/theme/gov/filter_icon.svg" class="icon" slot="end"></ion-icon>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -292,14 +299,14 @@
|
||||
<div class="content ion-align-items-center">
|
||||
|
||||
<div class="d-flex ion-justify-content-between ">
|
||||
<span class="result-name">{{ searchDocument.Assunto}}</span>
|
||||
<span class="result-name">{{ searchDocument.subject}}</span>
|
||||
<span class="app-name"
|
||||
*ngIf="itemIcons() == 'AccoesPresidenciais & ArquivoDespachoElect' || itemIcons() == 'Correspondencia' ">{{
|
||||
searchDocument.appName}}</span>
|
||||
</div>
|
||||
<div class="d-flex ion-justify-content-between ">
|
||||
<span class="organic-entity">{{ searchDocument.EntidadeOrganicaNome }}</span>
|
||||
<span class="documente-date">{{ formateIsoDate(searchDocument.Data) }}</span>
|
||||
<span class="documente-date">{{ formateIsoDate(searchDocument.dateEntry) }}</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="select" (click)="view(searchDocument)"> Ver</div>
|
||||
@@ -309,6 +316,14 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- <a href="#" class="previous">« Previous</a>
|
||||
<a href="#" class="next">Next »</a> -->
|
||||
<div class="nextAndPreviewDiv" >
|
||||
<a href="#" class="previous round" (click)="previeweButton($event)">‹</a>
|
||||
<div>{{pageNumber + "/" + totalPage}}</div>
|
||||
<a href="#" class="next round" (click)="nextButton($event)" >›</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -316,4 +331,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ion-content>
|
||||
</ion-content>
|
||||
@@ -290,3 +290,33 @@ ion-slide {
|
||||
.swiper-container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
background-color: #ddd;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.previous {
|
||||
background-color: #f1f1f1;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.next {
|
||||
background-color: #ffb81c;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.round {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.nextAndPreviewDiv {
|
||||
display:inline-flex
|
||||
}
|
||||
@@ -18,6 +18,8 @@ import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-pick
|
||||
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
|
||||
import { momentG } from 'src/plugin/momentG';
|
||||
import { Cy } from 'cypress/enum'
|
||||
import { AgendaDataRepositoryService } from 'src/app/services/Repositorys/Agenda/agenda-data-repository.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
|
||||
parse: {
|
||||
@@ -91,9 +93,13 @@ export class SearchPage implements OnInit {
|
||||
select: boolean = false;
|
||||
|
||||
showSearchInput = false
|
||||
eventAgenda = false;
|
||||
checkRoutPublication: boolean;
|
||||
checkDateEnd: boolean;
|
||||
datePickerPlaceholder: string;
|
||||
pageNumber = 1;
|
||||
pageSize = 10;
|
||||
totalPage: number;
|
||||
|
||||
|
||||
@ViewChild('picker1') picker1: any;
|
||||
@@ -107,7 +113,8 @@ export class SearchPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
public ThemeService: ThemeService,
|
||||
private router: Router,
|
||||
private httpErrorhandle: HttpErrorHandle) {
|
||||
private httpErrorhandle: HttpErrorHandle,
|
||||
private agendaDataRepository: AgendaDataRepositoryService) {
|
||||
this.ordinance = "recent";
|
||||
this.currentPath = window.location.pathname;
|
||||
|
||||
@@ -117,6 +124,7 @@ export class SearchPage implements OnInit {
|
||||
this.select = this.navParams.get('select');
|
||||
|
||||
this.showSearchInput = this.navParams.get('showSearchInput');
|
||||
this.eventAgenda = this.navParams.get('eventAgenda')
|
||||
|
||||
if (this.type == null || this.type == undefined) {
|
||||
|
||||
@@ -141,8 +149,8 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
|
||||
myInterval = setInterval(() => {
|
||||
document.querySelectorAll('.ngx-mat-timepicker input').forEach((e :any) => {
|
||||
if(e) {
|
||||
document.querySelectorAll('.ngx-mat-timepicker input').forEach((e: any) => {
|
||||
if (e) {
|
||||
e.disabled = true;
|
||||
}
|
||||
})
|
||||
@@ -204,7 +212,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
if(this.currentPath.includes('/home/publications')) {
|
||||
if (this.currentPath.includes('/home/publications')) {
|
||||
this.checkRoutPublication = false;
|
||||
this.checkDateEnd = true;
|
||||
this.datePickerPlaceholder = 'Data Inicio*'
|
||||
@@ -382,8 +390,34 @@ export class SearchPage implements OnInit {
|
||||
|
||||
} else {
|
||||
this.showLoader = true;
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, this.searchSenderId
|
||||
this.agendaDataRepository.getDocumentAttachments(361, SessionStore.user.UserId, this.searchSubject, this.pageNumber, this.pageSize).subscribe((values) => {
|
||||
this.totalPage = values.data.total / this.pageSize;
|
||||
this.totalPage = Math.round(this.totalPage)
|
||||
console.log(values.data.result)
|
||||
this.searchDocuments = this.sortArrayISODate(values.data.result);
|
||||
this.reorderList(this.ordinance);
|
||||
|
||||
// hide show document
|
||||
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)
|
||||
})
|
||||
return
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate, searchDocumentDateEnd, this.searchSenderId
|
||||
, this.searchOrganicEntiryCode, this.searchDocTypeId, '0').subscribe(res => {
|
||||
console.log(this.searchDocTypeId)
|
||||
|
||||
return
|
||||
|
||||
if (!res.Categories.length) {
|
||||
this.searchResult = "Não encontramos o que procura";
|
||||
@@ -418,6 +452,32 @@ export class SearchPage implements OnInit {
|
||||
});
|
||||
}
|
||||
}
|
||||
else if (this.type == "AccoesPresidenciais & ArquivoDespachoElect" && this.eventAgenda == true) {
|
||||
this.showLoader = true;
|
||||
this.agendaDataRepository.getDocumentAttachments(361, SessionStore.user.UserId, this.searchSubject, this.pageNumber, this.pageSize).subscribe((values) => {
|
||||
this.totalPage = values.data.total / this.pageSize;
|
||||
this.totalPage = Math.round(this.totalPage)
|
||||
console.log(values.data.result)
|
||||
this.searchDocuments = this.sortArrayISODate(values.data.result);
|
||||
this.reorderList(this.ordinance);
|
||||
|
||||
// hide show document
|
||||
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)
|
||||
})
|
||||
|
||||
}
|
||||
else if (this.type == "AccoesPresidenciais & ArquivoDespachoElect") {
|
||||
|
||||
this.searchCategories = [];
|
||||
@@ -536,7 +596,7 @@ export class SearchPage implements OnInit {
|
||||
|
||||
} else {
|
||||
this.showLoader = true;
|
||||
this.search.basicSearch(this.searchSubject, searchDocumentDate,searchDocumentDateEnd, 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";
|
||||
@@ -579,7 +639,7 @@ export class SearchPage implements OnInit {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null&& searchDocumentDateEnd == 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');
|
||||
|
||||
@@ -793,13 +853,13 @@ export class SearchPage implements OnInit {
|
||||
// });
|
||||
|
||||
|
||||
if (this.searchSubject.trim() == "" && searchDocumentDate == null && searchDocumentDateEnd == 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,searchDocumentDateEnd, 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";
|
||||
@@ -1136,4 +1196,18 @@ export class SearchPage implements OnInit {
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
nextButton(event) {
|
||||
event.preventDefault();
|
||||
this.pageNumber++;
|
||||
this.basicSearch()
|
||||
}
|
||||
|
||||
previeweButton(event) {
|
||||
event.preventDefault();
|
||||
if (this.pageNumber > 1) {
|
||||
this.pageNumber--;
|
||||
this.basicSearch()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user