Corrige fallback HTML e consulta tickets por canal
This commit is contained in:
parent
15d11b6b12
commit
11a4b903c4
2 changed files with 10 additions and 2 deletions
|
|
@ -63,6 +63,16 @@ function getInitials(name: string | null | undefined, fallback: string): string
|
|||
return normalizedFallback.length > 0 ? normalizedFallback.charAt(0).toUpperCase() : "?"
|
||||
}
|
||||
|
||||
function toHtml(text: string) {
|
||||
const escaped = text
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">")
|
||||
.replace(/"/g, """)
|
||||
.replace(/'/g, "'")
|
||||
return `<p>${escaped.replace(/\n/g, "<br />")}</p>`
|
||||
}
|
||||
|
||||
type RequesterPreviewProps = {
|
||||
customer: CustomerOption | null
|
||||
company: { id: string; name: string; isAvulso?: boolean } | null
|
||||
|
|
|
|||
|
|
@ -478,8 +478,6 @@ export async function buildTicketsByChannelWorkbook(
|
|||
viewerId: ctx.viewerId,
|
||||
range: options.range,
|
||||
companyId: (options.companyId ?? undefined) as Id<"companies"> | undefined,
|
||||
dateFrom: options.dateFrom ?? undefined,
|
||||
dateTo: options.dateTo ?? undefined,
|
||||
})
|
||||
|
||||
const CHANNEL_PT: Record<string, string> = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue