feature(dashboard,api): add timezone support

* feat(dashboard): add support for today, yesterday etc (timezones)

* fix(db): escape js dates

* fix(dashboard): ensure we support default timezone

* final fixes

* remove complete series and add sql with fill instead
This commit is contained in:
Carl-Gerhard Lindesvärd
2025-05-23 11:26:44 +02:00
committed by GitHub
parent 46bfeee131
commit 680727355b
48 changed files with 1817 additions and 758 deletions

View File

@@ -203,6 +203,7 @@ export const zOnboardingProject = z
website: z.boolean(),
app: z.boolean(),
backend: z.boolean(),
timezone: z.string().optional(),
})
.superRefine((data, ctx) => {
if (!data.organization && !data.organizationId) {
@@ -434,3 +435,9 @@ export const zCheckout = z.object({
productId: z.string(),
});
export type ICheckout = z.infer<typeof zCheckout>;
export const zEditOrganization = z.object({
id: z.string().min(2),
name: z.string().min(2),
timezone: z.string().min(1),
});