mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
list event for today
This commit is contained in:
@@ -228,8 +228,10 @@ export class EventsPage implements OnInit {
|
||||
|
||||
let date = new Date();
|
||||
let month = date.getMonth() + 1;
|
||||
|
||||
let start = date.getFullYear() + "-" + month + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
||||
let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
|
||||
|
||||
if(SessionStore.user) {
|
||||
let onwEvent:any = await this.eventService.getAllOwnEvents(start, end).catch((error) => {
|
||||
this.showLoader = false;
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user