mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
ITOTEAM-525 no mobile ao adicionar attachments aparece um sem título
This commit is contained in:
@@ -37,6 +37,8 @@ export class MetricsInterceptor implements HttpInterceptor {
|
||||
if (event instanceof HttpResponse) {
|
||||
// Capture the status code and check protocol
|
||||
if (req.method !== 'GET' && !req.urlWithParams.includes('metrics')) {
|
||||
|
||||
console.log('response', event.body)
|
||||
const path = req.urlWithParams;
|
||||
const url = new URL(path);
|
||||
if (window.location.protocol !== 'https:') {
|
||||
|
||||
@@ -123,7 +123,7 @@ export class ViewEventPage implements OnInit {
|
||||
ev.target.complete();
|
||||
}
|
||||
|
||||
@XTracerAsync({name:'ViewEventPage/loadEvent', bugPrint: true})
|
||||
@XTracerAsync({name:'mobile/loadEvent', bugPrint: true})
|
||||
async loadEvent(tracing?: TracingType) {
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
|
||||
@@ -678,7 +678,7 @@ export class AgendaPage implements OnInit {
|
||||
});
|
||||
};
|
||||
|
||||
@XTracerAsync({name:'AgendaPage/loadRangeEventRun', bugPrint: true})
|
||||
@XTracerAsync({name:'AgendaPage/loadRange', bugPrint: true})
|
||||
async loadRangeEventRun(startTime: Date, endTime: Date, tracing?: TracingType) {
|
||||
|
||||
tracing.addEvent('load range start')
|
||||
|
||||
@@ -459,7 +459,7 @@ export class EditEventPage implements OnInit {
|
||||
await this.saveDocument()
|
||||
|
||||
if (this.addedAttachmentsList.length > 0) {
|
||||
this.agendaDataRepository.addEventAttachment(this.postEvent.EventId, this.loadedEventAttachments).subscribe((value) => {
|
||||
this.agendaDataRepository.addEventAttachment(this.postEvent.EventId, this.loadedEventAttachments, tracing).subscribe((value) => {
|
||||
console.log(value)
|
||||
}, ((error) => {
|
||||
console.log('add attachment error: ', error)
|
||||
|
||||
@@ -177,7 +177,7 @@ export class EventListPage implements OnInit {
|
||||
this.LoadToApproveEvents();
|
||||
}
|
||||
|
||||
@XTracerAsync({name:'EventListPage/LoadToApproveEvents', bugPrint: true})
|
||||
@XTracerAsync({name:'EventListPage/LoadToApprove', bugPrint: true})
|
||||
async LoadToApproveEvents(tracing?: TracingType) {
|
||||
console.log('aprove event')
|
||||
this.showLoader = true;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ export class TaskService {
|
||||
}
|
||||
|
||||
|
||||
@XTracerAsync({name:'taskService/loadEventosParaAprovacao', bugPrint: true})
|
||||
@XTracerAsync({name:'taskService/loadEventParaAprovacao', bugPrint: true})
|
||||
async loadEventosParaAprovacao(tracing?: TracingType) {
|
||||
this.showLoaderNum++
|
||||
console.log('PR')
|
||||
|
||||
@@ -392,7 +392,7 @@ export class EditEventToApprovePage implements OnInit {
|
||||
}));
|
||||
|
||||
if (this.addedAttachmentsList.length > 0) {
|
||||
this.agendaDataRepository.addEventAttachment(this.eventProcess.serialNumber, this.loadedAttachments).subscribe((value) => {
|
||||
this.agendaDataRepository.addEventAttachment(this.eventProcess.serialNumber, this.loadedAttachments, tracing).subscribe((value) => {
|
||||
console.log(value)
|
||||
}, ((error) => {
|
||||
this.showLoader = false
|
||||
|
||||
@@ -457,7 +457,7 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
|
||||
if (this.addedAttachmentsList.length > 0) {
|
||||
this.agendaDataRepository.addEventAttachment(this._postEvent.EventId, this.loadedEventAttachments).subscribe((value) => {
|
||||
this.agendaDataRepository.addEventAttachment(this._postEvent.EventId, this.loadedEventAttachments, tracing).subscribe((value) => {
|
||||
console.log(value)
|
||||
}, ((error) => {
|
||||
this.showLoader = false
|
||||
|
||||
@@ -334,7 +334,7 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
|
||||
|
||||
if (this.addedAttachmentsList.length > 0) {
|
||||
this.agendaDataRepository.addEventAttachment(this.eventProcess.serialNumber, this.loadedAttachments).subscribe((value) => {
|
||||
this.agendaDataRepository.addEventAttachment(this.eventProcess.serialNumber, this.loadedAttachments, tracing).subscribe((value) => {
|
||||
console.log(value)
|
||||
}, ((error) => {
|
||||
this.showLoader = false
|
||||
|
||||
Reference in New Issue
Block a user