Merge branch 'feature/calendar' into developer

This commit is contained in:
tiago.kayaya
2021-03-30 16:27:02 +01:00
8 changed files with 57 additions and 36 deletions
+5 -5
View File
@@ -42,8 +42,8 @@
</ion-row>
<ion-row class="ion-align-items-center">
<ion-icon *ngIf="profile == 'mdgpr' " (click)="changeProfile()" class="right-icons d-md-none" src="assets/images/icons-profile-calendar-md.svg"></ion-icon>
<ion-icon *ngIf="profile == 'pr' " (click)="changeProfile()" class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg"></ion-icon>
<ion-icon *ngIf="profile == 'mdgpr' " (click)="changeProfile()" class="right-icons d-md-none" src="assets/images/icons-profile-calendar-md.svg">ddddddd</ion-icon>
<ion-icon *ngIf="profile == 'pr' " (click)="changeProfile()" class="right-icons d-md-none" src="assets/images/icons-profile-calendar-pr.svg">dddddddd</ion-icon>
<ion-icon (click)="viewEventsToApprove()" class="right-icons" src="assets/images/icons-received-event.svg"></ion-icon>
<ion-icon (click)="clearContact();openAddEvent()" class="right-icons" src="assets/images/icons-add-new-event.svg" ></ion-icon>
</ion-row>
@@ -340,7 +340,7 @@
(cloneAllmobileComponent)="cloneAllmobileComponent()"
[eventAttendees]="contacts"
(clearContact)="clearContact()"
(setContact)="setContact()"
(setContact)="setContact($event)"
></app-new-event>
<!-- Edit -->
@@ -351,7 +351,7 @@
(cloneAllmobileComponent)="cloneAllmobileComponent()"
(clearContact)="clearContact()"
(openAttendeesComponent)="openAttendeesComponent($event)"
(setContact)="setContact()"
(setContact)="setContact($event)"
></app-edit-event>
<!-- View -->
@@ -391,7 +391,7 @@
<app-attendee-modal
class="d-flex flex-column height-100"
class="d-flex flex-column height-100"
*ngIf="mobileComponent.showAttendees"
[eventAttendees]="contacts"
(closeComponent)="GoBackEditOrAdd()"
+3 -2
View File
@@ -97,7 +97,8 @@ export class AgendaPage implements OnInit {
@ViewChild(CalendarComponent) myCal: CalendarComponent;
segment:string;
profile:string;
profile:'mdgpr' | 'pr';
eventsList: Event[];
eventsListPessoal: Event[];
@@ -153,7 +154,7 @@ export class AgendaPage implements OnInit {
}
ngOnInit() {
this.profile = "MDGPR";
this.profile = "mdgpr";
//Inicializar segment
/* localStorage.setItem('test', this.eventSelectedDate.toString()); */
+1 -8
View File
@@ -4,11 +4,9 @@ import { Event } from '../../models/event.model';
import { EventsService } from 'src/app/services/events.service';
import { Router } from '@angular/router';
import { ActivatedRoute, NavigationEnd } from '@angular/router';
import { formatDate } from '@angular/common';
import { AlertService } from 'src/app/services/alert.service';
import { AuthService } from 'src/app/services/auth.service';
import { StorageService } from 'src/app/services/storage.service';
import { AuthConnstants } from 'src/app/config/auth-constants';
import { ModalController } from '@ionic/angular';
import { EventDetailPage } from './event-detail/event-detail.page';
import { EventDetailModalPage } from './event-detail-modal/event-detail-modal.page';
@@ -75,17 +73,12 @@ export class EventsPage implements OnInit {
}
swipe(){
console.log('!!!!');
}
ngOnInit() {
//Inicializar segment
this.segment = "Combinada";
//Initialize profile as mdgpr
this.profile = "mdgpr";
console.log(this.profile);
/* console.log(this.profile); */
/* this.storageService.get(AuthConnstants.USER).then(res=>{
console.log(res);
@@ -7,6 +7,7 @@ import { IonicModule } from '@ionic/angular';
import { ExpedientTaskModalPageRoutingModule } from './expedient-task-modal-routing.module';
import { ExpedientTaskModalPage } from './expedient-task-modal.page';
import { AttendeeModalPage } from 'src/app/shared/event/attendee-modal/attendee-modal.page';
@NgModule({
imports: [
@@ -15,6 +16,9 @@ import { ExpedientTaskModalPage } from './expedient-task-modal.page';
IonicModule,
ExpedientTaskModalPageRoutingModule
],
declarations: [ExpedientTaskModalPage]
declarations: [
ExpedientTaskModalPage,
AttendeeModalPage
]
})
export class ExpedientTaskModalPageModule {}
@@ -114,8 +114,14 @@
</ion-list>
</div>
</div>
<div class="aside-right flex-column height-100">
</div>
<app-attendee-modal
class="aside-right d-flex flex-column height-100"
[eventAttendees]="contacts"
(closeComponent)="closeComponent()"
(setContact)="setContact($event)"
></app-attendee-modal>
</div>
</ion-content>
<ion-footer>
@@ -40,14 +40,18 @@ export class ExpedientTaskModalPage implements OnInit {
dispatchFolder: Folder;
participants: Participant[];
contacts: EventPerson[] = [];
// trigger hide and show for attendee component
showAttendees= false;
constructor(
private modalController: ModalController,
private router:Router,
private processes:ProcessesService,
private attachmentsService: AttachmentsService,
private navParams: NavParams,
private authService: AuthService,
) {
private authService: AuthService) {
this.user = environment.defaultuser +'@'+ environment.domain;
this.task = this.navParams.get('task');
this.taskType = this.navParams.get('taskAction');
@@ -70,7 +74,7 @@ export class ExpedientTaskModalPage implements OnInit {
this.postData.SubjectTypeId = '99999844';
/* Initialize 'Subject' with the title of the expedient */
this.postData.DispatchFolder.Subject = this.task.workflowInstanceFolio;
}
}
ngOnInit() {
this.taskDate = new Date(this.task.taskStartDate);
@@ -78,12 +82,12 @@ export class ExpedientTaskModalPage implements OnInit {
console.log(res);
});
console.log(this.user); */
console.log(this.task)
/* console.log(this.task) */
console.log(this.task.serialNumber);
/* console.log(this.task.serialNumber); */
this.getAttachments();
console.log(this.getSubjectType());
/* console.log(this.getSubjectType()); */
}
@@ -101,7 +105,7 @@ export class ExpedientTaskModalPage implements OnInit {
});
}
saveTask(){
console.log(this.taskType);
/* console.log(this.taskType); */
switch (this.taskType)
{
@@ -229,4 +233,12 @@ export class ExpedientTaskModalPage implements OnInit {
modal.onDidDismiss();
}
async setContact(data:EventPerson[]){
this.contacts = data;
}
async closeComponent(){
this.showAttendees = false;
}
}
@@ -47,7 +47,8 @@
</ion-content>
<ion-footer class="ion-no-border">
<!-- Hide footer in gabinete-digital -->
<ion-footer class="ion-no-border" *ngIf="currentPath != '/home/gabinete-digital' ">
<ion-toolbar class="width-100 d-flex justify-space-between px-20">
<ion-buttons slot="start">
<ion-button class="btn-cancel" fill="clear" color="#061b52" (click)="close()">
@@ -22,6 +22,8 @@ export class AttendeeModalPage implements OnInit {
@Output() closeComponent = new EventEmitter<any>();
@Output() setContact = new EventEmitter<any>();
currentPath = window.location.pathname;
ngOnInit() {
this.fetchContacts("");
this.selectedContact = this.eventAttendees;
@@ -33,6 +35,12 @@ export class AttendeeModalPage implements OnInit {
this.closeComponent.emit();
}
setContactWithClose(){
if(this.currentPath == '/home/gabinete-digital'){
this.setContact.emit(this.selectedContact);
}
}
close(){
// this.modalCtrl.dismiss(null);
this.selectedContact = [];
@@ -66,22 +74,18 @@ export class AttendeeModalPage implements OnInit {
return false;
});
// run only in gabinete digital
this.setContactWithClose();
}
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);
// run only in gabinete digital
this.setContactWithClose();
}
async fetchContacts(filter: string) {