mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
list events
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
import { EventOutputDTO } from "../model/eventDTOOutput"
|
||||
|
||||
export class EventMapper {
|
||||
|
||||
constructor() {}
|
||||
static toDomain(dto: EventOutputDTO) {
|
||||
|
||||
return {
|
||||
"HasAttachments": dto.hasAttachments,
|
||||
"EventComunicationId": 1682,
|
||||
"EventId": dto.id,
|
||||
"Subject": dto.subject,
|
||||
"Body": {
|
||||
"BodyType": 1,
|
||||
"Text": dto.body
|
||||
},
|
||||
"Location": dto.location,
|
||||
"CalendarId": "",
|
||||
"CalendarName": dto.category,
|
||||
"StartDate": dto.startDate,
|
||||
"EndDate": dto.endDate,
|
||||
"EventType": "Single",
|
||||
"Attendees": dto.attendees.map((e) => ({
|
||||
Id: e.id,
|
||||
EmailAddress: e.emailAddress,
|
||||
Name: e.name,
|
||||
IsRequired: e.attendeeType == '0' ? true : false,
|
||||
UserType: "GD",
|
||||
// "IsPR": false,
|
||||
Acknowledgment: e.attendeeType == '0' ? true : false,
|
||||
// "RoleDescription": null,
|
||||
// "RoleId": 0
|
||||
})),
|
||||
"IsMeeting": dto.category,
|
||||
"IsRecurring": dto.isRecurring,
|
||||
"IsAllDayEvent": dto.isAllDayEvent,
|
||||
"AppointmentState": 1,
|
||||
"TimeZone": "UTC",
|
||||
"Organizer": {
|
||||
"Id": dto.organizer.wxUserId,
|
||||
"EmailAddress": dto.organizer.wxeMail,
|
||||
"Name": dto.organizer.wxFullName,
|
||||
"IsRequired": true,
|
||||
"UserType": 'GD',
|
||||
"IsPR": dto.ownerType == 'PR',
|
||||
//"Entity": null,
|
||||
"Acknowledgment": true,
|
||||
//"RoleDescription": null,
|
||||
//"RoleId": 0
|
||||
},
|
||||
"InstanceId": null,
|
||||
"Category": dto.type,
|
||||
"EventRecurrence": {
|
||||
"Type": -1,
|
||||
"Day": null,
|
||||
"DayOfWeek": null,
|
||||
"Month": null,
|
||||
"LastOccurrence": null
|
||||
},
|
||||
"Attachments": dto.attachments.map( e => ({
|
||||
"Id": e.sourceId,
|
||||
// "ParentId": "AAMkADVhOGY3ZDQzLTg4ZGEtNDYxMC1iMzc5LTJkMDgwNjMxOWFlZQBGAAAAAABEDW9nKs69TKQcVqQURj8YBwBR2HR2eO7pSpNdD9cc70l+AAAAAAFKAABR2HR2eO7pSpNdD9cc70l+AACK2OeJAAA=",
|
||||
// "Source": 1,
|
||||
"SourceId": e.sourceId,
|
||||
// "Description": "teste pp",
|
||||
"SourceName": e.sourceName,
|
||||
// "CreateDate": "2024-05-24 16:41",
|
||||
// "Stakeholders": "",
|
||||
// "Link": "",
|
||||
// "Data": null,
|
||||
"ApplicationId": e.applicationId,
|
||||
// "FileSize": 301208
|
||||
|
||||
})),
|
||||
"IsPrivate": dto.isPrivate
|
||||
}
|
||||
}
|
||||
|
||||
static toDTO(data: any): any {
|
||||
return {}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user