feat: add ticket category model and align ticket ui\n\nCo-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
parent
55511f3a0e
commit
fab1cbe476
17 changed files with 1121 additions and 42 deletions
20
web/src/lib/schemas/category.ts
Normal file
20
web/src/lib/schemas/category.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { z } from "zod"
|
||||
|
||||
export const ticketSubcategorySchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
slug: z.string().optional(),
|
||||
order: z.number().optional(),
|
||||
categoryId: z.string().optional(),
|
||||
})
|
||||
export type TicketSubcategory = z.infer<typeof ticketSubcategorySchema>
|
||||
|
||||
export const ticketCategorySchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
slug: z.string().optional(),
|
||||
description: z.string().optional().nullable(),
|
||||
order: z.number().optional(),
|
||||
secondary: z.array(ticketSubcategorySchema),
|
||||
})
|
||||
export type TicketCategory = z.infer<typeof ticketCategorySchema>
|
||||
Loading…
Add table
Add a link
Reference in a new issue