refactor: atualiza transacoes dashboard e relatorios

This commit is contained in:
Felipe Coutinho
2026-03-14 12:51:22 +00:00
parent 43b0f0c47e
commit 6854017a8c
89 changed files with 2785 additions and 2705 deletions

View File

@@ -55,8 +55,8 @@ interface AnticipateInstallmentsDialogProps {
type AnticipationFormValues = {
anticipationPeriod: string;
discount: string;
pagadorId: string;
categoriaId: string;
payerId: string;
categoryId: string;
note: string;
};
@@ -90,8 +90,8 @@ export function AnticipateInstallmentsDialog({
useFormState<AnticipationFormValues>({
anticipationPeriod: defaultPeriod,
discount: "0",
pagadorId: "",
categoriaId: "",
payerId: "",
categoryId: "",
note: "",
});
@@ -119,8 +119,8 @@ export function AnticipateInstallmentsDialog({
replaceForm({
anticipationPeriod: defaultPeriod,
discount: "0",
pagadorId: first.pagadorId ?? "",
categoriaId: first.categoriaId ?? "",
payerId: first.payerId ?? "",
categoryId: first.categoryId ?? "",
note: "",
});
}
@@ -182,8 +182,8 @@ export function AnticipateInstallmentsDialog({
installmentIds: selectedIds,
anticipationPeriod: formState.anticipationPeriod,
discount: Number(formState.discount) || 0,
pagadorId: formState.pagadorId || undefined,
categoriaId: formState.categoriaId || undefined,
payerId: formState.payerId || undefined,
categoryId: formState.categoryId || undefined,
note: formState.note || undefined,
});
@@ -269,11 +269,11 @@ export function AnticipateInstallmentsDialog({
</Field>
<Field className="gap-1">
<FieldLabel htmlFor="anticipation-pagador">Pagador</FieldLabel>
<FieldLabel htmlFor="anticipation-pagador">Payer</FieldLabel>
<FieldContent>
<Select
value={formState.pagadorId}
onValueChange={(value) => updateField("pagadorId", value)}
value={formState.payerId}
onValueChange={(value) => updateField("payerId", value)}
disabled={isPending}
>
<SelectTrigger id="anticipation-pagador" className="w-full">
@@ -292,12 +292,12 @@ export function AnticipateInstallmentsDialog({
<Field className="gap-1">
<FieldLabel htmlFor="anticipation-categoria">
Categoria
Category
</FieldLabel>
<FieldContent>
<Select
value={formState.categoriaId}
onValueChange={(value) => updateField("categoriaId", value)}
value={formState.categoryId}
onValueChange={(value) => updateField("categoryId", value)}
disabled={isPending}
>
<SelectTrigger

View File

@@ -29,7 +29,7 @@ interface AnticipationHistoryDialogProps {
lancamentoName: string;
open?: boolean;
onOpenChange?: (open: boolean) => void;
onViewLancamento?: (lancamentoId: string) => void;
onViewLancamento?: (transactionId: string) => void;
}
export function AnticipationHistoryDialog({