This commit is contained in:
Peter Maquiran
2023-06-09 15:29:03 +01:00
parent 7f3cfdc55e
commit 2f38104155
12 changed files with 56 additions and 31 deletions
@@ -8,13 +8,12 @@
<ion-header>
<div class="title-content">
<div class="middle">
<ion-label class="title">Editar Evento</ion-label>
<ion-label id="vsdfajnl" class="title">Editar Evento</ion-label>
</div>
</div>
</ion-header>
</div>
<ion-item-sliding class="overflow-y-auto">
<div class="px-20">
<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>
@@ -487,13 +487,18 @@ export class EditEventPage implements OnInit {
}
getAttachments(eventId: string){
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
this.loadedEventAttachments = res;
},((erro) => {
console.error('editgetAttchament', erro)
}));
getAttachments(eventId: string) {
if(this.postEvent.HasAttachments) {
this.attachmentsService.getAttachmentsById(eventId).subscribe(res=>{
this.loadedEventAttachments = res;
},((erro) => {
console.error('editgetAttchament', erro)
}));
}
}
deleteAttachment(attachmentID: string, index) {
@@ -20,7 +20,7 @@ import { Storage } from '@ionic/storage';
import { SessionStore } from 'src/app/store/session.service';
import { CalendarService } from 'src/app/store/calendar.service';
import { HttpErrorHandle} from 'src/app/services/http-error-handle.service'
import { AttachmentsService } from 'src/app/services/attachments.service';
@Component({
selector: 'app-view-event',
@@ -73,7 +73,8 @@ export class ViewEventPage implements OnInit {
private RouteService: RouteService,
private ionicStorage: Storage,
private CalendarService: CalendarService,
private httpErrorHandle: HttpErrorHandle
private httpErrorHandle: HttpErrorHandle,
private attachmentsService: AttachmentsService,
) {
@@ -394,6 +395,7 @@ export class ViewEventPage implements OnInit {
setTimeout(() => {
/* this.loadEvent(); */
this.loadEvent()
this.getAttachments()
}, 250);
this.isEventEdited = true;
}
@@ -404,6 +406,18 @@ export class ViewEventPage implements OnInit {
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() {
const docId = this.loadedEvent.Attachments[this.dicIndex].SourceId
@@ -90,7 +90,7 @@
</ion-buttons>
<ion-buttons class="flex-grow-1" slot="end">
<button class="btn-ok" fill="clear" color="#fff" (click)="save()">
<ion-label>Enviar</ion-label>
<ion-label>Selecionar</ion-label>
</button>
</ion-buttons>
</ion-toolbar>
@@ -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>
</div>
<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.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>
@@ -308,7 +308,7 @@ export class DespachoPrPage implements OnInit {
try {
await this.processes.CompleteTask(body).toPromise()
this.httpErroHandle.httpsSucessMessagge('Concluir')
this.httpErroHandle.httpsSucessMessagge('Concluir Despacho')
this.TaskService.loadDiplomas()
} catch (error) {
this.httpErroHandle.httpStatusHandle(error)
@@ -408,6 +408,7 @@ export class DespachoPrPage implements OnInit {
await this.generateDiploma(res.data.note, docs);
}
else if (actionName == 'Concluido') {
console.log('actionName', actionName)
await this.concluir(res.data.note, docs);
}
else if (actionName == 'Reexecução') {
@@ -415,7 +416,7 @@ export class DespachoPrPage implements OnInit {
}
this.TaskService.loadDiplomas()
this.goBack();
// this.goBack();
}
});
}
+2 -2
View File
@@ -152,7 +152,7 @@ export class SearchPage implements OnInit {
applicationId: ApplicationType,
docId: item.Id,
},
cssClass: 'modal modal-desktop'
cssClass: 'modal-width-100-width-background modal'
});
await modal.present();
@@ -170,7 +170,7 @@ export class SearchPage implements OnInit {
applicationId: ApplicationType,
docId: item.Id,
},
cssClass: 'modal modal-desktop'
cssClass: 'modal-width-100-width-background modal'
});
await modal.present();
}