diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 9a6bf1379..8def4f516 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -51,6 +51,10 @@ const routes: Routes = [ path: 'despachos', loadChildren: () => import('./shared/gabinete-digital/despachos/despachos.module').then( m => m.DespachosPageModule) }, + { + path: 'create-process', + loadChildren: () => import('./modals/create-process/create-process.module').then( m => m.CreateProcessPageModule) + }, /* { path: 'chat', diff --git a/src/app/modals/create-process/create-process-routing.module.ts b/src/app/modals/create-process/create-process-routing.module.ts new file mode 100644 index 000000000..05ed0fa3e --- /dev/null +++ b/src/app/modals/create-process/create-process-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { CreateProcessPage } from './create-process.page'; + +const routes: Routes = [ + { + path: '', + component: CreateProcessPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class CreateProcessPageRoutingModule {} diff --git a/src/app/modals/create-process/create-process.module.ts b/src/app/modals/create-process/create-process.module.ts new file mode 100644 index 000000000..bde6665cf --- /dev/null +++ b/src/app/modals/create-process/create-process.module.ts @@ -0,0 +1,26 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { CreateProcessPageRoutingModule } from './create-process-routing.module'; + +import { CreateProcessPage } from './create-process.page'; +import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page'; +import { EmptyContainerPage } from 'src/app/shared/empty-container/empty-container.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + CreateProcessPageRoutingModule + ], + declarations: [ + CreateProcessPage, + AttendeeModalPage, + EmptyContainerPage, + ] +}) +export class CreateProcessPageModule {} diff --git a/src/app/modals/create-process/create-process.page.html b/src/app/modals/create-process/create-process.page.html new file mode 100644 index 000000000..6679aae08 --- /dev/null +++ b/src/app/modals/create-process/create-process.page.html @@ -0,0 +1,145 @@ + +
+
+ + {{modalTitle[taskType]}} + +
+ +
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+
+ + Normal (4 dias para a execução da tarefa) + Urgente (2 dias para a execução da tarefa) + Muito Urgente (1 dia para a execução da tarefa) + Urgentíssimo (8 horas para a execução da tarefa) + +
+
+
+
+
+
+ +
+
+ + {{type.Description}} + +
+
+
+ +
+
+
+ +
+
+
+ + + Adicionar intervenientes + {{participant.Name}} + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+ + + Com conhecimento + {{participant.Name}} + + +
+
+ +
+
+
+
+ + + +
+ + Documentos Anexados + + + + +

{{attachment.Description}}

+

{{attachment.Stakeholders}} {{ attachment.CreateDate | date: 'dd/MM/yyyy' }}

+
+
+
+
+
+ + +
+ + + +
+ +
+
+ +
+ + +
+
\ No newline at end of file diff --git a/src/app/modals/create-process/create-process.page.scss b/src/app/modals/create-process/create-process.page.scss new file mode 100644 index 000000000..3fa3f3254 --- /dev/null +++ b/src/app/modals/create-process/create-process.page.scss @@ -0,0 +1,128 @@ +.content{ + padding: 30px 20px 0 20px !important; + margin: 0; + float: left; + + .title{ + font-family: Roboto; + font-size: 25px; + font-weight: normal; + font-stretch: normal; + font-style: normal; + line-height: normal; + letter-spacing: normal; + color: #000000; + //margin: 8px 0 8px 0px; + } + .container-div{ + margin-bottom: 15px; + } + .ion-item-container{ + //width: 360px; + margin: 15px auto; + border: 1px solid #ebebeb; + border-radius: 5px; + padding-left: 5px; + } + .ion-item-container-no-border{ + //width: 360px; + //margin: 15px auto; + } + .ion-item-class-2{ + //width: 360px; + margin: 0px auto; + overflow: auto; + } + .ion-icon-class{ + width: 45px; + height: 45px; + float: left; + padding: 10px; + font-size: 25px; + } + ion-select{ + padding-left: 5px; + margin-left: 0; + } + .ion-input-class{ + width: calc(100% - 45px); + height: 45px; + border: 1px solid #ebebeb; + border-radius: 5px; + padding-left: 5px; + padding-right: 10px; + float: left; + } + .ion-input-class-no-height{ + border: 1px solid #ebebeb; + border-radius: 5px; + overflow: auto; + } + .list-people{ + width: 256px; + float: left; + + } + .add-people{ + width: 45px; + float: right; + overflow: auto; + font-size: 25px; + padding: 10px; + } + .list-people-title{ + /* font-size: 13px; */ + color: #797979; + } + .attach-document{ + font-size: 15px; + color: #0d89d1; + } + + .attach-title-item{ + width: 100%; + font-size: 15px; + color:#0d89d1; + } + /* SPAN */ + .span-left{ + float: left; + font-size: 15x; + } + .span-right{ + text-align: right; + float: right; + font-size: 13px; + } + } + .container-footer{ + margin:0 auto; + overflow: auto; + .button-cancel { + width: 170px; + height: 44px; + border-radius: 22.5px; + --background: #e0e9ee; + --color: #061b52; + margin:10px; + } + .button-save { + width: 170px; + height: 44px; + border-radius: 22.5px; + --background: #42b9fe; + --color:#ffffff; + margin:10px; + } + } + .buttons{ + display: flex; + justify-content: space-between; + padding: 20px; + overflow: auto; + } + @media only screen and (min-width: 1024px){ + .aside-content{ + display: block; + } + } \ No newline at end of file diff --git a/src/app/modals/create-process/create-process.page.spec.ts b/src/app/modals/create-process/create-process.page.spec.ts new file mode 100644 index 000000000..721e09257 --- /dev/null +++ b/src/app/modals/create-process/create-process.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { CreateProcessPage } from './create-process.page'; + +describe('CreateProcessPage', () => { + let component: CreateProcessPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ CreateProcessPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(CreateProcessPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modals/create-process/create-process.page.ts b/src/app/modals/create-process/create-process.page.ts new file mode 100644 index 000000000..87d6a1b9b --- /dev/null +++ b/src/app/modals/create-process/create-process.page.ts @@ -0,0 +1,370 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; +import { ModalController, NavParams } from '@ionic/angular'; +import { Despacho } from 'src/app/models/despacho.model'; +import { EventPerson } from 'src/app/models/eventperson.model'; +import { Participant } from 'src/app/models/participant.model'; +import { Folder } from 'src/app/models/folder.model'; +import { AuthService } from 'src/app/services/auth.service'; +import { ProcessesService } from 'src/app/services/processes.service'; +import { environment } from 'src/environments/environment'; +import { AttachmentsService } from 'src/app/services/attachments.service'; +import { AlertService } from 'src/app/services/alert.service'; +import { AddParticipantsModalPage } from 'src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page'; +import { AddParticipantsCcModalPage } from 'src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page'; +import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discart-expedient-modal/discart-expedient-modal.page'; +import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page'; + +@Component({ + selector: 'app-create-process', + templateUrl: './create-process.page.html', + styleUrls: ['./create-process.page.scss'], +}) +export class CreateProcessPage implements OnInit { + modalTitle: string[] = [ + 'Efectuar Despacho', + 'Solicitar Parecer', + 'Solicitar Deferimento' + ]; + taskType:string; + task: any; + + taskParticipants: any = []; + taskParticipantsCc: any = []; + + taskDate: Date; + taskDescription: string; + user: string; + loadedAttachments:any; + subjectTypes:any; + + postData: Despacho; + dispatchFolder: Folder; + participants: Participant[]; + + contacts= []; + // trigger hide and show for attendee component + showAttendees= false; + + adding: "intervenient" | "CC" = "intervenient"; + profile: string; + + emptyTextDescription = "Sem intervenientes selecionados"; + showEmptyContainer = true; + + constructor( + private modalController: ModalController, + private router:Router, + private processes:ProcessesService, + private attachmentsService: AttachmentsService, + private navParams: NavParams, + private alertController: AlertService, + private authService: AuthService) { + this.user = environment.defaultuser +'@'+ environment.domain; + this.task = this.navParams.get('task'); + + console.log('task', this.task) + + this.taskType = this.navParams.get('taskAction'); + + this.postData = new Despacho(); + this.participants = this.participants = new Array(); + this.dispatchFolder = { + Nad: 30, + Subject: '', + Message: '', + SourceSecFsId: '361', + SouceType: 'FOLDER', + SourceId: this.task.workflowInstanceDataFields.FolderID, + DeadlineType: '', + + }; + + this.postData.DispatchFolder = this.dispatchFolder; + this.postData.UsersSelected = this.participants; + /* By Default TypeDeadline should be 'Normal' */ + this.postData.Priority = '99999861'; + /* By Default TypeDeadline should be 'Economia' */ + this.postData.SubjectTypeId = '99999844'; + /* Initialize 'Subject' with the title of the expedient */ + this.postData.DispatchFolder.Subject = this.task.workflowInstanceDataFields.Subject; + this.profile = this.navParams.get('profile'); + } + + async setAdding(type: "intervenient" | "CC"){ + this.adding = type; + } + + ngOnInit() { + + this.taskDate = new Date(this.task.taskStartDate); + + if(!this.task.hasOwnProperty('isEvent')) { + // if not + this.getAttachments(); + } + + this.getSubjectType(); + + console.log('CHEGOU'); + + + } + + close(){ + this.router.navigate(['/home/gabinete-digital/expediente']); + this.modalController.dismiss(null); + } + + getSubjectType() { + this.processes.GetSubjectType().subscribe(res=>{ + console.log(res); + this.subjectTypes = res; + }); + } + cancelTask() { + this.modalController.dismiss(null); + + } + saveTask(){ + + if(this.postData.Priority=='99999861'){ + this.dispatchFolder.DeadlineType = 'Normal'; + } + else if(this.postData.Priority=='99999862'){ + this.dispatchFolder.DeadlineType = 'Urgente'; + } + else if(this.postData.Priority=='99999863'){ + this.dispatchFolder.DeadlineType = 'Muito Urgente'; + } + else if(this.postData.Priority=='99999864'){ + this.dispatchFolder.DeadlineType = 'Urgentíssimo'; + } + + let attendees = this.taskParticipants.concat(this.taskParticipantsCc); + attendees = attendees.map(function(val) { + return { + UserEmail: val.EmailAddress, + UserType: val.IsRequired?"I": "CC" + }; + }) + + if(this.taskParticipants.length > 0) { + switch (this.taskType) { + case '0': + this.postData = { + DistributionType: "Paralelo", + CountryCode: 'AO', + Priority: this.postData.Priority, + UserEmail: this.user, + SubjectTypeId: this.postData.SubjectTypeId, + UsersSelected: attendees, + DispatchFolder: this.dispatchFolder, + } + console.log('this.postData', this.postData, this.taskType); + this.processes.postDespatcho(this.postData); + break; + case '1': + this.postData = { + DistributionType: "Paralelo", + CountryCode: 'AO', + Priority: this.postData.Priority, + UserEmail: this.user, + SubjectTypeId: this.postData.SubjectTypeId, + UsersSelected: attendees, + DispatchFolder: this.dispatchFolder, + } + console.log(this.postData); + this.processes.postParecer(this.postData); + break; + case '2': + this.postData = { + DistributionType: "Paralelo", + CountryCode: 'AO', + Priority: this.postData.Priority, + UserEmail: this.user, + SubjectTypeId: this.postData.SubjectTypeId, + UsersSelected: attendees, + DispatchFolder: this.dispatchFolder, + } + console.log(this.postData); + this.processes.postDeferimento(this.postData); + break; + } + + + this.modalController.dismiss(); + /* this.distartExpedientModal(); + this.close(); */ + } + else { + this.alertController.presentAlert("Lista de intervenientes vazia. Por favor, adicione 1 ou mais intervenientes."); + } + + } + + getAttachments() { + this.attachmentsService.getAttachmentsBySerial(this.task.serialNumber).subscribe(res=>{ + this.loadedAttachments = res; + console.log(res); + }); + } + + async addParticipants() { + /* console.log('HERES'); */ + + + this.adding = "intervenient"; + this.contacts = this.taskParticipants; + + if(window.innerWidth <=800){ + + this.showAttendees=false; + + const modal = await this.modalController.create({ + component: AddParticipantsModalPage, + componentProps: { + eventPersons: this.participants + }, + cssClass: 'add-participants-modal', + backdropDismiss: false + }); + await modal.present(); + modal.onDidDismiss().then((res) => { + this.taskParticipants = res.data; + let newattendees: EventPerson[] = res['data']; + if(newattendees!= null){ + newattendees.forEach(newattendee => { + let att = { + 'UserEmail': newattendee.EmailAddress, + 'UserType': 'I', + }; + if(this.participants == null){ + this.participants = new Array(); + } + this.participants.push(att); + }); + } + this.postData.UsersSelected = this.participants; + console.log(this.postData); + }); + } else { + this.showAttendees=true + } + } + + async addParticipantsCc() { + + this.adding = "CC"; + this.contacts = this.taskParticipantsCc; + + if(window.innerWidth <=800){ + this.showAttendees=false; + + const modal = await this.modalController.create({ + component: AddParticipantsCcModalPage, + componentProps: { + eventPersons: this.participants + }, + cssClass: 'add-participants-cc-modal', + backdropDismiss: false + }); + await modal.present(); + modal.onDidDismiss().then((res) => { + this.taskParticipantsCc = res.data; + let newattendees: EventPerson[] = res['data']; + if(newattendees!= null){ + newattendees.forEach(newattendee => { + let att = { + 'UserEmail': newattendee.EmailAddress, + 'UserType': 'CC', + }; + if(this.participants == null){ + this.participants = new Array(); + } + this.participants.push(att); + }); + } + this.postData.UsersSelected = this.participants; + console.log(this.postData); + }); + } else { + this.showAttendees=true + } + + } + + async distartExpedientModal() { + const modal = await this.modalController.create({ + component: DiscartExpedientModalPage, + componentProps: { + serialNumber: this.task.serialNumber, + folderId: this.task.workflowInstanceDataFields.FolderID, + action: 'complete', + }, + cssClass: 'discart-expedient-modal', + backdropDismiss: false + }); + + await modal.present(); + modal.onDidDismiss().then(res=>{ + if(res['data']=='close'){ + console.log('Expedient Discard closed'); + this.modalController.dismiss(res['data']) + } + + }); + } + + async setContact(data:EventPerson[]) { + + if(this.adding == "intervenient"){ + this.taskParticipants = data; + } else if (this.adding == "CC") { + + this.taskParticipantsCc = data; + } + + } + + async setIntervenient(data) { + this.taskParticipants = data; + } + + async setIntervenientCC(data) { + this.taskParticipantsCc = data; + } + + async closeComponent() { + this.showAttendees = false; + } + + async viewExpedientDetail() { + console.log(this.profile); + + let classs; + if( window.innerWidth <= 800){ + classs = 'modal' + } else { + classs = 'modal modal-desktop showAsideOptions' + } + + const modal = await this.modalController.create({ + component: ExpedienteDetailPage, + componentProps:{ + serialNumber: this.task.serialNumber, + profile: this.profile, + }, + cssClass: classs, + backdropDismiss: false + }); + await modal.present(); + modal.onDidDismiss().then((res)=>{ + /* console.log('!refresh list'); */ + }); + } + + + + +} \ No newline at end of file diff --git a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts index f6f77c359..b6e63ee5c 100644 --- a/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts +++ b/src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts @@ -14,6 +14,7 @@ import { momentG } from 'src/plugin/momentG' import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page'; import { ExpedientTaskModalPage } from '../../expediente/expedient-task-modal/expedient-task-modal.page'; import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page'; +import { CreateProcessPage } from 'src/app/modals/create-process/create-process.page'; @Component({ selector: 'app-despacho', @@ -81,12 +82,14 @@ export class DespachoPage implements OnInit { "Remetente": res.workflowInstanceDataFields.Sender, "Note": res.workflowInstanceDataFields.Note, "FolderId": res.workflowInstanceDataFields.FolderID, - "FsId": res.workflowInstanceDataFields.FsId, - "DocId": res.workflowInstanceDataFields.DocId, + "FsId": '361', + "DocId": res.workflowInstanceDataFields.DispatchDocId, "WorkflowName": res.workflowDisplayName, "DeadlineType": res.workflowInstanceDataFields.DeadlineType, } this.fulltask = res; + console.log(this.task); + console.log('GetTask', res); let thedate = new Date(this.task.CreateDate); @@ -139,7 +142,6 @@ export class DespachoPage implements OnInit { const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); const browser = this.iab.create(url,"_blank"); browser.show(); - }); } @@ -178,7 +180,7 @@ export class DespachoPage implements OnInit { classs = 'modal modal-desktop showAsideOptions' } const modal = await this.modalController.create({ - component: ExpedientTaskModalPage, + component: CreateProcessPage, componentProps: { taskAction: taskAction, task: task, @@ -232,7 +234,7 @@ export class DespachoPage implements OnInit { const modal = await this.modalController.create({ component: BookMeetingModalPage, componentProps: { - task: task, + task: this.task, }, cssClass: classs, backdropDismiss: false diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts index a2ebdce27..2b401b2c5 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.ts @@ -63,6 +63,8 @@ export class BookMeetingModalPage implements OnInit { ngOnInit() { this.adding = "intervenient"; + console.log(this.task); + this.getAttachments(); } @@ -110,12 +112,12 @@ export class BookMeetingModalPage implements OnInit { } console.log(this.postData); - this.processes.FindTaskDocId(this.task.SerialNumber).subscribe(res =>{ - if(res){ - this.calendarService.postExpedientEvent(res, this.postData, "md",this.task.SerialNumber, this.task.FsId); - } - }); - this.distartExpedientModal(); + this.calendarService.postExpedientEvent(this.task.DocId, this.postData, "md",this.task.SerialNumber, this.task.FsId); + + if(this.task.FsId == '8'){ + this.distartExpedientModal(); + } + this.close(); } @@ -138,16 +140,14 @@ export class BookMeetingModalPage implements OnInit { modal.onDidDismiss().then((res) => { this.taskParticipants = res.data; let newattendees: EventPerson[] = res['data']; - if (newattendees != null) - { + if(newattendees != null){ newattendees.forEach(newattendee => { let att = { "EmailAddress": newattendee.EmailAddress, "Name": newattendee.Name, "IsRequired": true }; - if (this.eventAttendees == null) - { + if(this.eventAttendees == null){ this.eventAttendees = new Array(); } this.eventAttendees.push(att); @@ -156,10 +156,8 @@ export class BookMeetingModalPage implements OnInit { this.postData.Attendees = this.eventAttendees; }); } else { - this.showAttendees = true; } - } async addParticipantsCc() { diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts index 60b25ebeb..a3b7d91e8 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts @@ -74,9 +74,9 @@ export class ExpedientTaskModalPage implements OnInit { Nad: 30, Subject: '', Message: '', - SourceSecFsId: this.task.workflowInstanceDataFields.FsId, - SouceType: 'DOC', - SourceId: this.task.workflowInstanceDataFields.DocId, + SourceSecFsId: this.task.workflowInstanceDataFields.FsId, //361 + SouceType: 'DOC', //FOLDER + SourceId: this.task.workflowInstanceDataFields.DocId, //FolderId DeadlineType: '', }; diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html index 2227dc03f..6f340b179 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.html @@ -36,7 +36,7 @@ Pedido de Deferimento - + Marcar reunião 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 df1bcac9b..03dfdea68 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 @@ -92,7 +92,7 @@ export class ExpedienteDetailPage implements OnInit { "DocId": res.workflowInstanceDataFields.DocId, } - console.log('task', this.fulltask); + console.log('task', this.task); this.fulltask = res; console.log('GetTask', res); @@ -210,7 +210,7 @@ export class ExpedienteDetailPage implements OnInit { const modal = await this.modalController.create({ component: BookMeetingModalPage, componentProps: { - task: task, + task: this.task, }, cssClass: classs, backdropDismiss: false diff --git a/src/app/pages/gabinete-digital/gabinete-digital-routing.module.ts b/src/app/pages/gabinete-digital/gabinete-digital-routing.module.ts index 426cea21c..3f616043e 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital-routing.module.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital-routing.module.ts @@ -23,6 +23,10 @@ const routes: Routes = [ path: 'despachos', loadChildren: () => import('./despachos/despachos.module').then( m => m.DespachosPageModule) }, + { + path: 'pedidos', + loadChildren: () => import('./pedidos/pedidos.module').then( m => m.PedidosPageModule) + }, ]; diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido-routing.module.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido-routing.module.ts new file mode 100644 index 000000000..af5e01524 --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { PedidoPage } from './pedido.page'; + +const routes: Routes = [ + { + path: '', + component: PedidoPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class PedidoPageRoutingModule {} diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.module.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.module.ts new file mode 100644 index 000000000..46f08f137 --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { PedidoPageRoutingModule } from './pedido-routing.module'; + +import { PedidoPage } from './pedido.page'; +import { SharedModule } from 'src/app/shared/shared.module'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + SharedModule, + PedidoPageRoutingModule + ], + declarations: [PedidoPage] +}) +export class PedidoPageModule {} diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html new file mode 100644 index 000000000..9c36e3dc1 --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html @@ -0,0 +1,166 @@ + + + + Menu + + + + + + + Efectuar Despacho + + + + Pedido de Parecer + + + + Pedido de Deferimento + + + + Marcar reunião + + + + Descartar + + + + + +
+ +
+ + +
+
+
+
+ +
+ {{ task.Folio}} +
+
+ + + +
+
+
+
+
+ +

{{customDate}}{{ task.WorkflowName }}

+

{{ task.DeadlineType }}

+
+
+
+
+
+
Intervenientes
+ + +
+

{{interveniente.Name}}

+
+
+
+
+
Com conhecimento
+ + +
+

{{c.Name}}

+
+
+
+
+
+
Detalhes
+ +

+
+
+
+
+ +
Documentos Anexados
+ + +

{{ attachment.Assunto }}

+

{{ attachment.DocNumber }}

+

{{attachment.Sender}}{{ attachment.DocDate | date: 'dd/MM/yy' }}

+
+
+
+
+
+ +
+
+ + +
+ + + + +
+
+ + + +
+
+ +
+ + + + + + + + +

+ +

+

+ +

+
+
+ + +

+ +

+

+
+
+ + +

+ +

+

+ +

+
+
+ + + + +
+
+
+
+ diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss new file mode 100644 index 000000000..860c052db --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.scss @@ -0,0 +1,236 @@ +@import '~src/function.scss'; +.content{ + padding: 30px 20px 0 20px !important; + margin: 0; + float: left; +} +.color-red{ + font-weight: 500; + color:#d30a0a !important; +} +.btn-size{ + font-size: 18px !important; +} +.main-header{ + font-family: Roboto; + border-top-left-radius: 25px; + border-top-right-radius: 25px; + background-color: #fff; + overflow:auto; + color:#000; + transform: translate3d(0, 1px, 0); + .header-top{ + width: 360px; + margin: 0px auto; + overflow: auto; + padding: 0 !important; + background: #fff; + .middle{ + padding: 0!important; + float: left; + width: 280px; + margin: 2.5px 0 0 5px; + display: flex; + align-items: center; + + } + .right{ + padding: 0!important; + float: right; + font-size: 25px; + color: #0782c9; + margin: 5px 0 0 0; + } + } + .header-bottom{ + width: 310px; + overflow: auto; + margin: 0 auto; + + .header-bottom-icon{ + width: 30px; + font-size: 25px; + float: left; + padding: 2px; + } + .header-bottom-contacts{ + width: 275px; + font-size: 15px; + color: #797979; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + float: left; + padding: 5px; + margin: 1px; + } + } + + .title{ + font-size: 25px; + overflow: auto; + float: left; + padding-top: 4px; + padding-left: 5px; + } + .div-icon{ + width: 40px; + float: right; + font-size: 35px; + overflow: auto; + padding: 1px; + } +} +ion-item-group{ + margin: 15px; +} +ion-button{ + display: block; + width: 80%; + margin: 20px auto; +} + + +.upper-content{ + font-family: Roboto; + margin-left: 41px; + overflow: auto; + font-size: 18px; + + .label{ + border-radius: 20px; + background: #ffb703; + float: right; + padding: 5px 13.5px 5px 13.5px; + color: #fff; + } + + .button-calendar-type ion-button{ + height: 25px; + } + .content-details{ + font-size: 17px; + .date{ + color: #797979; + } + } +} +.middle-conten{ + .middle-content p{ + font-size: 16px; + } +} +.bottom-content{ + //width: 360px; + margin: 0 auto; + + .bottom-content h3{ + font-size: 16px; + margin: 0 0 0 10px; + } + .attach-document{ + font-size: 15px; + color: #0d89d1; + margin: 5px 5px 5px 10px; + padding: 5px; + float: left; + } + .attach-icon{ + width: 37px; + font-size: 35px; + float: left; + } + .attach-title-item{ + font-size: 18px; + width: 100%; + color:#0d89d1; + padding-bottom: 5px; + } + /* SPAN */ + .span-left{ + float: left; + font-size: 15x; + } + .span-right{ + text-align: right; + float: right; + font-size: 13px; + } +} +.aside-right{ + padding: 30px 20px 0 20px !important; + + .arrow-right{ + display: flex; + justify-content: flex-end; + margin-bottom: 20px; + + .arrow-right-icon{ + width: 37px; + float: right; + font-size: 35px; + overflow: hidden; + } + } + .buttons{ + display: flex; + flex-wrap: wrap; + justify-content: space-between; + + .btn-ok, .btn-cancel, .btn-delete{ + height: auto !important; + font-size: 16px !important; + font-weight: 600 !important; + width: 100% !important; + margin-bottom: 10px !important; + padding: 15px !important; + } + } + .solid { + display: block; + width: 90%; + border-top: 1px solid #ebebeb; + margin: 0 auto !important; + margin-bottom: 10px !important; + } +} + +@media only screen and (max-width: 800px) { + .content{ + width: 100% !important; + } + .aside-right{ + display: none; + } +} +@media only screen and (min-width: 801px) { + .div-icon{ + display: none; + } + .content{ + width: 65%; + border-right: 1px solid #d8d8d8; + } + + .aside-right{ + width: 35%; + } +} + +@media only screen and (min-width: 1024px){ + .content{ + width: 70%; + } + .aside-right{ + width: 30%; + } +} + +@media only screen and (min-width: 1140px){ + .content{ + width: 75%; + } + .aside-right{ + width: 25%; + } +} diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.spec.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.spec.ts new file mode 100644 index 000000000..6d4e19e39 --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { PedidoPage } from './pedido.page'; + +describe('PedidoPage', () => { + let component: PedidoPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PedidoPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(PedidoPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts new file mode 100644 index 000000000..a2e89a45f --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -0,0 +1,307 @@ +import { Component, OnInit } from '@angular/core'; +import { ProcessesService } from 'src/app/services/processes.service'; +import { AttachmentsService } from 'src/app/services/attachments.service'; +import { EventsService } from 'src/app/services/events.service'; +import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; +import { DailyWorkTask } from '../../../../models/dailyworktask.model'; +import { ActivatedRoute, Router } from '@angular/router'; +import { formatDate } from '@angular/common'; +import { Event } from '../../../../models/event.model'; +import { MenuController, ModalController, NavParams } from '@ionic/angular'; +import { AlertService } from 'src/app/services/alert.service'; +import { ViewEventPage } from 'src/app/pages/agenda/view-event/view-event.page'; +import { momentG } from 'src/plugin/momentG' +import { DiscartExpedientModalPage } from '../../discart-expedient-modal/discart-expedient-modal.page'; +import { ExpedientTaskModalPage } from '../../expediente/expedient-task-modal/expedient-task-modal.page'; +import { BookMeetingModalPage } from '../../expediente/book-meeting-modal/book-meeting-modal.page'; + +@Component({ + selector: 'app-pedido', + templateUrl: './pedido.page.html', + styleUrls: ['./pedido.page.scss'], +}) +export class PedidoPage implements OnInit { + months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; + days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"]; + + customDate:any; + + task: any; + attachments:any; + fulltask: any; + eventsList: Event[]; + serialnumber: string; + profile: string; + intervenientes: any; + cc: any; + + constructor(private activateRoute: ActivatedRoute, + private processes: ProcessesService, + private iab: InAppBrowser, + private attachmentsService: AttachmentsService, + private events: EventsService, + private menu: MenuController, + private router: Router, + private modalController: ModalController, + private navParams: NavParams, + private alertService: AlertService) { + this.serialnumber = this.navParams.get('serialNumber'); + this.profile = this.navParams.get('profile'); + } + + ngOnInit() { + this.profile = "mdgpr"; + console.log(this.serialnumber); + + this.activateRoute.paramMap.subscribe(paramMap => { + if (!paramMap.has('SerialNumber')) { + return; + } + /* this.serialnumber = paramMap.get('SerialNumber'); */ + this.LoadTaskDetail(this.serialnumber); + this.LoadRelatedEvents(this.serialnumber); + }); + this.LoadTaskDetail(this.serialnumber); + this.LoadRelatedEvents(this.serialnumber); + } + + close(){ + this.modalController.dismiss(); + } + + + async LoadTaskDetail(serial: string) { + this.processes.GetTask(serial).subscribe(res => { + + if(res.workflowDisplayName == 'Pedido de Parecer'){ + this.task = { + "SerialNumber": res.serialNumber, + "Folio": res.workflowInstanceDataFields.Subject, + "Senders": res.originator.email, + "CreateDate": momentG(new Date(res.taskStartDate),'yyyy-MM-dd HH:mm:ss'), + "DocumentURL": res.workflowInstanceDataFields.ViewerRequest, + "Remetente": res.workflowInstanceDataFields.Sender, + "Note": res.workflowInstanceDataFields.Note, + "FolderId": res.workflowInstanceDataFields.FolderID, + "FsId": '361', + "DocId": res.workflowInstanceDataFields.ParecerDocId, + "WorkflowName": res.workflowDisplayName, + "DeadlineType": res.workflowInstanceDataFields.DeadlineType, + } + } + else if(res.workflowDisplayName == 'Pedido de Deferimento'){ + this.task = { + "SerialNumber": res.serialNumber, + "Folio": res.workflowInstanceDataFields.Subject, + "Senders": res.originator.email, + "CreateDate": momentG(new Date(res.taskStartDate),'yyyy-MM-dd HH:mm:ss'), + "DocumentURL": res.workflowInstanceDataFields.ViewerRequest, + "Remetente": res.workflowInstanceDataFields.Sender, + "Note": res.workflowInstanceDataFields.Note, + "FolderId": res.workflowInstanceDataFields.FolderID, + "FsId": '361', + "DocId": res.workflowInstanceDataFields.DocIdDiferimento, + "WorkflowName": res.workflowDisplayName, + "DeadlineType": res.workflowInstanceDataFields.DeadlineType, + } + } + + this.fulltask = res; + console.log(this.task); + + console.log('GetTask', res); + + let thedate = new Date(this.task.CreateDate); + this.customDate = this.days[thedate.getDay()]+ ", " + thedate.getDate() +" de " + ( this.months[thedate.getMonth()]); + + + this.processes.GetTaskParticipants(this.task.FolderId).subscribe(users=>{ + this.intervenientes = users.filter(user=>{ + return user.Type == 'I'; + }); + this.cc = users.filter(user=>{ + return user.Type == 'CC'; + }); + console.log(users); + + }); + this.getDocumentDetails(this.task.FolderId, '361'); + + }); + } + + getDocumentDetails(forlderId:string, applicationId:string){ + this.processes.GetDocumentDetails(forlderId,applicationId).subscribe(res=>{ + this.attachments = res.Documents; + console.log(res['Documents']); + console.log(this.attachments); + }) + } + + async LoadRelatedEvents(serial: string) { + if (this.eventsList == null) { + this.attachmentsService.getAttachmentsBySerial(serial).subscribe(res => { + console.log(res); + res.forEach(att => { + if (this.eventsList == null) { + this.eventsList = new Array(); + } + this.events.getEvent(att.ParentId).subscribe(event => { + this.eventsList.push(event); + console.log(this.eventsList); + }); + }); + }); + } + } + + viewDocument(docId:string){ + this.processes.GetDocumentUrl(docId, '361').subscribe(res=>{ + console.log(res); + const url: string = res.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); + const browser = this.iab.create(url,"_blank"); + browser.show(); + }); + } + + openMenu() { + this.menu.open(); + this.modalController.dismiss(); + } + arquivar(){ + let body = { + "serialNumber": this.serialnumber, + "action": "Arquivo", + "dataFields": { + "ReviewerComments": '', + } + } + this.processes.PostTaskAction(body); + } + + delegar(){ + + } + + sendExpedienteToPending(){ + this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{ + console.log(res); + this.close(); + }); + } + + async openExpedientActionsModal(taskAction: any, task: any) { + //this.modalController.dismiss(); + let classs; + if( window.innerWidth <= 800){ + classs = 'modal modal-desktop' + } else { + classs = 'modal modal-desktop showAsideOptions' + } + 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(); + + } + + }); + } + + discartExpedient() { + /* let body = { "serialNumber": this.serialnumber, "action": "Passivo" } + console.log(body); + this.processes.PostTaskAction(body); + this.router.navigate(['/home/gabinete-digital/expediente']); */ + } + + async distartExpedientModal2(task: any){ + const modal = await this.modalController.create({ + component: DiscartExpedientModalPage, + componentProps: { + serialNumber: task.serialNumber, + folderId: task.workflowInstanceDataFields.FolderID, + action: 'discart', + }, + cssClass: 'discart-expedient-modal', + backdropDismiss: false + }); + + await modal.present(); + modal.onDidDismiss(); + } + + async openBookMeetingModal(task: any) { + 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: this.task, + }, + cssClass: classs, + backdropDismiss: false + }); + await modal.present(); + modal.onDidDismiss(); + } + + async viewEventDetail(eventId: any) { + console.log(this.profile); + + const modal = await this.modalController.create({ + component: ViewEventPage, + componentProps: { + eventId: eventId, + profile: this.profile, + }, + cssClass: 'modal modal-desktop', + backdropDismiss: false + }); + await modal.present(); + modal.onDidDismiss().then((res) => { + if (res) { + } + }); + } + async distartExpedientModal(){ + console.log(this.fulltask); + const modal = await this.modalController.create({ + component: DiscartExpedientModalPage, + componentProps: { + serialNumber: this.fulltask.serialNumber, + folderId: this.fulltask.workflowInstanceDataFields.FolderID, + action: 'complete', + }, + cssClass: 'discart-expedient-modal', + backdropDismiss: false + }); + + await modal.present(); + modal.onDidDismiss().then(res=>{ + if(res['data']=='close'){ + this.close(); + /* console.log('2Expedient Discard closed2'); + this.close(); + this.openMenu(); */ + } + + }); + } +} diff --git a/src/app/pages/gabinete-digital/pedidos/pedidos-routing.module.ts b/src/app/pages/gabinete-digital/pedidos/pedidos-routing.module.ts new file mode 100644 index 000000000..b39935b91 --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedidos-routing.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { PedidosPage } from './pedidos.page'; + +const routes: Routes = [ + { + path: '', + component: PedidosPage + }, + { + path: 'pedido', + loadChildren: () => import('./pedido/pedido.module').then( m => m.PedidoPageModule) + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class PedidosPageRoutingModule {} diff --git a/src/app/pages/gabinete-digital/pedidos/pedidos.module.ts b/src/app/pages/gabinete-digital/pedidos/pedidos.module.ts new file mode 100644 index 000000000..bd2b3de89 --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedidos.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { PedidosPageRoutingModule } from './pedidos-routing.module'; + +import { PedidosPage } from './pedidos.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + PedidosPageRoutingModule + ], + declarations: [PedidosPage] +}) +export class PedidosPageModule {} diff --git a/src/app/pages/gabinete-digital/pedidos/pedidos.page.html b/src/app/pages/gabinete-digital/pedidos/pedidos.page.html new file mode 100644 index 000000000..8455c6462 --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedidos.page.html @@ -0,0 +1,9 @@ + + + pedidos + + + + + + diff --git a/src/app/pages/gabinete-digital/pedidos/pedidos.page.scss b/src/app/pages/gabinete-digital/pedidos/pedidos.page.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/pages/gabinete-digital/pedidos/pedidos.page.spec.ts b/src/app/pages/gabinete-digital/pedidos/pedidos.page.spec.ts new file mode 100644 index 000000000..3b94a96d9 --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedidos.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { PedidosPage } from './pedidos.page'; + +describe('PedidosPage', () => { + let component: PedidosPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ PedidosPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(PedidosPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts b/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts new file mode 100644 index 000000000..bfb036bfd --- /dev/null +++ b/src/app/pages/gabinete-digital/pedidos/pedidos.page.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-pedidos', + templateUrl: './pedidos.page.html', + styleUrls: ['./pedidos.page.scss'], +}) +export class PedidosPage implements OnInit { + + constructor() { } + + ngOnInit() { + } + +} diff --git a/src/app/shared/gabinete-digital/despachos/despachos.page.ts b/src/app/shared/gabinete-digital/despachos/despachos.page.ts index 3da586e0b..23120c67c 100644 --- a/src/app/shared/gabinete-digital/despachos/despachos.page.ts +++ b/src/app/shared/gabinete-digital/despachos/despachos.page.ts @@ -79,7 +79,7 @@ export class DespachosPage implements OnInit { console.log(element); - let task: DailyWorkTask = { + let task = { "SerialNumber": element.serialNumber, "Folio": element.workflowInstanceDataFields.Subject, "Senders": element.workflowInstanceDataFields.Sender, @@ -87,11 +87,12 @@ export class DespachosPage implements OnInit { "DocumentURL": element.workflowInstanceDataFields.ViewerRequest, "Remetente": element.workflowInstanceDataFields.Remetente, "DocumentsQty": this.totalDocs, + "DocId": element.workflowInstanceDataFields.DocId, } this.despachoList.push(task); }, (error)=>{ - let task: DailyWorkTask = { + let task = { "SerialNumber": element.serialNumber, "Folio": element.workflowInstanceDataFields.Subject, "Senders": element.workflowInstanceDataFields.Sender, @@ -99,6 +100,7 @@ export class DespachosPage implements OnInit { "DocumentURL": element.workflowInstanceDataFields.ViewerRequest, "Remetente": element.workflowInstanceDataFields.Remetente, "DocumentsQty": 0, + "DocId": element.workflowInstanceDataFields.DocId, } this.despachoList.push(task); diff --git a/src/app/shared/gabinete-digital/pedidos/pedidos.page.html b/src/app/shared/gabinete-digital/pedidos/pedidos.page.html index 14a383f20..0efe5ef58 100644 --- a/src/app/shared/gabinete-digital/pedidos/pedidos.page.html +++ b/src/app/shared/gabinete-digital/pedidos/pedidos.page.html @@ -34,7 +34,7 @@ @@ -64,6 +64,7 @@ diff --git a/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts b/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts index c897cbfb0..22e96c06e 100644 --- a/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts +++ b/src/app/shared/gabinete-digital/pedidos/pedidos.page.ts @@ -9,6 +9,7 @@ import { LoadingService } from 'src/app/services/loading.service'; import { ModalController, NavParams } from '@ionic/angular'; import { ExpedienteDetailPage } from 'src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page'; import { AlertService } from 'src/app/services/alert.service'; +import { PedidoPage } from 'src/app/pages/gabinete-digital/pedidos/pedido/pedido.page'; @Component({ selector: 'app-pedidos', @@ -65,7 +66,7 @@ export class PedidosPage implements OnInit { this.parecerList = new Array(); let res = result.reverse(); res.forEach(element => { - let task: DailyWorkTask = { + let task = { "SerialNumber": element.serialNumber, "Folio": element.workflowInstanceDataFields.Subject, "Senders": element.originator.email, @@ -73,6 +74,7 @@ export class PedidosPage implements OnInit { "DocumentURL": element.workflowInstanceDataFields.ViewerRequest, "Remetente": element.workflowInstanceDataFields.Remetente, "DocumentsQty": 0, + "DocId": element.workflowInstanceDataFields.DocIdDiferimento, } this.parecerList.push(task); }); @@ -88,7 +90,7 @@ export class PedidosPage implements OnInit { this.deferimentoList = new Array(); let res = result.reverse(); res.forEach(element => { - let task: DailyWorkTask = { + let task = { "SerialNumber": element.serialNumber, "Folio": element.workflowInstanceDataFields.Subject, "Senders": element.originator.email, @@ -96,6 +98,7 @@ export class PedidosPage implements OnInit { "DocumentURL": element.workflowInstanceDataFields.ViewerRequest, "Remetente": element.workflowInstanceDataFields.Remetente, "DocumentsQty": 0, + "DocId": element.workflowInstanceDataFields.DocIdDiferimento, } this.deferimentoList.push(task); }); @@ -113,7 +116,7 @@ export class PedidosPage implements OnInit { }, 2000); } - async viewExpedientDetail(serialNumber:any) { + async viewPedidoDetail(serialNumber:any) { console.log(this.profile); let classs; @@ -124,7 +127,7 @@ export class PedidosPage implements OnInit { } const modal = await this.modalController.create({ - component: ExpedienteDetailPage, + component: PedidoPage, componentProps:{ enterAnimation: "", serialNumber: serialNumber,