This commit is contained in:
Peter Maquiran
2022-04-13 15:55:50 +01:00
parent 8970d4579d
commit b9031c71dd
5 changed files with 75 additions and 30 deletions
+2 -2
View File
@@ -94,7 +94,7 @@
</div>
</div>
</ion-item-sliding>
<ion-item-sliding *ngIf=" wsChatMethodsService.dmCount < 1">
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true">
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-chat-grey.svg"></ion-icon></div>
<div class="item-content flex-grow-1 cursor-pointer">
@@ -150,7 +150,7 @@
</div>
</div>
</ion-item-sliding>
<ion-item-sliding *ngIf="wsChatMethodsService.groupCount < 1">
<ion-item-sliding *ngIf="wsChatMethodsService.loadingWholeList == true">
<div *ngFor="let n of numSequence(8); let i = index;" class="item item-hover width-100 d-flex ion-no-padding ion-no-margin">
<div class="item-icon"><ion-icon class="icon" slot="start" src="assets/icon/icons-group-chat-grey.svg"></ion-icon></div>
<div class="item-content flex-grow-1 cursor-pointer">
@@ -37,7 +37,7 @@
</div>
</div>
<div class="container-div" >
<div class="container-div" *ngIf="calendarService.hasOwnCalendar == true && calendarService.hasSharedCalendar == true" >
<div class="ion-item-class-2 d-flex">
<div class="ion-icon-class">
<ion-icon slot="start" src="assets/images/icons-calendar.svg"></ion-icon>
@@ -127,11 +127,12 @@ export class BookMeetingModalPage implements OnInit {
private navParams: NavParams,
private processes:ProcessesService,
private attachmentsService: AttachmentsService,
private calendarService: EventsService,
public calendarService: EventsService,
authService: AuthService,
private toastService: ToastService,
private activatedRoute: ActivatedRoute,
public ThemeService: ThemeService
public ThemeService: ThemeService,
) {
this.taskParticipants = [];
this.loggeduser = authService.ValidatedUser;
@@ -149,6 +150,18 @@ export class BookMeetingModalPage implements OnInit {
this.postData.Category = 'Reunião'
if(this.calendarService.hasOwnCalendar == false || !this.calendarService.hasSharedCalendar == false) {
if(this.calendarService.hasOwnCalendar == false && this.calendarService.hasSharedCalendar == true) {
this.CalendarName = 'sharedCalendar'
} else if (this.calendarService.hasOwnCalendar == true && this.calendarService.hasSharedCalendar == false) {
this.CalendarName = 'myCalendar'
}
}
}
ngOnInit() {
@@ -265,19 +278,12 @@ export class BookMeetingModalPage implements OnInit {
if(this.task.FsId == '8') {
const loader = this.toastService.loading()
try {
switch (this.loggeduser.Profile) {
case 'MDGPR':
await this.calendarService.postExpedientEvent(this.task.DocId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise();
break;
case 'PR':
await this.calendarService.postExpedientEvent(this.task.DocId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise()
break;
}
await this.calendarService.genericPostExpedientEvent(this.task.DocId, this.postData, "",this.task.SerialNumber, this.task.FsId, this.CalendarName).toPromise();
this.modalController.dismiss();
// this.distartExpedientModal();
this.toastService._successMessage('Reunião criada');
} catch (error) {
@@ -293,15 +299,9 @@ export class BookMeetingModalPage implements OnInit {
const loader = this.toastService.loading()
try {
switch (this.loggeduser.Profile) {
case 'MDGPR':
await this.calendarService.createTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "md",this.task.SerialNumber, this.task.FsId).toPromise();
break;
case 'PR':
await this.calendarService.createTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "pr",this.task.SerialNumber, this.task.FsId).toPromise();
break;
}
await this.calendarService.genericCreateTaskEvent(this.task.FolderID | this.task.FolderId, this.postData, "",this.task.SerialNumber, this.task.FsId, this.CalendarName).toPromise();
this.close();
this.toastService._successMessage('Reunião criada');
+46 -1
View File
@@ -866,7 +866,7 @@ export class EventsService {
genericPostExpedientEvent(docId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any, calendar: 'myCalendar' | 'sharedCalendar') {
const geturl = environment.apiURL + 'calendar/' + ((sharedagenda != '') ? sharedagenda : 'CreateEventExpediente') + '/event';
const geturl = environment.apiURL + 'calendar/expediente';
let params = new HttpParams();
let options;
@@ -948,6 +948,51 @@ export class EventsService {
return this.http.post<any>(`${geturl}`, body, options)
}
genericCreateTaskEvent(folderId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any, calendar: 'myCalendar' | 'sharedCalendar') {
const geturl = environment.apiURL + 'calendar/dispatch';
let params = new HttpParams();
let options;
params = params.set("FolderId", folderId);
params = params.set("SerialNumber", serialNumber);
params = params.set("applicationID", applicationID);
if(calendar == 'myCalendar') {
if (body.CalendarName == 'Pessoal') {
options = {
headers: this.headerOwnPessoal,
params: params
}
}
else if (body.CalendarName == 'Oficial') {
options = {
headers: this.headerOwnOficial,
params: params
}
}
} else if (calendar == 'sharedCalendar') {
if (body.CalendarName == 'Pessoal') {
options = {
headers: this.headerSharedPessoal,
params: params
};
}
else if (body.CalendarName == 'Oficial') {
options = {
headers: this.headerSharedOficial,
params: params
};
}
}
return this.http.post<any>(`${geturl}`, body, options)
}
postEventToApproveEdit(body: EventToApproveEdit) {
const geturl = environment.apiURL + 'Tasks/EditEventTask';
+6 -6
View File
@@ -21,12 +21,12 @@
export const environment = {
production: false,
apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/',
apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket',
//apiChatUrl: 'https://www.tabularium.pt/api/v1/',
//apiWsChatUrl: 'wss://www.tabularium.pt/websocket',
//apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
//apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/',
//apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket',
apiChatUrl: 'https://www.tabularium.pt/api/v1/',
apiWsChatUrl: 'wss://www.tabularium.pt/websocket',
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
domain: 'gabinetedigital.local', //gabinetedigital.local
defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local