mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve attendess
This commit is contained in:
@@ -349,9 +349,12 @@
|
|||||||
></app-new-event>
|
></app-new-event>
|
||||||
<!-- Edit -->
|
<!-- Edit -->
|
||||||
<app-edit-event *ngIf="mobileComponent.showEditEvent"
|
<app-edit-event *ngIf="mobileComponent.showEditEvent"
|
||||||
|
[taskParticipants]="taskParticipants"
|
||||||
|
[taskParticipantsCc]="taskParticipantsCc"
|
||||||
[profile]="profile"
|
[profile]="profile"
|
||||||
[selectedSegment]="segment"
|
[selectedSegment]="segment"
|
||||||
[postEvent]="postEvent"
|
[postEvent]="postEvent"
|
||||||
|
(clearPostEvent)="clearPostEvent"
|
||||||
(clearContact)="clearContact()"
|
(clearContact)="clearContact()"
|
||||||
(openAttendeesComponent)="openAttendeesComponent($event)"
|
(openAttendeesComponent)="openAttendeesComponent($event)"
|
||||||
(setContact)="setContact($event)"
|
(setContact)="setContact($event)"
|
||||||
|
|||||||
@@ -94,11 +94,11 @@ export class AgendaPage implements OnInit {
|
|||||||
selectedEventId: string | number;
|
selectedEventId: string | number;
|
||||||
postEvent: any;
|
postEvent: any;
|
||||||
|
|
||||||
|
// temporary data
|
||||||
taskParticipants: any = [];
|
taskParticipants: any = [];
|
||||||
taskParticipantsCc: any = [];
|
taskParticipantsCc: any = [];
|
||||||
adding: "intervenient" | "CC" = "intervenient";
|
adding: "intervenient" | "CC" = "intervenient";
|
||||||
|
|
||||||
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
@ViewChild(CalendarComponent) myCal: CalendarComponent;
|
||||||
|
|
||||||
segment: "Combinado" | "Pessoal" | "Oficial";
|
segment: "Combinado" | "Pessoal" | "Oficial";
|
||||||
@@ -209,6 +209,11 @@ export class AgendaPage implements OnInit {
|
|||||||
// show information about the clicked event in timeline
|
// show information about the clicked event in timeline
|
||||||
eventClicked({ event }: { event: CalendarEvent }): void {
|
eventClicked({ event }: { event: CalendarEvent }): void {
|
||||||
/* console.log('Event clicked', event); */
|
/* console.log('Event clicked', event); */
|
||||||
|
//clear
|
||||||
|
|
||||||
|
this.setIntervenient([]);
|
||||||
|
this.setIntervenientCC([]);
|
||||||
|
this.clearPostEvent();
|
||||||
|
|
||||||
this.IsEvent= "view";
|
this.IsEvent= "view";
|
||||||
|
|
||||||
@@ -995,12 +1000,7 @@ export class AgendaPage implements OnInit {
|
|||||||
// open component
|
// open component
|
||||||
async openAttendeesComponent(data) {
|
async openAttendeesComponent(data) {
|
||||||
|
|
||||||
if(Array.isArray(data)){
|
this.adding = data.type
|
||||||
if(data.length >= 1){
|
|
||||||
|
|
||||||
this.contacts = data ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.cloneAllmobileComponent();
|
this.cloneAllmobileComponent();
|
||||||
this.mobileComponent.showAttendees = true;
|
this.mobileComponent.showAttendees = true;
|
||||||
@@ -1061,4 +1061,8 @@ export class AgendaPage implements OnInit {
|
|||||||
this.adding = adding;
|
this.adding = adding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async clearPostEvent(){
|
||||||
|
this.postEvent = false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<ion-content>
|
<ion-content>
|
||||||
|
<!-- Edit event for Inicio -->
|
||||||
<div class="main-content height-100">
|
<div class="main-content height-100">
|
||||||
|
|
||||||
<div class="content d-flex flex-column width-md-100 height-100">
|
<div class="content d-flex flex-column width-md-100 height-100">
|
||||||
@@ -224,7 +225,7 @@
|
|||||||
[taskParticipants]="taskParticipants"
|
[taskParticipants]="taskParticipants"
|
||||||
[taskParticipantsCc]="taskParticipantsCc"
|
[taskParticipantsCc]="taskParticipantsCc"
|
||||||
[adding]="adding"
|
[adding]="adding"
|
||||||
|
(dynamicSetIntervenient)="dynamicSetIntervenient($event)"
|
||||||
></app-attendee-modal>
|
></app-attendee-modal>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -44,17 +44,20 @@ export class EditEventPage implements OnInit {
|
|||||||
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.taskParticipants = [];
|
|
||||||
this.taskParticipantsCc = [];
|
|
||||||
|
|
||||||
if(this.postEvent.Attendees == null){
|
if(this.postEvent.Attendees == null){
|
||||||
this.taskParticipants = []
|
this.taskParticipants = []
|
||||||
} else {
|
} else {
|
||||||
this.taskParticipants = this.postEvent.Attendees;
|
|
||||||
|
this.postEvent.Attendees.forEach(e =>{
|
||||||
|
if(e.IsRequired){
|
||||||
|
this.taskParticipants.push(e);
|
||||||
|
} else {
|
||||||
|
this.taskParticipantsCc.push(e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.taskParticipantsCc = [];
|
|
||||||
|
|
||||||
if(this.postEvent.IsRecurring == false){
|
if(this.postEvent.IsRecurring == false){
|
||||||
this.isRecurring = "Não se repete";
|
this.isRecurring = "Não se repete";
|
||||||
}
|
}
|
||||||
@@ -80,7 +83,9 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
save(){
|
save(){
|
||||||
|
|
||||||
|
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
|
||||||
|
|
||||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||||
const alert = await this.alertController.create({
|
const alert = await this.alertController.create({
|
||||||
cssClass: 'my-custom-class',
|
cssClass: 'my-custom-class',
|
||||||
@@ -122,7 +127,6 @@ export class EditEventPage implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setIntervenient(data){
|
setIntervenient(data){
|
||||||
@@ -145,4 +149,10 @@ export class EditEventPage implements OnInit {
|
|||||||
this.openAttendees();
|
this.openAttendees();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
dynamicSetIntervenient({taskParticipants, taskParticipantsCc}){
|
||||||
|
this.taskParticipants = taskParticipants;
|
||||||
|
this.taskParticipantsCc = taskParticipantsCc;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
-1
@@ -117,7 +117,6 @@
|
|||||||
|
|
||||||
<app-attendee-modal
|
<app-attendee-modal
|
||||||
class="aside-right d-flex flex-column height-100"
|
class="aside-right d-flex flex-column height-100"
|
||||||
[eventAttendees]="contacts"
|
|
||||||
[adding]="adding"
|
[adding]="adding"
|
||||||
[taskParticipants]="taskParticipants"
|
[taskParticipants]="taskParticipants"
|
||||||
[taskParticipantsCc]="taskParticipantsCc"
|
[taskParticipantsCc]="taskParticipantsCc"
|
||||||
|
|||||||
-6
@@ -105,11 +105,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
}
|
}
|
||||||
cancelTask(){
|
cancelTask(){
|
||||||
this.modalController.dismiss(null);
|
this.modalController.dismiss(null);
|
||||||
//this.viewExpedientDetail();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
saveTask(){
|
saveTask(){
|
||||||
/* console.log(this.taskType); */
|
|
||||||
|
|
||||||
switch (this.taskType)
|
switch (this.taskType)
|
||||||
{
|
{
|
||||||
@@ -154,12 +152,9 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
DispatchFolder: this.dispatchFolder,
|
DispatchFolder: this.dispatchFolder,
|
||||||
}
|
}
|
||||||
this.processes.postDeferimento(this.postData);
|
this.processes.postDeferimento(this.postData);
|
||||||
//this.distartExpedientModal();
|
|
||||||
this.close();
|
this.close();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* this.distartExpedientModal();
|
|
||||||
this.close(); */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
getAttachments(){
|
getAttachments(){
|
||||||
@@ -245,7 +240,6 @@ export class ExpedientTaskModalPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async distartExpedientModal(){
|
async distartExpedientModal(){
|
||||||
console.log(this.task.serialNumber);
|
|
||||||
const modal = await this.modalController.create({
|
const modal = await this.modalController.create({
|
||||||
component: DiscartExpedientModalPage,
|
component: DiscartExpedientModalPage,
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="main-header">
|
<div class="main-header">
|
||||||
<div class="title-content">
|
<div class="title-content">
|
||||||
<div class="middle">
|
<div class="middle">
|
||||||
<ion-label class="title">Editar Evento</ion-label>
|
<ion-label class="title">Editar Evento agenda</ion-label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -130,43 +130,43 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container-div d-flex">
|
<div class=" d-flex width-100">
|
||||||
<div class="ion-item-class-2 width-100 d-flex">
|
<div class="ion-item-class-2 width-100">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div (click)="openAttendees()" class="ion-input-class d-flex flex-grow-1 width-100 overflow-hidden ">
|
<div class="ion-input-class-no-height">
|
||||||
<div class="list-people flex-grow-1">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-label class="list-people-title">Ver ou editar participantes</ion-label>
|
<ion-label *ngIf="taskParticipants.length == 0" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||||
<ion-label hidden >Text</ion-label>
|
<ion-label *ngFor="let participant of taskParticipants">{{participant.Name}}</ion-label>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-center align-center font-35">
|
<div class="add-people">
|
||||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
<ion-icon (click)="addParticipants()" class="font-35" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div hidden class="container-div d-flex">
|
<div class=" d-flex width-100">
|
||||||
<div class="ion-item-class-2 width-100 d-flex">
|
<div class="ion-item-class-2 width-100">
|
||||||
<div class="ion-icon-class">
|
<div class="ion-icon-class">
|
||||||
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
<ion-icon slot="start" src="assets/images/icons-people-cc.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="ion-input-class d-flex flex-grow-1 width-100 overflow-hidden">
|
<div class="ion-input-class-no-height">
|
||||||
<div class="list-people flex-grow-1">
|
<div class="list-people">
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-label class="list-people-title">Com conhecimento</ion-label>
|
<ion-label *ngIf="taskParticipantsCc.length == 0" class="list-people-title">Como conhecido</ion-label>
|
||||||
<ion-label hidden >Text</ion-label>
|
<ion-label *ngFor="let participant of taskParticipantsCc">{{participant.Name}}</ion-label>
|
||||||
</ion-list>
|
</ion-list>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-center align-center font-35">
|
<div class="add-people">
|
||||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
<ion-icon (click)="addParticipantsCc()" class="font-35" slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,25 +22,25 @@ export class EditEventComponent implements OnInit {
|
|||||||
eventAttendees: EventPerson[];
|
eventAttendees: EventPerson[];
|
||||||
minDate: string;
|
minDate: string;
|
||||||
|
|
||||||
|
@Input() taskParticipants: EventPerson[];
|
||||||
|
@Input() taskParticipantsCc: any = [];
|
||||||
@Input() profile:string;
|
@Input() profile:string;
|
||||||
@Input() selectedSegment: string;
|
@Input() selectedSegment: string;
|
||||||
@Input() postEvent: any;
|
@Input() postEvent: any;
|
||||||
@Output() clearContact = new EventEmitter<any>();
|
@Output() clearContact = new EventEmitter<any>();
|
||||||
|
|
||||||
|
|
||||||
@Output() openAttendeesComponent = new EventEmitter<any>();
|
@Output() openAttendeesComponent = new EventEmitter<any>();
|
||||||
@Output() closeComponent = new EventEmitter<any>();
|
@Output() closeComponent = new EventEmitter<any>();
|
||||||
|
|
||||||
@Output() setIntervenient = new EventEmitter<any>();
|
@Output() setIntervenient = new EventEmitter<any>();
|
||||||
@Output() setIntervenientCC = new EventEmitter<any>();
|
@Output() setIntervenientCC = new EventEmitter<any>();
|
||||||
|
@Output() clearPostEvent = new EventEmitter<any>();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private modalController: ModalController,
|
private modalController: ModalController,
|
||||||
private eventsService: EventsService,
|
private eventsService: EventsService,
|
||||||
public alertController: AlertController,
|
public alertController: AlertController,
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,8 +48,18 @@ export class EditEventComponent implements OnInit {
|
|||||||
if(this.postEvent){
|
if(this.postEvent){
|
||||||
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
this.postEvent.Body.Text = this.postEvent.Body.Text.replace(/<[^>]+>/g, '');
|
||||||
}
|
}
|
||||||
console.log(this.postEvent);
|
|
||||||
|
// attendees list
|
||||||
|
if(this.postEvent.Attendees != null) {
|
||||||
|
this.postEvent.Attendees.forEach(e =>{
|
||||||
|
if(e.IsRequired){
|
||||||
|
this.taskParticipants.push(e);
|
||||||
|
} else {
|
||||||
|
this.taskParticipantsCc.push(e);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
this.isEventEdited = false;
|
this.isEventEdited = false;
|
||||||
|
|
||||||
if(this.postEvent.IsRecurring == false){
|
if(this.postEvent.IsRecurring == false){
|
||||||
@@ -61,32 +71,45 @@ export class EditEventComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
close(){
|
close(){
|
||||||
console.log('!!!!!!!!!!!!!!!!! close')
|
|
||||||
this.closeComponent.emit();
|
this.closeComponent.emit();
|
||||||
|
this.setIntervenient.emit([]);
|
||||||
|
this.setIntervenientCC.emit([]);
|
||||||
this.clearContact.emit();
|
this.clearContact.emit();
|
||||||
}
|
}
|
||||||
save(){
|
|
||||||
this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
async save(){
|
||||||
|
|
||||||
|
this.postEvent.Attendees = this.taskParticipants.concat(this.taskParticipantsCc)
|
||||||
|
|
||||||
|
await this.eventsService.editEvent(this.postEvent, 2, 3).subscribe(async () => {
|
||||||
const alert = await this.alertController.create({
|
const alert = await this.alertController.create({
|
||||||
cssClass: 'my-custom-class',
|
cssClass: 'my-custom-class',
|
||||||
header: 'Evento actualizado',
|
header: 'Evento actualizado',
|
||||||
buttons: ['OK']
|
buttons: ['OK']
|
||||||
});
|
});
|
||||||
await alert.present();
|
await alert.present();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.clearPostEvent.emit();
|
||||||
|
|
||||||
this.closeComponent.emit();
|
this.close();
|
||||||
this.clearContact.emit();
|
|
||||||
|
|
||||||
this.setIntervenient.emit([]);
|
|
||||||
this.setIntervenientCC.emit([]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async openAttendees() {
|
async addParticipants() {
|
||||||
|
this.openAttendeesComponent.emit({
|
||||||
|
type: "intervenient"
|
||||||
|
});
|
||||||
|
|
||||||
|
this.clearContact.emit();
|
||||||
|
}
|
||||||
|
|
||||||
|
async addParticipantsCc() {
|
||||||
|
this.openAttendeesComponent.emit({
|
||||||
|
type: "CC"
|
||||||
|
});
|
||||||
|
|
||||||
this.openAttendeesComponent.emit();
|
|
||||||
|
|
||||||
this.clearContact.emit();
|
this.clearContact.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ export class AttendeeModalPage implements OnInit {
|
|||||||
@Input() taskParticipants:EventPerson[] = [];
|
@Input() taskParticipants:EventPerson[] = [];
|
||||||
@Input() taskParticipantsCc:EventPerson[] = [];
|
@Input() taskParticipantsCc:EventPerson[] = [];
|
||||||
|
|
||||||
constructor(private modalCtrl: ModalController, private contactsService: ContactsService) { }
|
constructor(
|
||||||
|
private modalCtrl: ModalController,
|
||||||
|
private contactsService: ContactsService ) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Output() closeComponent = new EventEmitter<any>();
|
@Output() closeComponent = new EventEmitter<any>();
|
||||||
|
|
||||||
@@ -45,7 +49,6 @@ export class AttendeeModalPage implements OnInit {
|
|||||||
ngOnChanges(event){}
|
ngOnChanges(event){}
|
||||||
|
|
||||||
save(){
|
save(){
|
||||||
|
|
||||||
this.setIntervenient.emit(this.taskParticipants);
|
this.setIntervenient.emit(this.taskParticipants);
|
||||||
this.setIntervenientCC.emit(this.taskParticipantsCc);
|
this.setIntervenientCC.emit(this.taskParticipantsCc);
|
||||||
|
|
||||||
@@ -60,7 +63,6 @@ export class AttendeeModalPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
close(){
|
close(){
|
||||||
// this.modalCtrl.dismiss(null);
|
|
||||||
this.closeComponent.emit();
|
this.closeComponent.emit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,8 +110,6 @@ export class AttendeeModalPage implements OnInit {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else if (this.adding == "CC") {
|
} else if (this.adding == "CC") {
|
||||||
|
|
||||||
this.taskParticipantsCc = this.taskParticipantsCc.filter((contact, index) =>{
|
this.taskParticipantsCc = this.taskParticipantsCc.filter((contact, index) =>{
|
||||||
@@ -136,10 +136,12 @@ export class AttendeeModalPage implements OnInit {
|
|||||||
|
|
||||||
if(this.adding == "intervenient"){
|
if(this.adding == "intervenient"){
|
||||||
|
|
||||||
|
itm.IsRequired = true;
|
||||||
this.taskParticipants.push(itm);
|
this.taskParticipants.push(itm);
|
||||||
|
|
||||||
} else if (this.adding == "CC") {
|
} else if (this.adding == "CC") {
|
||||||
|
|
||||||
|
itm.IsRequired = false;
|
||||||
this.taskParticipantsCc.push(itm);
|
this.taskParticipantsCc.push(itm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user