feat: add first day of week user setting (#1249)
* feat: add first day of week user setting * fix: add missing migrations * fix: format and test issues * fix: deepsource issue * refactor: rename first-day-of-week procedure
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type { DayOfWeek } from "@mantine/dates";
|
||||
import { z } from "zod";
|
||||
|
||||
import { colorSchemes } from "@homarr/definitions";
|
||||
@@ -103,6 +104,10 @@ const changeColorSchemeSchema = z.object({
|
||||
colorScheme: zodEnumFromArray(colorSchemes),
|
||||
});
|
||||
|
||||
const firstDayOfWeekSchema = z.object({
|
||||
firstDayOfWeek: z.custom<DayOfWeek>((value) => z.number().min(0).max(6).safeParse(value).success),
|
||||
});
|
||||
|
||||
export const userSchemas = {
|
||||
signIn: signInSchema,
|
||||
registration: registrationSchema,
|
||||
@@ -115,4 +120,5 @@ export const userSchemas = {
|
||||
changeHomeBoard: changeHomeBoardSchema,
|
||||
changePasswordApi: changePasswordApiSchema,
|
||||
changeColorScheme: changeColorSchemeSchema,
|
||||
firstDayOfWeek: firstDayOfWeekSchema,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user