From ac24961e4b97bfb58a52e1b95f3d9696fe1e5d86 Mon Sep 17 00:00:00 2001 From: Felipe Coutinho Date: Sat, 22 Nov 2025 12:58:57 -0300 Subject: [PATCH] =?UTF-8?q?refactor:=20substitui=20'=E2=80=A2'=20por=20'-'?= =?UTF-8?q?=20em=20textos=20de=20exibi=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As alterações consistem na substituição do caractere '•' por '-' em várias partes do código, visando padronizar a formatação dos textos exibidos. Essa mudança foi aplicada em componentes como `event-modal`, `accounts-page`, `expenses-by-category-widget`, `income-by-category-widget`, `pending-invoice-card`, entre outros, para melhorar a consistência visual da interface. --- app/(landing-page)/page.tsx | 34 ++--- app/globals.css | 2 +- components/calendario/event-modal.tsx | 2 +- components/contas/accounts-page.tsx | 2 +- .../dashboard/expenses-by-category-widget.tsx | 2 +- .../dashboard/income-by-category-widget.tsx | 2 +- .../pending-invoice-card.tsx | 12 +- .../dashboard/installment-expenses-widget.tsx | 4 +- .../dashboard/recurring-expenses-widget.tsx | 2 +- .../lancamentos/table/lancamentos-table.tsx | 2 +- .../pagadores/details/pagador-info-card.tsx | 6 +- .../details/pagador-monthly-summary-card.tsx | 2 +- components/ui/chart.tsx | 132 +++++++++--------- lib/pagadores/notifications.ts | 2 +- 14 files changed, 105 insertions(+), 101 deletions(-) diff --git a/app/(landing-page)/page.tsx b/app/(landing-page)/page.tsx index 736c29a..d901496 100644 --- a/app/(landing-page)/page.tsx +++ b/app/(landing-page)/page.tsx @@ -171,7 +171,7 @@ export default async function Page() {
- +
@@ -191,7 +191,7 @@ export default async function Page() { - +
@@ -210,7 +210,7 @@ export default async function Page() { - +
@@ -229,7 +229,7 @@ export default async function Page() { - +
@@ -249,7 +249,7 @@ export default async function Page() { - +
@@ -269,7 +269,7 @@ export default async function Page() { - +
@@ -309,7 +309,7 @@ export default async function Page() {
- +
- +
- +
- +
@@ -415,7 +415,7 @@ export default async function Page() {
- +
@@ -434,7 +434,7 @@ export default async function Page() { - +
@@ -457,7 +457,7 @@ export default async function Page() { - +
@@ -475,7 +475,7 @@ export default async function Page() { - +
@@ -529,7 +529,7 @@ export default async function Page() {
- +
@@ -548,7 +548,7 @@ export default async function Page() { - +
@@ -567,7 +567,7 @@ export default async function Page() { - +
diff --git a/app/globals.css b/app/globals.css index 47ade7b..055cd99 100644 --- a/app/globals.css +++ b/app/globals.css @@ -10,7 +10,7 @@ /* Base surfaces - warm cream with subtle orange undertone */ --background: oklch(97.512% 0.00674 67.377); --foreground: oklch(18% 0.02 45); - --card: oklch(99% 0.006 80); + --card: oklch(100% 0.00011 271.152); --card-foreground: oklch(18% 0.02 45); --popover: oklch(99.5% 0.004 80); --popover-foreground: oklch(18% 0.02 45); diff --git a/components/calendario/event-modal.tsx b/components/calendario/event-modal.tsx index cf7435a..be8108b 100644 --- a/components/calendario/event-modal.tsx +++ b/components/calendario/event-modal.tsx @@ -114,7 +114,7 @@ const renderBoleto = (event: Extract) => {
{event.lancamento.name} - Boleto{formattedDueDate ? ` • Vence em ${formattedDueDate}` : ""} + Boleto{formattedDueDate ? ` - Vence em ${formattedDueDate}` : ""}
diff --git a/components/contas/accounts-page.tsx b/components/contas/accounts-page.tsx index 13f7591..bf03fef 100644 --- a/components/contas/accounts-page.tsx +++ b/components/contas/accounts-page.tsx @@ -137,7 +137,7 @@ export function AccountsPage({ accounts, logoOptions }: AccountsPageProps) { {formatPercentage(category.budgetUsedPercentage)} do - limite • excedeu em {formatCurrency(exceededAmount)} + limite - excedeu em {formatCurrency(exceededAmount)} ) : ( <> diff --git a/components/dashboard/income-by-category-widget.tsx b/components/dashboard/income-by-category-widget.tsx index 3654d70..fa17f6c 100644 --- a/components/dashboard/income-by-category-widget.tsx +++ b/components/dashboard/income-by-category-widget.tsx @@ -162,7 +162,7 @@ export function IncomeByCategoryWidget({ {budgetExceeded ? ( <> {formatPercentage(category.budgetUsedPercentage)} do - limite {formatCurrency(category.budgetAmount)} • excedeu + limite {formatCurrency(category.budgetAmount)} - excedeu em {formatCurrency(exceededAmount)} ) : ( diff --git a/components/dashboard/installment-analysis/pending-invoice-card.tsx b/components/dashboard/installment-analysis/pending-invoice-card.tsx index c29e5c6..c5fd356 100644 --- a/components/dashboard/installment-analysis/pending-invoice-card.tsx +++ b/components/dashboard/installment-analysis/pending-invoice-card.tsx @@ -5,7 +5,11 @@ import { Badge } from "@/components/ui/badge"; import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; import { cn } from "@/lib/utils/ui"; -import { RiArrowDownSLine, RiArrowRightSLine, RiBillLine } from "@remixicon/react"; +import { + RiArrowDownSLine, + RiArrowRightSLine, + RiBillLine, +} from "@remixicon/react"; import { format, parse } from "date-fns"; import { ptBR } from "date-fns/locale"; import { useState } from "react"; @@ -68,7 +72,7 @@ export function PendingInvoiceCard({
{periodText} - + - Vencimento: {dueDateText}
@@ -144,13 +148,13 @@ export function PendingInvoiceCard({ {purchaseDate} {installmentLabel && ( <> - + - Parcela {installmentLabel} )} {lancamento.condition !== "Parcelado" && ( <> - + - {lancamento.condition} )} diff --git a/components/dashboard/installment-expenses-widget.tsx b/components/dashboard/installment-expenses-widget.tsx index 7c6b6ee..fe92391 100644 --- a/components/dashboard/installment-expenses-widget.tsx +++ b/components/dashboard/installment-expenses-widget.tsx @@ -173,8 +173,8 @@ export function InstallmentExpensesWidget({

Restantes {remainingInstallments} - {endDate && ` • Termina em ${endDate}`} - {" • Restante "} + {endDate && ` - Termina em ${endDate}`} + {" - Restante "} {expense.paymentMethod} - •{formatOccurrences(expense.recurrenceCount)} + -{formatOccurrences(expense.recurrenceCount)}

diff --git a/components/lancamentos/table/lancamentos-table.tsx b/components/lancamentos/table/lancamentos-table.tsx index f8d161d..ae01c77 100644 --- a/components/lancamentos/table/lancamentos-table.tsx +++ b/components/lancamentos/table/lancamentos-table.tsx @@ -732,7 +732,7 @@ export function LancamentosTable({ {selectedCount === 1 ? "item selecionado" : "itens selecionados"} - • + - Total:{" "} diff --git a/components/pagadores/details/pagador-info-card.tsx b/components/pagadores/details/pagador-info-card.tsx index f3f14c9..a148cbe 100644 --- a/components/pagadores/details/pagador-info-card.tsx +++ b/components/pagadores/details/pagador-info-card.tsx @@ -297,8 +297,8 @@ export function PagadorInfoCard({ registradas

- Cartões: {formatCurrency(summary.paymentSplits.card)} • - Boletos: {formatCurrency(summary.paymentSplits.boleto)} • + Cartões: {formatCurrency(summary.paymentSplits.card)} - + Boletos: {formatCurrency(summary.paymentSplits.boleto)} - Pix/Débito/Dinheiro:{" "} {formatCurrency(summary.paymentSplits.instant)}

@@ -315,7 +315,7 @@ export function PagadorInfoCard({ (item) => `${item.name}: ${formatCurrency(item.amount)}` ) - .join(" • ") + .join(" - ") : "Sem lançamentos com cartão no período."}

diff --git a/components/pagadores/details/pagador-monthly-summary-card.tsx b/components/pagadores/details/pagador-monthly-summary-card.tsx index d011c71..3317083 100644 --- a/components/pagadores/details/pagador-monthly-summary-card.tsx +++ b/components/pagadores/details/pagador-monthly-summary-card.tsx @@ -48,7 +48,7 @@ export function PagadorMonthlySummaryCard({ Totais do mês

- {periodLabel} • despesas por forma de pagamento + {periodLabel} - despesas por forma de pagamento

diff --git a/components/ui/chart.tsx b/components/ui/chart.tsx index 98ce46a..f142f3b 100644 --- a/components/ui/chart.tsx +++ b/components/ui/chart.tsx @@ -1,37 +1,37 @@ -"use client" +"use client"; -import * as React from "react" -import * as RechartsPrimitive from "recharts" +import * as React from "react"; +import * as RechartsPrimitive from "recharts"; -import { cn } from "@/lib/utils/ui" +import { cn } from "@/lib/utils/ui"; // Format: { THEME_NAME: CSS_SELECTOR } -const THEMES = { light: "", dark: ".dark" } as const +const THEMES = { light: "", dark: ".dark" } as const; export type ChartConfig = { [k in string]: { - label?: React.ReactNode - icon?: React.ComponentType + label?: React.ReactNode; + icon?: React.ComponentType; } & ( | { color?: string; theme?: never } | { color?: never; theme: Record } - ) -} + ); +}; type ChartContextProps = { - config: ChartConfig -} + config: ChartConfig; +}; -const ChartContext = React.createContext(null) +const ChartContext = React.createContext(null); function useChart() { - const context = React.useContext(ChartContext) + const context = React.useContext(ChartContext); if (!context) { - throw new Error("useChart must be used within a ") + throw new Error("useChart must be used within a "); } - return context + return context; } function ChartContainer({ @@ -42,13 +42,13 @@ function ChartContainer({ style, ...props }: React.ComponentProps<"div"> & { - config: ChartConfig + config: ChartConfig; children: React.ComponentProps< typeof RechartsPrimitive.ResponsiveContainer - >["children"] + >["children"]; }) { - const uniqueId = React.useId() - const chartId = `chart-${id || uniqueId.replace(/:/g, "")}` + const uniqueId = React.useId(); + const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`; return ( @@ -70,16 +70,16 @@ function ChartContainer({
- ) + ); } const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => { const colorConfig = Object.entries(config).filter( ([, config]) => config.theme || config.color - ) + ); if (!colorConfig.length) { - return null + return null; } return ( @@ -93,8 +93,8 @@ ${colorConfig .map(([key, itemConfig]) => { const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || - itemConfig.color - return color ? ` --color-${key}: ${color};` : null + itemConfig.color; + return color ? ` --color-${key}: ${color};` : null; }) .join("\n")} } @@ -103,10 +103,10 @@ ${colorConfig .join("\n"), }} /> - ) -} + ); +}; -const ChartTooltip = RechartsPrimitive.Tooltip +const ChartTooltip = RechartsPrimitive.Tooltip; function ChartTooltipContent({ active, @@ -124,40 +124,40 @@ function ChartTooltipContent({ labelKey, }: React.ComponentProps & React.ComponentProps<"div"> & { - hideLabel?: boolean - hideIndicator?: boolean - indicator?: "line" | "dot" | "dashed" - nameKey?: string - labelKey?: string + hideLabel?: boolean; + hideIndicator?: boolean; + indicator?: "line" | "dot" | "dashed"; + nameKey?: string; + labelKey?: string; }) { - const { config } = useChart() + const { config } = useChart(); const tooltipLabel = React.useMemo(() => { if (hideLabel || !payload?.length) { - return null + return null; } - const [item] = payload - const key = `${labelKey || item?.dataKey || item?.name || "value"}` - const itemConfig = getPayloadConfigFromPayload(config, item, key) + const [item] = payload; + const key = `${labelKey || item?.dataKey || item?.name || "value"}`; + const itemConfig = getPayloadConfigFromPayload(config, item, key); const value = !labelKey && typeof label === "string" ? config[label as keyof typeof config]?.label || label - : itemConfig?.label + : itemConfig?.label; if (labelFormatter) { return (
{labelFormatter(value, payload)}
- ) + ); } if (!value) { - return null + return null; } - return
{value}
+ return
{value}
; }, [ label, labelFormatter, @@ -166,13 +166,13 @@ function ChartTooltipContent({ labelClassName, config, labelKey, - ]) + ]); if (!active || !payload?.length) { - return null + return null; } - const nestLabel = payload.length === 1 && indicator !== "dot" + const nestLabel = payload.length === 1 && indicator !== "dot"; return (
item.type !== "none") .map((item, index) => { - const key = `${nameKey || item.name || item.dataKey || "value"}` - const itemConfig = getPayloadConfigFromPayload(config, item, key) - const indicatorColor = color || item.payload.fill || item.color + const key = `${nameKey || item.name || item.dataKey || "value"}`; + const itemConfig = getPayloadConfigFromPayload(config, item, key); + const indicatorColor = color || item.payload.fill || item.color; return (
)}
- ) + ); })}
- ) + ); } -const ChartLegend = RechartsPrimitive.Legend +const ChartLegend = RechartsPrimitive.Legend; function ChartLegendContent({ className, @@ -264,13 +264,13 @@ function ChartLegendContent({ nameKey, }: React.ComponentProps<"div"> & Pick & { - hideIcon?: boolean - nameKey?: string + hideIcon?: boolean; + nameKey?: string; }) { - const { config } = useChart() + const { config } = useChart(); if (!payload?.length) { - return null + return null; } return ( @@ -284,8 +284,8 @@ function ChartLegendContent({ {payload .filter((item) => item.type !== "none") .map((item) => { - const key = `${nameKey || item.dataKey || "value"}` - const itemConfig = getPayloadConfigFromPayload(config, item, key) + const key = `${nameKey || item.dataKey || "value"}`; + const itemConfig = getPayloadConfigFromPayload(config, item, key); return (
- ) + ); })}
- ) + ); } // Helper to extract item config from a payload. @@ -319,7 +319,7 @@ function getPayloadConfigFromPayload( key: string ) { if (typeof payload !== "object" || payload === null) { - return undefined + return undefined; } const payloadPayload = @@ -327,15 +327,15 @@ function getPayloadConfigFromPayload( typeof payload.payload === "object" && payload.payload !== null ? payload.payload - : undefined + : undefined; - let configLabelKey: string = key + let configLabelKey: string = key; if ( key in payload && typeof payload[key as keyof typeof payload] === "string" ) { - configLabelKey = payload[key as keyof typeof payload] as string + configLabelKey = payload[key as keyof typeof payload] as string; } else if ( payloadPayload && key in payloadPayload && @@ -343,12 +343,12 @@ function getPayloadConfigFromPayload( ) { configLabelKey = payloadPayload[ key as keyof typeof payloadPayload - ] as string + ] as string; } return configLabelKey in config ? config[configLabelKey] - : config[key as keyof typeof config] + : config[key as keyof typeof config]; } export { @@ -358,4 +358,4 @@ export { ChartLegend, ChartLegendContent, ChartStyle, -} +}; diff --git a/lib/pagadores/notifications.ts b/lib/pagadores/notifications.ts index aa936fd..dd1d660 100644 --- a/lib/pagadores/notifications.ts +++ b/lib/pagadores/notifications.ts @@ -165,7 +165,7 @@ export async function sendPagadorAutoEmails({ await resend.emails.send({ from: resendFrom, to: pagador.email, - subject: `${subjectPrefix} • ${pagador.name}`, + subject: `${subjectPrefix} - ${pagador.name}`, html, }); })