mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
Padronização de peso tipográfico em títulos, rótulos de seção, nomes de entidades e valores monetários em toda a interface. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
import MoneyValues from "@/shared/components/money-values";
|
|
import StatusDot from "@/shared/components/status-dot";
|
|
import { Progress } from "@/shared/components/ui/progress";
|
|
|
|
type PaymentStatusCategorySectionProps = {
|
|
title: string;
|
|
total: number;
|
|
confirmed: number;
|
|
pending: number;
|
|
};
|
|
|
|
export function PaymentStatusCategorySection({
|
|
title,
|
|
total,
|
|
confirmed,
|
|
pending,
|
|
}: PaymentStatusCategorySectionProps) {
|
|
const absTotal = Math.abs(total);
|
|
const absConfirmed = Math.abs(confirmed);
|
|
const confirmedPercentage =
|
|
absTotal > 0 ? (absConfirmed / absTotal) * 100 : 0;
|
|
|
|
return (
|
|
<div className="mt-4 space-y-3">
|
|
<div className="flex items-center justify-between">
|
|
<span className="text-sm font-medium text-foreground">{title}</span>
|
|
<MoneyValues amount={total} className="font-medium" />
|
|
</div>
|
|
|
|
<Progress value={confirmedPercentage} className="h-2" />
|
|
|
|
<div className="flex flex-col gap-1 text-sm sm:flex-row sm:items-center sm:justify-between sm:gap-4">
|
|
<div className="flex items-center gap-1.5">
|
|
<StatusDot color="bg-primary" />
|
|
<MoneyValues amount={confirmed} className="font-medium" />
|
|
<span className="text-xs text-muted-foreground">confirmados</span>
|
|
</div>
|
|
|
|
<div className="flex items-center gap-1.5">
|
|
<StatusDot color="bg-warning/40" />
|
|
<MoneyValues amount={pending} className="font-medium" />
|
|
<span className="text-xs text-muted-foreground">pendentes</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|