Pesquisa avançada fixed

This commit is contained in:
Eudes Inácio
2023-06-10 10:55:30 +01:00
12 changed files with 85 additions and 43 deletions
@@ -8,13 +8,12 @@
<ion-header> <ion-header>
<div class="title-content"> <div class="title-content">
<div class="middle"> <div class="middle">
<ion-label class="title">Editar Evento</ion-label> <ion-label id="vsdfajnl" class="title">Editar Evento</ion-label>
</div> </div>
</div> </div>
</ion-header> </ion-header>
</div> </div>
<ion-item-sliding class="overflow-y-auto"> <ion-item-sliding class="overflow-y-auto">
<div class="px-20"> <div class="px-20">
<div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom "> <div class="ion-item-container width-100" [class.input-error]="Form?.get('Subject')?.invalid && validateFrom ">
<ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input> <ion-input autocomplete="on" autocorrect="on" spellcheck="true" placeholder="Assunto*" [(ngModel)]="postEvent.Subject"></ion-input>
@@ -487,7 +487,9 @@ export class EditEventPage implements OnInit {
} }
getAttachments(eventId: string){ getAttachments(eventId: string) {
if(this.postEvent.HasAttachments) {
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{ this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
this.loadedEventAttachments = res; this.loadedEventAttachments = res;
@@ -496,6 +498,9 @@ export class EditEventPage implements OnInit {
})); }));
} }
}
deleteAttachment(attachmentID: string, index) { deleteAttachment(attachmentID: string, index) {
const id: any = this.loadedEventAttachments[index].Id const id: any = this.loadedEventAttachments[index].Id
@@ -45,8 +45,8 @@ export class NewEventPage implements OnInit {
// date picker // date picker
public date: any; public date: any;
public disabled = false; public disabled = false;
public showSpinners = true; public showSpinners = false;
public showSeconds = false; public showSeconds = true;
public touchUi = false; public touchUi = false;
public enableMeridian = false; public enableMeridian = false;
public stepHour = 1; public stepHour = 1;
@@ -5,6 +5,8 @@
</ion-refresher-content> </ion-refresher-content>
</ion-refresher> </ion-refresher>
{{ loadedEvent.HasAttachments | json}}
<div class="main-content d-flex height-100" [className]="isModal ? '_main-content d-flex height-100 ma-0 px-20 pt-30 pb-20 background-white' : 'main-content d-flex height-100'"> <div class="main-content d-flex height-100" [className]="isModal ? '_main-content d-flex height-100 ma-0 px-20 pt-30 pb-20 background-white' : 'main-content d-flex height-100'">
<div class="content d-flex flex-column width-100"> <div class="content d-flex flex-column width-100">
<div class="main-header d-flex"> <div class="main-header d-flex">
@@ -20,7 +20,7 @@ import { Storage } from '@ionic/storage';
import { SessionStore } from 'src/app/store/session.service'; import { SessionStore } from 'src/app/store/session.service';
import { CalendarService } from 'src/app/store/calendar.service'; import { CalendarService } from 'src/app/store/calendar.service';
import { HttpErrorHandle} from 'src/app/services/http-error-handle.service' import { HttpErrorHandle} from 'src/app/services/http-error-handle.service'
import { AttachmentsService } from 'src/app/services/attachments.service';
@Component({ @Component({
selector: 'app-view-event', selector: 'app-view-event',
@@ -73,7 +73,8 @@ export class ViewEventPage implements OnInit {
private RouteService: RouteService, private RouteService: RouteService,
private ionicStorage: Storage, private ionicStorage: Storage,
private CalendarService: CalendarService, private CalendarService: CalendarService,
private httpErrorHandle: HttpErrorHandle private httpErrorHandle: HttpErrorHandle,
private attachmentsService: AttachmentsService,
) { ) {
@@ -394,9 +395,12 @@ export class ViewEventPage implements OnInit {
setTimeout(() => { setTimeout(() => {
/* this.loadEvent(); */ /* this.loadEvent(); */
this.loadEvent() this.loadEvent()
}, 250); }, 250);
this.isEventEdited = true; this.isEventEdited = true;
} }
this.getAttachments()
}); });
} }
@@ -404,6 +408,18 @@ export class ViewEventPage implements OnInit {
this.dicIndex = index this.dicIndex = index
} }
getAttachments() {
if(this.loadedEvent.HasAttachments) {
this.attachmentsService.getAttachmentsById(this.loadedEvent.EventId).subscribe(res=>{
this.loadedEvent.Attachments = res;
},((erro) => {
console.error('editgetAttchament', erro)
}));
}
}
async LoadDocumentDetails() { async LoadDocumentDetails() {
const docId = this.loadedEvent.Attachments[this.dicIndex].SourceId const docId = this.loadedEvent.Attachments[this.dicIndex].SourceId
@@ -98,7 +98,7 @@
<button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.md_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
</div> </div>
<div class="buttons px-20" *ngIf="task.activityInstanceName == 'Concluir Despacho'"> <div class="buttons px-20" *ngIf="task.activityInstanceName == 'Concluir Despacho'">
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Concluido')" class="btn-cancel" shape="round" >Marcar como Concluído 123</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks])" (click)="openAddNoteModal('Reexecução')" class="btn-cancel" shape="round" >Enviar para Reexecução</button>
<button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button> <button *ngIf="p.userPermission([p.permissionList.Agenda.access])" (click)="openBookMeetingModal(task)" class="btn-cancel" shape="round" >Marcar Reunião</button>
<button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button> <button *ngIf="p.userPermission([p.permissionList.Gabinete.pr_tasks]) && task.Status != 'Pending'" (click)="sendExpedienteToPending()" class="btn-cancel" shape="round" >Enviar para Pendentes</button>
@@ -308,7 +308,7 @@ export class DespachoPrPage implements OnInit {
try { try {
await this.processes.CompleteTask(body).toPromise() await this.processes.CompleteTask(body).toPromise()
this.httpErroHandle.httpsSucessMessagge('Concluir') this.httpErroHandle.httpsSucessMessagge('Concluir Despacho')
this.TaskService.loadDiplomas() this.TaskService.loadDiplomas()
} catch (error) { } catch (error) {
this.httpErroHandle.httpStatusHandle(error) this.httpErroHandle.httpStatusHandle(error)
@@ -408,6 +408,7 @@ export class DespachoPrPage implements OnInit {
await this.generateDiploma(res.data.note, docs); await this.generateDiploma(res.data.note, docs);
} }
else if (actionName == 'Concluido') { else if (actionName == 'Concluido') {
console.log('actionName', actionName)
await this.concluir(res.data.note, docs); await this.concluir(res.data.note, docs);
} }
else if (actionName == 'Reexecução') { else if (actionName == 'Reexecução') {
@@ -415,7 +416,7 @@ export class DespachoPrPage implements OnInit {
} }
this.TaskService.loadDiplomas() this.TaskService.loadDiplomas()
this.goBack(); // this.goBack();
} }
}); });
} }
+27 -14
View File
@@ -16,6 +16,7 @@ import { environment } from 'src/environments/environment';
import { HttpErrorHandle } from 'src/app/services/http-error-handle.service'; import { HttpErrorHandle } from 'src/app/services/http-error-handle.service';
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker'; import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker'; import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
import { momentG } from 'src/plugin/momentG';
const CUSTOM_DATE_FORMATS: NgxMatDateFormats = { const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {
parse: { parse: {
@@ -152,7 +153,7 @@ export class SearchPage implements OnInit {
applicationId: ApplicationType, applicationId: ApplicationType,
docId: item.Id, docId: item.Id,
}, },
cssClass: 'modal modal-desktop' cssClass: 'modal-width-100-width-background modal'
}); });
await modal.present(); await modal.present();
@@ -170,7 +171,7 @@ export class SearchPage implements OnInit {
applicationId: ApplicationType, applicationId: ApplicationType,
docId: item.Id, docId: item.Id,
}, },
cssClass: 'modal modal-desktop' cssClass: 'modal-width-100-width-background modal'
}); });
await modal.present(); await modal.present();
} }
@@ -319,11 +320,23 @@ export class SearchPage implements OnInit {
*/ */
basicSearch() { basicSearch() {
if(this.type == "Agenda" ){ let searchDocumentDate
if (this.searchDocumentDate) {
searchDocumentDate = momentG(new Date(this.searchDocumentDate), 'yyyy-MM-dd')
}
searchDocumentDate;
if(this.searchSubject == '') {
this.searchSubject = undefined
}
if(this.type == "Agenda" ) {
this.showLoader = true; this.showLoader = true;
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{ ,this.searchOrganicEntiry, this.searchDocTypeId, '0').subscribe(res=>{
res.Categories.forEach( e => { res.Categories.forEach( e => {
@@ -338,7 +351,7 @@ export class SearchPage implements OnInit {
this.reorderList(this.ordinance); this.reorderList(this.ordinance);
// hide show document // hide show document
if(this.searchDocuments.length >= 1){ if(this.searchDocuments.length >= 1) {
this.showDocuments = true; this.showDocuments = true;
} else { } else {
this.showDocuments = false this.showDocuments = false
@@ -366,8 +379,8 @@ export class SearchPage implements OnInit {
let counter = 0; let counter = 0;
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{ ,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res => {
res.Categories.forEach( e => { res.Categories.forEach( e => {
e['Active'] = false; e['Active'] = false;
@@ -405,7 +418,7 @@ export class SearchPage implements OnInit {
} }
}); });
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{ ,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res=>{
res.Categories.forEach( e => { res.Categories.forEach( e => {
@@ -448,7 +461,7 @@ export class SearchPage implements OnInit {
} else { } else {
let counter = 0; let counter = 0;
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res => { ,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res => {
res.Categories.forEach( e => { res.Categories.forEach( e => {
e['Active'] = false; e['Active'] = false;
@@ -488,7 +501,7 @@ export class SearchPage implements OnInit {
} }
}); });
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res => { ,this.searchOrganicEntiry, this.searchDocTypeId, '361').subscribe(res => {
res.Categories.forEach( e => { res.Categories.forEach( e => {
@@ -543,7 +556,7 @@ export class SearchPage implements OnInit {
let counter = 0; let counter = 0;
this.search.searchForDoc(this.searchSubject, this.searchDocumentDate, this.searchSender this.search.searchForDoc(this.searchSubject, searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{ ,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
res.Categories.forEach( e => { res.Categories.forEach( e => {
@@ -581,7 +594,7 @@ export class SearchPage implements OnInit {
} else { } else {
let counter = 0; let counter = 0;
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{ ,this.searchOrganicEntiry, this.searchDocTypeId, '8').subscribe(res=>{
res.Categories.forEach( e => { res.Categories.forEach( e => {
@@ -632,7 +645,7 @@ export class SearchPage implements OnInit {
this.searchCategories = [] this.searchCategories = []
this.searchDocuments = [] this.searchDocuments = []
this.search.basicSearch(this.searchSubject, this.searchDocumentDate, this.searchSender this.search.basicSearch(this.searchSubject, searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res=>{ ,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res=>{
@@ -683,7 +696,7 @@ export class SearchPage implements OnInit {
this.search.basicSearchPublication(this.searchSubject, this.searchDocumentDate, this.searchSender this.search.basicSearchPublication(this.searchSubject, searchDocumentDate, this.searchSender
,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res => { ,this.searchOrganicEntiry, this.searchDocTypeId, '386').subscribe(res => {
@@ -92,8 +92,12 @@ export class HttpErrorHandle {
case 'Arquivar': case 'Arquivar':
this.toastService._successMessage('Tarefa Arquivada!') this.toastService._successMessage('Tarefa Arquivada!')
break break
case 'Concluir Despacho':
this.toastService._successMessage('Despacho concluido')
break;
case 'Concluir': case 'Concluir':
this.toastService._successMessage('Diploma concluido') this.toastService._successMessage('Diploma concluido')
break;
case 'Reexecução': case 'Reexecução':
this.toastService._successMessage('Enviado para reexecução!') this.toastService._successMessage('Enviado para reexecução!')
break; break;
@@ -3,7 +3,7 @@
<div class="main-header"> <div class="main-header">
<div class="title-content"> <div class="title-content">
<div class="middle"> <div class="middle">
<ion-label class="title">Editar Evento</ion-label> <br> <ion-label id="edit-event-desktop" class="title">Editar Evento</ion-label> <br>
<i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i> <i style="margin-top: -3px; font-size: 15px;" > Campos marcados com * são obrigatórios</i>
</div> </div>
</div> </div>
@@ -450,6 +450,7 @@ export class EditEventPage implements OnInit {
} }
async getAttachments(eventId: string){ async getAttachments(eventId: string){
if(this.postEvent.HasAttachments) {
let rest: any; let rest: any;
try { try {
rest = this.attachmentsService.getAttachmentsById(eventId).toPromise() rest = this.attachmentsService.getAttachmentsById(eventId).toPromise()
@@ -458,6 +459,7 @@ export class EditEventPage implements OnInit {
} }
this.loadedEventAttachments = rest; this.loadedEventAttachments = rest;
} }
}
deleteAttachment(attachmentID: string, index) { deleteAttachment(attachmentID: string, index) {
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = { export let versionData = {
"shortSHA": "05265f244", "shortSHA": "d56c38aac",
"SHA": "05265f24426a97111f90220e42cefe9b3e6356f0", "SHA": "d56c38aac1f66aa95eef0ad6dd1875d93d6f4467",
"branch": "feature/gabinete-search", "branch": "feature/gabinete-search",
"lastCommitAuthor": "'Eudes Inácio'", "lastCommitAuthor": "'Eudes Inácio'",
"lastCommitTime": "'Fri Jun 9 13:55:32 2023 +0100'", "lastCommitTime": "'Sat Jun 10 10:00:02 2023 +0100'",
"lastCommitMessage": "changes from peter", "lastCommitMessage": "add interveninter button text change and text on agrupadores on inicio module",
"lastCommitNumber": "4966", "lastCommitNumber": "4969",
"change": "", "change": "",
"changeStatus": "On branch feature/gabinete-search\nYour branch and 'origin/feature/gabinete-search' have diverged,\nand have 11 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/modals/document-set-up-meeting/document-set-up-meeting.page.html\n\tmodified: src/app/modals/forward/forward.page.html\n\tmodified: src/app/pages/events/attendees/attendees.page.html\n\tmodified: src/app/pages/events/events.page.html\n\tmodified: src/app/pages/events/events.page.scss\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.html\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tmodified: src/app/services/events/attendees/attendees.page.html\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/event/attendee-modal/attendee-modal.page.html\n\tmodified: src/app/shared/gabinete-digital/despachos/despachos.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas-assinar/diplomas-assinar.page.ts\n\tmodified: src/app/shared/gabinete-digital/diplomas-gerar/diplomas-gerar.page.ts\n\tmodified: src/app/shared/gabinete-digital/expedientes-pr/expedientes-pr.page.ts\n\tmodified: src/app/shared/gabinete-digital/expedients/expedients.page.ts\n\tmodified: src/app/shared/gabinete-digital/pedidos/pedidos.page.ts", "changeStatus": "On branch feature/gabinete-search\nYour branch and 'origin/feature/gabinete-search' have diverged,\nand have 12 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/edit-event/edit-event.page.html\n\tmodified: src/app/pages/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/agenda/new-event/new-event.page.ts\n\tmodified: src/app/pages/agenda/view-event/view-event.page.html\n\tmodified: src/app/pages/agenda/view-event/view-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.html\n\tmodified: src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page.ts\n\tmodified: src/app/pages/search/search.page.ts\n\tmodified: src/app/services/http-error-handle.service.ts\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.html\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.ts",
"changeAuthor": "eudes.inacio" "changeAuthor": "eudes.inacio"
} }