mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
bugs solved
This commit is contained in:
@@ -97,6 +97,7 @@ export class AgendaDataRepositoryService {
|
||||
}
|
||||
|
||||
createEvent(eventData: Event, CalendarName, documents) {
|
||||
console.log('create repository 1',eventData)
|
||||
|
||||
let eventInput = {
|
||||
userId: CalendarName,
|
||||
@@ -104,20 +105,22 @@ export class AgendaDataRepositoryService {
|
||||
subject: eventData.Subject,
|
||||
body: eventData.Body.Text,
|
||||
location: eventData.Location,
|
||||
startDate: eventData.StartDate.toISOString(),
|
||||
endDate: eventData.EndDate.toISOString(),
|
||||
startDate: this.utils.addOneHourToIsoString(eventData.StartDate.toISOString()),
|
||||
endDate: this.utils.addOneHourToIsoString(eventData.EndDate.toISOString()),
|
||||
type: this.utils.calendarTypeSeleted(eventData.Category),
|
||||
category: this.utils.calendarCategorySeleted(eventData.CalendarName),
|
||||
attendees: this.utils.attendeesAdded(eventData.Attendees),
|
||||
attachments: this.utils.documentAdded(documents),
|
||||
recurrence: {
|
||||
frequency: this.utils.eventRecurence(eventData.EventRecurrence.frequency),
|
||||
until: eventData.EndDate.toISOString(),
|
||||
until:((eventData.EventRecurrence.until === "") ? this.utils.addOneHourToIsoString(eventData.EndDate.toISOString()) : eventData.EventRecurrence.until),
|
||||
},
|
||||
organizerId: SessionStore.user.UserId,
|
||||
isAllDayEvent: eventData.IsAllDayEvent,
|
||||
}
|
||||
|
||||
console.log('create repository 2',eventInput)
|
||||
|
||||
return this.agendaDataService.createEvent(eventInput)
|
||||
}
|
||||
|
||||
@@ -152,8 +155,8 @@ export class AgendaDataRepositoryService {
|
||||
return this.agendaDataService.addEventAttachment(id, { attachments: this.utils.documentAdded(attachmentData) });
|
||||
}
|
||||
|
||||
deleteEvent(eventId) {
|
||||
return this.agendaDataService.deleteEvent(eventId, false)
|
||||
deleteEvent(eventId,deleteAll) {
|
||||
return this.agendaDataService.deleteEvent(eventId, deleteAll)
|
||||
}
|
||||
|
||||
removeEventAttachment(eventId, attachmentData) {
|
||||
|
||||
@@ -67,8 +67,8 @@ export class EventMapper {
|
||||
"DayOfWeek": null,
|
||||
"Month": null,
|
||||
"LastOccurrence": null,
|
||||
"frequency": dto.eventRecurrence.frequency,
|
||||
"until": dto.eventRecurrence.until
|
||||
"frequency": dto.eventRecurrence?.frequency,
|
||||
"until": dto.eventRecurrence?.until
|
||||
},
|
||||
"Attachments": dto.attachments.map( e => ({
|
||||
"Id": e.id,
|
||||
|
||||
@@ -176,4 +176,12 @@ export class Utils {
|
||||
}
|
||||
return selectedType[recurenceType];
|
||||
}
|
||||
|
||||
|
||||
addOneHourToIsoString(isoDateString) {
|
||||
let date = new Date(isoDateString);
|
||||
/* date.setHours(date.getHours()); */
|
||||
let newIsoDateString = date.toISOString();
|
||||
return newIsoDateString;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user