From ab1954255ec7661ae0ee8e5be825ac0c155609bb Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Tue, 4 May 2021 13:55:28 +0100 Subject: [PATCH 1/3] Add new modal to edit task to approve --- .../approve-event.component.html | 7 + .../approve-event/approve-event.component.ts | 22 ++ .../edit-event-routing.module.ts | 18 ++ .../edit-event.module.ts | 26 ++ .../edit-event.page.html | 236 ++++++++++++++++ .../edit-event.page.scss | 201 ++++++++++++++ .../edit-event.page.spec.ts | 24 ++ .../edit-event-to-approve/edit-event.page.ts | 260 ++++++++++++++++++ 8 files changed, 794 insertions(+) create mode 100644 src/app/shared/gabinete-digital/edit-event-to-approve/edit-event-routing.module.ts create mode 100644 src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.module.ts create mode 100644 src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html create mode 100644 src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.scss create mode 100644 src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.spec.ts create mode 100644 src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts diff --git a/src/app/shared/agenda/approve-event/approve-event.component.html b/src/app/shared/agenda/approve-event/approve-event.component.html index 570f2c578..d88481083 100644 --- a/src/app/shared/agenda/approve-event/approve-event.component.html +++ b/src/app/shared/agenda/approve-event/approve-event.component.html @@ -31,6 +31,10 @@ Rejeitar + + + Editar + @@ -110,6 +114,7 @@
+ @@ -124,6 +129,8 @@ + + diff --git a/src/app/shared/agenda/approve-event/approve-event.component.ts b/src/app/shared/agenda/approve-event/approve-event.component.ts index 4b172518a..2c9905333 100644 --- a/src/app/shared/agenda/approve-event/approve-event.component.ts +++ b/src/app/shared/agenda/approve-event/approve-event.component.ts @@ -8,6 +8,7 @@ import { ProcessesService } from 'src/app/services/processes.service'; import { EmendMessageModalPage } from 'src/app/pages/agenda/emend-message-modal/emend-message-modal.page'; import { EventActionsPopoverPage } from 'src/app/pages/agenda/event-actions-popover/event-actions-popover.page'; import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'; +import { EditEventToApproveComponent } from '../../gabinete-digital/edit-event-to-approve/edit-event.page'; @Component({ @@ -176,4 +177,25 @@ export class ApproveEventComponent implements OnInit { this.router.navigate(['/home/gabinete-digital'], navigationExtras); } + + async editar(serialNumber: string) { + + const modal = await this.modalController.create({ + component: EditEventToApproveComponent, + componentProps:{ + serialNumber: serialNumber, + InstanceId:this.InstanceId + }, + cssClass: 'modal modal-desktop', + // backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then(res => { + + }); + + } + } diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event-routing.module.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event-routing.module.ts new file mode 100644 index 000000000..9ac4b7cd2 --- /dev/null +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event-routing.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { Routes, RouterModule } from '@angular/router'; + +import { EditEventToApproveComponent } from './edit-event.page'; + +const routes: Routes = [ + { + path: '', + component: EditEventToApproveComponent + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes), BrowserModule], + exports: [RouterModule], +}) +export class EditEventToApproveComponentRoutingModule {} diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.module.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.module.ts new file mode 100644 index 000000000..24d42c7d6 --- /dev/null +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.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 { EditEventToApproveComponentRoutingModule } from './edit-event-routing.module'; + +import { EditEventToApproveComponent } from './edit-event.page'; +import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + EditEventToApproveComponentRoutingModule + ], + declarations: [ + EditEventToApproveComponent, + AttendeeModalPage + ] +}) +export class EditEventToApproveComponentModule {} + + + diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html new file mode 100644 index 000000000..a03c29526 --- /dev/null +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html @@ -0,0 +1,236 @@ + + +
+ +
+ +
+ +
+
+ Editar Evento Por Aprovar +
+
+
+
+ + +
+
+ +
+ {{eventProcess.workflowInstanceDataFields.Subject}} +
+
+
+ +
+
+ +
+
+ + + +
+ +
+
+
+ +
+
+ + Oficial + Pessoal + +
+
+
+ + + +
+
+
+ +
+
+ + + +
+
+
+ +
+
+
+ +
+
+ + + +
+
+
+ +
+
+
+ +
+
+ + Não se repete + Repete + +
+
+
+ + + +
+
+
+ +
+
+
+ + + Adicionar intervenientes + {{participant.Name}} + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+ + + Adicionar intervenientes + {{participant.Name}} + + +
+
+ +
+
+
+
+ +
+ +
+ +
+
+ Adicionar documentos +
+
+
+ +
+ + + +

+ {{document.SourceName}} + Correspondencia + AccoesPresidenciais + ArquivoDespachoElect + + + + +

+

{{document.Stakeholders}} {{document.CreateDate | date: 'dd-MM-yy'}}

+
+
+
+
+ +
+ + + +
+ +
+ + + +
+
+ + +
+ + +
+
\ No newline at end of file diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.scss b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.scss new file mode 100644 index 000000000..de650114b --- /dev/null +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.scss @@ -0,0 +1,201 @@ + + +.title-content::after, .header-md::after{ + display: none; +} + +.content{ + margin: 0; + float: left; + border-left: 1px solid #d8d8d8 !important; +} + .main-header{ + font-family: Roboto; + background-color: #fff; + + overflow:hidden; + transform: translate3d(0, 1px, 0); + + .title-content{ + margin: 0px auto; + padding: 0 !important; + background: #fff; + .middle{ + padding: 0!important; + float: left; + } + } + + .title{ + font-size: 25px; + } + + } + .ion-item-container{ + margin: 15px auto; + border: 1px solid #ebebeb; + border-radius: 5px; + padding-left: 10px; + } + .ion-item-container-no-border{ + width: 100%; + margin: 0px auto; + padding: 0 !important; + } + .container-div{ + margin-bottom: 15px; + float: left; + } + .ion-item-class-2{ + margin: 0px 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{ + width: calc(100% - 45px); + border: 1px solid #ebebeb; + border-radius: 5px; + } + .list-people{ + 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; + margin: 5px 5px 5px 10px; + padding: 5px; + float: left; + } + .attach-icon{ + width: 37px; + font-size: 35px; + float: left; + } + .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; + } + + .text-input{ + width: 100%; + border: 1px solid #ebebeb; + margin: 0px 15px 15px 0px; + padding: 0 !important; + border-radius: 5px; + } + + /* Error Messages */ + .error{ + color:red; + font-size: 12px; + font-weight: bold; + padding-bottom: 20px; + } + .span-color{ + color:red; + } + + + .buttons{ + display: flex; + justify-content: space-between; + padding: 20px; + overflow: auto; + } + + + + .app-name{ + background: #42b9f2; + border-radius: 18px; + text-align: center; + display: flex; + align-items: center; + padding: 0px 5px; + color: white; + font-size: 9pt; + font-weight: 500; + height: 19px; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + -ms-border-radius: 18px; + -o-border-radius: 18px; + } + + +.close-button { + display: none; +} + + +.list:hover { + + .app-name { + display: none; + } + + .close-button { + display: block !important; + } +} \ No newline at end of file diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.spec.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.spec.ts new file mode 100644 index 000000000..509415955 --- /dev/null +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { EditEventPage } from './edit-event.page'; + +describe('EditEventPage', () => { + let component: EditEventPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ EditEventPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(EditEventPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts new file mode 100644 index 000000000..784a2cf25 --- /dev/null +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -0,0 +1,260 @@ +import { Component, OnInit } from '@angular/core'; +import { AlertController, ModalController, NavParams } from '@ionic/angular'; +import { Attachment } from 'src/app/models/attachment.model'; +import { EventPerson } from 'src/app/models/eventperson.model'; +import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page'; +import { SearchPage } from 'src/app/pages/search/search.page'; +import { AttachmentsService } from 'src/app/services/attachments.service'; +import { EventsService } from 'src/app/services/events.service'; +import { ProcessesService } from 'src/app/services/processes.service'; +import { Event } from '../../../models/event.model'; + + +@Component({ + selector: 'app-edit-event', + templateUrl: './edit-event.page.html', + styleUrls: ['./edit-event.page.scss'], +}) +export class EditEventToApproveComponent implements OnInit { + + serialNumber: string + loadedAttachments:any + + eventProcess = { + taskStartDate: "", + workflowInstanceDataFields:{ + Body: "", + IsRecurring: false, + ParticipantsList: [], + Agenda: '', + EndDate: '', + Location: '', + Subject: '' + } + } + + show =false + + postEvent: Event; + isRecurring:string; + isEventEdited: boolean; + segment:string = "true"; + profile:string; + eventAttendees: EventPerson[]; + + loadedEventAttachments: Attachment[]; + taskParticipants: any = []; + taskParticipantsCc: any = []; + adding: "intervenient" | "CC" = "intervenient"; + + Location = '' + + showAttendees = false; + + InstanceId: string + + constructor( + private modalController: ModalController, + private navParams: NavParams, + private eventsService: EventsService, + public alertController: AlertController, + private attachmentsService: AttachmentsService, + private processes:ProcessesService, + ) { + + this.serialNumber = this.navParams.get('serialNumber'); + this.postEvent = this.navParams.get('event'); + this.profile = this.navParams.get('profile'); + this.InstanceId = this.navParams.get('InstanceId') + + this.isEventEdited = false; + + console.log(this.eventProcess.workflowInstanceDataFields.Subject) + + + this.getTask() + this.getAttachments() + + } + + async getTask() { + console.log('this.eventProcess', this.eventProcess); + + const result = await this.processes.GetTask(this.serialNumber).subscribe( result =>{ + this.eventProcess = result + console.log('this.eventProcess', this.eventProcess); + + console.log(this.eventProcess.workflowInstanceDataFields.Subject) + + // description + let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '') + this.eventProcess.workflowInstanceDataFields.Body = body + this.Location = this.eventProcess.workflowInstanceDataFields.Location + + // attendees + //this.eventProcess.workflowInstanceDataFields.ParticipantsList + // subject + //this.eventProcess.workflowInstanceDataFields.Subject | this.eventProcess.workflowInstanceFolio + // location + //this.eventProcess.workflowInstanceDataFields.Location + // startDate + //this.eventProcess.taskStartDate + // endDate + //this.eventProcess.workflowInstanceDataFields.EndDate + + // this.eventProcess.workflowInstanceDataFields.Agenda + + // eventProcess.workflowInstanceDataFields.IsRecurring + + if(this.eventProcess.workflowInstanceDataFields.IsRecurring == false) { + this.isRecurring = "Não se repete"; + } + else { + this.isRecurring = "Repete"; + } + + this.eventProcess.workflowInstanceDataFields.ParticipantsList.forEach(e => { + if(e.IsRequired){ + this.taskParticipants.push(e); + } else { + this.taskParticipantsCc.push(e); + } + }) + }) + + + + + } + + ngOnInit() { + + + window.onresize = (event) => { + // if not mobile remove all component + if( window.innerWidth >= 800){ + this.modalController.dismiss(); + } + }; + + } + + close() { + this.modalController.dismiss(); + } + + save() { + + this.eventProcess.workflowInstanceDataFields.ParticipantsList = this.taskParticipants.concat(this.taskParticipantsCc) + + + } + + async openAttendees() { + + if(window.innerWidth <= 1024) { + const modal = await this.modalController.create({ + component: AttendeesPage, + componentProps: { + adding: this.adding, + taskParticipants: this.taskParticipants, + taskParticipantsCc: this.taskParticipantsCc + }, + cssClass: 'attendee modal modal-desktop', + backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then((data) => { + + if(data){ + data = data['data']; + + const newAttendees: EventPerson[] = data['taskParticipants']; + const newAttendeesCC: EventPerson[] = data['taskParticipantsCc']; + + this.setIntervenient(newAttendees); + this.setIntervenientCC(newAttendeesCC); + } + }); + } + } + + setIntervenient(data){ + this.taskParticipants = data; + this.postEvent.Attendees = data; + } + + setIntervenientCC(data){ + this.taskParticipantsCc = data; + } + + addParticipants(){ + this.adding = 'intervenient' + + this.openAttendees(); + } + + addParticipantsCC(){ + this.adding = 'CC' + this.openAttendees(); + } + + dynamicSetIntervenient({taskParticipants, taskParticipantsCc}){ + this.taskParticipants = taskParticipants; + this.taskParticipantsCc = taskParticipantsCc; + } + + + async getAttachments(){ + this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise(); + + console.log(this.loadedAttachments) + + } + + deleteAttachment(attachmentID: string) { + + this.attachmentsService.deleteEventAttachmentById(this.InstanceId).subscribe( + res=>{ + this.loadedEventAttachments = this.loadedEventAttachments.filter(e=> e.Id.toString() != attachmentID); + }) + } + + async getDoc() { + const modal = await this.modalController.create({ + component: SearchPage, + cssClass: 'modal-width-100-width-background modal', + componentProps: { + type: 'AccoesPresidenciais & ArquivoDespachoElect', + showSearchInput: true, + select: true, + } + }); + await modal.present(); + modal.onDidDismiss().then( async (res)=>{ + if(res){ + + const data = res.data; + //data.selected + const DocumentToSave = { + SourceTitle: data.selected.Assunto, + ParentId: this.postEvent.EventId, + Source: '1', + SourceId: data.selected.Id, + ApplicationId: data.selected.ApplicationType.toString(), + Id: '0', + Link: '', + SerialNumber: '', + }; + + await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{ + this.getAttachments(); + }); + + } + }); + } + +} \ No newline at end of file From 6a3fda279e7dbcf36f2844a30fba0d01bd070adf Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Tue, 4 May 2021 15:44:48 +0100 Subject: [PATCH 2/3] Edit process to approve --- src/app/home/home-routing.module.ts | 9 ++++ src/app/pages/agenda/agenda.page.html | 1 + src/app/pages/agenda/agenda.page.ts | 3 +- .../agenda/edit-event/edit-event.page.ts | 51 +++++++++--------- .../pages/agenda/new-event/new-event.page.ts | 1 + .../approve-event-modal.page.html | 33 +++++++----- .../approve-event-modal.page.scss | 53 +++++++++++++++++++ .../approve-event-modal.page.ts | 42 ++++++++++++--- .../event-list/event-list.page.html | 4 +- .../event-list/event-list.page.ts | 4 +- .../approve-event.component.html | 3 +- .../approve-event/approve-event.component.ts | 6 ++- .../event-list/event-list.component.html | 2 +- .../edit-event.page.html | 45 ++++++++-------- .../edit-event.page.scss | 10 ++-- .../edit-event-to-approve/edit-event.page.ts | 38 +++++++------ 16 files changed, 203 insertions(+), 102 deletions(-) diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index 8a8e01dc6..2bc75c478 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -136,6 +136,15 @@ const routes: Routes = [ }, ] }, + { + path: 'events-to-approve', + children: [ + { + path: '', + loadChildren: ()=> import('../shared/gabinete-digital/edit-event-to-approve/edit-event.module') + } + ] + } ] }, { diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index a8ec8846c..dda1b4b45 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -469,6 +469,7 @@ { - - if(data){ - data = data['data']; - const newAttendees: EventPerson[] = data['taskParticipants']; - const newAttendeesCC: EventPerson[] = data['taskParticipantsCc']; + const modal = await this.modalController.create({ + component: AttendeesPage, + componentProps: { + adding: this.adding, + taskParticipants: this.taskParticipants, + taskParticipantsCc: this.taskParticipantsCc + }, + cssClass: 'attendee', + backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then((data) => { + + if(data){ + data = data['data']; + + const newAttendees: EventPerson[] = data['taskParticipants']; + const newAttendeesCC: EventPerson[] = data['taskParticipantsCc']; + + this.setIntervenient(newAttendees); + this.setIntervenientCC(newAttendeesCC); + } + }); + - this.setIntervenient(newAttendees); - this.setIntervenientCC(newAttendeesCC); - } - }); - } } setIntervenient(data){ diff --git a/src/app/pages/agenda/new-event/new-event.page.ts b/src/app/pages/agenda/new-event/new-event.page.ts index b7e0061a6..9b152a129 100644 --- a/src/app/pages/agenda/new-event/new-event.page.ts +++ b/src/app/pages/agenda/new-event/new-event.page.ts @@ -153,6 +153,7 @@ export class NewEventPage implements OnInit { async openAttendees() { + const modal = await this.modalController.create({ component: AttendeesPage, componentProps: { diff --git a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.html b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.html index a7efa5476..304113ecc 100644 --- a/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.html +++ b/src/app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page.html @@ -8,8 +8,8 @@
-
- +
+
@@ -72,17 +72,26 @@
-
- -

Documentos Anexados

- - -

Receita por Natureza

-

{{loadedAttachments.Remetente}}{{loadedAttachments.CreateDate}}

-
-
+
+ + + +

+ {{document.SourceName}} + Correspondencia + AccoesPresidenciais + ArquivoDespachoElect + + + + +

+

{{document.Stakeholders}} {{document.CreateDate | date: 'dd-MM-yy'}}

+
+
-
+
+ -
+
@@ -19,7 +19,6 @@
- {{eventProcess.workflowInstanceDataFields.Subject}}
@@ -150,7 +149,7 @@
-
+
@@ -171,7 +170,7 @@
-
+
@@ -189,23 +188,23 @@
-
- - - -

- {{document.SourceName}} - Correspondencia - AccoesPresidenciais - ArquivoDespachoElect - - - - -

-

{{document.Stakeholders}} {{document.CreateDate | date: 'dd-MM-yy'}}

-
-
+
+ + + +

+ {{document.SourceName}} + Correspondencia + AccoesPresidenciais + ArquivoDespachoElect + + + + +

+

{{document.Stakeholders}} {{document.CreateDate | date: 'dd-MM-yy'}}

+
+
@@ -217,13 +216,13 @@
- + >
diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.scss b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.scss index de650114b..f52dd4e07 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.scss +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.scss @@ -4,11 +4,11 @@ display: none; } -.content{ - margin: 0; - float: left; - border-left: 1px solid #d8d8d8 !important; -} + .content { + margin: 0; + float: left; + border-right: 1px solid #d8d8d8 !important; + } .main-header{ font-family: Roboto; background-color: #fff; diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts index 784a2cf25..1ec8d744d 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -29,7 +29,8 @@ export class EditEventToApproveComponent implements OnInit { Agenda: '', EndDate: '', Location: '', - Subject: '' + Subject: '', + InstanceId: '' } } @@ -63,17 +64,12 @@ export class EditEventToApproveComponent implements OnInit { ) { this.serialNumber = this.navParams.get('serialNumber'); - this.postEvent = this.navParams.get('event'); - this.profile = this.navParams.get('profile'); - this.InstanceId = this.navParams.get('InstanceId') + // this.profile = this.navParams.get('profile'); this.isEventEdited = false; - console.log(this.eventProcess.workflowInstanceDataFields.Subject) - this.getTask() - this.getAttachments() } @@ -90,7 +86,11 @@ export class EditEventToApproveComponent implements OnInit { let body : any =this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '') this.eventProcess.workflowInstanceDataFields.Body = body this.Location = this.eventProcess.workflowInstanceDataFields.Location - + + this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId + this.getAttachments() + + // attendees //this.eventProcess.workflowInstanceDataFields.ParticipantsList // subject @@ -121,10 +121,6 @@ export class EditEventToApproveComponent implements OnInit { } }) }) - - - - } ngOnInit() { @@ -147,7 +143,6 @@ export class EditEventToApproveComponent implements OnInit { this.eventProcess.workflowInstanceDataFields.ParticipantsList = this.taskParticipants.concat(this.taskParticipantsCc) - } async openAttendees() { @@ -178,6 +173,8 @@ export class EditEventToApproveComponent implements OnInit { this.setIntervenientCC(newAttendeesCC); } }); + } else { + this.showAttendees = true } } @@ -197,6 +194,7 @@ export class EditEventToApproveComponent implements OnInit { } addParticipantsCC(){ + this.adding = 'CC' this.openAttendees(); } @@ -206,12 +204,11 @@ export class EditEventToApproveComponent implements OnInit { this.taskParticipantsCc = taskParticipantsCc; } - - async getAttachments(){ + + async getAttachments() { this.loadedAttachments = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise(); console.log(this.loadedAttachments) - } deleteAttachment(attachmentID: string) { @@ -235,18 +232,19 @@ export class EditEventToApproveComponent implements OnInit { await modal.present(); modal.onDidDismiss().then( async (res)=>{ if(res){ - + const data = res.data; + //data.selected const DocumentToSave = { SourceTitle: data.selected.Assunto, - ParentId: this.postEvent.EventId, + ParentId: this.InstanceId, Source: '1', SourceId: data.selected.Id, ApplicationId: data.selected.ApplicationType.toString(), - Id: '0', + Id: '', Link: '', - SerialNumber: '', + SerialNumber: '' }; await this.attachmentsService.setEventAttachmentById(DocumentToSave).subscribe(()=>{ From f091e0c2fdcfd6c74f06928033af659fd6bf7ce5 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Tue, 4 May 2021 16:21:24 +0100 Subject: [PATCH 3/3] Add cursor pointer --- .../agenda/approve-event/approve-event.component.html | 6 +++--- .../shared/agenda/edit-event/edit-event.component.html | 8 ++++---- src/app/shared/agenda/new-event/new-event.component.html | 8 ++++---- .../edit-event-to-approve/edit-event.page.html | 4 ++-- .../edit-event-to-approve/edit-event.page.ts | 4 ++-- src/global.scss | 4 ++++ 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/app/shared/agenda/approve-event/approve-event.component.html b/src/app/shared/agenda/approve-event/approve-event.component.html index 193560993..a8264ef84 100644 --- a/src/app/shared/agenda/approve-event/approve-event.component.html +++ b/src/app/shared/agenda/approve-event/approve-event.component.html @@ -43,10 +43,10 @@
-
+
-
+
@@ -108,7 +108,7 @@
-
+
diff --git a/src/app/shared/agenda/edit-event/edit-event.component.html b/src/app/shared/agenda/edit-event/edit-event.component.html index 4e317be59..14a8f9b5d 100644 --- a/src/app/shared/agenda/edit-event/edit-event.component.html +++ b/src/app/shared/agenda/edit-event/edit-event.component.html @@ -145,7 +145,7 @@
-
@@ -168,7 +168,7 @@
-
@@ -187,7 +187,7 @@
-
+
@@ -207,7 +207,7 @@ Correspondencia AccoesPresidenciais ArquivoDespachoElect - + diff --git a/src/app/shared/agenda/new-event/new-event.component.html b/src/app/shared/agenda/new-event/new-event.component.html index d8119273d..30169bfa0 100644 --- a/src/app/shared/agenda/new-event/new-event.component.html +++ b/src/app/shared/agenda/new-event/new-event.component.html @@ -140,7 +140,7 @@
-
+
@@ -163,7 +163,7 @@
-
+
@@ -183,7 +183,7 @@
-
+
@@ -201,7 +201,7 @@

{{document.Assunto}} {{document.appName}} - +

diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html index f2af32a5f..21c3b379b 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html @@ -189,7 +189,7 @@
- +

@@ -197,7 +197,7 @@ Correspondencia AccoesPresidenciais ArquivoDespachoElect - + diff --git a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts index 1ec8d744d..6211c102c 100644 --- a/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts +++ b/src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts @@ -213,9 +213,9 @@ export class EditEventToApproveComponent implements OnInit { deleteAttachment(attachmentID: string) { - this.attachmentsService.deleteEventAttachmentById(this.InstanceId).subscribe( + this.attachmentsService.deleteEventAttachmentById(attachmentID).subscribe( res=>{ - this.loadedEventAttachments = this.loadedEventAttachments.filter(e=> e.Id.toString() != attachmentID); + this.loadedAttachments = this.loadedAttachments.filter(e=> e.Id.toString() != attachmentID); }) } diff --git a/src/global.scss b/src/global.scss index 6e510461e..a67e3134a 100644 --- a/src/global.scss +++ b/src/global.scss @@ -666,4 +666,8 @@ ion-content { .day { color: #cecece; } +} + +ion-icon{ + cursor: pointer; } \ No newline at end of file