- Adicionar intervenientes
+ Adicionar intervenientes*
{{participant.Name}}
diff --git a/src/app/modals/create-process/create-process.page.scss b/src/app/modals/create-process/create-process.page.scss
index 8d65f1756..e2a954f25 100644
--- a/src/app/modals/create-process/create-process.page.scss
+++ b/src/app/modals/create-process/create-process.page.scss
@@ -72,7 +72,7 @@
}
.list-people-title{
/* font-size: 13px; */
- color: #797979;
+ color: #a3a3a3;
}
.attach-document{
font-size: 15px;
diff --git a/src/app/modals/delegar/delegar.page.ts b/src/app/modals/delegar/delegar.page.ts
index 2f2b46f6a..b4d74a350 100644
--- a/src/app/modals/delegar/delegar.page.ts
+++ b/src/app/modals/delegar/delegar.page.ts
@@ -7,8 +7,6 @@ import { ProcessesService } from 'src/app/services/processes.service';
import { EventPerson } from 'src/app/models/eventperson.model';
import { EventsService } from 'src/app/services/events.service';
import { AttachmentsService } from 'src/app/services/attachments.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 { AlertService } from 'src/app/services/alert.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
diff --git a/src/app/modals/forward/forward.page.ts b/src/app/modals/forward/forward.page.ts
index 9ab745dfc..30edfac9e 100644
--- a/src/app/modals/forward/forward.page.ts
+++ b/src/app/modals/forward/forward.page.ts
@@ -7,8 +7,6 @@ import { ProcessesService } from 'src/app/services/processes.service';
import { EventPerson } from 'src/app/models/eventperson.model';
import { EventsService } from 'src/app/services/events.service';
import { AttachmentsService } from 'src/app/services/attachments.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 { AlertService } from 'src/app/services/alert.service';
import { BadRequestPage } from 'src/app/shared/popover/bad-request/bad-request.page';
@@ -16,6 +14,7 @@ import { SuccessMessagePage } from 'src/app/shared/popover/success-message/succe
import { ToastService } from 'src/app/services/toast.service';
import { SearchDocument } from 'src/app/models/search-document';
import { SearchPage } from 'src/app/pages/search/search.page';
+import { AttendeesPageModal } from 'src/app/pages/events/attendees/attendees.page';
@Component({
selector: 'app-forward',
@@ -157,28 +156,44 @@ export class ForwardPage implements OnInit {
}
}
- async addParticipants(){
- console.log('HERE');
-
+ async addParticipants() {
this.adding = "intervenient";
- if(window.innerWidth <= 800){
+ if(window.innerWidth <=800) {
+ this.showAttendees=false;
const modal = await this.modalController.create({
- component: AddParticipantsModalPage,
- componentProps: {
- eventPersons: this.eventAttendees
+ component: AttendeesPageModal,
+ componentProps: {
+ adding: this.adding,
+ taskParticipants: this.taskParticipants,
+ taskParticipantsCc: this.taskParticipantsCc
},
- cssClass: 'book-meeting-modal',
+ cssClass: 'modal attendee',
backdropDismiss: false
});
-
+
await modal.present();
-
- modal.onDidDismiss().then((res) => {
+
+ 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);
+ }
});
} else {
- this.showAttendees = true;
+ this.showAttendees=true
}
}
+
+ async setIntervenient(data) {
+ this.taskParticipants = data;
+ }
+
+ async setIntervenientCC(data) {
+ this.taskParticipantsCc = data;
+ }
validateFormInputs(){
let formLocation = this.postData.Location.trim();
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
deleted file mode 100644
index 41b207888..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal-routing.module.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-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
deleted file mode 100644
index bc0249591..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.module.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-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
deleted file mode 100644
index b4bed4fb0..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.html
+++ /dev/null
@@ -1,35 +0,0 @@
-
- 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
deleted file mode 100644
index 5e0ed3224..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.scss
+++ /dev/null
@@ -1,29 +0,0 @@
-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-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
deleted file mode 100644
index 23481cfde..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-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
deleted file mode 100644
index 07e6b8d65..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-cc-modal/add-participants-cc-modal.page.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { ModalController, NavParams } 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[];
- participantsAdded: any;
-
- constructor(private modalController: ModalController,
- private contactsService: ContactsService,
- private navParams: NavParams,
- ) {
- this.participantsAdded = this.navParams.get('eventPersons');
- }
-
- ngOnInit() {
- this.fetchContacts("");
- }
-
- onChange(evt: any) {
- this.fetchContacts(evt.detail.value);
- }
-
- selectContact(itm: EventPerson){
- itm.IsRequired = !itm.IsRequired;
- }
-
- async fetchContacts(filter: string) {
- this.showLoader = true;
-
- this.contactsService.getContacts(filter).subscribe(result =>
- {
- if (this.participantsAdded != null)
- {
- this.participantsAdded.forEach(attendee => {
- const index: number = result.findIndex((cont) => {
- return cont.EmailAddress == attendee.UserId
- });
-
- result.splice(index, 1);
- });
- }
- this.contacts = result;
- this.showLoader = false;
- }
- );
- }
-
- 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
deleted file mode 100644
index f6e6c6ca7..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal-routing.module.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-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
deleted file mode 100644
index 7ba6edc49..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.module.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-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
deleted file mode 100644
index f654a2caa..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
- Adicionar Intervenientes - TK
-
-
-
-
-
-
-
-
-
-
-
-
- {{ 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
deleted file mode 100644
index 5e0ed3224..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.scss
+++ /dev/null
@@ -1,29 +0,0 @@
-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
deleted file mode 100644
index 33f7c7d91..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.spec.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-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
deleted file mode 100644
index 818795e56..000000000
--- a/src/app/pages/gabinete-digital/expediente/add-participants-modal/add-participants-modal.page.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import { Component, OnInit } from '@angular/core';
-import { ModalController, NavParams } 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[];
- participantsAdded: any;
-
- constructor(private modalController: ModalController,
- private contactsService: ContactsService,
- private navParams: NavParams,) { }
-
- ngOnInit() {
- this.fetchContacts("");
- this.participantsAdded = this.navParams.get('eventPersons');
- }
- async fetchContacts(filter: string) {
- this.showLoader = true;
-
- this.contactsService.getContacts(filter).subscribe(result =>
- {
- if (this.participantsAdded != null)
- {
- this.participantsAdded.forEach(attendee => {
- const index: number = result.findIndex((cont) => {
- return cont.EmailAddress == attendee.UserId
- });
-
- result.splice(index, 1);
- });
- }
- this.contacts = 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 66633a13e..4de07a3f2 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
@@ -69,7 +69,7 @@