feat(portal): enable ticket reopen and improve loading UX
This commit is contained in:
parent
8b905dc467
commit
50a80f5244
4 changed files with 40 additions and 10 deletions
|
|
@ -113,6 +113,9 @@ const serverTicketSchema = z.object({
|
|||
dueAt: z.number().nullable().optional(),
|
||||
firstResponseAt: z.number().nullable().optional(),
|
||||
resolvedAt: z.number().nullable().optional(),
|
||||
reopenDeadline: z.number().nullable().optional(),
|
||||
reopenWindowDays: z.number().nullable().optional(),
|
||||
reopenedAt: z.number().nullable().optional(),
|
||||
updatedAt: z.number(),
|
||||
createdAt: z.number(),
|
||||
tags: z.array(z.string()).default([]).optional(),
|
||||
|
|
@ -258,6 +261,9 @@ export function mapTicketFromServer(input: unknown) {
|
|||
dueAt: s.dueAt ? new Date(s.dueAt) : null,
|
||||
firstResponseAt: s.firstResponseAt ? new Date(s.firstResponseAt) : null,
|
||||
resolvedAt: s.resolvedAt ? new Date(s.resolvedAt) : null,
|
||||
reopenDeadline: typeof s.reopenDeadline === "number" ? s.reopenDeadline : null,
|
||||
reopenWindowDays: typeof s.reopenWindowDays === "number" ? s.reopenWindowDays : null,
|
||||
reopenedAt: typeof s.reopenedAt === "number" ? s.reopenedAt : null,
|
||||
csatScore: typeof csatScore === "number" ? csatScore : null,
|
||||
csatMaxScore: typeof csatMaxScore === "number" ? csatMaxScore : null,
|
||||
csatComment: typeof csatComment === "string" && csatComment.trim().length > 0 ? csatComment.trim() : null,
|
||||
|
|
@ -356,6 +362,9 @@ export function mapTicketWithDetailsFromServer(input: unknown) {
|
|||
dueAt: base.dueAt ? new Date(base.dueAt) : null,
|
||||
firstResponseAt: base.firstResponseAt ? new Date(base.firstResponseAt) : null,
|
||||
resolvedAt: base.resolvedAt ? new Date(base.resolvedAt) : null,
|
||||
reopenDeadline: typeof base.reopenDeadline === "number" ? base.reopenDeadline : null,
|
||||
reopenWindowDays: typeof base.reopenWindowDays === "number" ? base.reopenWindowDays : null,
|
||||
reopenedAt: typeof base.reopenedAt === "number" ? base.reopenedAt : null,
|
||||
csatScore: typeof csatScore === "number" ? csatScore : null,
|
||||
csatMaxScore: typeof csatMaxScore === "number" ? csatMaxScore : null,
|
||||
csatComment: typeof csatComment === "string" && csatComment.trim().length > 0 ? csatComment.trim() : null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue