add filter

This commit is contained in:
Peter Maquiran
2024-06-17 10:33:35 +01:00
parent 54cdf512c0
commit 768dc10308
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);
}