diff --git a/src/app/pages/events/event-detail/event-detail.page.ts b/src/app/pages/events/event-detail/event-detail.page.ts index 6fec41951..548259339 100644 --- a/src/app/pages/events/event-detail/event-detail.page.ts +++ b/src/app/pages/events/event-detail/event-detail.page.ts @@ -43,9 +43,9 @@ export class EventDetailPage implements OnInit { private attachamentsService: AttachmentsService, private route: Router, private iab: InAppBrowser) { - this.loadedEvent = new Event(); - this.loadedEvent.Body = new EventBody(); - } + this.loadedEvent = new Event(); + this.loadedEvent.Body = new EventBody(); + } ngOnInit() { this.loadEvent(); @@ -59,38 +59,28 @@ export class EventDetailPage implements OnInit { return this.ionicForm.controls; } - loadEvent() - { + loadEvent(){ let eventid: string; - this.activatedRoute.paramMap.subscribe(paramMap => { - if (!paramMap.has("eventId")) - { + if (!paramMap.has("eventId")){ return; } - else - { + else{ this.pageId = paramMap.get('eventId'); eventid = paramMap.get('eventId'); - } - - if (paramMap.has("caller")) - { + if (paramMap.has("caller")){ this.backURL = "/home/" + paramMap.get('caller'); } } ); - - this.eventsService.getEvent(eventid).subscribe(response => - { + this.eventsService.getEvent(eventid).subscribe(response => { this.loadedEvent = response; }); } - async openAttendees() - { + async openAttendees(){ const modal = await this.modalCtrl.create({ component: AttendeesPage, componentProps: { diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal-routing.module.ts b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal-routing.module.ts new file mode 100644 index 000000000..41b207888 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { AddParticipantsCcModalPage } from './add-participants-cc-modal.page'; + +const routes: Routes = [ + { + path: '', + component: AddParticipantsCcModalPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class AddParticipantsCcModalPageRoutingModule {} diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.module.ts b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.module.ts new file mode 100644 index 000000000..bc0249591 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.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 { AddParticipantsCcModalPageRoutingModule } from './add-participants-cc-modal-routing.module'; + +import { AddParticipantsCcModalPage } from './add-participants-cc-modal.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + AddParticipantsCcModalPageRoutingModule + ], + declarations: [AddParticipantsCcModalPage] +}) +export class AddParticipantsCcModalPageModule {} diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.html b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.html new file mode 100644 index 000000000..5ba673ef0 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.html @@ -0,0 +1,35 @@ + +

Com conhecimento

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

{{ attendee.Name }}

+

{{ attendee.EmailAddress }}

+
+
+
+
+
+ +
+ + + +

+ Cancelar +

+

+ Gravar +

+
+
+
+ diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.scss b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.spec.ts b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.spec.ts new file mode 100644 index 000000000..23481cfde --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { AddParticipantsCcModalPage } from './add-participants-cc-modal.page'; + +describe('AddParticipantsCcModalPage', () => { + let component: AddParticipantsCcModalPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AddParticipantsCcModalPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(AddParticipantsCcModalPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.ts b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.ts new file mode 100644 index 000000000..a2337def4 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.ts @@ -0,0 +1,68 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { EventPerson } from 'src/app/models/eventperson.model'; +import { ContactsService } from 'src/app/services/contacts.service'; + +@Component({ + selector: 'app-add-participants-cc-modal', + templateUrl: './add-participants-cc-modal.page.html', + styleUrls: ['./add-participants-cc-modal.page.scss'], +}) +export class AddParticipantsCcModalPage implements OnInit { + + contacts: EventPerson[]; + showLoader: boolean = false; + eventPersons: EventPerson[]; + + constructor(private modalController: ModalController, private contactsService: ContactsService) { } + + ngOnInit() { + this.fetchContacts(""); + } + async fetchContacts(filter: string) { + this.showLoader = true; + + this.contactsService.getContacts(filter).subscribe(result => + { + if (this.eventPersons != null) + { + this.eventPersons.forEach(attendee => { + const index: number = result.findIndex((cont) => { + return cont.EmailAddress == attendee.EmailAddress + }); + + result.splice(index, 1); + }); + } + + this.contacts = result; + /* console.log(result); */ + + this.showLoader = false; + } + ); + } + + onChange(evt: any) { + this.fetchContacts(evt.detail.value); + } + + selectContact(itm: EventPerson){ + itm.IsRequired = !itm.IsRequired; + } + + cancelTask(){ + this.modalController.dismiss(null); + } + + saveTask(){ + this.modalController.dismiss(this.contacts.filter(function(contact) { + if(contact.IsRequired){ + console.log(contact); + } + + return contact.IsRequired == true; + })); + } + +} diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal-routing.module.ts b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal-routing.module.ts new file mode 100644 index 000000000..f6e6c6ca7 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { AddParticipantsModalPage } from './add-participants-modal.page'; + +const routes: Routes = [ + { + path: '', + component: AddParticipantsModalPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class AddParticipantsModalPageRoutingModule {} diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.module.ts b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.module.ts new file mode 100644 index 000000000..7ba6edc49 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.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 { AddParticipantsModalPageRoutingModule } from './add-participants-modal-routing.module'; + +import { AddParticipantsModalPage } from './add-participants-modal.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + AddParticipantsModalPageRoutingModule + ], + declarations: [AddParticipantsModalPage] +}) +export class AddParticipantsModalPageModule {} diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.html b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.html new file mode 100644 index 000000000..e27630dd8 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.html @@ -0,0 +1,34 @@ + +

Adicionar Intervenientes

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

{{ attendee.Name }}

+

{{ attendee.EmailAddress }}

+
+
+
+
+
+ +
+ + + +

+ Cancelar +

+

+ Gravar +

+
+
+
diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.scss b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.scss new file mode 100644 index 000000000..5e0ed3224 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.scss @@ -0,0 +1,29 @@ +ion-header{ + padding: 20px 20px 0px 20px; +} +ion-content{ + --padding-top: 20px; + --padding-start: 15px; + --padding-end: 20px; +} + +.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; + } \ No newline at end of file diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.spec.ts b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.spec.ts new file mode 100644 index 000000000..33f7c7d91 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { AddParticipantsModalPage } from './add-participants-modal.page'; + +describe('AddParticipantsModalPage', () => { + let component: AddParticipantsModalPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AddParticipantsModalPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(AddParticipantsModalPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.ts b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.ts new file mode 100644 index 000000000..b2f134184 --- /dev/null +++ b/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.ts @@ -0,0 +1,68 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { EventPerson } from 'src/app/models/eventperson.model'; +import { ContactsService } from 'src/app/services/contacts.service'; + +@Component({ + selector: 'app-add-participants-modal', + templateUrl: './add-participants-modal.page.html', + styleUrls: ['./add-participants-modal.page.scss'], +}) +export class AddParticipantsModalPage implements OnInit { + + contacts: EventPerson[]; + showLoader: boolean = false; + eventPersons: EventPerson[]; + + constructor(private modalController: ModalController, private contactsService: ContactsService) { } + + ngOnInit() { + this.fetchContacts(""); + } + async fetchContacts(filter: string) { + this.showLoader = true; + + this.contactsService.getContacts(filter).subscribe(result => + { + if (this.eventPersons != null) + { + this.eventPersons.forEach(attendee => { + const index: number = result.findIndex((cont) => { + return cont.EmailAddress == attendee.EmailAddress + }); + + result.splice(index, 1); + }); + } + + this.contacts = result; + /* console.log(result); */ + + this.showLoader = false; + } + ); + } + + onChange(evt: any) { + this.fetchContacts(evt.detail.value); + } + + selectContact(itm: EventPerson){ + itm.IsRequired = !itm.IsRequired; + } + + cancelTask(){ + this.modalController.dismiss(null); + } + + saveTask(){ + this.modalController.dismiss(this.contacts.filter(function(contact) { + if(contact.IsRequired){ + console.log(contact); + } + + return contact.IsRequired == true; + })); + } + +} diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html index 2c35e2622..3b872a33a 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.html @@ -45,9 +45,11 @@
- - Nunca - Sim + + Não se repete + Semanal + Diário + Anual
@@ -86,6 +88,37 @@ + + +
+ + Documentos Anexados + + + + +

Receita por Natureza

+

OAPR - GTI13/04/2020

+
+
+ + +

Receita por Natureza

+

OAPR - GTI13/04/2020

+
+
+
+
+ diff --git a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.scss b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.scss index f8ddda4c4..82e04bb43 100644 --- a/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.scss +++ b/src/app/pages/gabinete-digital/expediente/book-meeting-modal/book-meeting-modal.page.scss @@ -1,3 +1,8 @@ +ion-content{ + --padding-top: 20px; + --padding-start: 15px; + --padding-end: 20px; +} .title{ font-family: Roboto; font-size: 25px; @@ -7,7 +12,7 @@ line-height: normal; letter-spacing: normal; color: #000000; - margin: 28px 0 8px 5px; + margin: 8px 0 8px 0px; } .container-div{ margin-bottom: 15px; @@ -20,6 +25,12 @@ border-radius: 5px; padding-left: 10px; } +.ion-item-container-no-border{ + width: 100%; + margin: 0px auto; + padding: 0 !important; + overflow: auto; +} .ion-item-class-2{ width: 360px; margin: 0px auto; @@ -31,14 +42,55 @@ padding: 10px; font-size: 25px; } +ion-select{ + padding-left: 5px; + margin-left: 0; +} .ion-input-class{ width: 315px; height: 45px; border: 1px solid #ebebeb; border-radius: 5px; - padding-left: 10px; + padding-left: 5px; + padding-right: 10px; float: left; } +.ion-input-class-no-height{ + border: 1px solid #ebebeb; + border-radius: 5px; + overflow: auto; +} +.container-footer{ + margin:0 auto; + overflow: auto; +} +.attach-icon{ + width: 37px; + font-size: 35px; + float: left; +} +.attach-document{ + font-size: 15px; + color: #0d89d1; + margin: 5px 5px 5px 10px; + padding: 5px; + float: left; +} +/* SPAN */ +.span-left{ + float: left; + font-size: 15x; +} +.span-right{ +text-align: right; +float: right; +font-size: 13px; +} +.attach-title-item{ + width: 100%; + font-size: 15px; + color:#0d89d1; +} .container-footer{ margin:0 auto; overflow: auto; diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html index d179a1ce3..0c420b928 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html @@ -42,13 +42,13 @@
- Adicionar intervenientes - segpr@exemplo.gov.ao + Adicionar intervenientes + {{participant.Name}}
- +
@@ -63,23 +63,47 @@
- Com conhecimento - segpr@exemplo.gov.ao + Com conhecimento + {{participant.Name}}
- +
-
- - - Anexar Documentos - + + +
+ + Documentos Anexados + + + + +

Receita por Natureza

+

OAPR - GTI13/04/2020

+
+
+ + +

Receita por Natureza

+

OAPR - GTI13/04/2020

+
+
+
diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.scss b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.scss index f9998b438..9d776f333 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.scss +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.scss @@ -1,3 +1,8 @@ +ion-content{ + --padding-top: 20px; + --padding-start: 15px; + --padding-end: 20px; +} .title{ font-family: Roboto; font-size: 25px; @@ -7,7 +12,7 @@ line-height: normal; letter-spacing: normal; color: #000000; - margin: 28px 0 8px 8px; + margin: 8px 0 8px 0px; } .container-div{ margin-bottom: 15px; @@ -65,10 +70,29 @@ ion-select{ font-size: 25px; padding: 10px; } +.list-people-title{ + /* font-size: 13px; */ + color: #797979; +} .attach-document{ font-size: 15px; color: #0d89d1; } +/* SPAN */ +.span-left{ + float: left; + font-size: 15x; +} +.span-right{ +text-align: right; +float: right; +font-size: 13px; +} +.attach-title-item{ + width: 100%; + font-size: 15px; + color:#0d89d1; +} .container-footer{ margin:0 auto; overflow: auto; 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 f7a95d00c..d5a8226da 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 @@ -1,6 +1,8 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { ModalController, NavParams } from '@ionic/angular'; +import { EventPerson } from 'src/app/models/eventperson.model'; +import { AddParticipantsModalPage } from '../add-participants-modal/add-participants-modal.page'; @Component({ selector: 'app-expedient-task-modal', @@ -15,6 +17,8 @@ export class ExpedientTaskModalPage implements OnInit { 'Solicitar Deferimento' ]; taskType:number; + taskParticipants: any; + taskParticipantsCc: any; constructor( private modalController: ModalController, @@ -36,9 +40,38 @@ export class ExpedientTaskModalPage implements OnInit { saveTask(){ } - clicked(){ - console.log('clicked'); - + + async addParticipants(){ + const modal = await this.modalController.create({ + component: AddParticipantsModalPage, + componentProps: { + }, + cssClass: 'add-participants-modal', + backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then((res) => { + this.taskParticipants = res.data; + /* console.log(this.taskParticipants.data); */ + }); + } + async addParticipantsCc(){ + const modal = await this.modalController.create({ + component: AddParticipantsModalPage, + componentProps: { + }, + cssClass: 'add-participants-modal', + backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then((res) => { + this.taskParticipantsCc = res.data; + /* console.log(this.taskParticipants.data); */ + }); } } diff --git a/src/app/pages/gabinete-digital/expediente/expediente-routing.module.ts b/src/app/pages/gabinete-digital/expediente/expediente-routing.module.ts index c8f4d8275..9ff908043 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-routing.module.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente-routing.module.ts @@ -18,6 +18,14 @@ const routes: Routes = [ }, { path: 'book-meeting-modal', loadChildren: () => import('./book-meeting-modal/book-meeting-modal.module').then( m => m.BookMeetingModalPageModule) + }, + { + path: 'add-participants-modal', + loadChildren: () => import('./add-participants-modal/add-participants-modal.module').then( m => m.AddParticipantsModalPageModule) + }, + { + path: 'add-participants-cc-modal', + loadChildren: () => import('./add-participants-cc-modal/add-participants-cc-modal.module').then( m => m.AddParticipantsCcModalPageModule) }