mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Event to approval bug solved
This commit is contained in:
@@ -60,6 +60,8 @@ export class AgendaDataRepositoryService {
|
||||
try {
|
||||
const result = await this.agendaDataService.getEvent(id).pipe(
|
||||
map((response) => {
|
||||
console.log('response',response)
|
||||
console.log('ToDomain',EventToApproveDetailsMapper.toDomain(response.data))
|
||||
return EventToApproveDetailsMapper.toDomain(response.data)
|
||||
})
|
||||
).toPromise()
|
||||
@@ -140,6 +142,7 @@ export class AgendaDataRepositoryService {
|
||||
}
|
||||
|
||||
updateEvent(eventId, eventData, editAllEvent) {
|
||||
console.log('Update event', eventData)
|
||||
let eventInput = {
|
||||
subject: eventData.Subject,
|
||||
body: eventData.Body.Text || eventData.Body,
|
||||
@@ -149,12 +152,13 @@ export class AgendaDataRepositoryService {
|
||||
isAllDayEvent: eventData.IsAllDayEvent,
|
||||
updateAllEvents: editAllEvent,
|
||||
type: this.utils.calendarTypeSeleted(eventData.Category),
|
||||
category: this.utils.calendarCategorySeleted(eventData.CalendarName),
|
||||
category: this.utils.calendarCategorySeleted(eventData.CalendarName || eventData.Agenda),
|
||||
recurrence: {
|
||||
frequency: this.utils.eventRecurence(eventData.EventRecurrence.frequency),
|
||||
until: ((eventData.EventRecurrence.until === "") ? this.utils.addOneHourToIsoString(eventData.EndDate.toISOString()) : eventData.EventRecurrence.until),
|
||||
}
|
||||
}
|
||||
console.log('Update event post', eventInput)
|
||||
return this.agendaDataService.updateEvent(eventId, eventInput)
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ export class EventToApproveDetailsMapper {
|
||||
"Status": "Active",
|
||||
"TimeZone": getTextInsideParentheses(new Date(dto.startDate)+ ''),
|
||||
"Agenda": category ,
|
||||
"EventType": "Reunião",
|
||||
"EventType": dto.type,
|
||||
//"EventID": "",
|
||||
//"HasAttachments": true,
|
||||
"ParticipantsList": [
|
||||
@@ -159,7 +159,11 @@ export class EventToApproveDetailsMapper {
|
||||
Stakeholders: '',
|
||||
CreateDate: '',
|
||||
ApplicationId: e.applicationId,
|
||||
}))
|
||||
})),
|
||||
eventRecurrence: {
|
||||
frequency: dto.eventRecurrence.frequency,
|
||||
until: dto.eventRecurrence.until
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export enum EEventType
|
||||
|
||||
|
||||
export enum EAttendeeType {
|
||||
Required,
|
||||
Required = 1,
|
||||
Acknowledgment,
|
||||
Optional
|
||||
}
|
||||
|
||||
@@ -78,10 +78,10 @@ export class Utils {
|
||||
let listupdate = []
|
||||
documents.forEach(element => {
|
||||
let object = {
|
||||
docId: element.docId,
|
||||
sourceName: element.subject || element.sourceNames,
|
||||
docId: element.docId || element.DocId,
|
||||
sourceName: element.subject || element.sourceNames || element.Description,
|
||||
description: "",
|
||||
applicationId: element.applicationId
|
||||
applicationId: element.applicationId || element.ApplicationId
|
||||
}
|
||||
|
||||
listupdate.push(object)
|
||||
|
||||
Reference in New Issue
Block a user