16 lines
372 B
TypeScript
16 lines
372 B
TypeScript
import type { TenantEvent } from '../../api';
|
|
|
|
export type EventListStats = {
|
|
photos: number;
|
|
guests: number;
|
|
tasks: number;
|
|
};
|
|
|
|
export function buildEventListStats(event: TenantEvent): EventListStats {
|
|
return {
|
|
photos: event.photo_count ?? 0,
|
|
guests: event.active_invites_count ?? event.total_invites_count ?? 0,
|
|
tasks: event.tasks_count ?? 0,
|
|
};
|
|
}
|