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