diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts index d8a004d70..360619358 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts @@ -135,7 +135,7 @@ export class ExpedienteDetailPage implements OnInit { async LoadTaskDetail(serial: string) { this.processes.GetTask(serial).subscribe(res => { - console.log(res); + //console.log(res); this.task = { "SerialNumber": res.serialNumber, @@ -151,10 +151,10 @@ export class ExpedienteDetailPage implements OnInit { "WorkflowName": res.workflowDisplayName, } - console.log('task', this.task); + //console.log('task', this.task); this.fulltask = res; - console.log('GetTask', res); + //console.log('GetTask', res); let thedate = new Date(this.task.CreateDate); this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]); @@ -303,6 +303,8 @@ export class ExpedienteDetailPage implements OnInit { } async openBookMeetingModal(task: any) { + console.log(task); + let classs; if( window.innerWidth <= 800){ classs = 'book-meeting-modal modal modal-desktop' diff --git a/src/app/services/events.service.ts b/src/app/services/events.service.ts index 6c7853d63..8159936c8 100644 --- a/src/app/services/events.service.ts +++ b/src/app/services/events.service.ts @@ -397,15 +397,42 @@ export class EventsService { postExpedientEvent(docId:any, body:any, sharedagenda:string, serialNumber:any, applicationID:any){ const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente')+'/event'; let params = new HttpParams(); + let options; params = params.set("DocId", docId); params = params.set("SerialNumber", serialNumber); params = params.set("applicationID", applicationID); - let options = { - headers: this.headers, - params: params - }; + switch (this.loggeduser.Profile) { + case 'MDGPR': + if(body.CalendarName == 'Pessoal'){ + options = { + headers: this.headersMdPessoal, + params: params + }; + } + else if(body.CalendarName == 'Oficial'){ + options = { + headers: this.headersMdOficial, + params: params + }; + } + break; + case 'PR': + if(body.CalendarName == 'Pessoal'){ + options = { + headers: this.headersPrPessoal, + params: params + }; + } + else if(body.CalendarName == 'Oficial'){ + options = { + headers: this.headersPrOficial, + params: params + }; + } + break; + } return this.http.post(`${geturl}`, body, options) } createTaskEvent(folderId:any, body:any, sharedagenda:string, serialNumber:any, applicationID:any){