This commit is contained in:
tiago.kayaya
2021-07-28 16:27:48 +01:00
19 changed files with 352 additions and 173 deletions
@@ -22,11 +22,19 @@
<div class="header-title flex-grow-1 cursor-pointer">
<label>{{loadedEvent.workflowInstanceDataFields.Subject}} </label>
</div>
<div (click)="editar(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
<button class="btn-no-color">
<ion-icon src="assets/images/icons-edit.svg"></ion-icon>
</button>
</div>
<div (click)="rejectTask(loadedEvent.serialNumber)" class="header-icon-right display-none-{{showAside}}">
<button class="btn-no-color" >
<ion-icon class="delete" name="trash-sharp"></ion-icon>
</button>
</div>
</div>
<div class="upper-content d-flex flex-column">
<div class="content-location">
@@ -114,9 +122,8 @@
</ion-content>
<ion-footer class="display-none-{{showAside}} ion-no-border">
<div class="buttons">
<button class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Adicionar Nota</button>
<button class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
<button class="btn-delete" shape="round" (click)="rejectTask(loadedEvent.serialNumber)">Rejeitar</button>
</div>
<div class="buttons">
<button class="btn-cancel" shape="round" (click)="emendTask(loadedEvent.serialNumber)">Adicionar Nota</button>
<button class="btn-ok" shape="round" (click)="approveTask(loadedEvent.serialNumber)">Aprovar</button>
</div>
</ion-footer>
@@ -207,4 +207,13 @@ ion-menu{
width: 25%;
}
} */
.delete{
padding: 7px;
font-size: 21px;
color:#fff;
background: #d30606;
border-radius: 20px;
}
@@ -69,12 +69,12 @@ export class ApproveEventPage implements OnInit {
setTimeout(()=>{
this.getTask();
this.getAttachments();
}, 4000)
}, 6000)
setTimeout(()=>{
this.getTask();
this.getAttachments();
}, 6000)
}, 10000)
}
@@ -135,7 +135,6 @@ export class ApproveEventPage implements OnInit {
try {
await this.processes.PostTaskAction(body).toPromise()
this.router.navigate(['/home/gabinete-digital/event-list']);
this.toastService.successMessage('Evento rejeitado')
} catch (error) {
this.toastService.badRequest('Processo não efectuado')
@@ -218,12 +217,17 @@ export class ApproveEventPage implements OnInit {
}
goToEventsToApprove() {
let navigationExtras: NavigationExtras = {
queryParams: {
if(window.location.pathname.startsWith('/home/agenda')) {
this.close()
} else {
let navigationExtras: NavigationExtras = {
queryParams: {
"eventos": true,
}
};
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
};
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
}
@@ -109,6 +109,7 @@ export class EditEventToApprovePage implements OnInit {
@Output() setIntervenient = new EventEmitter<any>();
@Output() setIntervenientCC = new EventEmitter<any>();
@Output() closeComponent = new EventEmitter<any>();
@Output() closeEventToApprove = new EventEmitter<any>();
@Input() saveData: any;
@Input() serialNumber: string
@@ -210,7 +211,10 @@ export class EditEventToApprovePage implements OnInit {
window['temp.path:/shared/agenda/edit-event-to-approve.ts'] = {}
this.closeComponent.emit();
// this.closeComponent.emit();
this.closeEventToApprove.emit();
/* this.setIntervenient.emit([]);
this.setIntervenientCC.emit([]);
this.clearContact.emit(); */
@@ -254,8 +258,6 @@ export class EditEventToApprovePage implements OnInit {
}
async save() {
this.close()
this.injectValidation()
this.runValidation()
@@ -303,8 +305,9 @@ export class EditEventToApprovePage implements OnInit {
try {
await this.eventsService.postEventToApproveEdit(event).toPromise()
this.close()
this.toastService.successMessage('Evento editado');
} catch(e) {
this.toastService.badRequest('Evento não editado');
@@ -168,100 +168,41 @@ export class ViewEventPage implements OnInit {
});
}
async openExpedientActionsModal(taskAction: any, task: any) {
let classs;
if( window.innerWidth <= 800){
classs = 'modal modal-desktop'
} else {
classs = 'modal modal-desktop showAsideOptions'
}
const doc = this.loadedAttachments[ this.dicIndex];
task = {
serialNumber: doc.SourceId,
taskStartDate: doc.CreateDate,
isEvent: true,
workflowInstanceDataFields: {
FsId: doc.ApplicationId,
FolderID: null,
DocId: doc.SourceId,
Subject: doc.SourceName
},
}
const modal = await this.modalController.create({
component: ExpedientTaskModalPage,
componentProps: {
taskAction: taskAction,
task: task,
profile: this.profile,
},
cssClass: classs,
});
await modal.present();
modal.onDidDismiss().then(res=>{
console.log(res['data']);
if(res['data']=='openDiscart'){
console.log('open discart');
// this.distartExpedientModal();
}
});
}
async openBookMeetingModal(task: any) {
const doc = this.loadedAttachments[ this.dicIndex];
const Customtask = {
serialNumber: doc.SourceId,
taskStartDate: doc.CreateDate,
isEvent: true,
workflowInstanceDataFields: {
FsId: doc.ApplicationId,
FolderID: null,
DocId: doc.SourceId,
Subject: doc.SourceName
},
}
let classs;
if( window.innerWidth <= 800){
classs = 'book-meeting-modal modal modal-desktop'
} else {
classs = 'modal modal-desktop showAsideOptions'
}
const modal = await this.modalController.create({
component: BookMeetingModalPage,
componentProps: {
task: task,
},
cssClass: classs,
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss();
}
async openTaskOptions() {
const doc = this.loadedAttachments[ this.dicIndex];
let customTask = {
serialNumber: doc.SourceId,
taskStartDate: doc.CreateDate,
isEvent: true,
workflowInstanceDataFields: {
FsId: doc.ApplicationId,
FolderID: null,
DocId: doc.SourceId,
Subject: doc.SourceName
},
let customTask;
if(doc.ApplicationID == 361 || doc.ApplicationId == 361) {
customTask = {
serialNumber: doc.DispatchNumber,
taskStartDate: doc.DateDispatch,
isEvent: true,
workflowInstanceDataFields: {
FsId: doc.ApplicationID,
FolderID: null,
DocId: doc.DispatchNumber,
Subject: doc.Assunto
},
}
} else if (doc.ApplicationID == 8 || doc.ApplicationId == 8) {
customTask = {
serialNumber: doc.DocId,
taskStartDate: doc.DocDate,
isEvent: true,
workflowInstanceDataFields: {
FsId: doc.ApplicationID || doc.ApplicationId,
FolderID: null,
DocId: doc.DocId,
Subject: doc.Assunto
}
}
}
console.log(doc)
customTask.Status = ''
const popover = await this.modalController.create({
component: OptsExpedientePage,
cssClass: 'model aside-modal search-submodal',
@@ -104,7 +104,6 @@ export class OptsExpedientePage implements OnInit {
}
}
sendExpedienteToPending() {
this.close();
this.processes.SetTaskToPending(this.task.SerialNumber).subscribe(res=>{
@@ -136,6 +135,10 @@ export class OptsExpedientePage implements OnInit {
}
async openExpedientActionsModal(taskAction: any, task: any) {
alert('save')
console.log(taskAction, task)
this.close();
let classs;
if( window.innerWidth <= 800){