Padroniza copias e badges da interface

This commit is contained in:
Felipe Coutinho
2026-03-14 18:36:02 +00:00
parent 1e8e6e0d3d
commit 62b94e6b1d
45 changed files with 184 additions and 200 deletions

View File

@@ -269,7 +269,7 @@ export function AnticipateInstallmentsDialog({
</Field>
<Field className="gap-1">
<FieldLabel htmlFor="anticipation-pagador">Payer</FieldLabel>
<FieldLabel htmlFor="anticipation-pagador">Pagador</FieldLabel>
<FieldContent>
<Select
value={formState.payerId}

View File

@@ -24,8 +24,8 @@ import {
SelectValue,
} from "@/shared/components/ui/select";
import {
CategorySelectContent,
AccountCardSelectContent,
CategorySelectContent,
PayerSelectContent,
} from "../select-items";
import type { SelectOption, TransactionItem } from "../types";
@@ -203,7 +203,7 @@ export function BulkImportDialog({
<form className="space-y-4" onSubmit={handleSubmit}>
<div className="space-y-2">
<Label htmlFor="pagador">Payer *</Label>
<Label htmlFor="pagador">Pagador *</Label>
<Select value={payerId} onValueChange={setPagadorId}>
<SelectTrigger id="pagador" className="w-full">
<SelectValue placeholder="Selecione o pagador">
@@ -235,7 +235,7 @@ export function BulkImportDialog({
</div>
<div className="space-y-2">
<Label htmlFor="categoria">Category *</Label>
<Label htmlFor="categoria">Categoria *</Label>
<Select value={categoryId} onValueChange={setCategoriaId}>
<SelectTrigger id="categoria" className="w-full">
<SelectValue placeholder="Selecione a categoria">
@@ -274,7 +274,7 @@ export function BulkImportDialog({
{hasNonCredit && (
<div className="space-y-2">
<Label htmlFor="conta">
FinancialAccount {hasCredit ? "(para não cartão)" : "*"}
Conta {hasCredit ? "(para não cartão)" : "*"}
</Label>
<Select value={accountId} onValueChange={setContaId}>
<SelectTrigger id="conta" className="w-full">

View File

@@ -44,8 +44,8 @@ import {
periodToDate,
} from "@/shared/utils/period";
import {
CategorySelectContent,
AccountCardSelectContent,
CategorySelectContent,
PayerSelectContent,
PaymentMethodSelectContent,
TransactionTypeSelectContent,
@@ -413,7 +413,7 @@ export function MassAddDialog({
{/* FinancialAccount (for non-credit-card methods) */}
{!isCartaoSelected ? (
<div className="space-y-2">
<Label htmlFor="conta">FinancialAccount</Label>
<Label htmlFor="conta">Conta</Label>
<Select value={accountId} onValueChange={setContaId}>
<SelectTrigger id="conta" className="w-full">
<SelectValue placeholder="Selecione">
@@ -534,7 +534,7 @@ export function MassAddDialog({
htmlFor={`pagador-${transaction.id}`}
className="sr-only"
>
Payer {index + 1}
Pagador {index + 1}
</Label>
<Select
value={transaction.payerId}
@@ -546,7 +546,7 @@ export function MassAddDialog({
id={`pagador-${transaction.id}`}
className="w-32 truncate"
>
<SelectValue placeholder="Payer">
<SelectValue placeholder="Pagador">
{transaction.payerId &&
(() => {
const selectedOption = payerOptions.find(
@@ -579,7 +579,7 @@ export function MassAddDialog({
htmlFor={`categoria-${transaction.id}`}
className="sr-only"
>
Category {index + 1}
Categoria {index + 1}
</Label>
<Select
value={transaction.categoryId}
@@ -591,7 +591,7 @@ export function MassAddDialog({
id={`categoria-${transaction.id}`}
className="w-32 truncate"
>
<SelectValue placeholder="Category" />
<SelectValue placeholder="Categoria" />
</SelectTrigger>
<SelectContent>
{groupedCategorias.map((group) => (

View File

@@ -5,9 +5,8 @@ import {
formatCondition,
formatDate,
formatPeriod,
getTransactionBadgeVariant,
} from "@/features/transactions/formatting-helpers";
import { Badge } from "@/shared/components/ui/badge";
import { TransactionTypeBadge } from "@/shared/components/transaction-type-badge";
import { Button } from "@/shared/components/ui/button";
import {
CardContent,
@@ -93,12 +92,12 @@ export function TransactionDetailsDialog({
</li>
<DetailRow
label={transaction.cartaoName ? "Cartão" : "FinancialAccount"}
label={transaction.cartaoName ? "Cartão" : "Conta"}
value={transaction.cartaoName ?? transaction.contaName ?? "—"}
/>
<DetailRow
label="Category"
label="Categoria"
value={transaction.categoriaName ?? "—"}
/>
@@ -106,19 +105,13 @@ export function TransactionDetailsDialog({
<span className="text-muted-foreground">
Tipo de Transação
</span>
<span className="capitalize">
<Badge
variant={getTransactionBadgeVariant(
transaction.categoriaName === "Saldo inicial"
? "Saldo inicial"
: transaction.transactionType,
)}
>
{transaction.categoriaName === "Saldo inicial"
? "Saldo Inicial"
: transaction.transactionType}
</Badge>
</span>
<TransactionTypeBadge
kind={
transaction.categoriaName === "Saldo inicial"
? "Saldo inicial"
: transaction.transactionType
}
/>
</li>
<DetailRow

View File

@@ -65,7 +65,7 @@ export function CategorySection({
showTransactionTypeField ? "md:w-1/2" : "md:w-full",
)}
>
<Label htmlFor="categoria">Category</Label>
<Label htmlFor="categoria">Categoria</Label>
<Select
value={formState.categoryId}
onValueChange={(value) => onFieldChange("categoryId", value)}

View File

@@ -36,7 +36,7 @@ export function PayerSection({
return (
<div className="flex w-full flex-col gap-2 md:flex-row">
<div className="w-full space-y-1">
<Label htmlFor="payer">Payer</Label>
<Label htmlFor="payer">Pagador</Label>
<div className="flex gap-2">
<Select
value={formState.payerId}

View File

@@ -194,7 +194,7 @@ export function PaymentMethodSection({
!isUpdateMode ? "md:w-1/2" : "md:w-full",
)}
>
<Label htmlFor="conta">FinancialAccount</Label>
<Label htmlFor="conta">Conta</Label>
<Select
value={formState.accountId}
onValueChange={(value) => onFieldChange("accountId", value)}
@@ -308,7 +308,7 @@ export function PaymentMethodSection({
!isUpdateMode ? "md:w-1/2" : "md:w-full",
)}
>
<Label htmlFor="contaUpdate">FinancialAccount</Label>
<Label htmlFor="contaUpdate">Conta</Label>
<Select
value={formState.accountId}
onValueChange={(value) => onFieldChange("accountId", value)}