mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
ITOTEAM-525 data validation
This commit is contained in:
@@ -212,7 +212,7 @@ export class ProfilePage implements OnInit {
|
||||
return time;
|
||||
}
|
||||
|
||||
@XTracer({name:'profile/notificatinsRoutes', bugPrint: true, module:'notification'})
|
||||
@XTracer({name:'profile/notificationClick', bugPrint: true, module:'notification'})
|
||||
notificatinsRoutes (index, Service, Object, IdObject, FolderId, i, tracing?: TracingType) {
|
||||
|
||||
console.log(index, i)
|
||||
|
||||
@@ -123,7 +123,7 @@ export class ViewEventPage implements OnInit {
|
||||
ev.target.complete();
|
||||
}
|
||||
|
||||
@XTracerAsync({name:'mobile/loadEvent', bugPrint: true})
|
||||
@XTracerAsync({name:'mobile/loadEventDetails', bugPrint: true})
|
||||
async loadEvent(tracing?: TracingType) {
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
|
||||
@@ -425,7 +425,7 @@ export class EditEventPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
@XTracerAsync({name:'desktop/create-event', bugPrint: true, daley: 4000})
|
||||
@XTracerAsync({name:'mobile/create-event', bugPrint: true, daley: 4000})
|
||||
async save_v2(editAllEvent, tracing?: TracingType) {
|
||||
this.injectValidation()
|
||||
this.runValidation()
|
||||
@@ -604,7 +604,7 @@ export class EditEventPage implements OnInit {
|
||||
|
||||
if (this.postEvent.HasAttachments) {
|
||||
this.attachmentsService.getAttachmentsById(eventId).subscribe(res => {
|
||||
this.loadedEventAttachments = res;
|
||||
// this.loadedEventAttachments = res;
|
||||
|
||||
}, ((erro) => {
|
||||
console.error('editgetAttchament', erro)
|
||||
|
||||
@@ -193,7 +193,7 @@ export class ViewEventPage implements OnInit {
|
||||
this.TimeZoneString = this.loadedEvent.TimeZone
|
||||
}
|
||||
|
||||
@XTracerAsync({name:'ViewEventPage/loadEvent', bugPrint: true})
|
||||
@XTracerAsync({name:'mobile/loadEventDetails', bugPrint: true})
|
||||
async loadEvent(tracing?: TracingType) {
|
||||
const loader = this.toastService.loading();
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ export const AttachInputDTOSchema = z.object({
|
||||
attachments: z.array(z.object({
|
||||
docId: z.any(),
|
||||
sourceName: z.any(),
|
||||
description: z.any(),
|
||||
description: z.any().nullable(),
|
||||
applicationId: z.any(),
|
||||
}))
|
||||
|
||||
|
||||
@@ -83,15 +83,17 @@ export class Utils {
|
||||
let listupdate = []
|
||||
documents.forEach(element => {
|
||||
let object = {
|
||||
docId: element.docId || element.DocId,
|
||||
sourceName: element.subject || element.sourceNames || element.Description || element.SourceNames,
|
||||
docId: element.docId || element.DocId || element.Id,
|
||||
sourceName: element.subject || element.sourceNames || element.Description || element.SourceName,
|
||||
description: "",
|
||||
applicationId: element.applicationId || element.ApplicationId
|
||||
}
|
||||
|
||||
listupdate.push(object)
|
||||
});
|
||||
return listupdate
|
||||
|
||||
return listupdate.filter( e=> typeof e.docId == 'number')
|
||||
|
||||
/* return documents.map((e) => {
|
||||
return {
|
||||
docId: e.docId,
|
||||
|
||||
@@ -313,7 +313,7 @@ export class TaskService {
|
||||
}
|
||||
|
||||
|
||||
@XTracerAsync({name:'taskService/loadEventParaAprovacao', bugPrint: true})
|
||||
@XTracerAsync({name:'taskService/loadEventToAprove', bugPrint: true})
|
||||
async loadEventosParaAprovacao(tracing?: TracingType) {
|
||||
this.showLoaderNum++
|
||||
console.log('PR')
|
||||
|
||||
@@ -136,7 +136,8 @@ export class EditEventToApprovePage implements OnInit {
|
||||
private toastService: ToastService,
|
||||
public ThemeService: ThemeService,
|
||||
public httpErrorHandler: HttpErrorHandle,
|
||||
private agendaDataRepository: AgendaDataRepositoryService
|
||||
private agendaDataRepository: AgendaDataRepositoryService,
|
||||
private httpErroHalde: HttpErrorHandle,
|
||||
) {
|
||||
this.isEventEdited = false;
|
||||
}
|
||||
@@ -153,28 +154,42 @@ export class EditEventToApprovePage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
async getTask() {
|
||||
|
||||
async getTask(tracing?: TracingType) {
|
||||
|
||||
const res: any = await this.agendaDataRepository.getEventToApproveById(this.serialNumber)
|
||||
console.log('evento to apro to edit', res.value)
|
||||
this.eventProcess = res.value;
|
||||
const res = await this.agendaDataRepository.getEventToApproveById(this.serialNumber)
|
||||
if(res.isOk()) {
|
||||
console.log('evento to apro to edit', res.value)
|
||||
this.eventProcess = res.value as any;
|
||||
|
||||
this.eventProcess.workflowInstanceDataFields.LastOccurrence = new Date(this.eventProcess.workflowInstanceDataFields.LastOccurrence)
|
||||
|
||||
this.restoreDatepickerData()
|
||||
|
||||
// description
|
||||
|
||||
try {
|
||||
let body: any = this.eventProcess.workflowInstanceDataFields?.Body?.replace(/<[^>]+>/g, '')
|
||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||
|
||||
} catch (error) {}
|
||||
|
||||
this.eventProcess.workflowInstanceDataFields.Category = this.setEventType(this.eventProcess.workflowInstanceDataFields.EventType)
|
||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||
this.loadedAttachments = res.value.Attachments;
|
||||
console.log(this.loadedAttachments)
|
||||
|
||||
this.setOtherData()
|
||||
|
||||
this.saveTemporaryData()
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
|
||||
this.eventProcess.workflowInstanceDataFields.LastOccurrence = new Date(this.eventProcess.workflowInstanceDataFields.LastOccurrence)
|
||||
|
||||
this.restoreDatepickerData()
|
||||
|
||||
// description
|
||||
let body: any = this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||
this.eventProcess.workflowInstanceDataFields.Category = this.setEventType(this.eventProcess.workflowInstanceDataFields.EventType)
|
||||
|
||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||
this.loadedAttachments = res.value.Attachments;
|
||||
console.log(this.loadedAttachments)
|
||||
|
||||
this.setOtherData()
|
||||
|
||||
this.saveTemporaryData()
|
||||
} else {
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing.bugFlag()
|
||||
this.httpErroHalde.httpStatusHandle(res.error)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getRecurrenceTypes() {
|
||||
|
||||
@@ -285,6 +285,7 @@
|
||||
</ion-label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-flex container-div width-100" >
|
||||
<ion-list class="width-100 ">
|
||||
<ion-item class="width-100" *ngFor="let document of loadedAttachments; let i = index">
|
||||
|
||||
@@ -149,7 +149,8 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
})
|
||||
}, 1000);
|
||||
|
||||
async getTask() {
|
||||
@XTracerAsync({name:'mobile/loadEventToApproveDetails', bugPrint: true})
|
||||
async getTask(tracing?: TracingType) {
|
||||
|
||||
/* const result = await this.processes.GetTask(this.serialNumber).toPromise(); */
|
||||
const res = await this.agendaDataRepository.getEventToApproveById(this.serialNumber)
|
||||
@@ -164,8 +165,13 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
this.endDate = new Date(this.eventProcess.workflowInstanceDataFields.EndDate);
|
||||
|
||||
// description
|
||||
let body: any = this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||
try {
|
||||
|
||||
let body: any = this.eventProcess.workflowInstanceDataFields.Body.replace(/<[^>]+>/g, '')
|
||||
this.eventProcess.workflowInstanceDataFields.Body = body
|
||||
|
||||
} catch (error) {}
|
||||
|
||||
this.Location = this.eventProcess.workflowInstanceDataFields.Location
|
||||
|
||||
this.InstanceId = this.eventProcess.workflowInstanceDataFields.InstanceId
|
||||
@@ -189,7 +195,10 @@ export class EditEventToApproveComponent implements OnInit {
|
||||
}
|
||||
})
|
||||
|
||||
tracing.setAttribute('outcome', 'success')
|
||||
} else {
|
||||
tracing.setAttribute('outcome', 'failed')
|
||||
tracing.bugFlag()
|
||||
this.httpErroHalde.httpStatusHandle(res.error)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
export let versionData = {
|
||||
"shortSHA": "536548af0",
|
||||
"SHA": "536548af0c7696fdc7384057cf856163459fe374",
|
||||
"shortSHA": "e1914505f",
|
||||
"SHA": "e1914505f2e3ab233df288f980a028ecbcf1e2ed",
|
||||
"branch": "feature/agenda-api-peter",
|
||||
"lastCommitAuthor": "'Peter Maquiran'",
|
||||
"lastCommitTime": "'Sat Jun 22 13:28:14 2024 +0100'",
|
||||
"lastCommitMessage": "ITOTEAM-525 send the rigth category and ownertype",
|
||||
"lastCommitNumber": "5837",
|
||||
"changeStatus": "On branch feature/agenda-api-peter\nYour branch is up to date with 'origin/feature/agenda-api-peter'.\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/interceptors/metter.interceptor.ts\n\tmodified: src/app/modals/view-event/view-event.page.ts\n\tmodified: src/app/pages/agenda/agenda.page.ts\n\tmodified: src/app/pages/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/gabinete-digital/event-list/event-list.page.ts\n\tmodified: src/app/services/Repositorys/Agenda/agenda-data-repository.service.ts\n\tnew file: src/app/services/Repositorys/Agenda/model/addAttachmentDTOInput.ts\n\tmodified: src/app/services/Repositorys/Agenda/utils.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts\n\tmodified: src/app/shared/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts",
|
||||
"lastCommitTime": "'Sat Jun 22 21:51:40 2024 +0100'",
|
||||
"lastCommitMessage": "ITOTEAM-525 no mobile ao adicionar attachments aparece um sem título",
|
||||
"lastCommitNumber": "5838",
|
||||
"changeStatus": "On branch feature/agenda-api-peter\nYour branch is ahead of 'origin/feature/agenda-api-peter' by 1 commit.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/modals/profile/profile.page.ts\n\tmodified: src/app/modals/view-event/view-event.page.ts\n\tmodified: src/app/pages/agenda/edit-event/edit-event.page.ts\n\tmodified: src/app/pages/agenda/view-event/view-event.page.ts\n\tmodified: src/app/services/Repositorys/Agenda/model/addAttachmentDTOInput.ts\n\tmodified: src/app/services/Repositorys/Agenda/utils.ts\n\tmodified: src/app/services/task.service.ts\n\tmodified: src/app/shared/agenda/edit-event-to-approve/edit-event-to-approve.page.ts\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.html\n\tmodified: src/app/shared/gabinete-digital/edit-event-to-approve/edit-event.page.ts\n\tmodified: version/git-version.ts",
|
||||
"changeAuthor": "peter.maquiran"
|
||||
}
|
||||
Reference in New Issue
Block a user