Added tabs to form
This commit is contained in:
@@ -1,15 +1,23 @@
|
||||
import { z } from 'zod'
|
||||
import type { CalendarEvent } from "./CalendarEvent"
|
||||
import type { CalendarMonth } from "./CalendarMonth"
|
||||
import type { RPGDate } from "./Date"
|
||||
import { type CalendarMonth } from "./CalendarMonth"
|
||||
import { dateSchema, type RPGDate } from "./Date"
|
||||
|
||||
export interface CalendarConfig {
|
||||
months: CalendarMonth[]
|
||||
daysPerMonth: number
|
||||
today: RPGDate
|
||||
}
|
||||
|
||||
export interface Calendar extends CalendarConfig {
|
||||
id: number
|
||||
id?: number
|
||||
name: string
|
||||
events: CalendarEvent[]
|
||||
color?: string,
|
||||
}
|
||||
|
||||
export const postCalendarSchema = z.object({
|
||||
name: z.string(),
|
||||
today: dateSchema.optional().nullable(),
|
||||
color: z.string().optional().nullable(),
|
||||
worldId: z.number().int(),
|
||||
})
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
import { z } from 'zod'
|
||||
|
||||
export interface CalendarMonth {
|
||||
id: number
|
||||
id?: number
|
||||
days: number,
|
||||
name: string,
|
||||
position: number,
|
||||
}
|
||||
|
||||
export const calendarMonthSchema = z.object({
|
||||
name: z.string().max(64),
|
||||
days: z.number().int().min(12),
|
||||
calendarId: z.number().int()
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@ import { z } from "zod"
|
||||
|
||||
export interface RPGDate {
|
||||
day: number
|
||||
month: number
|
||||
month: number | string
|
||||
year: number
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user