mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
ITOTEAM-525 data validation
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user