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
|
|
@ -35,6 +35,19 @@ export const userSummarySchema = z.object({
|
|||
teams: z.array(z.string()).default([]),
|
||||
})
|
||||
export type UserSummary = z.infer<typeof userSummarySchema>
|
||||
|
||||
export const ticketCategorySummarySchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
})
|
||||
export type TicketCategorySummary = z.infer<typeof ticketCategorySummarySchema>
|
||||
|
||||
export const ticketSubcategorySummarySchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
categoryId: z.string().optional(),
|
||||
})
|
||||
export type TicketSubcategorySummary = z.infer<typeof ticketSubcategorySummarySchema>
|
||||
|
||||
export const ticketCommentSchema = z.object({
|
||||
id: z.string(),
|
||||
|
|
@ -98,6 +111,8 @@ export const ticketSchema = z.object({
|
|||
timeOpenedMinutes: z.number().nullable(),
|
||||
})
|
||||
.nullable(),
|
||||
category: ticketCategorySummarySchema.nullable().optional(),
|
||||
subcategory: ticketSubcategorySummarySchema.nullable().optional(),
|
||||
workSummary: z
|
||||
.object({
|
||||
totalWorkedMs: z.number(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue