This commit is contained in:
Peter Maquiran
2023-07-20 16:54:58 +01:00
parent 880f154ea2
commit 4d7c80a739
49 changed files with 1114 additions and 432 deletions
+20 -3
View File
@@ -105,6 +105,8 @@ export class EventsService {
this.calendarNamesAry = []
this.calendarNamesType = {}
this.calendarNamesAryNoPr = []
this.calendarNamesAryPR = []
this.hasSharedCalendar = false
this.hasSharedOficial = false
@@ -269,8 +271,6 @@ export class EventsService {
this.calendarNamesType['Meu calendario']['RoleId'] = OwnerCalendar.CalendarRoleId
this.calendarNamesType['Meu calendario']['OwnerId'] = OwnerCalendar.OwnerUserId || SessionStore.user.UserId
}
for (let sharedCalendar of SessionStore.user.SharedCalendars) {
this.hasAnyCalendar = true
if(sharedCalendar?.OwnerUserId) {
@@ -388,6 +388,24 @@ export class EventsService {
}
detectCalendarNameByCalendarId(calendarId) {
for ( const property in this.calendarNamesType) {
if(this.calendarNamesType[property]?.['Oficial']) {
if(this.calendarNamesType[property]['OficialId'] == calendarId) {
return property
}
}
if (this.calendarNamesType[property]?.['Pessoal']) {
if(this.calendarNamesType[property]['PessoalId'] == calendarId) {
return property
}
}
}
}
getAllPrOficialEvents(startdate: string, enddate: string): Observable<EventList[]> {
let geturl = environment.apiURL + 'calendar/pr';
@@ -1155,7 +1173,6 @@ export class EventsService {
return this.http.post<any>(`${geturl}`, body, options)
}
genericPostExpedientEvent(docId: any, body: any, sharedagenda: string, serialNumber: any, applicationID: any, CalendarId) {
const geturl = environment.apiURL + 'calendar/expediente';
let params = new HttpParams();