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
|
|
@ -5,7 +5,7 @@ import type { Id } from "./_generated/dataModel";
|
|||
|
||||
import { requireAdmin, requireStaff } from "./rbac";
|
||||
|
||||
type TicketStatusNormalized = "PENDING" | "AWAITING_ATTENDANCE" | "PAUSED" | "RESOLVED" | "CLOSED";
|
||||
type TicketStatusNormalized = "PENDING" | "AWAITING_ATTENDANCE" | "PAUSED" | "RESOLVED";
|
||||
|
||||
const STATUS_NORMALIZE_MAP: Record<string, TicketStatusNormalized> = {
|
||||
NEW: "PENDING",
|
||||
|
|
@ -15,7 +15,7 @@ const STATUS_NORMALIZE_MAP: Record<string, TicketStatusNormalized> = {
|
|||
ON_HOLD: "PAUSED",
|
||||
PAUSED: "PAUSED",
|
||||
RESOLVED: "RESOLVED",
|
||||
CLOSED: "CLOSED",
|
||||
CLOSED: "RESOLVED",
|
||||
};
|
||||
|
||||
function normalizeStatus(status: string | null | undefined): TicketStatusNormalized {
|
||||
|
|
@ -123,7 +123,7 @@ export const summary = query({
|
|||
}).length;
|
||||
const open = pending.filter((t) => {
|
||||
const status = normalizeStatus(t.status);
|
||||
return status !== "RESOLVED" && status !== "CLOSED";
|
||||
return status !== "RESOLVED";
|
||||
}).length;
|
||||
const breached = 0;
|
||||
return { id: qItem._id, name: renameQueueString(qItem.name), pending: open, waiting, breached };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue