mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
style(ui): refresh em badges de tipo, radio buttons e antecipação
- TransactionTypeBadge: substitui StatusDot por ícones direcionais (RiArrowRightDownLine receita, RiArrowRightUpLine despesa, RiArrowLeftRightLine transferência), adiciona borda e shadow sutil e dessaturação no dark mode; rótulo "Transferência" abreviado para "Transf." - RadioGroup: indicador trocado de RiCircleLine por RiCheckLine com fundo sólido primary no estado selecionado - Tabela de seleção de parcelas no dialog de antecipação reduzida para três colunas (estabelecimento, fatura, valor); coluna de vencimento removida e nome do estabelecimento absorve a parcela - Inter agora carrega explicitamente os pesos 500, 600 e 700 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { format } from "date-fns";
|
||||
import { ptBR } from "date-fns/locale";
|
||||
import MoneyValues from "@/shared/components/money-values";
|
||||
import { Badge } from "@/shared/components/ui/badge";
|
||||
import { Checkbox } from "@/shared/components/ui/checkbox";
|
||||
@@ -44,11 +42,6 @@ export function InstallmentSelectionTable({
|
||||
}
|
||||
};
|
||||
|
||||
const formatDate = (date: Date | null) => {
|
||||
if (!date) return "—";
|
||||
return format(date, "dd/MM/yyyy", { locale: ptBR });
|
||||
};
|
||||
|
||||
if (installments.length === 0) {
|
||||
return (
|
||||
<div className="rounded-lg border border-dashed p-8 text-center">
|
||||
@@ -63,11 +56,11 @@ export function InstallmentSelectionTable({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="overflow-hidden rounded-lg border">
|
||||
<div className="overflow-hidden">
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead className="w-12">
|
||||
<TableHead>
|
||||
<Checkbox
|
||||
checked={
|
||||
selectedIds.length === installments.length &&
|
||||
@@ -77,9 +70,8 @@ export function InstallmentSelectionTable({
|
||||
aria-label="Selecionar todas as parcelas"
|
||||
/>
|
||||
</TableHead>
|
||||
<TableHead>Parcela</TableHead>
|
||||
<TableHead>Período</TableHead>
|
||||
<TableHead>Vencimento</TableHead>
|
||||
<TableHead>Estabelecimento</TableHead>
|
||||
<TableHead>Fatura</TableHead>
|
||||
<TableHead className="text-right">Valor</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
@@ -103,6 +95,7 @@ export function InstallmentSelectionTable({
|
||||
/>
|
||||
</TableCell>
|
||||
<TableCell>
|
||||
{inst.name}{" "}
|
||||
<Badge variant="outline">
|
||||
{formatCurrentInstallment(
|
||||
inst.currentInstallment ?? 0,
|
||||
@@ -110,12 +103,11 @@ export function InstallmentSelectionTable({
|
||||
)}
|
||||
</Badge>
|
||||
</TableCell>
|
||||
|
||||
<TableCell className="font-medium">
|
||||
{formatShortPeriodLabel(inst.period)}
|
||||
</TableCell>
|
||||
<TableCell className="text-muted-foreground">
|
||||
{formatDate(inst.dueDate)}
|
||||
</TableCell>
|
||||
|
||||
<TableCell className="text-right font-medium">
|
||||
<MoneyValues amount={Number(inst.amount)} />
|
||||
</TableCell>
|
||||
|
||||
Reference in New Issue
Block a user