fix: corrige hydration, notificacoes e melhora visual
- Corrige hydration mismatch no Toaster (sonner) e ChatWidgetProvider - Corrige API de preferencias de notificacao (typePreferences como string) - Melhora visual do Switch (estado ativo em preto) - Adiciona icones em circulos na pagina de notificacoes - Corrige acentuacao em "Obrigatorio" - Corrige centralizacao das estrelas de avaliacao nos e-mails - Aplica Sentence case nos titulos dos templates de e-mail - Adiciona script de teste de e-mail 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7a3791117b
commit
eedd446b36
7 changed files with 302 additions and 55 deletions
|
|
@ -236,12 +236,12 @@ function ratingStars(rateUrl: string): string {
|
|||
}
|
||||
|
||||
return `
|
||||
<table cellpadding="0" cellspacing="0" style="margin:16px 0;">
|
||||
<table cellpadding="0" cellspacing="0" style="margin:16px auto;" align="center">
|
||||
<tr>
|
||||
${stars.join("")}
|
||||
</tr>
|
||||
</table>
|
||||
<p style="color:${COLORS.textMuted};font-size:12px;margin:4px 0 0 0;">Clique em uma estrela para avaliar</p>
|
||||
<p style="color:${COLORS.textMuted};font-size:12px;margin:4px 0 0 0;text-align:center;">Clique em uma estrela para avaliar</p>
|
||||
`
|
||||
}
|
||||
|
||||
|
|
@ -353,7 +353,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
return baseTemplate(
|
||||
`
|
||||
<h1 style="color:${COLORS.textPrimary};font-size:24px;font-weight:600;margin:0 0 8px 0;">
|
||||
Chamado Aberto
|
||||
Chamado aberto
|
||||
</h1>
|
||||
<p style="color:${COLORS.textSecondary};font-size:14px;line-height:1.6;margin:0 0 24px 0;">
|
||||
Seu chamado foi registrado com sucesso. Nossa equipe irá analisá-lo em breve.
|
||||
|
|
@ -368,7 +368,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
})}
|
||||
|
||||
<div style="text-align:center;margin-top:24px;">
|
||||
${button("Ver Chamado", viewUrl)}
|
||||
${button("Ver chamado", viewUrl)}
|
||||
</div>
|
||||
`,
|
||||
data
|
||||
|
|
@ -383,7 +383,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
return baseTemplate(
|
||||
`
|
||||
<h1 style="color:${COLORS.textPrimary};font-size:24px;font-weight:600;margin:0 0 8px 0;">
|
||||
Chamado Resolvido
|
||||
Chamado resolvido
|
||||
</h1>
|
||||
<p style="color:${COLORS.textSecondary};font-size:14px;line-height:1.6;margin:0 0 24px 0;">
|
||||
Seu chamado foi marcado como resolvido. Esperamos que o atendimento tenha sido satisfatório!
|
||||
|
|
@ -414,7 +414,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
</div>
|
||||
|
||||
<div style="text-align:center;margin-top:24px;">
|
||||
${button("Ver Chamado", viewUrl)}
|
||||
${button("Ver chamado", viewUrl)}
|
||||
</div>
|
||||
`,
|
||||
data
|
||||
|
|
@ -426,7 +426,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
const viewUrl = data.viewUrl as string
|
||||
const isForRequester = data.isForRequester as boolean
|
||||
|
||||
const title = isForRequester ? "Agente Atribuído ao Chamado" : "Novo Chamado Atribuído"
|
||||
const title = isForRequester ? "Agente atribuído ao chamado" : "Novo chamado atribuído"
|
||||
const message = isForRequester
|
||||
? `O agente ${escapeHtml(data.assigneeName)} foi atribuído ao seu chamado e em breve entrará em contato.`
|
||||
: `Um novo chamado foi atribuído a você. Por favor, verifique os detalhes abaixo.`
|
||||
|
|
@ -450,7 +450,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
})}
|
||||
|
||||
<div style="text-align:center;margin-top:24px;">
|
||||
${button("Ver Chamado", viewUrl)}
|
||||
${button("Ver chamado", viewUrl)}
|
||||
</div>
|
||||
`,
|
||||
data
|
||||
|
|
@ -466,7 +466,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
return baseTemplate(
|
||||
`
|
||||
<h1 style="color:${COLORS.textPrimary};font-size:24px;font-weight:600;margin:0 0 8px 0;">
|
||||
Status Atualizado
|
||||
Status atualizado
|
||||
</h1>
|
||||
<p style="color:${COLORS.textSecondary};font-size:14px;line-height:1.6;margin:0 0 24px 0;">
|
||||
O status do seu chamado foi alterado.
|
||||
|
|
@ -492,7 +492,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
</div>
|
||||
|
||||
<div style="text-align:center;margin-top:24px;">
|
||||
${button("Ver Chamado", viewUrl)}
|
||||
${button("Ver chamado", viewUrl)}
|
||||
</div>
|
||||
`,
|
||||
data
|
||||
|
|
@ -506,7 +506,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
return baseTemplate(
|
||||
`
|
||||
<h1 style="color:${COLORS.textPrimary};font-size:24px;font-weight:600;margin:0 0 8px 0;">
|
||||
Nova Atualização no Chamado
|
||||
Nova atualização no chamado
|
||||
</h1>
|
||||
<p style="color:${COLORS.textSecondary};font-size:14px;line-height:1.6;margin:0 0 24px 0;">
|
||||
${escapeHtml(data.authorName)} adicionou um comentário ao seu chamado.
|
||||
|
|
@ -527,7 +527,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
</div>
|
||||
|
||||
<div style="text-align:center;margin-top:24px;">
|
||||
${button("Ver Chamado", viewUrl)}
|
||||
${button("Ver chamado", viewUrl)}
|
||||
</div>
|
||||
`,
|
||||
data
|
||||
|
|
@ -541,14 +541,14 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
return baseTemplate(
|
||||
`
|
||||
<h1 style="color:${COLORS.textPrimary};font-size:24px;font-weight:600;margin:0 0 8px 0;">
|
||||
Redefinição de Senha
|
||||
Redefinição de senha
|
||||
</h1>
|
||||
<p style="color:${COLORS.textSecondary};font-size:14px;line-height:1.6;margin:0 0 24px 0;">
|
||||
Recebemos uma solicitação para redefinir a senha da sua conta. Se você não fez essa solicitação, pode ignorar este e-mail.
|
||||
</p>
|
||||
|
||||
<div style="text-align:center;margin:32px 0;">
|
||||
${button("Redefinir Senha", resetUrl)}
|
||||
${button("Redefinir senha", resetUrl)}
|
||||
</div>
|
||||
|
||||
<p style="color:${COLORS.textMuted};font-size:12px;margin:24px 0 0 0;">
|
||||
|
|
@ -567,14 +567,14 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
return baseTemplate(
|
||||
`
|
||||
<h1 style="color:${COLORS.textPrimary};font-size:24px;font-weight:600;margin:0 0 8px 0;">
|
||||
Confirme seu E-mail
|
||||
Confirme seu e-mail
|
||||
</h1>
|
||||
<p style="color:${COLORS.textSecondary};font-size:14px;line-height:1.6;margin:0 0 24px 0;">
|
||||
Clique no botão abaixo para confirmar seu endereço de e-mail e ativar sua conta.
|
||||
</p>
|
||||
|
||||
<div style="text-align:center;margin:32px 0;">
|
||||
${button("Confirmar E-mail", verifyUrl)}
|
||||
${button("Confirmar e-mail", verifyUrl)}
|
||||
</div>
|
||||
|
||||
<p style="color:${COLORS.textMuted};font-size:12px;margin:24px 0 0 0;">
|
||||
|
|
@ -618,7 +618,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
</div>
|
||||
|
||||
<div style="text-align:center;margin:32px 0;">
|
||||
${button("Aceitar Convite", inviteUrl)}
|
||||
${button("Aceitar convite", inviteUrl)}
|
||||
</div>
|
||||
|
||||
<p style="color:${COLORS.textMuted};font-size:12px;margin:24px 0 0 0;">
|
||||
|
|
@ -634,7 +634,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
return baseTemplate(
|
||||
`
|
||||
<h1 style="color:${COLORS.textPrimary};font-size:24px;font-weight:600;margin:0 0 8px 0;">
|
||||
Novo Acesso Detectado
|
||||
Novo acesso detectado
|
||||
</h1>
|
||||
<p style="color:${COLORS.textSecondary};font-size:14px;line-height:1.6;margin:0 0 24px 0;">
|
||||
Detectamos um novo acesso à sua conta. Se foi você, pode ignorar este e-mail.
|
||||
|
|
@ -672,7 +672,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
return baseTemplate(
|
||||
`
|
||||
<h1 style="color:${COLORS.statusPaused};font-size:24px;font-weight:600;margin:0 0 8px 0;">
|
||||
SLA em Risco
|
||||
SLA em risco
|
||||
</h1>
|
||||
<p style="color:${COLORS.textSecondary};font-size:14px;line-height:1.6;margin:0 0 24px 0;">
|
||||
O chamado abaixo está próximo de violar o SLA. Ação necessária!
|
||||
|
|
@ -697,7 +697,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
</div>
|
||||
|
||||
<div style="text-align:center;margin-top:24px;">
|
||||
${button("Ver Chamado", viewUrl)}
|
||||
${button("Ver chamado", viewUrl)}
|
||||
</div>
|
||||
`,
|
||||
data
|
||||
|
|
@ -711,7 +711,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
return baseTemplate(
|
||||
`
|
||||
<h1 style="color:${COLORS.priorityUrgent};font-size:24px;font-weight:600;margin:0 0 8px 0;">
|
||||
SLA Violado
|
||||
SLA violado
|
||||
</h1>
|
||||
<p style="color:${COLORS.textSecondary};font-size:14px;line-height:1.6;margin:0 0 24px 0;">
|
||||
O chamado abaixo violou o SLA estabelecido. Atenção urgente necessária!
|
||||
|
|
@ -736,7 +736,7 @@ const templates: Record<TemplateName, (data: TemplateData) => string> = {
|
|||
</div>
|
||||
|
||||
<div style="text-align:center;margin-top:24px;">
|
||||
${button("Ver Chamado", viewUrl)}
|
||||
${button("Ver chamado", viewUrl)}
|
||||
</div>
|
||||
`,
|
||||
data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue