Merge branch 'feature/agenda-new-api-eudes' of https://bitbucket.org/equilibriumito/gabinete-digital-fo into feature/agenda-new-api-eudes

This commit is contained in:
Eudes Inácio
2024-06-17 11:05:37 +01:00
10 changed files with 135 additions and 55 deletions
@@ -83,13 +83,14 @@ export class AgendaDataRepositoryService {
if(isHttpError(e)) {
tracing?.setAttribute('status.code', e.status.toString())
} else {
console.error(e)
tracing?.setAttribute('map.error', JSON.stringify(e.error))
}
return err(e as HttpErrorResponse)
}
}
async eventToApproveList({ userId, startDate = null, endDate = null, status = EEventFilterStatus.Pending, category = null, type = null, calendarOwnerName = '' }) {
async eventToApproveList({ userId, startDate = null, endDate = null, status = EEventFilterStatus.Pending, category = null, type = null, calendarOwnerName = '' }, tracing?: TracingType) {
try {
const result = await this.agendaDataService.getEvents(userId, startDate = null, endDate = null, status, category = null, type = null).pipe(
@@ -100,6 +101,12 @@ export class AgendaDataRepositoryService {
return ok(result)
} catch (e) {
if(isHttpError(e)) {
tracing?.setAttribute('status.code', e.status.toString())
} else {
console.error(e)
tracing?.setAttribute('map.error', JSON.stringify(e.error))
}
return err(e as HttpErrorResponse)
}
}
@@ -54,10 +54,10 @@ export class AgendaDataService {
}
if(status == -1 || status == undefined) {
if(status != null || status != undefined) {
params = params.set('status', status);
}
if (startDate !== null && startDate !== undefined) {
params = params.set('startDate', startDate);
}