Added day selection and revamped modal structure
This commit is contained in:
@@ -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(),
|
||||
})
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user