diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html index ef0ac10f7..9add03469 100644 --- a/src/app/pages/agenda/agenda.page.html +++ b/src/app/pages/agenda/agenda.page.html @@ -380,22 +380,16 @@ > + - - - - diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index ab46f0367..fafddf780 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -958,7 +958,7 @@ export class AgendaPage implements OnInit { if(Array.isArray(data)){ - if(data.length != 0){ + if(data.length >= 1){ console.log('save!!!',data.length); console.log(data); 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 d8fe8f3c3..bc5583568 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.html +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.html @@ -1,26 +1,51 @@ - - - Adicionar intervenientes + + + Adicionar intervenientes - + - - - - - - - - {{ attendee.Name }} - {{ attendee.EmailAddress }} - - - - - + + + + + + + + + + + + {{ attendee.Name }} + {{ attendee.EmailAddress }} + + + + + + + + = 1" class="flex-grow-1 overflow-y-auto height-100" style="border-top:1px solid #ebebeb"> + + + + + + + {{ attendee.Name }} + {{ attendee.EmailAddress }} + + + X + + + + + + + @@ -31,7 +56,7 @@ - Adicionar + Gravar diff --git a/src/app/shared/event/attendee-modal/attendee-modal.page.scss b/src/app/shared/event/attendee-modal/attendee-modal.page.scss index 9cee55e1d..b8645df58 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.scss +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.scss @@ -1,6 +1,9 @@ ion-item-group{ - margin: 15px; + } ion-searchbar{ --border-radius: 20px; -} \ No newline at end of file +} +.item-inner{ + border-style: unset !important; + } 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 90c08513e..b26568c75 100644 --- a/src/app/shared/event/attendee-modal/attendee-modal.page.ts +++ b/src/app/shared/event/attendee-modal/attendee-modal.page.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, OnInit, Output } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { ModalController } from '@ionic/angular'; import { ContactsService } from 'src/app/services/contacts.service'; import { EventPerson } from 'src/app/models/eventperson.model'; @@ -12,35 +12,79 @@ export class AttendeeModalPage implements OnInit { contacts: EventPerson[]; showLoader: boolean = false; + selectedContact: EventPerson[] =[]; eventPersons: EventPerson[]; + @Input() eventAttendees: EventPerson[]; + constructor(private modalCtrl: ModalController, private contactsService: ContactsService) { } @Output() openAttendeesComponent = new EventEmitter(); + @Output() GoBackEditOrAdd = new EventEmitter(); + @Output() setContact = new EventEmitter(); ngOnInit() { this.fetchContacts(""); + this.selectedContact = this.eventAttendees; } save(){ - - this.openAttendeesComponent.emit(this.contacts.filter(function(contact) { - return contact.IsRequired == true; - })); + // set data to agenda component + this.setContact.emit(this.selectedContact); + // got back + this.GoBackEditOrAdd.emit(); } close(){ // this.modalCtrl.dismiss(null); - this.openAttendeesComponent.emit(false); + this.selectedContact = []; + this.GoBackEditOrAdd.emit(); } onChange(evt: any) { this.fetchContacts(evt.detail.value); } - selectContact(itm: EventPerson){ - itm.IsRequired = !itm.IsRequired; + + checkbox(itm: EventPerson): boolean { + const result = this.selectedContact.find((contact, index)=>{ + + if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){ + index = index; + return contact; + } + }); + + return undefined == result; + } + + remove(itm: EventPerson){ + + this.selectedContact = this.selectedContact.filter((contact, index) =>{ + + if(contact.Name != itm.Name && contact.EmailAddress != itm.EmailAddress){ + return contact; + } + return false; + + }); + + } + + async selectContact(itm: EventPerson){ + + const index = 0; + const findIndex = this.selectedContact.find((contact, index)=>{ + + if(contact.Name == itm.Name && contact.EmailAddress == itm.EmailAddress){ + index = index; + return contact; + } + }); + + this.selectedContact.push(itm); + } async fetchContacts(filter: string) { diff --git a/src/assets/images/icons-userprofile.svg b/src/assets/images/icons-userprofile.svg new file mode 100644 index 000000000..d02f18900 --- /dev/null +++ b/src/assets/images/icons-userprofile.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + SE + + + + + + + + diff --git a/src/global.scss b/src/global.scss index 596dfc793..f2de22b0f 100644 --- a/src/global.scss +++ b/src/global.scss @@ -509,7 +509,7 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- .timeline-box{ left: -13%; position: relative; - width: 115%; + width: 113%; } } @@ -530,4 +530,26 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent- padding-left: 0px; } } -} \ No newline at end of file +} + + +// agenda attendee component +.attendee-search-bar input{ + border: 1px solid #cecece !important; + box-shadow: none !important; + border-radius: 3px !important; + -webkit-border-radius: 3px !important; + -moz-border-radius: 3px !important; + -ms-border-radius: 3px !important; + -o-border-radius: 3px !important; + } + + .attendee-search-bar .searchbar-input { + border: 1px solid #cecece !important; + box-shadow: none !important; + border-radius: 3px !important; + -webkit-border-radius: 3px !important; + -moz-border-radius: 3px !important; + -ms-border-radius: 3px !important; + -o-border-radius: 3px !important; + } \ No newline at end of file
{{ attendee.EmailAddress }}