mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
ITOTEAM-525 no mobile ao adicionar attachments aparece um sem título
This commit is contained in:
@@ -22,6 +22,7 @@ import { SharedCalendarListDetectChanges } from './async/change/shareCalendarCha
|
||||
import { SharedCalendarListItemOutputDTO } from './model/sharedCalendarOutputDTO';
|
||||
import { EventInputDTOSchema } from './agendaDataModels';
|
||||
import { EventUpdateInputDTOSchema } from './model/eventUpdateInputDtO';
|
||||
import { AttachInputDTOSchema } from './model/addAttachmentDTOInput';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -221,16 +222,22 @@ export class AgendaDataRepositoryService {
|
||||
return this.agendaDataService.updateEvent(eventId, eventInput)
|
||||
}
|
||||
|
||||
addEventAttendee(id, attendeeData,) {
|
||||
addEventAttendee(id, attendeeData) {
|
||||
console.log(attendeeData)
|
||||
console.log(this.utils.attendeesEdit(attendeeData))
|
||||
|
||||
|
||||
return this.agendaDataService.addEventAttendee(id, { attendees: this.utils.attendeesAdded(attendeeData) });
|
||||
}
|
||||
|
||||
addEventAttachment(id, attachmentData) {
|
||||
addEventAttachment(id, attachmentData, tracing: TracingType) {
|
||||
console.log(attachmentData)
|
||||
console.log('post attachment', this.utils.documentAdded(attachmentData))
|
||||
return this.agendaDataService.addEventAttachment(id, { attachments: this.utils.documentAdded(attachmentData) });
|
||||
|
||||
const attachments = { attachments: this.utils.documentAdded(attachmentData) }
|
||||
console.log('post attachment', attachments)
|
||||
|
||||
APINODReturn(AttachInputDTOSchema, attachments, `POST/${id}/Attendee`, tracing)
|
||||
return this.agendaDataService.addEventAttachment(id, attachments);
|
||||
}
|
||||
|
||||
deleteEvent(eventId,deleteAll) {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const AttachInputDTOSchema = z.object({
|
||||
attachments: z.array(z.object({
|
||||
docId: z.any(),
|
||||
sourceName: z.any(),
|
||||
description: z.any(),
|
||||
applicationId: z.any(),
|
||||
}))
|
||||
|
||||
})
|
||||
|
||||
export type AttachInputDTO = z.infer<typeof AttachInputDTOSchema>
|
||||
@@ -84,7 +84,7 @@ export class Utils {
|
||||
documents.forEach(element => {
|
||||
let object = {
|
||||
docId: element.docId || element.DocId,
|
||||
sourceName: element.subject || element.sourceNames || element.Description,
|
||||
sourceName: element.subject || element.sourceNames || element.Description || element.SourceNames,
|
||||
description: "",
|
||||
applicationId: element.applicationId || element.ApplicationId
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user