Adds date navigation to scheduled events
Implements date navigation for scheduled events, allowing users to view events for different days. This change replaces the static "Today's Events" section with a dynamic date selector. It introduces buttons for navigating to the previous and next days, as well as a "Today" button to return to the current date. A date display shows the selected date, and a message indicates when there are no scheduled events for a given day.
This commit is contained in:
parent
b368d58d83
commit
b104681345
3 changed files with 137 additions and 23 deletions
|
|
@ -31,6 +31,15 @@ export function useScheduledEvents() {
|
|||
return scheduledEventService.getEventsForDate(date)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get events for a specific date (filtered by current user participation)
|
||||
* @param date - ISO date string (YYYY-MM-DD). Defaults to today.
|
||||
*/
|
||||
const getEventsForSpecificDate = (date?: string): ScheduledEvent[] => {
|
||||
if (!scheduledEventService) return []
|
||||
return scheduledEventService.getEventsForSpecificDate(date, currentUserPubkey.value)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get today's scheduled events (filtered by current user participation)
|
||||
*/
|
||||
|
|
@ -141,6 +150,7 @@ export function useScheduledEvents() {
|
|||
// Methods
|
||||
getScheduledEvents,
|
||||
getEventsForDate,
|
||||
getEventsForSpecificDate,
|
||||
getTodaysEvents,
|
||||
getCompletion,
|
||||
isCompleted,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue