Added day selection and revamped modal structure

This commit is contained in:
Alexis
2024-08-17 11:33:42 +02:00
parent 0d57c70719
commit 7244120219
7 changed files with 243 additions and 112 deletions

View File

@@ -1,6 +1,6 @@
import { z } from 'zod'
import type { CalendarEvent } from "./CalendarEvent"
import { type CalendarMonth } from "./CalendarMonth"
import { calendarMonthSchema, type CalendarMonth } from "./CalendarMonth"
import { dateSchema, type RPGDate } from "./Date"
export interface CalendarConfig {
@@ -19,5 +19,6 @@ export const postCalendarSchema = z.object({
name: z.string(),
today: dateSchema.optional().nullable(),
color: z.string().optional().nullable(),
months: z.array(calendarMonthSchema).min(1),
worldId: z.number().int(),
})

View File

@@ -10,5 +10,6 @@ export interface CalendarMonth {
export const calendarMonthSchema = z.object({
name: z.string().max(64),
days: z.number().int().min(12),
calendarId: z.number().int()
position: z.number().int().optional().nullable(),
calendar_id: z.number().int().optional().nullable()
})