Skip to content

Dashboard

  • Route: src/routes/secure/dashboard/+page.svelte
  • Feature: src/features/dashboard/index.svelte (+ partials/, svc/)

Overview

The Dashboard is the main landing page — a two-panel view combining event scheduling (upcoming events) and contact management (recent contacts). Users can start/join events, create or edit events, call or message contacts, and manage favourites.

Views are permission-aware: event actions require ManageEvents, the recent-contacts panel is gated by ViewRecentCalls, and chat/message actions require Chat.

Core Features

1. Events

  • View upcoming events (readUpcomingEvents(minutesBefore = 60)).
  • One-tap start on the SignalR hub (initEvent) to jump straight into a call.
  • Create / edit events via Event Form.

2. Contacts

  • Recent contacts with online presence (userStatus hub subscription).
  • Favourite toggling, contact details, and call/message actions.

Module Functions (svc/index.ts)

ts
export async function readRecentContacts(search?: string): Promise<{ success, data?... }>
export async function setFavourite(contactId: number, isFavourite: boolean): Promise<{ success }>
export async function readUpcomingEvents(minutesBefore = 60): Promise<{ success, data?... }>
export async function createEvent(payload: CreateEventCommandInput): Promise<{ success }>
export async function updateEvent(payload: UpdateEventCommandInput): Promise<{ success }>

Each wraps a Houdini-generated store from svc/*.gql (createEvent.gql, getRecentContact.gql, getUpcomingEvent.gql, setFavorite.gql, updateEvent.gql).

UI Structure

svelte
<div class="grid grid-cols-1 sm:grid-cols-2 ...">
  <CardHolder> <!-- upcoming events + EventCard list --> </CardHolder>
  <CardHolder> <!-- recent contacts + ContactBox list --> </CardHolder>
</div>

Partials: CardHolder.svelte, CardShimmer.svelte (skeleton loader), EventCard.svelte.

Behavior

  • Presence updates arrive over the hub (userStatus) and refresh the contact list.
  • Starting an event calls hub initEvent and navigates to /secure/events/{eventId}.
  • Favourite changes update the list optimistically.

Released under the MIT License.