feat: add time-of-day controls to scheduled reports UI

Add send hour, day of week/month selectors to report schedule modal.
Schedule cards now show descriptive delivery times like
"Every Monday at 9:00 AM (UTC)". Timezone picker moved into modal.
This commit is contained in:
Usman Baig
2026-03-12 15:17:46 +01:00
parent c6ec4671a4
commit 27a9836d5a
2 changed files with 106 additions and 1 deletions

View File

@@ -10,6 +10,9 @@ export interface ReportSchedule {
timezone: string
enabled: boolean
report_type: 'summary' | 'pages' | 'sources' | 'goals'
send_hour: number
send_day: number | null
next_send_at: string | null
last_sent_at: string | null
last_error: string | null
created_at: string
@@ -30,6 +33,8 @@ export interface CreateReportScheduleRequest {
frequency: string
timezone?: string
report_type?: string
send_hour?: number
send_day?: number
}
export interface UpdateReportScheduleRequest {
@@ -39,6 +44,8 @@ export interface UpdateReportScheduleRequest {
timezone?: string
report_type?: string
enabled?: boolean
send_hour?: number
send_day?: number
}
export async function listReportSchedules(siteId: string): Promise<ReportSchedule[]> {