mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +00:00
Lançamentos parcelados com o mesmo seriesId agora são consolidados em um único evento do tipo 'installment' no calendário, exibindo 'Nx de R$ X' em vez de repetir o mesmo item N vezes. Legenda e modal de detalhes atualizados para refletir o novo tipo. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
841 B
TypeScript
34 lines
841 B
TypeScript
"use client";
|
|
|
|
import { EVENT_TYPE_STYLES } from "@/features/calendar/components/day-cell";
|
|
import { cn } from "@/shared/utils/ui";
|
|
|
|
const LEGEND_ITEMS = [
|
|
{ label: "Lançamentos", ...EVENT_TYPE_STYLES.transaction },
|
|
{ label: "Parcelas", ...EVENT_TYPE_STYLES.installment },
|
|
{ label: "Boletos", ...EVENT_TYPE_STYLES.boleto },
|
|
{ label: "Fatura de Cartão", ...EVENT_TYPE_STYLES.card },
|
|
];
|
|
|
|
export function CalendarLegend() {
|
|
return (
|
|
<ul className="flex items-center justify-start gap-2 px-1">
|
|
{LEGEND_ITEMS.map((item) => (
|
|
<li
|
|
key={item.label}
|
|
className={cn(
|
|
"flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium",
|
|
item.wrapper,
|
|
)}
|
|
>
|
|
<span
|
|
className={cn("size-1.5 shrink-0 rounded-full", item.dot)}
|
|
aria-hidden
|
|
/>
|
|
{item.label}
|
|
</li>
|
|
))}
|
|
</ul>
|
|
);
|
|
}
|