feat: CSV exports, PDF improvements, play internal/external with hour split, roles cleanup, admin companies with 'Cliente avulso', ticket list spacing/alignment fixes, status translations and mappings
This commit is contained in:
parent
addd4ce6e8
commit
3bafcc5a0a
45 changed files with 1401 additions and 256 deletions
|
|
@ -11,7 +11,7 @@ const STATUS_MAP: Record<string, NormalizedTicketStatus> = {
|
|||
ON_HOLD: "PAUSED",
|
||||
PAUSED: "PAUSED",
|
||||
RESOLVED: "RESOLVED",
|
||||
CLOSED: "CLOSED",
|
||||
CLOSED: "RESOLVED",
|
||||
};
|
||||
|
||||
function normalizeTicketStatus(status: unknown): NormalizedTicketStatus {
|
||||
|
|
@ -135,6 +135,8 @@ export function mapTicketFromServer(input: unknown) {
|
|||
workSummary: s.workSummary
|
||||
? {
|
||||
totalWorkedMs: s.workSummary.totalWorkedMs,
|
||||
internalWorkedMs: (s.workSummary as any).internalWorkedMs ?? 0,
|
||||
externalWorkedMs: (s.workSummary as any).externalWorkedMs ?? 0,
|
||||
activeSession: s.workSummary.activeSession
|
||||
? {
|
||||
...s.workSummary.activeSession,
|
||||
|
|
@ -183,6 +185,9 @@ export function mapTicketWithDetailsFromServer(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,
|
||||
company: (s as any).company
|
||||
? ({ id: (s as any).company.id, name: (s as any).company.name, isAvulso: (s as any).company.isAvulso } as any)
|
||||
: undefined,
|
||||
timeline: s.timeline.map((e) => ({ ...e, createdAt: new Date(e.createdAt) })),
|
||||
comments: s.comments.map((c) => ({
|
||||
...c,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue