mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge branch 'feature/calendar' into developer
This commit is contained in:
@@ -369,7 +369,6 @@
|
||||
(cloneAllmobileComponent)="viewEventDetailDismiss($event)"
|
||||
>
|
||||
</app-event-list>
|
||||
>
|
||||
|
||||
<app-approve-event class="d-flex flex-column" *ngIf="mobileComponent.showEventToApprove" [class.transparent]="mobileComponent.transparentEventToApprove"
|
||||
[serialNumber] = "eventToaprove.serialNumber"
|
||||
|
||||
+80
-64
@@ -7,7 +7,6 @@ import { Participant } from 'src/app/models/participant.model';
|
||||
import { Folder } from 'src/app/models/folder.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
import { AddParticipantsCcModalPage } from '../add-participants-cc-modal/add-participants-cc-modal.page';
|
||||
import { AddParticipantsModalPage } from '../add-participants-modal/add-participants-modal.page';
|
||||
import { environment } from 'src/environments/environment';
|
||||
@@ -40,10 +39,11 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
dispatchFolder: Folder;
|
||||
participants: Participant[];
|
||||
|
||||
contacts: EventPerson[] = [];
|
||||
contacts= [];
|
||||
// trigger hide and show for attendee component
|
||||
showAttendees= false;
|
||||
|
||||
adding: "intervenient" | "CC"
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -78,17 +78,8 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.taskDate = new Date(this.task.taskStartDate);
|
||||
/* this.authService.userData$.subscribe((res:any)=>{
|
||||
console.log(res);
|
||||
});
|
||||
console.log(this.user); */
|
||||
/* console.log(this.task) */
|
||||
|
||||
/* console.log(this.task.serialNumber); */
|
||||
this.getAttachments();
|
||||
|
||||
/* console.log(this.getSubjectType()); */
|
||||
|
||||
}
|
||||
|
||||
close(){
|
||||
@@ -159,63 +150,78 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
|
||||
async addParticipants(){
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.participants
|
||||
},
|
||||
cssClass: 'add-participants-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipants = res.data;
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
if(newattendees!= null){
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
'UserEmail': newattendee.EmailAddress,
|
||||
'UserType': 'I',
|
||||
};
|
||||
if(this.participants == null){
|
||||
this.participants = new Array();
|
||||
}
|
||||
this.participants.push(att);
|
||||
|
||||
this.adding = "intervenient";
|
||||
this.contacts = this.taskParticipants;
|
||||
|
||||
if(window.innerWidth <=1024){
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.participants
|
||||
},
|
||||
cssClass: 'add-participants-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
}
|
||||
this.postData.UsersSelected = this.participants;
|
||||
console.log(this.postData);
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipants = res.data;
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
if(newattendees!= null){
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
'UserEmail': newattendee.EmailAddress,
|
||||
'UserType': 'I',
|
||||
};
|
||||
if(this.participants == null){
|
||||
this.participants = new Array();
|
||||
}
|
||||
this.participants.push(att);
|
||||
});
|
||||
}
|
||||
this.postData.UsersSelected = this.participants;
|
||||
console.log(this.postData);
|
||||
});
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
async addParticipantsCc(){
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsCcModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.participants
|
||||
},
|
||||
cssClass: 'add-participants-cc-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipantsCc = res.data;
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
if(newattendees!= null){
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
'UserEmail': newattendee.EmailAddress,
|
||||
'UserType': 'CC',
|
||||
};
|
||||
if(this.participants == null){
|
||||
this.participants = new Array();
|
||||
}
|
||||
this.participants.push(att);
|
||||
|
||||
this.adding = "CC";
|
||||
this.contacts = this.taskParticipantsCc;
|
||||
|
||||
if(window.innerWidth <=1024){
|
||||
const modal = await this.modalController.create({
|
||||
component: AddParticipantsCcModalPage,
|
||||
componentProps: {
|
||||
eventPersons: this.participants
|
||||
},
|
||||
cssClass: 'add-participants-cc-modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
}
|
||||
this.postData.UsersSelected = this.participants;
|
||||
console.log(this.postData);
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res) => {
|
||||
this.taskParticipantsCc = res.data;
|
||||
let newattendees: EventPerson[] = res['data'];
|
||||
if(newattendees!= null){
|
||||
newattendees.forEach(newattendee => {
|
||||
let att = {
|
||||
'UserEmail': newattendee.EmailAddress,
|
||||
'UserType': 'CC',
|
||||
};
|
||||
if(this.participants == null){
|
||||
this.participants = new Array();
|
||||
}
|
||||
this.participants.push(att);
|
||||
});
|
||||
}
|
||||
this.postData.UsersSelected = this.participants;
|
||||
console.log(this.postData);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async distartExpedientModal(){
|
||||
@@ -236,7 +242,17 @@ export class ExpedientTaskModalPage implements OnInit {
|
||||
}
|
||||
|
||||
async setContact(data:EventPerson[]){
|
||||
this.contacts = data;
|
||||
|
||||
if(this.adding == "intervenient"){
|
||||
console.log('intervenient')
|
||||
this.contacts = data;
|
||||
this.taskParticipants = data;
|
||||
} else if (this.adding == "CC") {
|
||||
|
||||
console.log('CCCC')
|
||||
this.taskParticipantsCc = data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async closeComponent(){
|
||||
|
||||
@@ -172,13 +172,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-div d-flex">
|
||||
<div class="ion-item-class-2 width-100 d-flex">
|
||||
<div class="container-div">
|
||||
<div class="ion-item-class-2 d-flex">
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-description.svg"></ion-icon>
|
||||
</div>
|
||||
<div class="ion-input-class flex-grow-1">
|
||||
<ion-input placeholder="Detalhes" [(ngModel)]="postEvent.Body.Text"></ion-input>
|
||||
<div class="ion-input-class-no-height flex-grow-1">
|
||||
|
||||
<ion-textarea [(ngModel)]="postEvent.Body.Text" placeholder="Detalhes" ></ion-textarea>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -166,3 +166,10 @@ ion-content{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.container-div{
|
||||
ion-textarea{
|
||||
height: 81px;
|
||||
}
|
||||
}
|
||||
@@ -129,16 +129,18 @@
|
||||
<div class="ion-icon-class">
|
||||
<ion-icon slot="start" src="assets/images/icons-person.svg"></ion-icon>
|
||||
</div>
|
||||
<div (click)="openAttendees()" class="ion-input-class-no-height flex-grow-1">
|
||||
<div class="ion-input-class-no-height flex-grow-1">
|
||||
|
||||
<div class="list-people">
|
||||
<ion-item lines="none">
|
||||
<ion-list>
|
||||
<ion-label class="list-people-title">Adicionar participantes</ion-label>
|
||||
<ion-label hidden >Text</ion-label>
|
||||
<ion-label *ngIf="eventAttendees.length ==0" class="list-people-title">Adicionar intervenientes</ion-label>
|
||||
<ion-label *ngFor="let participant of eventAttendees">{{participant.Name}}</ion-label>
|
||||
</ion-list>
|
||||
</ion-item>
|
||||
</div>
|
||||
<div class="add-people">
|
||||
|
||||
<div class="add-people" (click)="openAttendees()">
|
||||
<ion-icon slot="start" src="assets/images/icons-arrow-forward.svg"></ion-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -171,3 +171,9 @@ ion-content{
|
||||
|
||||
}
|
||||
|
||||
|
||||
.container-div{
|
||||
ion-textarea{
|
||||
height: 81px;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ import { EventBody } from 'src/app/models/eventbody.model';
|
||||
import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
import { EventsService } from 'src/app/services/events.service';
|
||||
import { Event } from 'src/app/models/event.model';
|
||||
import { AttendeesPage } from 'src/app/pages/events/attendees/attendees.page';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
|
||||
@Component({
|
||||
@@ -34,12 +33,7 @@ export class NewEventPage implements OnInit {
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
private eventService: EventsService,
|
||||
) {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -49,7 +43,7 @@ export class NewEventPage implements OnInit {
|
||||
this.eventBody = { BodyType : "1", Text : ""};
|
||||
this.postEvent.Body = this.eventBody;
|
||||
|
||||
console.log(this.profile);
|
||||
/* console.log(this.profile); */
|
||||
|
||||
let selectedStartdDate = this.selectedDate;
|
||||
let selectedEndDate = new Date(this.selectedDate);
|
||||
@@ -115,6 +109,8 @@ export class NewEventPage implements OnInit {
|
||||
|
||||
save(){
|
||||
|
||||
this.postEvent.Attendees = this.eventAttendees;
|
||||
|
||||
if(this.profile=='mdgpr'){
|
||||
this.eventService.postEventMd(this.postEvent, this.postEvent.CalendarName).subscribe();
|
||||
}
|
||||
@@ -128,8 +124,7 @@ export class NewEventPage implements OnInit {
|
||||
this.GoBackEditOrAdd.emit();
|
||||
}
|
||||
|
||||
async openAttendees(data: any)
|
||||
{
|
||||
async openAttendees(){
|
||||
|
||||
this.saveTemporaryData();
|
||||
this.openAttendeesComponent.emit();
|
||||
|
||||
@@ -10,6 +10,7 @@ import { EventPerson } from 'src/app/models/eventperson.model';
|
||||
})
|
||||
export class AttendeeModalPage implements OnInit {
|
||||
|
||||
// Defined by the API
|
||||
contacts: EventPerson[];
|
||||
showLoader: boolean = false;
|
||||
selectedContact: EventPerson[] =[];
|
||||
@@ -29,6 +30,10 @@ export class AttendeeModalPage implements OnInit {
|
||||
this.selectedContact = this.eventAttendees;
|
||||
}
|
||||
|
||||
ngOnChanges(){
|
||||
console.log('change !!!')
|
||||
}
|
||||
|
||||
save(){
|
||||
// set data to agenda component
|
||||
this.setContact.emit(this.selectedContact);
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
<div class="div-profile" (click)="openProfile()">
|
||||
<ion-icon class="font-45" *ngIf="profile == 'mdgpr' " src='assets/images/icons-profile.svg'></ion-icon>
|
||||
<ion-icon class="font-45" *ngIf="profile == 'pr' " src='assets/images/icons-profile-pr-header.svg'></ion-icon>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -40,7 +39,7 @@
|
||||
|
||||
<div class="tab mr-20 d-flex align-center" (click)="changeRoute('/home/publications')" [class.active]="locationPathname() == '/home/publications'">
|
||||
<ion-icon class="font-40" src='assets/images/icons-nav-a-es-inactive.svg'></ion-icon>
|
||||
<span>Ações</span>
|
||||
<span>Acções</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user