feat: Enhance event management with FightEdit and GroupEdit components, including improved data handling and new functionalities
This commit is contained in:
@@ -45,6 +45,15 @@ export const EventFightSchema = z.object({
|
||||
|
||||
export type EventFight = z.infer<typeof EventFightSchema>;
|
||||
|
||||
export const EventFightEditSchema = EventFightSchema.omit({
|
||||
id: true,
|
||||
group: true,
|
||||
}).extend({
|
||||
group: z.number().nullable(),
|
||||
});
|
||||
|
||||
export type EventFightEdit = z.infer<typeof EventFightEditSchema>;
|
||||
|
||||
export type ResponseGroups = z.infer<typeof ResponseGroupsSchema>;
|
||||
|
||||
export const ResponseRelationSchema = z.object({
|
||||
@@ -111,6 +120,12 @@ export const UpdateEventGroupSchema = z.object({
|
||||
});
|
||||
export type UpdateEventGroup = z.infer<typeof UpdateEventGroupSchema>;
|
||||
|
||||
export const GroupEditSchema = ResponseGroupsSchema.omit({
|
||||
id: true,
|
||||
points: true,
|
||||
});
|
||||
export type GroupUpdateEdit = z.infer<typeof GroupEditSchema>;
|
||||
|
||||
export const CreateEventRelationSchema = z.object({
|
||||
fightId: z.number(),
|
||||
team: z.enum(["RED", "BLUE"]),
|
||||
|
||||
Reference in New Issue
Block a user