Files
openmonetis/src/features/dashboard/components/goals-progress/goals-progress-widget-view.tsx
Felipe Coutinho ba05985725 refactor(dashboard): reorganizar módulos em subdiretórios e nova arquitetura de widgets
Arquivos de queries, helpers e controllers dispersos na raiz de dashboard/
foram movidos para subdiretórios temáticos (bills/, invoices/, notes/,
notifications/, overview/, payments/, goals-progress/, categories/).
~25 widgets monolíticos obsoletos removidos em favor de nova arquitetura
baseada em widget-registry com components/widgets/. Novos componentes:
category-breakdown-chart/list, goals-progress-item, percentage-change-indicator.
Imports atualizados em fetch-dashboard-data e transaction-filters limpos.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 17:51:56 +00:00

45 lines
1.1 KiB
TypeScript

import type {
Budget,
BudgetCategory,
} from "@/features/budgets/components/types";
import type {
GoalProgressItem,
GoalsProgressData,
} from "@/features/dashboard/goals-progress/goals-progress-queries";
import { GoalsProgressList } from "./goals-progress-list";
import { GoalsProgressWidgetDialogs } from "./goals-progress-widget-dialogs";
type GoalsProgressWidgetViewProps = {
data: GoalsProgressData;
selectedBudget: Budget | null;
editOpen: boolean;
categories: BudgetCategory[];
defaultPeriod: string;
onEdit: (item: GoalProgressItem) => void;
onEditOpenChange: (open: boolean) => void;
};
export function GoalsProgressWidgetView({
data,
selectedBudget,
editOpen,
categories,
defaultPeriod,
onEdit,
onEditOpenChange,
}: GoalsProgressWidgetViewProps) {
return (
<div className="flex flex-col gap-4 px-0">
<GoalsProgressList items={data.items} onEdit={onEdit} />
<GoalsProgressWidgetDialogs
selectedBudget={selectedBudget}
editOpen={editOpen}
categories={categories}
defaultPeriod={defaultPeriod}
onEditOpenChange={onEditOpenChange}
/>
</div>
);
}