teste mobile done!

This commit is contained in:
Eudes Inácio
2024-06-04 09:38:11 +01:00
parent 9265622e65
commit 9fcf116102
19 changed files with 468 additions and 281 deletions
@@ -25,6 +25,8 @@ export class AgendaDataRepositoryService {
try {
const result = await this.agendaDataService.getEvent(id).pipe(
map((response) => {
console.log('Response',response.data)
console.log('Output',EventMapper.toDomain(response.data))
return EventMapper.toDomain(response.data)
})
).toPromise()
@@ -91,7 +93,7 @@ export class AgendaDataRepositoryService {
type: this.utils.calendarTypeSeleted(eventData.Category),
category: this.utils.calendarCategorySeleted(eventData.CalendarName),
attendees: this.utils.attendeesAdded(eventData.Attendees),
attachments: documents,
attachments: this.utils.documentAdded(documents),
recurrence: {
frequency: 0,
occurrences: 0,
@@ -130,7 +132,7 @@ export class AgendaDataRepositoryService {
}
addEventAttachment(id,attachmentData) {
return this.agendaDataService.addEventAttachment(id,attachmentData);
return this.agendaDataService.addEventAttachment(id,{ attachments: this.utils.documentAdded(attachmentData) });
}
deleteEvent(eventId) {
@@ -25,10 +25,10 @@ export class EventMapper {
wxUserId: e.wxUserId,
EmailAddress: e.emailAddress,
Name: e.name,
IsRequired: e.attendeeType == '0' ? true : false,
IsRequired: e.attendeeType == 'Required',
UserType: "GD",
// "IsPR": false,
Acknowledgment: e.attendeeType == '0' ? true : false,
attendeeType: e.attendeeType
// "RoleDescription": null,
// "RoleId": 0
})),
@@ -72,9 +72,10 @@ export class EventToApproveDetailsMapper {
...dto.attendees.map( e => ({
Name: e.name,
EmailAddress: e.emailAddress,
IsRequired: e.attendeeType == '0' ? true : false,
IsRequired: e.attendeeType == 'Required',
UserType: "GD",
wxUserId: e.wxUserId
wxUserId: e.wxUserId,
attendeeType: e.attendeeType
}))
],
//"EventOrganizer": "{\"$type\":\"GabineteDigital.k2RESTidentifier_EventPerson, GabineteDigital, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\",\"EmailAddress\":\"agenda.mdgpr@gabinetedigital.local\",\"Name\":\"Agenda do Ministro e Director do Gabinete do PR\",\"IsRequired\":true}",
@@ -104,6 +105,7 @@ export class EventToApproveDetailsMapper {
"Documents": null,
"PrivateMessage": null,
Attachments: dto.attachments.map( e => ({
id: e.id,
DocId: e.docId,
Description: e.sourceName,
Stakeholders: '',
@@ -7,7 +7,7 @@ export const AttachmentInputDTOSchema = z.object({
description: z.string().nullable(),
applicationId: z.number().int(),
}).strict();
const EAttendeeTypeDTO = z.enum(["0", "1", "2"]);
const EAttendeeTypeDTO = z.enum(["Required", "Acknowledgment", "Optional"]);
const CommentSchema = z.object({
+3 -3
View File
@@ -64,10 +64,10 @@ export class Utils {
console.log('added doc create event',documents)
return documents.map((e) => {
return {
docId: parseInt(e.Id),
sourceName: e.Assunto,
docId: e.docId,
sourceName: e.subject || e.sourceNames,
description: "",
applicationId: parseInt(JSON.stringify(e.ApplicationType))
applicationId: e.applicationId
};
});