-
+ +
-
-
+
+
- Editar Evento + ***Editar Evento
-
- -
-
-
-
- +
+
+ +
+
+
+
+ +
+
+ +
-
- + + + +
+ +
+
+
+ +
+
+ + Oficial + Pessoal + +
- - - -
- -
-
-
- -
-
- - Oficial - Pessoal - + +
+
+
+ +
+
+ + Reunião + Viagem + Conferência + Encontro + +
+ +
+
+
+ +
+
+ + + +
+
+
+ +
+
+
+ +
+
+ + + +
+
+
+ +
+
+
+ +
+
+ + Não se repete + Repete + +
+
+
+ +
+ +
+
+
+ +
+
+
+ + + Adicionar intervenientes + {{participant.Name}} + + +
+
+ +
+
+
+
+
+
+
+ +
+
+
+ + + Adicionar intervenientes + {{participant.Name}} + + +
+
+ +
+
+
+
+ + +
+ +
+
+
+ +
+
+ +
+
+
+ + +
-
-
-
- -
-
- - Reunião - Viagem - Conferência - Encontro - -
-
-
- -
-
-
- -
-
- - - -
-
-
- -
-
-
- -
-
- - - -
-
-
- -
-
-
- -
-
- - Não se repete - Repete - -
-
-
- -
-
-
-
- -
-
-
- - - Adicionar Destinatários - - - -
-
- -
-
-
-
-
-
-
- -
-
-
- - - Adicionar CC - - - -
-
- -
-
-
-
-
- -
-
-
- -
-
- -
-
-
- - -
-
- -
+ + +
- + +
diff --git a/src/app/pages/agenda/edit-event/edit-event.page.scss b/src/app/pages/agenda/edit-event/edit-event.page.scss index 1213bb8fe..d66c4d061 100644 --- a/src/app/pages/agenda/edit-event/edit-event.page.scss +++ b/src/app/pages/agenda/edit-event/edit-event.page.scss @@ -1,6 +1,5 @@ .content{ - padding: 30px 20px 0 20px !important; margin: 0; float: left; border-left: 1px solid #d8d8d8 !important; diff --git a/src/app/pages/agenda/edit-event/edit-event.page.ts b/src/app/pages/agenda/edit-event/edit-event.page.ts index 0a3bb35e6..5d0dbe1ca 100644 --- a/src/app/pages/agenda/edit-event/edit-event.page.ts +++ b/src/app/pages/agenda/edit-event/edit-event.page.ts @@ -3,7 +3,6 @@ import { AlertController, ModalController, NavParams } from '@ionic/angular'; import { EventBody } from 'src/app/models/eventbody.model'; import { EventPerson } from 'src/app/models/eventperson.model'; import { AlertService } from 'src/app/services/alert.service'; -import { AttachmentsService } from 'src/app/services/attachments.service'; import { EventsService } from 'src/app/services/events.service'; import { Event } from '../../../models/event.model'; import { AttendeesPage } from '../../events/attendees/attendees.page'; @@ -27,6 +26,11 @@ export class EditEventPage implements OnInit { selectedDate: Date; minDate: string; + + taskParticipants: any = []; + taskParticipantsCc: any = []; + adding: "intervenient" | "CC" = "intervenient"; + constructor( private modalController: ModalController, private navParams: NavParams, @@ -36,6 +40,18 @@ export class EditEventPage implements OnInit { ) { this.isEventEdited = false; this.postEvent = this.navParams.get('event'); + + this.taskParticipants = []; + this.taskParticipantsCc = []; + + if(this.postEvent.Attendees == null){ + this.taskParticipants = [] + } else { + this.taskParticipants = this.postEvent.Attendees; + } + + this.taskParticipantsCc = []; + if(this.postEvent.IsRecurring == false){ this.isRecurring = "Não se repete"; } @@ -46,8 +62,6 @@ export class EditEventPage implements OnInit { } ngOnInit() { - console.log(this.profile); - console.log(this.postEvent); window.onresize = (event) => { // if not mobile remove all component @@ -77,24 +91,50 @@ export class EditEventPage implements OnInit { async openAttendees() { - const modal = await this.modalController.create({ - component: AttendeesPage, - componentProps: { - eventAttendees: this.postEvent.Attendees - }, - cssClass: 'attendee', - backdropDismiss: false - }); - await modal.present(); - - modal.onDidDismiss().then((data) => { - if (data['data'] != null) - { - let newattendees: EventPerson[] = data['data']; - this.postEvent.Attendees = newattendees; - } - }); -} + this.adding = 'intervenient'; + if(window.innerWidth == 1024) { + const modal = await this.modalController.create({ + component: AttendeesPage, + componentProps: { + eventAttendees: this.postEvent.Attendees + }, + cssClass: 'attendee', + backdropDismiss: false + }); + + await modal.present(); + + modal.onDidDismiss().then((data) => { + if (data['data'] != null) + { + let newattendees: EventPerson[] = data['data']; + this.setIntervenient(newattendees); + } + }); + } + + + } + + async setIntervenient(data){ + this.taskParticipants = data; + + this.postEvent.Attendees = data; + } + + async setIntervenientCC(data){ + this.taskParticipantsCc = data; + } + + async addParticipants(){ + this.adding = 'intervenient' + } + + async addParticipantsCC(){ + this.adding = 'CC' + } + + async closeComponent(){} } diff --git a/src/app/pages/agenda/view-event/view-event.page.ts b/src/app/pages/agenda/view-event/view-event.page.ts index 27af119b1..42ef96f47 100644 --- a/src/app/pages/agenda/view-event/view-event.page.ts +++ b/src/app/pages/agenda/view-event/view-event.page.ts @@ -15,6 +15,7 @@ import { EventEditPage } from '../../events/edit-event/edit-event.component'; templateUrl: './view-event.page.html', styleUrls: ['./view-event.page.scss'], }) + export class ViewEventPage implements OnInit { loadedEvent: Event; @@ -66,6 +67,7 @@ export class ViewEventPage implements OnInit { }; } + close(){ console.log(this.isEventEdited); this.modalController.dismiss(this.isEventEdited); @@ -82,6 +84,7 @@ export class ViewEventPage implements OnInit { this.customDate = this.days[this.today.getDay()]+ ", " + this.today.getDate() +" de " + ( this.months[this.today.getMonth()]); }); } + deleteEvent(){ this.eventsService.deleteEvent(this.loadedEvent.EventId, 0).subscribe(async () => { @@ -120,7 +123,7 @@ export class ViewEventPage implements OnInit { }, cssClass: classs, }); - + } async editEvent() { @@ -154,7 +157,6 @@ export class ViewEventPage implements OnInit { }); } - viewDocument(){ const url: string = this.loadedAttachments.DocumentURL.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1"); const browser = this.iab.create(url,"_blank"); diff --git a/src/app/pages/events/edit-event/edit-event.component.ts b/src/app/pages/events/edit-event/edit-event.component.ts index e84f8ea28..7c8a50542 100644 --- a/src/app/pages/events/edit-event/edit-event.component.ts +++ b/src/app/pages/events/edit-event/edit-event.component.ts @@ -35,7 +35,6 @@ export class EventEditPage implements OnInit { profile:string; - constructor( public formBuilder: FormBuilder, public alertController: AlertController, @@ -105,7 +104,7 @@ export class EventEditPage implements OnInit { this.loadedEvent.Attendees = newattendees; } }); -} + } getEventAttendees(): EventPerson[] { 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 bf1c15605..402f4f98a 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 @@ -56,7 +56,7 @@
- Adicionar intervenientes + Adicionar intervenientes {{participant.Name}} @@ -77,7 +77,7 @@
- Com conhecimento + Com conhecimento {{participant.Name}} diff --git a/src/app/shared/event/attendee-modal/attendee-modal.page.html b/src/app/shared/event/attendee-modal/attendee-modal.page.html index f8b429f47..aa45e2e65 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.html +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.html @@ -27,8 +27,9 @@
-
Destinatário
+ +
Destinatário
@@ -45,6 +46,8 @@ +
Destinatário
+
diff --git a/src/app/shared/event/attendee-modal/attendee-modal.page.ts b/src/app/shared/event/attendee-modal/attendee-modal.page.ts index 586fb1351..36a6c6c13 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.ts +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.ts @@ -17,10 +17,8 @@ export class AttendeeModalPage implements OnInit { selectedContact: EventPerson[] =[]; eventPersons: EventPerson[]; - @Input() taskParticipants = []; - @Input() taskParticipantsCc= []; - - @Input() eventAttendees: EventPerson[]; + @Input() taskParticipants:EventPerson[] = []; + @Input() taskParticipantsCc:EventPerson[] = []; constructor(private modalCtrl: ModalController, private contactsService: ContactsService) { } @@ -35,9 +33,15 @@ export class AttendeeModalPage implements OnInit { ngOnInit() { this.fetchContacts(""); - this.taskParticipants = this.taskParticipants - this.taskParticipantsCc = this.taskParticipantsCc; + if(this.taskParticipants == null || this.taskParticipants == undefined){ + this.taskParticipants = []; + } + if(this.taskParticipantsCc == null || this.taskParticipantsCc == undefined){ + this.taskParticipantsCc = []; + + } + } ngOnChanges(event){} @@ -67,7 +71,6 @@ export class AttendeeModalPage implements OnInit { this.fetchContacts(evt.detail.value); } - filterSearchList(itm: EventPerson): boolean { if(this.adding == "intervenient"){