mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix duplication events
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
import { EventOutputDTO } from "../model/eventDTOOutput"
|
||||
|
||||
function getTextInsideParentheses(inputString) {
|
||||
var startIndex = inputString.indexOf('(');
|
||||
var endIndex = inputString.indexOf(')');
|
||||
if (startIndex !== -1 && endIndex !== -1) {
|
||||
return inputString.substring(startIndex + 1, endIndex);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export class EventMapper {
|
||||
|
||||
constructor() {}
|
||||
@@ -25,9 +35,10 @@ export class EventMapper {
|
||||
EmailAddress: e.emailAddress,
|
||||
Name: e.name,
|
||||
IsRequired: e.attendeeType == '0' ? true : false,
|
||||
//IsRequired: e.attendeeType == 'Acknowledgment',
|
||||
UserType: "GD",
|
||||
// "IsPR": false,
|
||||
Acknowledgment: e.attendeeType == '0' ? true : false,
|
||||
// Acknowledgment: e.attendeeType == '0' ? true : false,
|
||||
// "RoleDescription": null,
|
||||
// "RoleId": 0
|
||||
})),
|
||||
@@ -35,7 +46,7 @@ export class EventMapper {
|
||||
"IsRecurring": dto.isRecurring,
|
||||
"IsAllDayEvent": dto.isAllDayEvent,
|
||||
"AppointmentState": 1,
|
||||
"TimeZone": "UTC",
|
||||
"TimeZone": getTextInsideParentheses(new Date(dto.startDate)+ ''),
|
||||
"Organizer": {
|
||||
"Id": dto.organizer.wxUserId,
|
||||
"EmailAddress": dto.organizer.wxeMail,
|
||||
|
||||
Reference in New Issue
Block a user