list event for today

This commit is contained in:
Peter Maquiran
2024-05-31 09:45:30 +01:00
parent 746db6f583
commit 4fad0e306f
2 changed files with 12 additions and 1 deletions
@@ -40,9 +40,18 @@ export class AgendaDataService {
}
getEvents(userId: number, startDate: string, endDate: string, status: number, category: string, type: string): Observable<any> {
const params = new HttpParams()
let params = new HttpParams()
.set('UserId', userId)
.set('Status', status)
if (startDate !== null && startDate !== undefined) {
params = params.set('startDate', startDate);
}
if (endDate !== null && endDate !== undefined) {
params = params.set('endDate', endDate);
}
return this.http.get<any>(`${this.baseUrl}/Events`, { params });
}