mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
Merge branch 'feature/calendar' into developer
This commit is contained in:
@@ -381,21 +381,15 @@
|
|||||||
|
|
||||||
</app-approve-event>
|
</app-approve-event>
|
||||||
|
|
||||||
<app-attendees
|
|
||||||
class="d-flex flex-column height-100"
|
|
||||||
*ngIf="mobileComponent.showAttendees"
|
|
||||||
(openAttendeeModal)="openAttendeeModal()"
|
|
||||||
[eventAttendees]="contacts"
|
|
||||||
(openAddEvent)="openAddEvent($event)"
|
|
||||||
(GoBackEditOrAdd)="GoBackEditOrAdd()"
|
|
||||||
>
|
|
||||||
</app-attendees>
|
|
||||||
|
|
||||||
|
|
||||||
<app-attendee-modal
|
<app-attendee-modal
|
||||||
class="d-flex flex-column height-100"
|
class="d-flex flex-column height-100"
|
||||||
*ngIf="mobileComponent.showAttendeeModal"
|
*ngIf="mobileComponent.showAttendees"
|
||||||
|
[eventAttendees]="contacts"
|
||||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||||
|
(openAddEvent)="openAddEvent()"
|
||||||
|
(GoBackEditOrAdd)="GoBackEditOrAdd()"
|
||||||
|
(setContact)="setContact($event)"
|
||||||
>
|
>
|
||||||
</app-attendee-modal>
|
</app-attendee-modal>
|
||||||
|
|
||||||
|
|||||||
@@ -958,7 +958,7 @@ export class AgendaPage implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
if(Array.isArray(data)){
|
if(Array.isArray(data)){
|
||||||
if(data.length != 0){
|
if(data.length >= 1){
|
||||||
|
|
||||||
console.log('save!!!',data.length);
|
console.log('save!!!',data.length);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
|||||||
@@ -1,26 +1,51 @@
|
|||||||
<ion-header class="ion-no-border">
|
<ion-header class="ion-no-border px-20">
|
||||||
<ion-toolbar>
|
<ion-toolbar class="px-10">
|
||||||
<ion-title>Adicionar intervenientes</ion-title>
|
<ion-title class="pa-0">Adicionar intervenientes</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
<ion-searchbar (ionChange)="onChange($event)" placeholder="Pesquisar"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
<ion-searchbar class="attendee-search-bar" (ionChange)="onChange($event)" placeholder="Pesquisar"></ion-searchbar><!-- [(ngModel)]="searchCountryString" -->
|
||||||
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
<ion-progress-bar type="indeterminate" *ngIf="showLoader"></ion-progress-bar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content>
|
<ion-content class="height-100 ">
|
||||||
<ion-item-group>
|
|
||||||
<ion-list>
|
<ion-item-group class="d-flex flex-column height-100">
|
||||||
<ion-item-sliding>
|
<ion-list class="flex-grow-1 overflow-y-auto height-100" >
|
||||||
<ion-item *ngFor="let attendee of contacts">
|
<ion-item-sliding class="px-20">
|
||||||
<ion-checkbox slot="end" (ionChange)="selectContact(attendee)"></ion-checkbox><!-- [disabled]="isCheckboxDisabled" -->
|
<div *ngFor="let attendee of contacts;">
|
||||||
<ion-label>
|
<ion-item (click)="selectContact(attendee)" *ngIf="checkbox(attendee)" >
|
||||||
<h3>{{ attendee.Name }}</h3>
|
<div class="pr-10">
|
||||||
<p>{{ attendee.EmailAddress }}</p>
|
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
|
||||||
</ion-label>
|
</div>
|
||||||
</ion-item>
|
<ion-label>
|
||||||
</ion-item-sliding>
|
<h3>{{ attendee.Name }}</h3>
|
||||||
</ion-list>
|
<p>{{ attendee.EmailAddress }}</p>
|
||||||
</ion-item-group>
|
</ion-label>
|
||||||
|
</ion-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ion-item-sliding>
|
||||||
|
</ion-list>
|
||||||
|
<hr/>
|
||||||
|
<ion-list lines="none" *ngIf="selectedContact.length >= 1" class="flex-grow-1 overflow-y-auto height-100" style="border-top:1px solid #ebebeb">
|
||||||
|
<ion-item-sliding class="px-20">
|
||||||
|
<ion-item *ngFor="let attendee of selectedContact;" class="d-flex">
|
||||||
|
<div class="pr-10">
|
||||||
|
<ion-icon class="font-35" src="assets/images/icons-userprofile.svg"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<ion-label>
|
||||||
|
<h3>{{ attendee.Name }}</h3>
|
||||||
|
<p>{{ attendee.EmailAddress }}</p>
|
||||||
|
</ion-label>
|
||||||
|
<div style="color:red" (click)="remove(attendee)">
|
||||||
|
X
|
||||||
|
</div>
|
||||||
|
</ion-item>
|
||||||
|
</ion-item-sliding>
|
||||||
|
</ion-list>
|
||||||
|
</ion-item-group>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
||||||
<ion-footer class="ion-no-border">
|
<ion-footer class="ion-no-border">
|
||||||
<ion-toolbar class="width-100 d-flex justify-space-between px-20">
|
<ion-toolbar class="width-100 d-flex justify-space-between px-20">
|
||||||
<ion-buttons slot="start">
|
<ion-buttons slot="start">
|
||||||
@@ -31,7 +56,7 @@
|
|||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
<ion-buttons slot="end">
|
<ion-buttons slot="end">
|
||||||
<ion-button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
<ion-button class="btn-ok" fill="clear" color="#fff" (click)="save()">
|
||||||
<ion-label>Adicionar</ion-label>
|
<ion-label>Gravar</ion-label>
|
||||||
<ion-icon name="checkmark" slot="start"></ion-icon>
|
<ion-icon name="checkmark" slot="start"></ion-icon>
|
||||||
</ion-button>
|
</ion-button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
ion-item-group{
|
ion-item-group{
|
||||||
margin: 15px;
|
|
||||||
}
|
}
|
||||||
ion-searchbar{
|
ion-searchbar{
|
||||||
--border-radius: 20px;
|
--border-radius: 20px;
|
||||||
}
|
}
|
||||||
|
.item-inner{
|
||||||
|
border-style: unset !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -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 { ModalController } from '@ionic/angular';
|
||||||
import { ContactsService } from 'src/app/services/contacts.service';
|
import { ContactsService } from 'src/app/services/contacts.service';
|
||||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||||
@@ -12,35 +12,79 @@ export class AttendeeModalPage implements OnInit {
|
|||||||
|
|
||||||
contacts: EventPerson[];
|
contacts: EventPerson[];
|
||||||
showLoader: boolean = false;
|
showLoader: boolean = false;
|
||||||
|
selectedContact: EventPerson[] =[];
|
||||||
eventPersons: EventPerson[];
|
eventPersons: EventPerson[];
|
||||||
|
|
||||||
|
@Input() eventAttendees: EventPerson[];
|
||||||
|
|
||||||
constructor(private modalCtrl: ModalController, private contactsService: ContactsService) { }
|
constructor(private modalCtrl: ModalController, private contactsService: ContactsService) { }
|
||||||
|
|
||||||
@Output() openAttendeesComponent = new EventEmitter<any>();
|
@Output() openAttendeesComponent = new EventEmitter<any>();
|
||||||
|
@Output() GoBackEditOrAdd = new EventEmitter<any>();
|
||||||
|
@Output() setContact = new EventEmitter<any>();
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.fetchContacts("");
|
this.fetchContacts("");
|
||||||
|
this.selectedContact = this.eventAttendees;
|
||||||
}
|
}
|
||||||
|
|
||||||
save(){
|
save(){
|
||||||
|
|
||||||
this.openAttendeesComponent.emit(this.contacts.filter(function(contact) {
|
// set data to agenda component
|
||||||
return contact.IsRequired == true;
|
this.setContact.emit(this.selectedContact);
|
||||||
}));
|
// got back
|
||||||
|
this.GoBackEditOrAdd.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
close(){
|
close(){
|
||||||
// this.modalCtrl.dismiss(null);
|
// this.modalCtrl.dismiss(null);
|
||||||
this.openAttendeesComponent.emit(false);
|
this.selectedContact = [];
|
||||||
|
this.GoBackEditOrAdd.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange(evt: any) {
|
onChange(evt: any) {
|
||||||
this.fetchContacts(evt.detail.value);
|
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) {
|
async fetchContacts(filter: string) {
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35" height="35" viewBox="0 0 35 35">
|
||||||
|
<defs>
|
||||||
|
<circle id="nbs0qtv3ga" cx="17.5" cy="17.5" r="17.5"/>
|
||||||
|
</defs>
|
||||||
|
<g fill="none" fill-rule="evenodd">
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<g>
|
||||||
|
<g transform="translate(-20 -466) translate(0 99) translate(20 327) translate(0 35) translate(0 5)">
|
||||||
|
<rect width="35" height="35" fill="#FFF" fill-opacity=".6" rx="17.5"/>
|
||||||
|
<g>
|
||||||
|
<mask id="413y7q8i5b" fill="#fff">
|
||||||
|
<use xlink:href="#nbs0qtv3ga"/>
|
||||||
|
</mask>
|
||||||
|
<path fill="#42B9FE" fill-opacity=".7" d="M17.5 8.167c4.51 0 8.167 3.917 8.167 8.75 0 3.035-1.443 5.71-3.634 7.279 4.85 1.914 8.3 6.813 8.3 12.554 0 7.41-5.745 13.417-12.833 13.417S4.667 44.16 4.667 36.75c0-5.741 3.45-10.64 8.3-12.556-2.191-1.567-3.634-4.242-3.634-7.277 0-4.833 3.657-8.75 8.167-8.75z" mask="url(#413y7q8i5b)"/>
|
||||||
|
</g>
|
||||||
|
<text fill="#FFF" fill-opacity=".7" font-family="Roboto-Light, Roboto" font-size="20" font-weight="300">
|
||||||
|
<tspan x="5.889" y="21.778">SE</tspan>
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
+23
-1
@@ -509,7 +509,7 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
|
|||||||
.timeline-box{
|
.timeline-box{
|
||||||
left: -13%;
|
left: -13%;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 115%;
|
width: 113%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,3 +531,25 @@ td.monthview-secondary-with-event, td.monthview-secondary-with-event[_ngcontent-
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user